Author: snjeza
Date: 2008-03-31 17:49:14 -0400 (Mon, 31 Mar 2008)
New Revision: 7224
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ExtendedCellEditorProviderImpl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPCellEditorProviderImpl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPTreeDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPTextJspKbConnector.java
Log:
JBIDE-1896 JBDS1.0 Massive Memory Leak using JBoss Tool HTML Editor on .XHTML files
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -39,14 +39,14 @@
public class JSPDialogCellEditorContentAssistProcessor extends
JavaPackageCompletionProcessor implements ISubjectControlContentAssistProcessor {
Properties context;
- ValueHelper valueHelper;
+ //ValueHelper valueHelper;
boolean isFacelets = false;
public JSPDialogCellEditorContentAssistProcessor() {}
public void setContext(Properties context) {
this.context = context;
- valueHelper = (ValueHelper)context.get("valueHelper");
+ //valueHelper = (ValueHelper)context.get("valueHelper");
updateFacelets();
}
@@ -70,6 +70,7 @@
//JSPActiveContentAssistProcessor
public void addAttributeValueProposals(List proposalsList, String text, int offset) {
+ ValueHelper valueHelper = new ValueHelper();
WtpKbConnector wtpKbConnector = valueHelper.getPageConnector();
if(wtpKbConnector == null) return;
Node node = (Node)context.get("node");
@@ -158,6 +159,7 @@
}
void updateFacelets() {
+ ValueHelper valueHelper = new ValueHelper();
valueHelper.updateFacelets();
isFacelets = valueHelper.isFacetets();
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -215,10 +215,12 @@
}
public void dispose() {
+ setActiveEditor(null);
if (fToggleOccurencesMarkUp != null) {
fToggleOccurencesMarkUp.setEditor(null);
fToggleOccurencesMarkUp = null;
}
+
super.dispose();
fActiveEditorPart=null;
mainPart=null;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -104,7 +104,7 @@
private int visualIndex;
- JSPTextEditor sourceEditor;
+ private JSPTextEditor sourceEditor;
private int sourceIndex;
@@ -123,7 +123,7 @@
private ConfigurableContentOutlinePage outlinePage = null;
- XModelObject object;
+ private XModelObject object;
private QualifiedName persistentTabQualifiedName = new QualifiedName("",
"Selected_tab");
@@ -375,6 +375,10 @@
public void dispose() {
ISelectionProvider provider = getSelectionProvider();
+ if (provider != null) {
+ provider
+ .removeSelectionChangedListener(getSelectionChangedListener());
+ }
if (provider instanceof IPostSelectionProvider &&
postSelectionChangedListener != null) {
((IPostSelectionProvider) provider)
.removePostSelectionChangedListener(postSelectionChangedListener);
@@ -524,10 +528,17 @@
public void dispose() {
saveSelectedTab();
- XModelObject o = getModelObject();
+ IEditorActionBarContributor contributor = getEditorSite()
+ .getActionBarContributor();
+ if (contributor != null
+ && contributor instanceof MultiPageEditorActionBarContributor) {
+ ((MultiPageEditorActionBarContributor) contributor)
+ .setActivePage(null);
+ }
visualEditor.dispose();
site.dispose();
- super.dispose();
+ outlinePage = null;
+ XModelObject o = getModelObject();
if (o != null) {
o.getModel().removeModelTreeListener(syncListener);
}
@@ -541,6 +552,7 @@
JspEditorPlugin.getPluginLog().logError(e);
}
}
+ super.dispose();
}
public Object getAdapter(Class adapter) {
@@ -788,12 +800,12 @@
IEditorInput e2 = XModelObjectEditorInput.createInstance(o);
e.setInput(e2);
e.updateTitle();
- if (e.sourceEditor instanceof AbstractTextEditor) {
- if (e.sourceEditor != null
- && e.sourceEditor.getEditorInput() != e
+ if (e.getJspEditor() instanceof AbstractTextEditor) {
+ if (e.getJspEditor() != null
+ && e.getJspEditor().getEditorInput() != e
.getEditorInput()) {
try {
- ((AbstractTextEditor) e.sourceEditor)
+ ((AbstractTextEditor) e.getJspEditor())
.setInput(e2);
} catch (Exception exc) {
JspEditorPlugin.getPluginLog().logError(exc);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -83,12 +83,12 @@
.handlePropertyChange(propertyId);
}
});
+ nestedEditors.add(editor);
} else {
parent2 = ppp;
}
Item item = createItem(parent2);
item.setData(editor);
- nestedEditors.add(editor);
return getPageCount() - 1;
}
@@ -132,6 +132,7 @@
protected abstract IEditorSite createSite(IEditorPart editor);
public void dispose() {
+ getSite().setSelectionProvider(null);
for (int i = 0; i < nestedEditors.size(); ++i) {
IEditorPart editor = (IEditorPart) nestedEditors.get(i);
disposePart(editor);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -32,6 +32,7 @@
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP;
@@ -148,9 +149,12 @@
//Fix for JBIDE-788
protected SourceEditorPageContext pageContext = null;
+ private TextEditorDropProviderImpl textEditorDropProvider;
+
public JSPTextEditor(JSPMultiPageEditor parentEditor) {
JspEditorPlugin.getDefault().initDefaultPluginPreferences();
- dnd.setTextEditorDropProvider(new TextEditorDropProviderImpl());
+ textEditorDropProvider = new TextEditorDropProviderImpl();
+ dnd.setTextEditorDropProvider(textEditorDropProvider);
this.parentEditor = parentEditor;
super
.setSourceViewerConfiguration(new JSPTextViewerConfiguration());
@@ -647,6 +651,8 @@
widget.removeSelectionListener(editor.getVPEController());
}
super.handleDispose();
+ editor = null;
+ provider = null;
}
@@ -1104,6 +1110,11 @@
public void dispose() {
// some things in the configuration need to clean
// up after themselves
+ if (dnd != null) {
+ dnd.setTextEditorDropProvider(null);
+ dnd=null;
+ }
+ textEditorDropProvider=null;
getSourceViewer().removeTextListener(this);
if (fOutlinePage != null) {
if (fOutlinePage instanceof ConfigurableContentOutlinePage &&
fOutlinePageListener != null) {
@@ -1119,6 +1130,7 @@
fOccurrenceModelUpdater.uninstall();
fOccurrenceModelUpdater = null;
}
+ fPropertySheetPage = null;
if (pageContext != null) {
pageContext.dispose();
pageContext = null;
@@ -1133,6 +1145,10 @@
if (listener != null)
listener.dispose();
listener = null;
+ ISelectionProvider provider = getSelectionProvider();
+ if (provider != null) {
+ provider.removeSelectionChangedListener(getSelectionChangedListener());
+ }
}
BodyListenerImpl listener = null;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ExtendedCellEditorProviderImpl.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ExtendedCellEditorProviderImpl.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ExtendedCellEditorProviderImpl.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -20,8 +20,8 @@
public class ExtendedCellEditorProviderImpl implements ExtendedCellEditorProvider {
public CellEditor createCellEditor(Composite parent, Properties context) {
- ValueHelper valueHelper = new ValueHelper();
- context.put("valueHelper", valueHelper);
+ //ValueHelper valueHelper = new ValueHelper();
+ //context.put("valueHelper", valueHelper);
return new ExtendedJSPDialogCellEditor(parent, context);
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPCellEditorProviderImpl.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPCellEditorProviderImpl.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPCellEditorProviderImpl.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -18,8 +18,8 @@
public class JSPCellEditorProviderImpl implements ExtendedCellEditorProvider {
public CellEditor createCellEditor(Composite parent, Properties context) {
- ValueHelper valueHelper = new ValueHelper();
- context.put("valueHelper", valueHelper);
+ //ValueHelper valueHelper = new ValueHelper();
+ //context.put("valueHelper", valueHelper);
return new JSPDialogCellEditor(parent, context);
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -35,7 +35,7 @@
public class JSPDialogCellEditor extends DialogCellEditorEx implements
ExtendedCellEditorProvider.StoppableCellEditor {
Properties context;
- ValueHelper valueHelper;
+ //ValueHelper valueHelper;
JSPDialogCellEditorContentAssistProcessor contentAssistentProcessor;
ContentAssistHandler handler = null;
@@ -44,10 +44,10 @@
public JSPDialogCellEditor(Composite parent, Properties context) {
super(parent);
this.context = context;
- valueHelper = (ValueHelper)context.get("valueHelper");
+ //valueHelper = (ValueHelper)context.get("valueHelper");
contentAssistentProcessor = new JSPDialogCellEditorContentAssistProcessor();
- if(valueHelper != null) contentAssistentProcessor.setContext(context);
+ //if(valueHelper != null) contentAssistentProcessor.setContext(context);
handler = ContentAssistHandler.createHandlerForText(getTextField(),
ControlContentAssistHelper.createJavaContentAssistant(contentAssistentProcessor));
}
@@ -60,8 +60,9 @@
void checkHasProposals() {
hasProposals = false;
if(context == null) return;
- valueHelper = (ValueHelper)context.get("valueHelper");
- if(valueHelper == null) return;
+ //valueHelper = (ValueHelper)context.get("valueHelper");
+ //if(valueHelper == null) return;
+ ValueHelper valueHelper = new ValueHelper();
String attributeName = "" + context.getProperty("attributeName");
String nodeName = "" + context.getProperty("nodeName");
String query = "/";
@@ -75,8 +76,9 @@
private void checkButtonEnablement() {
if(context == null) return;
- valueHelper = (ValueHelper)context.get("valueHelper");
- if(valueHelper == null) return;
+ //valueHelper = (ValueHelper)context.get("valueHelper");
+ //if(valueHelper == null) return;
+ ValueHelper valueHelper = new ValueHelper();
Button button = getButtonControl();
if(button == null || button.isDisposed()) return;
button.setVisible(hasProposals);
@@ -88,6 +90,7 @@
String attributeName = "" + context.getProperty("attributeName");
String nodeName = "" + context.getProperty("nodeName");
String query = "/";
+ ValueHelper valueHelper = new ValueHelper();
if(valueHelper != null && valueHelper.isFacetets() &&
nodeName.indexOf(":") < 0) {
query += FaceletsHtmlContentAssistProcessor.faceletHtmlPrefixStart;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -23,8 +23,8 @@
*/
public class JSPPropertySheetConfiguration extends XMLPropertySheetConfiguration {
- AttributeSorter sorter = new AttributeSorter();
- IPropertySheetPage fPropertySheetPage = null;
+ private AttributeSorter sorter = new AttributeSorter();
+ private IPropertySheetPage fPropertySheetPage = null;
private JSPPropertySourceProvider0 fPropertySourceProvider = null;
public IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page) {
@@ -65,4 +65,11 @@
this.sorter = sorter;
}
}
+
+ public void unconfigure() {
+ super.unconfigure();
+ fPropertySheetPage = null;
+ fPropertySourceProvider = null;
+
+ }
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -59,12 +59,12 @@
protected final static String CATEGORY_ATTRIBUTES =
XMLUIMessages.XMLPropertySourceAdapter_0;
private static final boolean SET_EXPERT_FILTER = false;
- AttributeSorter sorter = null;
+ private AttributeSorter sorter = null;
private Node fNode = null;
private boolean fCaseSensitive = true;
private IPropertyDescriptor[] fDescriptors = null;
- ValueHelper valueHelper = new ValueHelper();
- Set attributeNames = new HashSet();
+ //private ValueHelper valueHelper = new ValueHelper();
+ private Set attributeNames = new HashSet();
public JSPPropertySourceAdapter(INodeNotifier target) {
setTarget(target);
@@ -122,6 +122,7 @@
private String getQuery(String attributeName) {
String tagName = fNode.getNodeName();
String jsfTagName = null;
+ ValueHelper valueHelper = new ValueHelper();
if(fNode instanceof Element) {
jsfTagName = valueHelper.getFaceletJsfTag((Element)fNode);
}
@@ -144,7 +145,7 @@
List<String> names = new ArrayList<String>();
List<String> namesLow = new ArrayList<String>();
IPropertyDescriptor descriptor;
-
+ ValueHelper valueHelper = new ValueHelper();
TagDescriptor td = valueHelper.getTagDescriptor("/" + fNode.getNodeName());
if(td != null) {
List list = td.getAttributesDescriptors();
@@ -274,6 +275,7 @@
}
private IPropertyDescriptor createJSPPropertyDescriptor(String query, String
attributeName, boolean hideOnFilter) {
+ ValueHelper valueHelper = new ValueHelper();
AttributeDescriptor d = valueHelper.getAttributeDescriptor(query);
return createJSPPropertyDescriptor(d, attributeName, hideOnFilter);
}
@@ -288,7 +290,7 @@
context.put("node", fNode);
context.setProperty("nodeName", fNode.getNodeName());
context.setProperty("attributeName", attributeName);
- context.put("valueHelper", valueHelper);
+ //context.put("valueHelper", valueHelper);
JSPPropertyDescriptor descriptor = new JSPPropertyDescriptor(context, attributeName,
attributeName);
descriptor.setCategory(getCategory(null));
descriptor.setDescription(attributeName);
@@ -331,7 +333,7 @@
protected void updatePropertyDescriptors() {
if (fDescriptors == null || fDescriptors.length == 0) return;
-
+ ValueHelper valueHelper = new ValueHelper();
// List of all names encountered in the tag and defined by the element
List<String> declaredNames = new ArrayList<String>();
// New descriptor list that will become fDescriptors after all
@@ -546,6 +548,7 @@
if (attr instanceof IDOMNode) {
((IDOMNode) attr).setValueSource(valueString);
try {
+ ValueHelper valueHelper = new ValueHelper();
IVisualController controller = valueHelper.getController();
if(controller != null) controller.visualRefresh();
} catch (Exception e) {
@@ -583,6 +586,7 @@
boolean isRequiredAttribute(String attributeName) {
String query = getQuery(attributeName);
+ ValueHelper valueHelper = new ValueHelper();
AttributeDescriptor d = valueHelper.getAttributeDescriptor(query);
if(d == null) return false; // do not remove unknown attribute? Remove it!
return d.isRequired();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPTreeDialog.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPTreeDialog.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPTreeDialog.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -75,7 +75,8 @@
treeViewer.getControl().setLayoutData(layoutData);
String query = context.getProperty("query");
- ValueHelper valueHelper = (ValueHelper)context.get("valueHelper");
+ //ValueHelper valueHelper = (ValueHelper)context.get("valueHelper");
+ ValueHelper valueHelper = new ValueHelper();
root = valueHelper.getInitalInput(query);
treeViewer.setInput(root);
treeViewer.setSorter(new AttributeValueSorter());
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPTextJspKbConnector.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPTextJspKbConnector.java 2008-03-31
21:16:43 UTC (rev 7223)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/support/kb/WTPTextJspKbConnector.java 2008-03-31
21:49:14 UTC (rev 7224)
@@ -71,6 +71,7 @@
private WTPKbdManagedBeanNameResource fManagedBeanNameResourceRegistered = null;
private WTPKbJsfValuesResource fJSFValuesResource = null;
WTPKbdTaglibResource fTaglibResource = null;
+ private MyDocumentAdapter documentAdapter;
public WTPTextJspKbConnector(IEditorInput editorInput, IDocument document,
IStructuredModel model) {
try {
@@ -81,7 +82,7 @@
this.dom = (model instanceof IDOMModel) ? ((IDOMModel) model).getDocument() : null;
if (dom != null) {
- new MyDocumentAdapter(dom);
+ documentAdapter = new MyDocumentAdapter(dom);
}
kbConnector =
KbConnectorFactory.getIntstance().createConnector(KbConnectorType.JSP_WTP_KB_CONNECTOR,
document);
WTPKbdBundleNameResource bundleNameResource = new
WTPKbdBundleNameResource(fEditorInput, this);
@@ -350,8 +351,14 @@
}
public void dispose() {
+ if (documentAdapter != null && dom != null) {
+ ((INodeNotifier) dom).removeAdapter(documentAdapter);
+ }
+ documentAdapter=null;
+ dom=null;
KbConnectorFactory.getIntstance().removeConnector(KbConnectorType.JSP_WTP_KB_CONNECTOR,
fDocument);
}
+
/**
* This class listens to the changes in the CMDocument and triggers a CMDocument load
*/