Author: snjeza
Date: 2008-03-31 17:49:22 -0400 (Mon, 31 Mar 2008)
New Revision: 7225
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/attribute/adapter/JSFKnowledgeBaseAdapter.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizard.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/OutputLinkWizard.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/PanelGridWizard.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/SelectItemsWizard.java
Log:
JBIDE-1896 JBDS1.0 Massive Memory Leak using JBoss Tool HTML Editor on .XHTML files
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/attribute/adapter/JSFKnowledgeBaseAdapter.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/attribute/adapter/JSFKnowledgeBaseAdapter.java 2008-03-31
21:49:14 UTC (rev 7224)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/attribute/adapter/JSFKnowledgeBaseAdapter.java 2008-03-31
21:49:22 UTC (rev 7225)
@@ -29,8 +29,8 @@
}
public String invoke0(Control control) {
- ValueHelper h = new ValueHelper();
- context.put("valueHelper", h);
+ //ValueHelper h = new ValueHelper();
+ //context.put("valueHelper", h);
String nodeName = "h:" + attribute.getProperty("nodeName");
String attrName = attribute.getProperty("attrName");
context.setProperty("nodeName", nodeName);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizard.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizard.java 2008-03-31
21:49:14 UTC (rev 7224)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizard.java 2008-03-31
21:49:22 UTC (rev 7225)
@@ -127,4 +127,8 @@
}
}
+ public void dispose() {
+ getWizardModel().removePropertyChangeListener(this);
+ super.dispose();
+ }
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java 2008-03-31
21:49:14 UTC (rev 7224)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java 2008-03-31
21:49:22 UTC (rev 7225)
@@ -22,6 +22,7 @@
import org.eclipse.compare.Splitter;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
import org.jboss.tools.common.model.ui.attribute.editor.IPropertyEditor;
import org.jboss.tools.common.model.ui.objecteditor.XChildrenEditor;
@@ -60,6 +61,8 @@
null);
XChildrenEditorImpl propertyListEditor = new XChildrenEditorImpl();
+
+ private PropertyChangeListener pcl,mpcl;
public void propertyChange(PropertyChangeEvent evt) {
@@ -163,10 +166,12 @@
if(model == null) model = PreferenceModelUtilities.getPreferenceModel();
support.init(model.getRoot(), data);
Control c = support.createControl(generalTabContent);
- support.addPropertyChangeListener(new PCL());
+ pcl = new PCL();
+ support.addPropertyChangeListener(pcl);
fWizardModel = getSpecificWizard().getWizardModel();
- fWizardModel.addPropertyChangeListener(new MPCL());
+ mpcl = new MPCL();
+ fWizardModel.addPropertyChangeListener(mpcl);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 3;
@@ -375,6 +380,18 @@
return (nature == null) ? null : nature.getModel();
}
+ public void dispose() {
+ if (pcl != null && support != null) {
+ support.removePropertyChangeListener(pcl);
+ pcl=null;
+ }
+ if (mpcl != null && fWizardModel != null) {
+ fWizardModel.removePropertyChangeListener(mpcl);
+ mpcl=null;
+ }
+ super.dispose();
+ }
+
}
class Helper extends AbstractTableHelper {
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/OutputLinkWizard.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/OutputLinkWizard.java 2008-03-31
21:49:14 UTC (rev 7224)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/OutputLinkWizard.java 2008-03-31
21:49:22 UTC (rev 7225)
@@ -112,5 +112,10 @@
}
}
}
+
+ public void dispose() {
+ getWizardModel().removePropertyChangeListener(this);
+ super.dispose();
+ }
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/PanelGridWizard.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/PanelGridWizard.java 2008-03-31
21:49:14 UTC (rev 7224)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/PanelGridWizard.java 2008-03-31
21:49:22 UTC (rev 7225)
@@ -161,4 +161,8 @@
fDropCommand.getProperties().setProperty("start text", text.toString());
}
+ public void dispose() {
+ getWizardModel().removePropertyChangeListener(this);
+ super.dispose();
+ }
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/SelectItemsWizard.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/SelectItemsWizard.java 2008-03-31
21:49:14 UTC (rev 7224)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/SelectItemsWizard.java 2008-03-31
21:49:22 UTC (rev 7225)
@@ -104,4 +104,9 @@
text.toString());
}
}
+
+ public void dispose() {
+ getWizardModel().removePropertyChangeListener(this);
+ super.dispose();
+ }
}
Show replies by date