Author: scabanovich
Date: 2012-01-26 14:11:14 -0500 (Thu, 26 Jan 2012)
New Revision: 38211
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormLayoutDataUtil.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Do not create instance of preference XModel when it is not necessary .
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormLayoutDataUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormLayoutDataUtil.java 2012-01-26
18:19:04 UTC (rev 38210)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormLayoutDataUtil.java 2012-01-26
19:11:14 UTC (rev 38211)
@@ -16,6 +16,7 @@
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.meta.XChild;
import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.forms.FormActionData;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
@@ -69,7 +70,7 @@
}
public static String[] getChildEntitiesWithAttribute(String entityName, String
attributeName) {
- XModelEntity entity =
PreferenceModelUtilities.getPreferenceModel().getMetaData().getEntity(entityName);
+ XModelEntity entity = XModelMetaDataImpl.getInstance().getEntity(entityName);
if(entity == null) return new String[0];
List<String> list = new ArrayList<String>();
XChild[] cs = entity.getChildren();