Author: scabanovich
Date: 2012-01-26 14:20:49 -0500 (Thu, 26 Jan 2012)
New Revision: 38213
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/Hibernate3FormLayoutDataUtil.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/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/Hibernate3FormLayoutDataUtil.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/Hibernate3FormLayoutDataUtil.java 2012-01-26
19:19:27 UTC (rev 38212)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/Hibernate3FormLayoutDataUtil.java 2012-01-26
19:20:49 UTC (rev 38213)
@@ -16,7 +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.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
import org.jboss.tools.common.model.ui.attribute.editor.TableStructuredEditor;
import org.jboss.tools.common.model.ui.forms.FormActionData;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
@@ -62,7 +62,7 @@
* @return
*/
public static IFormAttributeData[] createFormAttributeData(String entityName, String
categoryName) {
- XModelEntity entity =
PreferenceModelUtilities.getPreferenceModel().getMetaData().getEntity(entityName);
+ XModelEntity entity = XModelMetaDataImpl.getInstance().getEntity(entityName);
if(entity == null) return new IFormAttributeData[0];
List<FormAttributeData> list = new ArrayList<FormAttributeData>();
XAttribute[] as = entity.getAttributes();
@@ -90,7 +90,7 @@
* @return
*/
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();