Author: scabanovich
Date: 2011-07-29 15:21:14 -0400 (Fri, 29 Jul 2011)
New Revision: 33362
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
Log:
JBIDE-9408
https://issues.jboss.org/browse/JBIDE-9408
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java 2011-07-29
19:20:21 UTC (rev 33361)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java 2011-07-29
19:21:14 UTC (rev 33362)
@@ -45,4 +45,11 @@
return object == null ? null : getLibs(object.getModel());
}
+ public static XModelObject getFile(XModelObject o) {
+ while(o != null && o.getFileType() != XModelObject.FILE) {
+ o = o.getParent();
+ }
+ return o;
+ }
+
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2011-07-29
19:20:21 UTC (rev 33361)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2011-07-29
19:21:14 UTC (rev 33362)
@@ -45,6 +45,7 @@
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.filesystems.impl.AbstractExtendedXMLFileImpl;
import org.jboss.tools.common.model.filesystems.impl.FileSystemImpl;
import org.jboss.tools.common.model.filesystems.impl.FileSystemPeer;
import org.jboss.tools.common.model.loaders.EntityRecognizer;
@@ -360,7 +361,11 @@
if(edit) {
((XModelObjectImpl)object).onAttributeValueEdit(attributeName, ov, nv);
}
-//// ent.getAttribute(attributeName).valueChanged(object);
+ XModelObject f = FileSystemsHelper.getFile(object);
+ if(f instanceof AbstractExtendedXMLFileImpl) {
+ ((AbstractExtendedXMLFileImpl)f).check();
+ }
+// ent.getAttribute(attributeName).valueChanged(object);
}
private boolean isDifferent(String v1, String v2) {