19 package com.generalrobotix.ui.item;
22 import java.lang.reflect.InvocationTargetException;
26 import javax.xml.parsers.DocumentBuilder;
27 import javax.xml.parsers.DocumentBuilderFactory;
28 import javax.xml.parsers.ParserConfigurationException;
29 import javax.xml.transform.OutputKeys;
30 import javax.xml.transform.Transformer;
31 import javax.xml.transform.TransformerConfigurationException;
32 import javax.xml.transform.TransformerException;
33 import javax.xml.transform.TransformerFactory;
34 import javax.xml.transform.dom.DOMSource;
35 import javax.xml.transform.stream.StreamResult;
37 import org.eclipse.core.runtime.IProgressMonitor;
38 import org.eclipse.jface.action.Action;
39 import org.eclipse.jface.dialogs.InputDialog;
40 import org.eclipse.jface.dialogs.MessageDialog;
41 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
42 import org.eclipse.jface.operation.IRunnableWithProgress;
43 import org.eclipse.jface.preference.IPreferenceStore;
44 import org.eclipse.osgi.util.NLS;
45 import org.eclipse.swt.SWT;
46 import org.eclipse.swt.widgets.FileDialog;
47 import org.eclipse.ui.IPerspectiveDescriptor;
48 import org.eclipse.ui.IPerspectiveRegistry;
49 import org.eclipse.ui.IWorkbench;
50 import org.eclipse.ui.IWorkbenchPage;
51 import org.eclipse.ui.IWorkbenchWindow;
52 import org.eclipse.ui.PlatformUI;
53 import org.w3c.dom.Document;
54 import org.w3c.dom.Element;
55 import org.w3c.dom.Node;
56 import org.w3c.dom.NodeList;
57 import org.xml.sax.InputSource;
58 import org.xml.sax.SAXException;
73 @SuppressWarnings({
"unchecked",
"serial" })
75 public static final String TITLE =
"Project";
76 public static final String DEFAULT_DIR =
"/";
77 public static final String FILE_EXTENSION =
"xml";
79 public static final int MENU_CREATE=0, MENU_RESTORE=1, MENU_LOAD=2, MENU_SAVE=3, MENU_SAVE_AS=4, MENU_IMPORT=5;
82 private static final String MODE_TAG =
"mode";
83 private static final String WINCONF_TAG =
"perspective";
88 private HashMap<String, Properties> viewProperties_ =
new HashMap<String, Properties>();
90 private Map<String, ModeNodeInfo> modeInfoMap_ =
new HashMap<String, ModeNodeInfo>();
101 super(name, manager);
103 DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
104 TransformerFactory tffactory = TransformerFactory.newInstance();
107 builder_ = dbfactory.newDocumentBuilder();
108 transformer_ = tffactory.newTransformer();
109 transformer_.setOutputProperty(OutputKeys.INDENT,
"yes");
110 transformer_.setOutputProperty(OutputKeys.METHOD,
"xml");
111 setDefaultDirectory();
112 }
catch (ParserConfigurationException e) {
114 }
catch (TransformerConfigurationException e) {
120 viewProperties_.clear();
123 for (
int i=0; ;
i++) {
124 File f =
new File(getDefaultDir().getAbsolutePath()+
"/"+
"newproject"+
i+
".xml");
126 setName(f.getName().split(
"[.]")[0]);
131 doc_ = builder_.newDocument();
132 element_ = doc_.createElement(
"grxui");
133 element_.appendChild(doc_.createTextNode(
"\n"));
134 doc_.appendChild(element_);
136 IWorkbenchPage page=
null;
137 IWorkbench workbench = PlatformUI.getWorkbench();
138 if( workbench !=
null){
139 IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
140 for(IWorkbenchWindow window : windows){
141 page = window.getActivePage();
144 page.closePerspective(page.getPerspective(),
false,
false);
148 List<GrxBaseView> vl = manager_.getViewList();
149 for (
int i=0;
i<vl.size();
i++)
150 if (vl.get(
i) !=
null) vl.get(
i).restoreProperties();
156 modeInfoMap_.clear();
158 NodeList modeList = doc_.getElementsByTagName(MODE_TAG);
159 for (
int i=0;
i<modeList.getLength();
i++) {
161 mi.root = (Element)modeList.item(
i);
162 modeInfoMap_.put(mi.root.getAttribute(
"name"), mi);
165 NodeList propList = mi.root.getElementsByTagName(PROPERTY_TAG);
166 List<Element> elList =
new ArrayList<Element>();
167 for (
int j=0; j<propList.getLength(); j++) {
168 if (propList.item(j).getParentNode() == mi.root)
169 elList.add((Element)propList.item(j));
171 mi.propList = elList;
174 mi.itemList = mi.root.getElementsByTagName(ITEM_TAG);
177 mi.viewList = mi.root.getElementsByTagName(VIEW_TAG);
180 NodeList wconfList = mi.root.getElementsByTagName(WINCONF_TAG);
181 if (wconfList.getLength() > 0)
182 mi.windowConfig = (Element)wconfList.item(0);
184 mi.windowConfig =
null;
194 NodeList nodeList = doc_.getElementsByTagName(MODE_TAG);
195 for (
int i=0;
i<nodeList.getLength();
i++) {
196 Element e = (Element)nodeList.item(
i);
197 if (e.getAttribute(
"name").equals(mode)) {
202 if (mi.root ==
null) {
203 mi.root = doc_.createElement(MODE_TAG);
204 mi.root.setAttribute(
"name", mode);
205 element_.appendChild(doc_.createTextNode(INDENT4));
206 element_.appendChild(mi.root);
207 element_.appendChild(doc_.createTextNode(
"\n"));
217 _getModeNodeInfo(mode).windowConfig = element;
221 return _getModeNodeInfo(mode).windowConfig;
225 Element modeEl = _getModeNodeInfo(mode).root;
226 NodeList list = modeEl.getChildNodes();
227 for (
int i=list.getLength()-1;
i>=0;
i--)
228 modeEl.removeChild(list.item(
i));
230 modeEl.appendChild(doc_.createTextNode(
"\n"));
232 List<GrxBaseItem> itemList = manager_.getActiveItemList();
233 for (
int i=0;
i<itemList.size();
i++) {
235 modeEl.appendChild(doc_.createTextNode(INDENT4+INDENT4));
238 modeEl.appendChild(doc_.createTextNode(
"\n"));
241 List<GrxBaseView> viewList = manager_.getActiveViewList();
242 for (
int i=0;
i<viewList.size();
i++) {
244 if (view.propertyNames().hasMoreElements()) {
248 modeEl.appendChild(doc_.createTextNode(INDENT4+INDENT4));
249 modeEl.appendChild(element);
250 modeEl.appendChild(doc_.createTextNode(
"\n"));
255 modeEl.appendChild(doc_.createTextNode(INDENT4));
258 @SuppressWarnings(
"deprecation")
259 private Element storePerspectiveConf(Element element){
260 IWorkbenchPage page=
null;
261 IWorkbench workbench = PlatformUI.getWorkbench();
262 if( workbench !=
null){
263 IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
265 page = window.getActivePage();
272 IPerspectiveRegistry perspectiveRegistry=workbench.getPerspectiveRegistry();
276 perspectiveRegistry.deletePerspective(tempPd);
278 page.savePerspectiveAs(tempPd);
279 page.setPerspective(orgPd);
280 page.setPerspective(tempPd);
281 IPreferenceStore store = workbench.getPreferenceStore();
285 doc = builder_.parse(
new InputSource(
new StringReader(confString)));
286 Element confElement =doc.getDocumentElement();
287 Node elementCopy = doc_.importNode(confElement,
true);
288 element.appendChild(elementCopy);
289 return (Element) elementCopy;
290 }
catch (SAXException e1) {
291 e1.printStackTrace();
292 }
catch (IOException e1) {
293 e1.printStackTrace();
301 menu_ =
new Vector<Action>();
304 menu_.add(
new Action(){
307 boolean ans = MessageDialog.openConfirm(
null,
MessageBundle.
get(
"GrxProjectItem.dialog.title.createProject"),
MessageBundle.
get(
"GrxProjectItem.dialog.message.createProject") );
309 if(!checkModifiedModel())
311 manager_.refuseItemChange();
312 manager_.removeAllItems();
313 manager_.acceptItemChange();
314 }
else if ( ans ==
false )
320 menu_.add(
new Action(){
323 manager_.refuseItemChange();
324 manager_.removeAllItems();
326 manager_.acceptItemChange();
330 menu_.add(
new Action(){
333 if(!checkModifiedModel())
339 menu_.add(
new Action(){
346 menu_.add(
new Action(){
361 menu_.add(
new Action(){
376 List<GrxModelItem> modifiedModels =
new ArrayList<GrxModelItem>();
377 for (
int i=0;
i<modelList.size();
i++) {
382 modifiedModel.reload();
386 modifiedModels.add(model);
398 String mode = manager_.getCurrentModeName();
401 setName(f.getName().split(
"[.]")[0]);
402 setURL(f.getAbsolutePath());
404 if (MessageDialog.openQuestion(
null,
MessageBundle.
get(
"GrxProjectItem.dialog.savewindow.title"),
406 Element element = _getModeNodeInfo(mode).root;
407 Element windowConfigElement = storePerspectiveConf(element);
408 setWindowConfigElement(mode, windowConfigElement);
412 f =
new File(getDefaultDir().getAbsolutePath()+
"/"+getName()+
".xml");
414 if (!f.getAbsolutePath().endsWith(
".xml"))
415 f =
new File(f.getAbsolutePath()+
".xml");
418 DOMSource src =
new DOMSource();
420 StreamResult target =
new StreamResult();
421 target.setOutputStream(
new FileOutputStream(f));
422 transformer_.transform(src, target);
424 }
catch (TransformerConfigurationException e) {
426 }
catch (FileNotFoundException e) {
428 }
catch (TransformerException e) {
435 String
path = getURL(
true);
437 path = getDefaultDir().getAbsolutePath()+
"/"+getName()+
".xml";
442 String[] exts = {
"*.xml" }, extNames={
"GrxUI Project"};
443 fdlg.setFilterExtensions( exts );
444 fdlg.setFilterNames( extNames );
446 fdlg.setFilterPath( initialFile.getParent() );
447 fdlg.setFileName( initialFile.getName() );
449 String fPath = fdlg.open();
450 if( fPath !=
null ) {
452 if (f.exists() && f.isFile()){
453 boolean ans = MessageDialog.openConfirm(
null,
MessageBundle.
get(
"GrxProjectItem.dialog.title.saveProject"),
459 System.setProperty(
"CURRENT_DIR", f.getParent());
461 setDefaultDirectory(f.getParent());
466 if (getURL(
true) ==
null){
483 String[] fe = {
"*.xml" };
484 fdlg.setFilterExtensions( fe );
485 fdlg.setFilterPath(getDefaultDir().getAbsolutePath());
487 String fPath = fdlg.open();
488 if( fPath !=
null ) {
500 System.out.println(
"[ProjectItem]@load ProjectFile load "+ f.toString());
502 if (f ==
null || !f.isFile())
508 manager_.refuseItemChange();
509 manager_.removeAllItems();
510 manager_.focusedItem(manager_.getProject());
511 setName(f.getName().split(
"[.]")[0]);
513 String dir = f.getParent();
515 System.setProperty(
"CURRENT_DIR", dir);
518 doc_ = builder_.parse(f);
519 element_ = doc_.getDocumentElement();
522 setURL(f.getAbsolutePath());
523 }
catch (Exception e) {
531 Iterator<GrxModeInfoItem> it = modes.
values().iterator();
532 NodeList list = doc_.getElementsByTagName(MODE_TAG);
533 for (
int i=0;
i<list.getLength();
i++) {
534 Element modeEl = (Element) list.item(
i);
535 String modeName = modeEl.getAttribute(
"name");
536 if (modeName ==
null)
539 while (it.hasNext()) {
541 if(modeName.equals(mode.
getName())){
552 manager_.setSelectedItem(item,
true);
555 manager_.setCurrentMode(item);
559 setDefaultDirectory(f.getParent());
561 manager_.acceptItemChange();
567 String mode = manager_.getCurrentModeName();
568 System.out.println(
"Restore Project (Mode:" +mode+
")");
570 IRunnableWithProgress runnableProgress =
new IRunnableWithProgress() {
571 public void run(IProgressMonitor monitor)
throws InterruptedException {
572 String mode = manager_.getCurrentModeName();
573 monitor.beginTask(
"Restore Project (Mode:" +mode+
")", 10 );
574 restoreProject_work(mode, monitor);
580 progressMonitorDlg.run(
false,
false, runnableProgress);
586 }
catch (InvocationTargetException e) {
588 }
catch (InterruptedException e) {
598 if (file_ ==
null || !file_.isFile())
606 List propList = minfo.propList;
607 if (propList !=
null) {
608 for (
int i=0;
i<propList.size();
i++) {
609 Element propEl = (Element)propList.get(
i);
610 String key = propEl.getAttribute(
"name");
611 String
val = propEl.getAttribute(
"value");
612 setProperty(key, val);
618 if (minfo.itemList !=
null) {
622 if(mode.equals(
"Simulation") && !containSimulationItem(minfo.itemList)){
623 Element simElement = doc_.createElement(ITEM_TAG);
625 simElement.setAttribute(
"name",
"simulationItem");
626 simElement.setAttribute(
"select",
"true");
627 minfo.root.appendChild(simElement);
628 minfo.itemList = minfo.root.getElementsByTagName(ITEM_TAG);
629 for (
int i=0;
i<minfo.itemList.getLength();
i++) {
630 Element itemElement = (Element)minfo.itemList.item(
i);
632 NodeList props = itemElement.getElementsByTagName(PROPERTY_TAG);
633 for (
int j = 0; j < props.getLength(); ) {
634 Element propEl = (Element) props.item(j);
635 String key = propEl.getAttribute(
"name");
636 String
val = propEl.getAttribute(
"value");
637 if(!key.equals(
"logTimeStep")){
638 Element element = doc_.createElement(PROPERTY_TAG);
639 element.setAttribute(
"name", key);
640 element.setAttribute(
"value", val);
641 simElement.appendChild(element);
642 itemElement.removeChild(propEl);
650 List<GrxBaseItem> il =
new ArrayList<GrxBaseItem>();
651 for (
int i = 0;
i < minfo.itemList.getLength();
i++) {
658 for (
int i=0;
i<il.size();
i++) {
667 if (minfo.windowConfig !=
null) {
668 Document doc = builder_.newDocument();
669 Node nodeCopy = doc.importNode(minfo.windowConfig,
true);
670 doc.appendChild(nodeCopy);
671 StringWriter sw =
new StringWriter();
673 DOMSource src =
new DOMSource();
675 StreamResult target =
new StreamResult(sw);
676 transformer_.transform(src, target);
677 }
catch (TransformerConfigurationException e) {
679 }
catch (TransformerException e) {
683 IWorkbenchPage page=
null;
684 IWorkbench workbench = PlatformUI.getWorkbench();
685 if( workbench !=
null){
686 IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
688 page = window.getActivePage();
695 page.closePerspective(page.getPerspective(),
false,
false);
696 IPreferenceStore store = workbench.getPreferenceStore();
697 IPerspectiveRegistry perspectiveRegistry=workbench.getPerspectiveRegistry();
701 perspectiveRegistry.deletePerspective(tempPd);
705 page.setPerspective(tempPd);
707 IWorkbench workbench = PlatformUI.getWorkbench();
708 if( workbench !=
null){
709 IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
710 for(IWorkbenchWindow window : windows){
711 IWorkbenchPage page = window.getActivePage();
714 page.closePerspective(page.getPerspective(),
false,
false);
719 viewProperties_.clear();
720 if (minfo.viewList !=
null) {
721 for (
int i = 0;
i < minfo.viewList.getLength();
i++){
722 Element element = (Element)minfo.viewList.item(
i);
723 NodeList props = element.getElementsByTagName(PROPERTY_TAG);
725 for (
int j = 0; j < props.getLength(); j++) {
726 Element propEl = (Element) props.item(j);
727 String key = propEl.getAttribute(
"name");
728 String
val = propEl.getAttribute(
"value");
729 properties.setProperty(key, val);
731 viewProperties_.put(element.getAttribute(
"name"), properties);
735 List<GrxBaseView> vl = manager_.getViewList();
736 for (
int i=0;
i<vl.size();
i++)
737 if (vl.get(
i) !=
null) vl.get(
i).restoreProperties();
742 String iname = e.getAttribute(
"name");
743 if (iname ==
null || iname.length() == 0)
746 Class cls = manager_.registerPlugin(e.getAttribute(
"class"));
749 manager_.getMode().addItemClassList(cls);
753 Class<? extends GrxBaseItem> icls = (Class<? extends GrxBaseItem>) cls;
754 String url = e.getAttribute(
"url");
756 plugin = manager_.loadItem(icls, iname, url);
758 plugin = manager_.createItem(icls, iname);
759 plugin = manager_.getItem(icls, iname);
762 if (plugin !=
null) {
767 manager_.setSelectedItem((
GrxBaseItem)plugin,
true);
775 for (
int i = 0;
i < list.getLength();
i++) {
782 private static final File DEFAULT_ISE_PROJECT_DIR =
new File(
"../ISE/Projects");
785 FileDialog fDialog =
new FileDialog(
null,SWT.SAVE);
787 String [] exts = {
"*.prj"};
788 String [] filterNames = {
"ISE Project File(*.prj)"};
789 fDialog.setFilterExtensions(exts);
790 fDialog.setFilterNames(filterNames);
791 if( DEFAULT_ISE_PROJECT_DIR !=
null )
792 fDialog.setFilterPath( DEFAULT_ISE_PROJECT_DIR.getPath() );
794 String openPath = fDialog.open();
796 if( openPath !=
null ) {
804 setName(f.getName().split(
".prj")[0]);
808 storeMode(manager_.getCurrentModeName());
816 return viewProperties_.get(viewName);
819 private static String ENVIRONMENT_NODE =
"jp.go.aist.hrp.simulator.EnvironmentNode";
820 private static String ROBOT_NODE =
"jp.go.aist.hrp.simulator.RobotNode";
821 private static String COLLISIONPAIR_NODE =
"jp.go.aist.hrp.simulator.CollisionPairNode";
822 private static String GRAPH_NODE =
"jp.go.aist.hrp.simulator.GraphNode";
824 private static String WORLD_STATE_ITEM =
"com.generalrobotix.ui.item.GrxWorldStateItem";
825 private static String MODEL_ITEM =
"com.generalrobotix.ui.item.GrxModelItem";
826 private static String COLLISIONPAIR_ITEM =
"com.generalrobotix.ui.item.GrxCollisionPairItem";
827 private static String GRAPH_ITEM =
"com.generalrobotix.ui.item.GrxGraphItem";
830 manager_.removeAllItems();
835 }
catch (FileNotFoundException e) {
837 }
catch (IOException e) {
843 setProperty(
"nsPort", nsPort.toString());
845 String pname = prop.
getStr(
"Project.name",
"");
846 Class cls = manager_.registerPlugin(WORLD_STATE_ITEM);
847 GrxBaseItem newItem = manager_.createItem((Class <? extends GrxBaseItem>)cls, pname);
848 newItem.
setDbl(
"totalTime", prop.
getDbl(
"Project.totalTime", 20.0));
849 newItem.
setDbl(
"timeStep", prop.
getDbl(
"Project.timeStep", 0.001));
850 newItem.
setDbl(
"logTimeStep", prop.
getDbl(
"Project.timeStep", 0.001));
853 manager_.setSelectedItem(newItem,
true);
855 for (
int i = 0;
i < prop.
getInt(
"Project.num_object", 0);
i++) {
856 String header =
"Object" +
i +
".";
857 String oName = prop.
getStr(header +
"name");
858 String cName = prop.
getStr(header +
"class");
862 if (cName.equals(ENVIRONMENT_NODE) || cName.equals(ROBOT_NODE)) {
863 cls = manager_.registerPlugin(MODEL_ITEM);
865 URL url =
new URL(prop.
getStr(header +
"url"));
866 newItem = manager_.loadItem((Class<? extends GrxBaseItem>)cls, oName, url.getPath());
869 manager_.setSelectedItem(newItem,
true);
871 }
catch (Exception e) {
877 if (cName.equals(ENVIRONMENT_NODE)) {
879 }
else if (cName.equals(ROBOT_NODE)) {
881 Enumeration e = prop.keys();
882 while (e.hasMoreElements()) {
883 String key = (String)e.nextElement();
884 if (key.startsWith(header)) {
885 String newKey = key.substring(header.length());
886 if (key.endsWith(
".angle")) {
888 }
else if (key.endsWith(
".mode")) {
890 }
else if (key.endsWith(
".translation")) {
892 prop.
getDblAry(key,
new double[]{0.0, 0.0, 0.0}));
893 }
else if (key.endsWith(
".rotation")) {
895 prop.
getDblAry(key,
new double[]{0.0, 1.0, 0.0, 0.0}));
900 String controller = prop.
getStr(header +
"controller");
901 controller = controller.replaceFirst(
"openhrp.",
"");
902 double controlTime = prop.
getDbl(header +
"controlTime", 0.001);
904 newItem.
setProperty(
"controlTime", String.valueOf(controlTime));
906 String imageProcessor = prop.
getStr(header +
"imageProcessor");
907 if (imageProcessor !=
null) {
908 double imageProcessTime = prop.
getDbl(header +
"imageProcessTime", 0.001);
909 newItem.
setProperty(
"imageProcessor", imageProcessor);
910 newItem.
setProperty(
"imageProcessTime", String.valueOf(imageProcessTime));
914 }
else if (cName.equals(COLLISIONPAIR_NODE)) {
915 cls = manager_.registerPlugin(COLLISIONPAIR_ITEM);
916 newItem = manager_.createItem((Class<? extends GrxBaseItem>)cls, oName);
921 newItem.
setProperty(
"slidingFriction", prop.
getStr(header +
"slidingFriction",
"0.5"));
922 newItem.
setProperty(
"staticFriction", prop.
getStr(header +
"staticFriction",
"0.5"));
923 newItem.
setProperty(
"cullingThresh", prop.
getStr(header +
"cullingThresh",
"0.01"));
925 newItem.
setProperty(
"sprintDamperModel", prop.
getStr(header +
"springDamplerModel",
"false"));
926 newItem.
setProperty(
"springConstant", prop.
getStr(header +
"springConstant",
"0.0 0.0 0.0 0.0 0.0 0.0"));
927 newItem.
setProperty(
"damperConstant", prop.
getStr(header +
"damperConstant",
"0.0 0.0 0.0 0.0 0.0 0.0"));
929 }
else if (cName.equals(GRAPH_NODE)) {
930 cls = manager_.registerPlugin(GRAPH_ITEM);
931 newItem = manager_.getItem((Class<? extends GrxBaseItem>)cls,
null);
933 newItem = manager_.createItem((Class<? extends GrxBaseItem>)cls,
"GraphList1");
934 String items = prop.
getStr(header +
"dataItems");
936 String[] str = items.split(
",");
938 "object",
"node",
"attr",
"index",
939 "numSibling",
"legend",
"color" 941 for (
int j = 0; j < str.length; j++) {
942 for (
int k = 0; k < p.length; k++) {
943 String key = str[j] +
"." + p[k];
951 manager_.setSelectedItem(newItem,
true);
959 dir = System.getenv(
"PROJECT_DIR");
961 setDefaultDirectory( dir );
968 if(dialog.open()==InputDialog.OK){
970 manager_.addPlugin(values[0], values[1]);
static final int MODIFIED_OK
static final String get(String key)
final Integer getInt(String key, Integer defaultVal)
get integer value associated to key
void clear(CorbaSequence &seq)
final double [] getDblAry(String key, double[] defaultVal)
get double array associated to key
void restoreProject_work(String mode, IProgressMonitor monitor)
#define null
our own NULL pointer
Element storeProperties()
store properties
static final String SIMULATIONITEM
boolean checkModifiedModel()
static final int MODIFIED_NG
png_infop png_charpp name
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
item corresponds to a robot model
static final int ADD_ITEM
void importISEProject(File f)
Element getWindowConfigElement(String mode)
static String nsHost()
get hostname where naming server is running
Element storeProperties()
final void setDbl(String key, double value)
associate double value to key
void setWindowConfigElement(String mode, Element element)
static void printErr(String s)
static Shell getCurrentShell()
static Activator getDefault()
Element getElement()
get element
void setDocument(Document doc)
set document
void storeMode(String mode)
GrxBasePlugin _restorePlugin(Element e)
static String expandEnvVal(String str)
GrxProjectItem(String name, GrxPluginManager manager)
Object setProperty(String key, String value)
set property value associated with a keyword
boolean containSimulationItem(NodeList list)
boolean load(File f)
load a project file
void load()
load a project
ModeNodeInfo _getModeNodeInfo(String mode)
final Double getDbl(String key, Double defaultVal)
get double value associated to key
final String getStr(String key)
get value associated to keyword
static int nsPort()
get port number where naming server is listening
void setDefaultDirectory()
プラグイン管理クラス GrxUIの核になるクラス。プラグインのロード等の、初期化を実行する。 プラグインとそ...
void setElement(Element element)
set element
static final String WORLDSTATEITEM
def getText(self, nodes=None)
final String getName()
get name
void restoreProperties()
restore properties. Called by menu item "restore Properties"
int checkModifiedModel(boolean reload)
Properties getViewProperties(String viewName)
static BodyCustomizerHandle create(BodyHandle bodyHandle, const char *modelName)
final void setDblAry(String key, double[] value, int digits)
associate double array to key
static Boolean getBoolean(String[] path, String atr, boolean defaultValue)
Vector< Action > getMenu()