Author: scabanovich
Date: 2012-01-26 14:22:53 -0500 (Thu, 26 Jan 2012)
New Revision: 38214
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.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/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2012-01-26
19:20:49 UTC (rev 38213)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2012-01-26
19:22:53 UTC (rev 38214)
@@ -16,14 +16,14 @@
import org.jboss.tools.common.meta.XChild;
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.meta.XModelMetaData;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
import org.jboss.tools.common.model.ui.forms.*;
import org.jboss.tools.seam.xml.components.model.SeamComponentConstants;
public class SeamComponentsFileFormLayoutData implements SeamComponentConstants {
static IFormData createSeamComponentListDefinition(String parentEntity) {
- XModelMetaData meta = PreferenceModelUtilities.getPreferenceModel().getMetaData();
+ XModelMetaData meta = XModelMetaDataImpl.getInstance();
XModelEntity entity = meta.getEntity(parentEntity);
List<String> childEntities = new ArrayList<String>();
if(entity != null) {
@@ -39,7 +39,7 @@
IFormData result = new FormData(
"Components", //$NON-NLS-1$
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
- new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new
FormAttributeData(ATTR_CLASS, 60)}, //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new
FormAttributeData(ATTR_CLASS, 60)},
childEntities.toArray(new String[0]),
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent")
//$NON-NLS-1$
);