[MOBY-guts] biomoby commit
Dmitry Repchevski
drepchevski at dev.open-bio.org
Tue Aug 31 15:23:00 UTC 2010
drepchevski
Tue Aug 31 11:23:00 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/central/gui/model
In directory dev.open-bio.org:/tmp/cvs-serv27533/model
Modified Files:
DataTypesTreeModel.java
Log Message:
minor visual fix in MobyGenerator
moby-live/Java/src/main/org/inb/biomoby/central/gui/model DataTypesTreeModel.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/central/gui/model/DataTypesTreeModel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/central/gui/model/DataTypesTreeModel.java 2009/12/17 11:40:49 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/central/gui/model/DataTypesTreeModel.java 2010/08/31 15:23:00 1.2
@@ -36,7 +36,8 @@
public DataTypesTreeModel()
{
- super(new DefaultMutableTreeNode(new ObjectType("Object")));
+ //super(new DefaultMutableTreeNode(new ObjectType("Object")));
+ super(new DefaultMutableTreeNode());
orphans = new LinkedList<ObjectType>();
}
@@ -274,12 +275,12 @@
String name = element.getName();
DefaultMutableTreeNode raiz = getRoot();
- ObjectType object = (ObjectType)raiz.getUserObject();
-
- if (name.equals(object.getName()))
- {
- return raiz;
- }
+// ObjectType object = (ObjectType)raiz.getUserObject();
+//
+// if (name.equals(object.getName()))
+// {
+// return raiz;
+// }
Enumeration nodes = raiz.depthFirstEnumeration();
@@ -289,7 +290,7 @@
ObjectType objectType = (ObjectType)node.getUserObject();
- if (name.equals(objectType.getName()))
+ if (objectType != null && name.equals(objectType.getName()))
{
return node;
}
@@ -320,6 +321,15 @@
return new ObjectType("Object");
}
+ DefaultMutableTreeNode raiz = getRoot();
+
+ if (raiz.getUserObject() == null)
+ {
+ raiz.setUserObject(element);
+
+ checkOrphans(raiz);
+ }
+
return null;
}
More information about the MOBY-guts
mailing list