aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2014-02-04 23:16:13 (EST)
committerMike Rennie2014-02-04 23:16:13 (EST)
commitc58c5785bbb2dd9414d2e1482780ffe2a810aab6 (patch)
treea5e52b3c7566eddc8bc5fd983eabf820295d6f3e
parent60bc1be1265063d987c22be0adb91d86f49ae01f (diff)
downloadeclipse.jdt.debug-c58c5785bbb2dd9414d2e1482780ffe2a810aab6.zip
eclipse.jdt.debug-c58c5785bbb2dd9414d2e1482780ffe2a810aab6.tar.gz
eclipse.jdt.debug-c58c5785bbb2dd9414d2e1482780ffe2a810aab6.tar.bz2
Bug 297840 - Strange Code in ExpressionInputDialog.dispose
Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
-rw-r--r--org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java49
1 files changed, 20 insertions, 29 deletions
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java
index d2e579b..219f61d 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -343,33 +343,11 @@ public class ExpressionInputDialog extends TrayDialog {
return fSourceViewer.getDocument().get();
}
- /**
- * Disposes the source viewer. This method is intended to be overridden
- * by subclasses.
- */
- protected void dispose() {
- if(fActivation != null) {
- fService.deactivateHandler(fActivation);
- }
- if (fSourceViewer != null) {
- fSourceViewer.getDocument().removeDocumentListener(fDocumentListener);
- fSourceViewer.getTextWidget().dispose();
- fSourceViewer.dispose();
- fSourceViewer= null;
- }
- if (fSourceViewerComposite != null){
- fSourceViewerComposite.dispose();
- fSourceViewerComposite = null;
- }
- fDocumentListener= null;
- fCompletionProcessor= null;
- }
-
-
- /**
- * Returns the text entered by the user or <code>null</code> if the user cancelled.
- * @return the text entered by the user or <code>null</code> if the user cancelled
- */
+ /**
+ * Returns the text entered by the user or <code>null</code> if the user cancelled.
+ *
+ * @return the text entered by the user or <code>null</code> if the user cancelled
+ */
public String getResult() {
return fResult;
}
@@ -400,7 +378,20 @@ public class ExpressionInputDialog extends TrayDialog {
*/
@Override
public boolean close() {
- dispose();
+ if (fActivation != null) {
+ fService.deactivateHandler(fActivation);
+ }
+ if (fSourceViewer != null) {
+ fSourceViewer.getDocument().removeDocumentListener(fDocumentListener);
+ fSourceViewer.dispose();
+ fSourceViewer = null;
+ }
+ if (fSourceViewerComposite != null) {
+ fSourceViewerComposite.dispose();
+ fSourceViewerComposite = null;
+ }
+ fDocumentListener = null;
+ fCompletionProcessor = null;
return super.close();
}