Author: scabanovich
Date: 2011-07-29 16:18:32 -0400 (Fri, 29 Jul 2011)
New Revision: 33366
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java
Log:
FileSystemsHelper.getFile(object) method used.
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java 2011-07-29
20:15:54 UTC (rev 33365)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java 2011-07-29
20:18:32 UTC (rev 33366)
@@ -62,6 +62,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.forms.DefaultFormFactory;
import org.jboss.tools.common.model.ui.forms.FormFactory;
@@ -326,11 +327,10 @@
}
private String getErrors() {
- XModelObject f = installedObject;
- while(f != null && f.getFileType() != XModelObject.FILE) {
- f = f.getParent();
+ XModelObject f = FileSystemsHelper.getFile(installedObject);
+ if(f == null) {
+ f = installedObject;
}
- if(f == null) f = installedObject;
return f.get("errors"); //$NON-NLS-1$
}
Show replies by date