Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2002-06-19 11:02:28 -0400
committerDarin Swanson2002-06-19 11:02:28 -0400
commit443489be2d75719f07a713cd50070278980717f5 (patch)
treebe5c97d2fd02ad6d6464b44c4e6f2b0c801701e9 /org.eclipse.debug.ui
parent84d0eb6f22d488f7719473baf2bd9b864fe85fbc (diff)
downloadeclipse.platform.debug-443489be2d75719f07a713cd50070278980717f5.tar.gz
eclipse.platform.debug-443489be2d75719f07a713cd50070278980717f5.tar.xz
eclipse.platform.debug-443489be2d75719f07a713cd50070278980717f5.zip
Bug 20365 - Bidi - NPE when closing Eclipse
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleView.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java10
2 files changed, 24 insertions, 16 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleView.java
index 8ce9d203a..5821b6d47 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleView.java
@@ -1,9 +1,11 @@
package org.eclipse.debug.internal.ui.views.console;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
import java.util.ArrayList;
import java.util.HashMap;
@@ -16,11 +18,11 @@ import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.views.AbstractDebugEventHandlerView;
-import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
import org.eclipse.debug.internal.ui.actions.ClearOutputAction;
import org.eclipse.debug.internal.ui.actions.TextViewerAction;
import org.eclipse.debug.internal.ui.actions.TextViewerGotoLineAction;
+import org.eclipse.debug.internal.ui.views.AbstractDebugEventHandlerView;
+import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.action.IAction;
@@ -38,8 +40,8 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.custom.VerifyKeyListener;
+import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Widget;
@@ -261,6 +263,9 @@ public class ConsoleView extends AbstractDebugEventHandlerView implements IDocum
* @see WorkbenchPart#getAdapter(Class)
*/
public Object getAdapter(Class required) {
+ if (!isAvailable()) {
+ return null;
+ }
if (IFindReplaceTarget.class.equals(required)) {
return getConsoleViewer().getFindReplaceTarget();
}
@@ -304,6 +309,9 @@ public class ConsoleView extends AbstractDebugEventHandlerView implements IDocum
}
protected void updateAction(String actionId) {
+ if (!isAvailable()) {
+ return;
+ }
IAction action= (IAction)fGlobalActions.get(actionId);
if (action instanceof IUpdate) {
((IUpdate) action).update();
@@ -324,13 +332,13 @@ public class ConsoleView extends AbstractDebugEventHandlerView implements IDocum
/**
* @see IDocumentListener#documentAboutToBeChanged(DocumentEvent)
*/
- public void documentAboutToBeChanged(DocumentEvent arg0) {
+ public void documentAboutToBeChanged(DocumentEvent e) {
}
/**
* @see IDocumentListener#documentChanged(DocumentEvent)
*/
- public void documentChanged(DocumentEvent arg0) {
+ public void documentChanged(DocumentEvent e) {
updateAction(ITextEditorActionConstants.FIND);
}
@@ -362,6 +370,4 @@ public class ConsoleView extends AbstractDebugEventHandlerView implements IDocum
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
setViewerInput(DebugUITools.getCurrentProcess());
}
-}
-
-
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
index 2887b4341..0d317539f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
@@ -1,9 +1,11 @@
package org.eclipse.debug.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
import java.util.ArrayList;
import java.util.HashMap;

Back to the top