Author: scabanovich
Date: 2012-01-26 16:32:14 -0500 (Thu, 26 Jan 2012)
New Revision: 38228
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Do not create instance of preference XModel when it is not necessary . Use
XModelFactory.getDefaultInstance() when XModel instance is required.
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2012-01-26
21:22:13 UTC (rev 38227)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2012-01-26
21:32:14 UTC (rev 38228)
@@ -67,8 +67,8 @@
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.action.CommandBar;
import org.jboss.tools.common.model.ui.action.XMenuInvoker;
@@ -86,7 +86,7 @@
static final String ATTR_VALUE = "value"; //$NON-NLS-1$
static final String ATTR_ENABLED = "enabled"; //$NON-NLS-1$
- XModelObject property =
PreferenceModelUtilities.getPreferenceModel().createModelObject(ENT_PROPERTY, null);
+ XModelObject property =
XModelFactory.getDefaultInstance().createModelObject(ENT_PROPERTY, null);
XAttributeSupport nsupport = new XAttributeSupport(property, XEntityDataImpl.create(new
String[][]{
{ENT_PROPERTY, "yes"}, //$NON-NLS-1$
{ATTR_NAME, "no"}, //$NON-NLS-1$