Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2013-05-16 17:13:55 +0000
committerCurtis Windatt2013-05-16 17:13:55 +0000
commit37b4c72b389e73c8dba177a00eb2419f13c13ca5 (patch)
treee62887f2a35e82b8ed4fe114a3bb46d629fa113d
parent65020c1280249413d14515f373ca9e359921b478 (diff)
downloadeclipse.platform.debug-37b4c72b389e73c8dba177a00eb2419f13c13ca5.tar.gz
eclipse.platform.debug-37b4c72b389e73c8dba177a00eb2419f13c13ca5.tar.xz
eclipse.platform.debug-37b4c72b389e73c8dba177a00eb2419f13c13ca5.zip
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePageParticipant.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePageParticipant.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePageParticipant.java
index e61655643..6fa8fdc03 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePageParticipant.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePageParticipant.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -237,10 +237,12 @@ public class ProcessConsolePageParticipant implements IConsolePageParticipant, I
public void activated() {
// add EOF submissions
IPageSite site = fPage.getSite();
- IHandlerService handlerService = (IHandlerService)site.getService(IHandlerService.class);
- IContextService contextService = (IContextService)site.getService(IContextService.class);
- fActivatedContext = contextService.activateContext(fContextId);
- fActivatedHandler = handlerService.activateHandler("org.eclipse.debug.ui.commands.eof", fEOFHandler); //$NON-NLS-1$
+ if(fActivatedContext == null && fActivatedHandler == null) {
+ IHandlerService handlerService = (IHandlerService)site.getService(IHandlerService.class);
+ IContextService contextService = (IContextService)site.getService(IContextService.class);
+ fActivatedContext = contextService.activateContext(fContextId);
+ fActivatedHandler = handlerService.activateHandler("org.eclipse.debug.ui.commands.eof", fEOFHandler); //$NON-NLS-1$
+ }
}
/* (non-Javadoc)
@@ -253,6 +255,8 @@ public class ProcessConsolePageParticipant implements IConsolePageParticipant, I
IContextService contextService = (IContextService)site.getService(IContextService.class);
handlerService.deactivateHandler(fActivatedHandler);
contextService.deactivateContext(fActivatedContext);
+ fActivatedContext = null;
+ fActivatedHandler = null;
}
/* (non-Javadoc)

Back to the top