diff options
author | Darin Wright | 2006-12-18 18:43:29 +0000 |
---|---|---|
committer | Darin Wright | 2006-12-18 18:43:29 +0000 |
commit | 2665c873f55d9595bbb6a339957666da036eda1d (patch) | |
tree | 1b9d7782df9940ff84af6b532322787c9a685827 /org.eclipse.debug.ui | |
parent | 054c623a8f0e3c0ade493098749955a87dcfffaa (diff) | |
download | eclipse.platform.debug-2665c873f55d9595bbb6a339957666da036eda1d.tar.gz eclipse.platform.debug-2665c873f55d9595bbb6a339957666da036eda1d.tar.xz eclipse.platform.debug-2665c873f55d9595bbb6a339957666da036eda1d.zip |
Bug 168434 move debug commands to core plug-in
Diffstat (limited to 'org.eclipse.debug.ui')
64 files changed, 107 insertions, 1399 deletions
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF index 1a0de6c7a..26d3ecf63 100644 --- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF @@ -12,7 +12,6 @@ Export-Package: org.eclipse.debug.internal.ui;x-internal:=true, org.eclipse.debug.internal.ui.actions.breakpoints;x-internal:=true, org.eclipse.debug.internal.ui.actions.expressions;x-internal:=true, org.eclipse.debug.internal.ui.actions.variables;x-internal:=true, - org.eclipse.debug.internal.ui.commands;x-internal:=true, org.eclipse.debug.internal.ui.commands.actions;x-internal:=true, org.eclipse.debug.internal.ui.contexts;x-internal:=true, org.eclipse.debug.internal.ui.elements.adapters;x-internal:=true, @@ -41,7 +40,6 @@ Export-Package: org.eclipse.debug.internal.ui;x-internal:=true, org.eclipse.debug.internal.ui.views.variables;x-internal:=true, org.eclipse.debug.ui, org.eclipse.debug.ui.actions, - org.eclipse.debug.ui.commands, org.eclipse.debug.ui.console, org.eclipse.debug.ui.contexts, org.eclipse.debug.ui.memory, diff --git a/org.eclipse.debug.ui/component.xml b/org.eclipse.debug.ui/component.xml index 90e576480..08cfc0a1e 100644 --- a/org.eclipse.debug.ui/component.xml +++ b/org.eclipse.debug.ui/component.xml @@ -69,20 +69,6 @@ <type name="ToggleMethodBreakpointActionDelegate" instantiate="false" subclass="false" /> <type name="ToggleWatchpointActionDelegate" instantiate="false" subclass="false" /> </package> - <package name="org.eclipse.debug.ui.commands"> - <type name="IBooleanStatusMonitor" implement="false"/> - <type name="IDebugCommand"/> - <type name="IDisconnectCommand"/> - <type name="IDropToFrameCommand"/> - <type name="IResumeCommand"/> - <type name="IStatusMonitor" implement="false"/> - <type name="IStepFiltersCommand"/> - <type name="IStepIntoCommand"/> - <type name="IStepOverCommand"/> - <type name="IStepReturnCommand"/> - <type name="ISuspendCommand"/> - <type name="ITerminateCommand"/> - </package> <package name="org.eclipse.debug.ui.console"> <type name="ConsoleColorProvider" /> <type name="FileLink" subclass="false" /> diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java index 1669da39b..1c86ca097 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java @@ -56,21 +56,14 @@ import org.eclipse.debug.core.IStatusHandler; import org.eclipse.debug.core.Launch; import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IDisconnect; -import org.eclipse.debug.core.model.IDropToFrame; import org.eclipse.debug.core.model.IExpression; import org.eclipse.debug.core.model.IMemoryBlockRetrieval; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IRegister; import org.eclipse.debug.core.model.IRegisterGroup; import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IStep; -import org.eclipse.debug.core.model.IStepFilters; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.core.model.ITerminate; import org.eclipse.debug.core.model.IThread; import org.eclipse.debug.core.model.IVariable; -import org.eclipse.debug.internal.ui.commands.actions.ActionAdapterFactory; import org.eclipse.debug.internal.ui.contexts.SuspendTriggerAdapterFactory; import org.eclipse.debug.internal.ui.launchConfigurations.ClosedProjectFilter; import org.eclipse.debug.internal.ui.launchConfigurations.DeletedProjectFilter; @@ -167,11 +160,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener { * Launch configuration manager */ private LaunchConfigurationManager fLaunchConfigurationManager = null; - - /** - * Step filter manager - */ - private StepFilterManager fStepFilterManager = null; /** * Image descriptor registry used for images with common overlays. @@ -365,10 +353,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener { fLaunchConfigurationManager.shutdown(); } - if (fStepFilterManager != null) { - fStepFilterManager.shutdown(); - } - ColorManager.getDefault().dispose(); if (fgPresentation != null) { @@ -443,18 +427,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener { SuspendTriggerAdapterFactory factory = new SuspendTriggerAdapterFactory(); manager.registerAdapters(factory, ILaunch.class); - //action adapters - ActionAdapterFactory actionFactory = new ActionAdapterFactory(); - manager.registerAdapters(actionFactory, IDisconnect.class); - manager.registerAdapters(actionFactory, IDropToFrame.class); - manager.registerAdapters(actionFactory, IStep.class); - manager.registerAdapters(actionFactory, IStepFilters.class); - manager.registerAdapters(actionFactory, ISuspendResume.class); - manager.registerAdapters(actionFactory, ITerminate.class); - manager.registerAdapters(actionFactory, ILaunch.class); - manager.registerAdapters(actionFactory, IProcess.class); - manager.registerAdapters(actionFactory, IDebugElement.class); - getStandardDisplay().asyncExec( new Runnable() { public void run() { @@ -701,10 +673,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener { DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); getProcessConsoleManager().startup(); - if (fStepFilterManager == null) { - getStepFilterManager().launchAdded(launch); - } - getLaunchConfigurationManager().startup(); SourceLookupManager.getDefault(); } @@ -717,18 +685,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener { public PerspectiveManager getPerspectiveManager() { return fPerspectiveManager; } - - /** - * Returns the singleton step filter manager. - * - * @return the step filter manager - */ - public StepFilterManager getStepFilterManager() { - if (fStepFilterManager == null) { - fStepFilterManager = new StepFilterManager(); - } - return fStepFilterManager; - } /** * @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java index 04def8ea7..2a0e53997 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java @@ -93,9 +93,6 @@ public class DebugUIPreferenceInitializer extends AbstractPreferenceInitializer prefs.setDefault(IDebugUIConstants.ID_VARIABLE_VIEW + '+' + "org.eclipse.debug.ui.ShowTypeNamesAction", false); //$NON-NLS-1$ prefs.setDefault(IDebugUIConstants.ID_EXPRESSION_VIEW + '+' + "org.eclipse.debug.ui.ShowTypeNamesAction", false); //$NON-NLS-1$ - // Step filter preferences - prefs.setDefault(IInternalDebugUIConstants.PREF_USE_STEP_FILTERS, false); - // set default for column size preference prefs.setDefault(IDebugPreferenceConstants.PREF_COLUMN_SIZE, IDebugPreferenceConstants.PREF_COLUMN_SIZE_DEFAULT); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java index ffdeeecb1..4f4650305 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java @@ -309,14 +309,6 @@ public interface IInternalDebugUIConstants { * @since 3.0 */ public static final String PREF_TRACK_VIEWS= IDebugUIConstants.PLUGIN_ID + ".track_views"; //$NON-NLS-1$ - - /** - * Boolean preference specifying whether step filters - * are used. - * - * @since 3.0 - */ - public static final String PREF_USE_STEP_FILTERS = IDebugUIConstants.PLUGIN_ID + ".USE_STEP_FILTERS"; //$NON-NLS-1$ /** * Comma separated list of view ids closed by the user, that have view context bindings. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepFilterManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepFilterManager.java deleted file mode 100644 index 043451424..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepFilterManager.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui; - -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchListener; -import org.eclipse.debug.internal.ui.commands.actions.ActionRequestMonitor; -import org.eclipse.debug.ui.commands.IStepFiltersCommand; - -/** - * As targets are launched, this manager sets its step filter - * support settings according to the "use step filter" setting. - * - * @since 3.0 - */ -public class StepFilterManager implements ILaunchListener { - - /** - * The step filter manager is instantiated by the debug UI plug-in, - * and should be accessed from the <code>DebugUIPlugin</code> class. - */ - protected StepFilterManager() { - DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); - } - - /** - * This method is called by the debug UI plug-in at shutdown. - */ - public void shutdown() { - DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); - } - - /* (non-Javadoc) - * @see org.eclipse.debug.core.ILaunchListener#launchAdded(org.eclipse.debug.core.ILaunch) - */ - public void launchAdded(ILaunch launch) { - launchChanged(launch); - } - /* (non-Javadoc) - * @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch) - */ - public void launchChanged(ILaunch launch) { - IStepFiltersCommand command = (IStepFiltersCommand)launch.getAdapter(IStepFiltersCommand.class); - if (command != null) { - command.execute(launch, new ActionRequestMonitor()); - } - } - - /** - * Returns whether the 'use step filters' preference is on. - * - * @return whether to use step filters - */ - public boolean isUseStepFilters() { - return DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_USE_STEP_FILTERS); - } - - /** - * Sets whether to use step filters. - * - * @param useFilters whether to use step filters - */ - public void setUseStepFilters(boolean useFilters) { - DebugUIPlugin.getDefault().getPreferenceStore().setValue(IInternalDebugUIConstants.PREF_USE_STEP_FILTERS, useFilters); - ILaunch[] launchs = DebugPlugin.getDefault().getLaunchManager().getLaunches(); - for (int i = 0; i < launchs.length; i++) { - ILaunch launch = launchs[i]; - launchChanged(launch); - } - } - - /* (non-Javadoc) - * @see org.eclipse.debug.core.ILaunchListener#launchRemoved(org.eclipse.debug.core.ILaunch) - */ - public void launchRemoved(ILaunch launch) {} -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DebugCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DebugCommand.java deleted file mode 100644 index c8023275d..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DebugCommand.java +++ /dev/null @@ -1,153 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.internal.ui.DebugUIPlugin; -import org.eclipse.debug.internal.ui.viewers.AsynchronousSchedulingRuleFactory; -import org.eclipse.debug.ui.commands.IBooleanStatusMonitor; -import org.eclipse.debug.ui.commands.IDebugCommand; -import org.eclipse.debug.ui.commands.IStatusMonitor; - -/** - * Common function for standard debug commands. - * - * @since 3.3 - * - */ -public abstract class DebugCommand implements IDebugCommand { - - // debug flag - public static boolean DEBUG_COMMANDS = false; - - static { - DEBUG_COMMANDS = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$ - Platform.getDebugOption("org.eclipse.debug.ui/debug/commands")); //$NON-NLS-1$ - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.commands.IDebugCommand#performCapability(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IStatusMonitor) - */ - public boolean execute(final Object element, final IStatusMonitor requestMonitor) { - Job job = new Job("execute command") { //$NON-NLS-1$ - protected IStatus run(IProgressMonitor monitor) { - if (DEBUG_COMMANDS) { - System.out.println("execute: " + DebugCommand.this); //$NON-NLS-1$ - } - Object target = getTarget(element); - if (target != null) { - try { - doExecute(target, requestMonitor); - } catch (CoreException e) { - requestMonitor.setStatus(e.getStatus()); - if (DEBUG_COMMANDS) { - System.out.println("\t" + e.getStatus().getMessage()); //$NON-NLS-1$ - } - } - } - requestMonitor.done(); - return Status.OK_STATUS; - } - }; - job.setSystem(true); - job.schedule(); - return isRemainEnabled(); - } - - /** - * Returns whether this command should remain enabled after execution is invoked. - * - * @return whether to remain enabled - */ - protected boolean isRemainEnabled() { - return false; - } - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.commands.IDebugCommand#checkCapability(java.lang.Object, org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor) - */ - public void canExecute(final Object element, final IBooleanStatusMonitor requestMonitor) { - Job job = new Job("check command") { //$NON-NLS-1$ - protected IStatus run(IProgressMonitor monitor) { - if (DEBUG_COMMANDS) { - System.out.print("can execute command: " + DebugCommand.this); //$NON-NLS-1$ - } - Object target = getTarget(element); - if (target != null) { - try { - boolean executable = isExecutable(target, requestMonitor); - if (DEBUG_COMMANDS) { - System.out.println(" >> " + executable); //$NON-NLS-1$ - } - requestMonitor.setResult(executable); - } catch (CoreException e) { - requestMonitor.setStatus(e.getStatus()); - if (DEBUG_COMMANDS) { - System.out.println(" >> ABORTED"); //$NON-NLS-1$ - System.out.println("\t" + e.getStatus().getMessage()); //$NON-NLS-1$ - } - } - } else { - requestMonitor.setResult(false); - if (DEBUG_COMMANDS) { - System.out.println(" >> false (no adapter)"); //$NON-NLS-1$ - } - } - requestMonitor.done(); - return Status.OK_STATUS; - } - }; - job.setSystem(true); - job.setRule(createUpdateSchedulingRule(element)); - job.schedule(); - - } - - /** - * Executes the actual operation. - * - * @param target object to perform on - * @param monitor progress monitor - */ - protected abstract void doExecute(Object target, IStatusMonitor monitor) throws CoreException; - - /** - * Returns whether this command is executable. - * - * @param target object to check command for - * @param monitor progress monitor - * @return whether this command can be executed - */ - protected abstract boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException; - - /** - * Returns the appropriate command adapter from the given object. - * - * @param element object to obtain adapter from - * @return adapter - */ - protected abstract Object getTarget(Object element); - - /** - * Scheduling rule for checking capability. - * - * @return scheduling rule or <code>null</code> - */ - protected ISchedulingRule createUpdateSchedulingRule(Object element) { - return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(element); - } -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DisconnectCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DisconnectCommand.java deleted file mode 100644 index 2a65fd827..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DisconnectCommand.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.model.IDisconnect; -import org.eclipse.debug.ui.commands.IDisconnectCommand; -import org.eclipse.debug.ui.commands.IStatusMonitor; - -/** - * Default disconnect command for the standard debug model. - * - * @since 3.3 - */ -public class DisconnectCommand extends DebugCommand implements IDisconnectCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((IDisconnect)target).canDisconnect(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((IDisconnect)target).disconnect(); - } - - protected Object getTarget(Object element) { - if (element instanceof IDisconnect) { - return element; - } else if (element instanceof IAdaptable) { - return ((IAdaptable) element).getAdapter(IDisconnect.class); - } - return null; - } -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DropToFrameCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DropToFrameCommand.java deleted file mode 100644 index 4f34a66f5..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/DropToFrameCommand.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.model.IDropToFrame; -import org.eclipse.debug.ui.commands.IDropToFrameCommand; -import org.eclipse.debug.ui.commands.IStatusMonitor; - -/** - * Default drop to frame command for the standard debug model. - * - * @since 3.3 - */ -public class DropToFrameCommand extends DebugCommand implements IDropToFrameCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((IDropToFrame)target).canDropToFrame(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((IDropToFrame)target).dropToFrame(); - } - - protected Object getTarget(Object element) { - if (element instanceof IDropToFrame) { - return element; - } else if (element instanceof IAdaptable) { - return ((IAdaptable) element).getAdapter(IDropToFrame.class); - } - return null; - } -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/ResumeCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/ResumeCommand.java deleted file mode 100644 index b075aaf32..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/ResumeCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.ui.commands.IResumeCommand; -import org.eclipse.debug.ui.commands.IStatusMonitor; - -/** - * Default resume command for the standard debug model. - * - * @since 3.3 - */ -public class ResumeCommand extends SuspendCommand implements IResumeCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((ISuspendResume)target).canResume(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((ISuspendResume)target).resume(); - } - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepCommand.java deleted file mode 100644 index d992ad671..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepCommand.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.model.IStep; - -/** - * Common function for step commands. - * - * @since 3.3 - */ -public abstract class StepCommand extends DebugCommand { - - protected Object getTarget(Object element) { - if (element instanceof IStep) { - return element; - } else if (element instanceof IAdaptable) { - return ((IAdaptable) element).getAdapter(IStep.class); - } - return null; - } - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepFiltersCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepFiltersCommand.java deleted file mode 100644 index 461b73776..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepFiltersCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IDebugElement; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.IStepFilters; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.IStepFiltersCommand; - -/** - * Default toggle step filters command for the standard debug model. - * - * @since 3.3 - */ -public class StepFiltersCommand extends DebugCommand implements IStepFiltersCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - IStepFilters[] filters = (IStepFilters[]) target; - for (int i = 0; i < filters.length; i++) { - IStepFilters filter = filters[i]; - if (filter == null || !filter.supportsStepFilters()) { - return false; - } - } - return true; - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - IStepFilters[] filters = (IStepFilters[]) target; - for (int i = 0; i < filters.length; i++) { - IStepFilters filter = filters[i]; - filter.setStepFiltersEnabled(DebugUITools.isUseStepFilters()); - } - } - - protected Object getTarget(Object element) { - IDebugTarget[] targets = getDebugTargets(element); - if (targets.length > 0) { - IStepFilters[] filters = new IStepFilters[targets.length]; - for (int i = 0; i < targets.length; i++) { - IDebugTarget target = targets[i]; - if (target instanceof IStepFilters) { - filters[i] = (IStepFilters) target; - } else { - filters[i] = (IStepFilters) ((IAdaptable)element).getAdapter(IStepFilters.class); - } - if (filters[i] == null) { - return null; - } - } - return filters; - } - return null; - } - - private IDebugTarget[] getDebugTargets(Object element) { - if (element instanceof IDebugElement) { - IDebugElement debugElement = (IDebugElement) element; - return new IDebugTarget[] { debugElement.getDebugTarget() }; - } else if (element instanceof ILaunch) { - ILaunch launch = (ILaunch) element; - return launch.getDebugTargets(); - } else if (element instanceof IProcess) { - IProcess process = (IProcess) element; - return process.getLaunch().getDebugTargets(); - } else { - return new IDebugTarget[0]; - } - } -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepIntoCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepIntoCommand.java deleted file mode 100644 index 4cd5caf94..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepIntoCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.model.IStep; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.IStepIntoCommand; - -/** - * Default step into command for the standard debug model. - * - * @since 3.3 - */ -public class StepIntoCommand extends StepCommand implements IStepIntoCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((IStep)target).canStepInto(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((IStep)target).stepInto(); - } - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepOverCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepOverCommand.java deleted file mode 100644 index 18c9360c7..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepOverCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.model.IStep; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.IStepOverCommand; - -/** - * Default step over command for the standard debug model. - * - * @since 3.3 - */ -public class StepOverCommand extends StepCommand implements IStepOverCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((IStep)target).canStepOver(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((IStep)target).stepOver(); - } - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepReturnCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepReturnCommand.java deleted file mode 100644 index a4e30c144..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/StepReturnCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.model.IStep; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.IStepReturnCommand; - -/** - * Default step return command for the standard debug model. - * - * @since 3.3 - */ -public class StepReturnCommand extends StepCommand implements IStepReturnCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((IStep)target).canStepReturn(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((IStep)target).stepReturn(); - } - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/SuspendCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/SuspendCommand.java deleted file mode 100644 index 2435051fc..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/SuspendCommand.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.ISuspendCommand; - -/** - * Default suspend command for the standard debug model. - * - * @since 3.3 - */ -public class SuspendCommand extends DebugCommand implements ISuspendCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((ISuspendResume)target).canSuspend(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((ISuspendResume)target).suspend(); - } - - protected Object getTarget(Object element) { - if (element instanceof ISuspendResume) { - return element; - } else if (element instanceof IAdaptable) { - return ((IAdaptable) element).getAdapter(ISuspendResume.class); - } - return null; - } -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/TerminateCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/TerminateCommand.java deleted file mode 100644 index d0407476f..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/TerminateCommand.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.debug.core.model.ITerminate; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.ITerminateCommand; - -/** - * Default terminate command for the standard debug model. - * - * @since 3.3 - */ -public class TerminateCommand extends DebugCommand implements ITerminateCommand { - - protected boolean isExecutable(Object target, IStatusMonitor monitor) throws CoreException { - return ((ITerminate)target).canTerminate(); - } - - protected void doExecute(Object target, IStatusMonitor monitor) throws CoreException { - ((ITerminate)target).terminate(); - } - - protected Object getTarget(Object element) { - if (element instanceof ITerminate) { - return element; - } else if (element instanceof IAdaptable) { - return ((IAdaptable) element).getAdapter(ITerminate.class); - } - return null; - } -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java index 2092389e4..2364d5655 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java @@ -11,7 +11,7 @@ package org.eclipse.debug.internal.ui.commands.actions; import org.eclipse.core.runtime.IStatus; -import org.eclipse.debug.ui.commands.IStatusMonitor; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; /** * Common function for request monitors diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionAdapterFactory.java deleted file mode 100644 index 6ebe59c9e..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionAdapterFactory.java +++ /dev/null @@ -1,131 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.internal.ui.commands.actions; - -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IDebugElement; -import org.eclipse.debug.core.model.IDisconnect; -import org.eclipse.debug.core.model.IDropToFrame; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.IStep; -import org.eclipse.debug.core.model.ISuspendResume; -import org.eclipse.debug.core.model.ITerminate; -import org.eclipse.debug.internal.ui.commands.DisconnectCommand; -import org.eclipse.debug.internal.ui.commands.DropToFrameCommand; -import org.eclipse.debug.internal.ui.commands.ResumeCommand; -import org.eclipse.debug.internal.ui.commands.StepFiltersCommand; -import org.eclipse.debug.internal.ui.commands.StepIntoCommand; -import org.eclipse.debug.internal.ui.commands.StepOverCommand; -import org.eclipse.debug.internal.ui.commands.StepReturnCommand; -import org.eclipse.debug.internal.ui.commands.SuspendCommand; -import org.eclipse.debug.internal.ui.commands.TerminateCommand; -import org.eclipse.debug.ui.commands.IDisconnectCommand; -import org.eclipse.debug.ui.commands.IDropToFrameCommand; -import org.eclipse.debug.ui.commands.IResumeCommand; -import org.eclipse.debug.ui.commands.IStepFiltersCommand; -import org.eclipse.debug.ui.commands.IStepIntoCommand; -import org.eclipse.debug.ui.commands.IStepOverCommand; -import org.eclipse.debug.ui.commands.IStepReturnCommand; -import org.eclipse.debug.ui.commands.ISuspendCommand; -import org.eclipse.debug.ui.commands.ITerminateCommand; - -/** - * Adapter factory for debug capabilities. - * - * @since 3.3 - * - */ -public class ActionAdapterFactory implements IAdapterFactory { - - - private static ITerminateCommand fgTerminateCommand = new TerminateCommand(); - private static IStepOverCommand fgStepOverCommand = new StepOverCommand(); - private static IStepIntoCommand fgStepIntoCommand = new StepIntoCommand(); - private static IStepReturnCommand fgStepReturnCommand = new StepReturnCommand(); - private static IDropToFrameCommand fgDropToFrameCommand = new DropToFrameCommand(); - private static IDisconnectCommand fgDisconnectCommand = new DisconnectCommand(); - private static ISuspendCommand fgSuspendCommand = new SuspendCommand(); - private static IResumeCommand fgResumeCommand = new ResumeCommand(); - private static IStepFiltersCommand fgStepFiltersCommand = new StepFiltersCommand(); - - /* (non-Javadoc) - * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) - */ - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (IStepFiltersCommand.class.equals(adapterType)) { - if (adaptableObject instanceof IDebugElement || - adaptableObject instanceof ILaunch || - adaptableObject instanceof IProcess) { - return fgStepFiltersCommand; - } - } - - if (ITerminateCommand.class.equals(adapterType)) { - if (adaptableObject instanceof ITerminate) { - return fgTerminateCommand; - } - } - if (IStepOverCommand.class.equals(adapterType)) { - if (adaptableObject instanceof IStep) { - return fgStepOverCommand; - } - } - if (IStepIntoCommand.class.equals(adapterType)) { - if (adaptableObject instanceof IStep) { - return fgStepIntoCommand; - } - } - if (IStepReturnCommand.class.equals(adapterType)) { - if (adaptableObject instanceof IStep) { - return fgStepReturnCommand; - } - } - if (ISuspendCommand.class.equals(adapterType)) { - if (adaptableObject instanceof ISuspendResume) { - return fgSuspendCommand; - } - } - if (IResumeCommand.class.equals(adapterType)) { - if (adaptableObject instanceof ISuspendResume) { - return fgResumeCommand; - } - } - if (IDisconnectCommand.class.equals(adapterType)) { - if (adaptableObject instanceof IDisconnect) { - return fgDisconnectCommand; - } - } - if (IDropToFrameCommand.class.equals(adapterType)) { - if (adaptableObject instanceof IDropToFrame) { - return fgDropToFrameCommand; - } - } - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() - */ - public Class[] getAdapterList() { - return new Class[]{ - ITerminateCommand.class, - IStepOverCommand.class, - IStepIntoCommand.class, - IStepReturnCommand.class, - ISuspendCommand.class, - IResumeCommand.class, - IDropToFrameCommand.class, - IDisconnectCommand.class, - IStepFiltersCommand.class}; - } - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionStatusCollector.java index 9a9de76d3..b34d53233 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionStatusCollector.java @@ -11,17 +11,18 @@ package org.eclipse.debug.internal.ui.commands.actions; import org.eclipse.core.runtime.IStatus; +import org.eclipse.debug.internal.core.commands.StatusCollector; import org.eclipse.debug.internal.ui.DebugUIMessages; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.jface.dialogs.MessageDialog; /** - * Plain request monitor for actions. Has no result. + * Plain status collector for actions. Has no result. * * @since 3.3 * */ -public class ActionRequestMonitor extends AbstractRequestMonitor { +public class ActionStatusCollector extends StatusCollector { /* * (non-Javadoc) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/BooleanRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/BooleanCollector.java index 167bf5b4b..dff19056d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/BooleanRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/BooleanCollector.java @@ -10,23 +10,25 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; -import org.eclipse.debug.ui.commands.IBooleanStatusMonitor; +import org.eclipse.debug.core.commands.IBooleanCollector; +import org.eclipse.debug.internal.core.commands.StatusCollector; import org.eclipse.jface.action.IAction; /** - * Boolean request monitor that collects boolean results from a number of voters. + * Boolean collector that collects boolean results from a number of voters. * Request is cancelled when one voter votes false. * * @since 3.3 * */ -public class BooleanRequestMonitor extends AbstractRequestMonitor implements IBooleanStatusMonitor { +public class BooleanCollector extends StatusCollector implements IBooleanCollector { private IAction fAction; private int fNumVoters; private int fNumOfVotes = 0; + private boolean fEnabled = true; - public BooleanRequestMonitor(IAction action, int numVoters) { + public BooleanCollector(IAction action, int numVoters) { fAction = action; fNumVoters = numVoters; } @@ -36,10 +38,8 @@ public class BooleanRequestMonitor extends AbstractRequestMonitor implements IBo */ public void setResult(boolean result) { fNumOfVotes++; - if (!isCanceled()) { - if (!result) { - setCanceled(true); - } + if (fEnabled) { + fEnabled = result; } } @@ -47,7 +47,7 @@ public class BooleanRequestMonitor extends AbstractRequestMonitor implements IBo * @see org.eclipse.core.runtime.IProgressMonitor#done() */ public void done() { - if (isCanceled()) { + if (!fEnabled) { fAction.setEnabled(false); } else { fAction.setEnabled(fNumOfVotes == fNumVoters); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/CommandMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/CommandStateCollector.java index 669d3028d..517352665 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/CommandMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/CommandStateCollector.java @@ -10,19 +10,21 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; -import org.eclipse.debug.ui.commands.IBooleanStatusMonitor; +import org.eclipse.debug.core.commands.IBooleanCollector; +import org.eclipse.debug.internal.core.commands.StatusCollector; import org.eclipse.jface.action.IAction; /** - * Request monitor for a command action. + * Boolean collector for a command action. Enables or disables an action. * * @since 3.3 */ -public class CommandMonitor extends AbstractRequestMonitor implements IBooleanStatusMonitor { +public class CommandStateCollector extends StatusCollector implements IBooleanCollector { private IAction fAction; + private boolean fEnabled = false; - public CommandMonitor(IAction action) { + public CommandStateCollector(IAction action) { fAction = action; } @@ -30,13 +32,13 @@ public class CommandMonitor extends AbstractRequestMonitor implements IBooleanSt * @see org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor#setResult(boolean) */ public void setResult(boolean result) { - setCanceled(!result); + fEnabled = result; } /* (non-Javadoc) * @see org.eclipse.core.runtime.IProgressMonitor#done() */ public void done() { - fAction.setEnabled(!isCanceled()); + fAction.setEnabled(fEnabled); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java index cca367402..b79df5c94 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java @@ -14,9 +14,10 @@ package org.eclipse.debug.internal.ui.commands.actions; import java.util.Iterator; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.debug.core.commands.IDebugCommand; +import org.eclipse.debug.core.commands.IStatusCollector; import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.commands.IDebugCommand; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.debug.ui.contexts.DebugContextEvent; import org.eclipse.debug.ui.contexts.IDebugContextListener; import org.eclipse.debug.ui.contexts.IDebugContextService; @@ -86,7 +87,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext IAdaptable adaptable = (IAdaptable) target; IDebugCommand capability = (IDebugCommand) adaptable.getAdapter(getCommandType()); if (capability != null) { - return capability.execute(target, createStatusMonitor(target)); + return capability.execute(target, new NullProgressMonitor(), createStatusMonitor(target)); } } return false; @@ -98,8 +99,8 @@ public abstract class DebugCommandAction extends Action implements IDebugContext * @param target target of the command * @return status monitor to execute with */ - protected IStatusMonitor createStatusMonitor(Object target) { - return new ActionRequestMonitor(); + protected IStatusCollector createStatusMonitor(Object target) { + return new ActionStatusCollector(); } /** @@ -113,7 +114,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext * @param context */ public void update(ISelection context) { - fUpdateService.postUpdateCommand(getCommandType(), new CommandMonitor(this)); + fUpdateService.postUpdateCommand(getCommandType(), new CommandStateCollector(this)); } /** @@ -147,7 +148,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext service.addDebugContextListener(this, partId); ISelection activeContext = service.getActiveContext(partId); if (activeContext != null) { - fUpdateService.updateCommand(getCommandType(), new CommandMonitor(this)); + fUpdateService.updateCommand(getCommandType(), new CommandStateCollector(this)); } else { setEnabled(getInitialEnablement()); } @@ -164,7 +165,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext contextService.addDebugContextListener(this); ISelection activeContext = contextService.getActiveContext(); if (activeContext != null) { - fUpdateService.updateCommand(getCommandType(), new BooleanRequestMonitor(this, 1)); + fUpdateService.updateCommand(getCommandType(), new BooleanCollector(this, 1)); } else { setEnabled(getInitialEnablement()); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java index ab23a0288..c93996720 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java @@ -16,9 +16,10 @@ import java.util.Map; import java.util.Map.Entry; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.debug.core.commands.IBooleanCollector; +import org.eclipse.debug.core.commands.IDebugCommand; import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.commands.IBooleanStatusMonitor; -import org.eclipse.debug.ui.commands.IDebugCommand; import org.eclipse.debug.ui.contexts.DebugContextEvent; import org.eclipse.debug.ui.contexts.IDebugContextListener; import org.eclipse.debug.ui.contexts.IDebugContextService; @@ -107,11 +108,11 @@ public class DebugCommandService implements IDebugContextListener { * @param commandType * @param monitor */ - public void postUpdateCommand(Class commandType, IBooleanStatusMonitor monitor) { + public void postUpdateCommand(Class commandType, IBooleanCollector monitor) { synchronized (fCommandUpdates) { - ProxyBooleanRequestMonitor proxy = (ProxyBooleanRequestMonitor) fCommandUpdates.get(commandType); + ProxyBooleanCollector proxy = (ProxyBooleanCollector) fCommandUpdates.get(commandType); if (proxy == null) { - proxy = new ProxyBooleanRequestMonitor(); + proxy = new ProxyBooleanCollector(); fCommandUpdates.put(commandType, proxy); } proxy.addMonitor(monitor); @@ -124,15 +125,15 @@ public class DebugCommandService implements IDebugContextListener { * @param commandType * @param requestMonitor */ - public void updateCommand(Class commandType, IBooleanStatusMonitor requestMonitor) { + public void updateCommand(Class commandType, IBooleanCollector requestMonitor) { ISelection context = fContextService.getActiveContext(); if (context instanceof IStructuredSelection && !context.isEmpty()) { Object[] elements = ((IStructuredSelection)context).toArray(); - ProxyBooleanRequestMonitor monitor = new ProxyBooleanRequestMonitor(); + ProxyBooleanCollector monitor = new ProxyBooleanCollector(); monitor.addMonitor(requestMonitor); updateCommand(commandType, elements, monitor); } else { - requestMonitor.setCanceled(true); + requestMonitor.setResult(false); requestMonitor.done(); } } @@ -149,14 +150,14 @@ public class DebugCommandService implements IDebugContextListener { while (iterator.hasNext()) { Entry entry = (Entry) iterator.next(); Class commandType = (Class)entry.getKey(); - ProxyBooleanRequestMonitor monitor = (ProxyBooleanRequestMonitor) entry.getValue(); + ProxyBooleanCollector monitor = (ProxyBooleanCollector) entry.getValue(); updateCommand(commandType, elements, monitor); } } else { Iterator iterator = commands.values().iterator(); while (iterator.hasNext()) { - ProxyBooleanRequestMonitor monitor = (ProxyBooleanRequestMonitor) iterator.next(); - monitor.setCanceled(true); + ProxyBooleanCollector monitor = (ProxyBooleanCollector) iterator.next(); + monitor.setResult(false); monitor.done(); } } @@ -170,7 +171,7 @@ public class DebugCommandService implements IDebugContextListener { * @param elements elements to update for * @param monitor status monitor */ - private void updateCommand(Class commandType, Object[] elements, ProxyBooleanRequestMonitor monitor) { + private void updateCommand(Class commandType, Object[] elements, ProxyBooleanCollector monitor) { IDebugCommand[] commands = new IDebugCommand[elements.length]; int numVoters = 0; for (int i = 0; i < elements.length; i++) { @@ -181,17 +182,17 @@ public class DebugCommandService implements IDebugContextListener { commands[i] = command; numVoters++; } else { - monitor.setCanceled(true); + monitor.setResult(false); monitor.done(); return; } } } - if (!monitor.isCanceled()) { + if (monitor.isEnabled()) { monitor.setNumVoters(numVoters); for (int i = 0; i < commands.length; i++) { IDebugCommand command = commands[i]; - command.canExecute(elements[i], monitor); + command.canExecute(elements[i], new NullProgressMonitor(), monitor); } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java index ab643f9bd..4b31ae5e5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java @@ -10,11 +10,11 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.IDisconnectCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.debug.ui.commands.IDisconnectCommand; import org.eclipse.jface.resource.ImageDescriptor; /** * Disconnect action. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java index e5ceb81ea..cff565827 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.IDropToFrameCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.IDropToFrameCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ProxyBooleanRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ProxyBooleanCollector.java index 1cd05ea66..4758486b5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ProxyBooleanRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ProxyBooleanCollector.java @@ -14,51 +14,41 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.eclipse.debug.ui.commands.IBooleanStatusMonitor; +import org.eclipse.debug.core.commands.IBooleanCollector; +import org.eclipse.debug.internal.core.commands.StatusCollector; /** - * Boolean request monitor that collects boolean results from a number of voters. + * Boolean collector that collects boolean results from a number of voters. * Request is cancelled when one voter votes false. Forwards the results to - * any number of boolean request monitors. + * any number of boolean collectors. * * @since 3.3 * */ -public class ProxyBooleanRequestMonitor extends AbstractRequestMonitor implements IBooleanStatusMonitor { +public class ProxyBooleanCollector extends StatusCollector implements IBooleanCollector { private List fMonitors = new ArrayList(); private int fNumVoters; private int fNumOfVotes = 0; private boolean fDone = false; + private boolean fEnabled = true; - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor#setResult(boolean) - */ public synchronized void setResult(boolean result) { fNumOfVotes++; - if (!isCanceled()) { - if (!result) { - setCanceled(true); - } + if (fEnabled) { + fEnabled = result; } } - /* (non-Javadoc) - * @see org.eclipse.core.runtime.IProgressMonitor#done() - */ public synchronized void done() { if (!fDone) { - if (isCanceled() || fNumOfVotes == fNumVoters) { + if (!fEnabled || fNumOfVotes == fNumVoters) { fDone = true; Iterator monitors = fMonitors.iterator(); while (monitors.hasNext()) { - IBooleanStatusMonitor monitor = (IBooleanStatusMonitor) monitors.next(); + IBooleanCollector monitor = (IBooleanCollector) monitors.next(); monitor.setStatus(getStatus()); - if (isCanceled()) { - monitor.setCanceled(true); - } else { - monitor.setResult(true); - } + monitor.setResult(fEnabled); monitor.done(); } fMonitors.clear(); @@ -80,7 +70,16 @@ public class ProxyBooleanRequestMonitor extends AbstractRequestMonitor implement * * @param monitor */ - void addMonitor(IBooleanStatusMonitor monitor) { + void addMonitor(IBooleanCollector monitor) { fMonitors.add(monitor); } + + /** + * Returns whether this command is still enabled. + * + * @return whether enabled + */ + synchronized boolean isEnabled() { + return fEnabled; + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java index 95ded45f7..11b54fd60 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.IResumeCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.IResumeCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java index 364df250c..0052dd666 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.IStepIntoCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.IStepIntoCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java index bd248a413..8951af91c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java @@ -11,10 +11,10 @@ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.IStepOverCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.IStepOverCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java index fa419b5ad..701a0a4f2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.IStepReturnCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.IStepReturnCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java index 1b8ef8eb3..77f3aed9c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.ISuspendCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.ISuspendCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java index 7bee7a537..022667296 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java @@ -14,10 +14,10 @@ import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchesListener2; +import org.eclipse.debug.core.commands.ITerminateCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.ITerminateCommand; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java index 854470053..3a4172df4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java @@ -11,14 +11,14 @@ package org.eclipse.debug.internal.ui.commands.actions; import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.commands.IStatusCollector; +import org.eclipse.debug.core.commands.ITerminateCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; import org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate; import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.ITerminateCommand; import org.eclipse.debug.ui.contexts.DebugContextEvent; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; @@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; */ public class TerminateAndRelaunchAction extends DebugCommandAction { - class RequestMonitor extends ActionRequestMonitor { + class RequestMonitor extends ActionStatusCollector { private ILaunch fLaunch; @@ -50,7 +50,7 @@ public class TerminateAndRelaunchAction extends DebugCommandAction { } - protected IStatusMonitor createStatusMonitor(Object target) { + protected IStatusCollector createStatusMonitor(Object target) { ILaunch launch = RelaunchActionDelegate.getLaunch(target); return new RequestMonitor(launch); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java index e3836128d..bd3c134eb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java @@ -13,13 +13,13 @@ package org.eclipse.debug.internal.ui.commands.actions; import org.eclipse.core.runtime.IStatus; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.commands.IStatusCollector; +import org.eclipse.debug.core.commands.ITerminateCommand; import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.IStatusMonitor; -import org.eclipse.debug.ui.commands.ITerminateCommand; import org.eclipse.jface.resource.ImageDescriptor; /** @@ -30,7 +30,7 @@ import org.eclipse.jface.resource.ImageDescriptor; public class TerminateAndRemoveAction extends DebugCommandAction { - class TerminateAndRemoveMonitor extends ActionRequestMonitor { + class TerminateAndRemoveMonitor extends ActionStatusCollector { private Object fElement; TerminateAndRemoveMonitor(Object element) { fElement = element; @@ -86,7 +86,7 @@ public class TerminateAndRemoveAction extends DebugCommandAction { return ITerminateCommand.class; } - protected IStatusMonitor createStatusMonitor(Object target) { + protected IStatusCollector createStatusMonitor(Object target) { return new TerminateAndRemoveMonitor(target); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java index c330266f0..86e00b80d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java @@ -10,10 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; +import org.eclipse.debug.core.commands.ITerminateCommand; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; -import org.eclipse.debug.ui.commands.ITerminateCommand; import org.eclipse.jface.resource.ImageDescriptor; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java index 32c04b881..d395152ba 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java @@ -12,12 +12,13 @@ package org.eclipse.debug.internal.ui.commands.actions; import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; import org.eclipse.core.runtime.Preferences.PropertyChangeEvent; +import org.eclipse.debug.core.commands.IStepFiltersCommand; +import org.eclipse.debug.internal.core.StepFilterManager; import org.eclipse.debug.internal.ui.DebugPluginImages; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.actions.ActionMessages; import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.commands.IStepFiltersCommand; import org.eclipse.debug.ui.contexts.DebugContextEvent; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; @@ -162,7 +163,7 @@ public class ToggleStepFiltersAction extends DebugCommandAction implements IProp * @see org.eclipse.core.runtime.Preferences$IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent event) { - if (event.getProperty().equals(IInternalDebugUIConstants.PREF_USE_STEP_FILTERS)) { + if (event.getProperty().equals(StepFilterManager.PREF_USE_STEP_FILTERS)) { boolean checked = DebugUITools.isUseStepFilters(); setChecked(checked); DebugCommandActionDelegate delegate = getDelegate(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java index dc5d3b295..4c211bff5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java @@ -37,6 +37,7 @@ import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil; import org.eclipse.debug.internal.ui.views.memory.renderings.AbstractBaseTableRendering; import org.eclipse.debug.internal.ui.views.memory.renderings.AbstractVirtualContentTableModel; @@ -61,7 +62,6 @@ import org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingConte import org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingLine; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.debug.ui.memory.AbstractTableRendering; import org.eclipse.debug.ui.memory.IMemoryBlockTablePresentation; import org.eclipse.debug.ui.memory.IMemoryRendering; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java index 91e90cf70..33212c80b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java @@ -28,12 +28,12 @@ import org.eclipse.debug.internal.ui.elements.adapters.AsynchronousDebugLabelAda import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactoryAdapter; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousContentAdapter; import org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousContentAdapter; import org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousLabelAdapter; import org.eclipse.debug.internal.ui.viewers.provisional.IChildrenRequestMonitor; import org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.viewers.ViewerSorter; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java index 04aae5b66..bd918c3d0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java @@ -27,8 +27,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactoryAdapter; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredContentProvider; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java index 1eb33cec3..0c1cd2d88 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java @@ -42,9 +42,9 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisito import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactoryAdapter; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.TreePath; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStatusMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java index 29bbbeada..0ba8af669 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStatusMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package org.eclipse.debug.ui.commands; +package org.eclipse.debug.internal.ui.viewers.model.provisional; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java index a7408a7da..51206dba9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.viewers.model.provisional; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.jface.viewers.TreePath; /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java index f196a5284..0f942662c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.viewers.model.provisional; -import org.eclipse.debug.ui.commands.IStatusMonitor; /** * Notified of viewer updates. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java index 8924ed9f5..7b41a6ca4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.viewers.provisional; -import org.eclipse.debug.ui.commands.IStatusMonitor; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; /** * A request monitor that collects children from an asynchronous tree content adapter. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java index 7c3d6fca2..a73b6bfa2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.viewers.provisional; -import org.eclipse.debug.ui.commands.IStatusMonitor; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; /** * A request monitor that collects whether an element contains diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java index e8d86e6af..eb8a93f51 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.viewers.provisional; -import org.eclipse.debug.ui.commands.IStatusMonitor; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.graphics.RGB; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java index 80539f846..b181e8bcb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java @@ -22,8 +22,8 @@ import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.internal.ui.memory.provisional.AbstractAsyncTableRendering; import org.eclipse.debug.internal.ui.viewers.AbstractUpdatePolicy; import org.eclipse.debug.internal.ui.viewers.AsynchronousModel; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.IBaseLabelProvider; import org.eclipse.jface.viewers.ICellModifier; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java index ea512971d..2ae633f45 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java @@ -23,9 +23,9 @@ import org.eclipse.core.runtime.Status; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.viewers.AsynchronousModel; import org.eclipse.debug.internal.ui.viewers.AsynchronousTableViewer; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor; import org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IPresentationErrorListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IPresentationErrorListener.java index 294b87381..667e2241b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IPresentationErrorListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IPresentationErrorListener.java @@ -12,7 +12,7 @@ package org.eclipse.debug.internal.ui.views.memory.renderings; import org.eclipse.core.runtime.IStatus; -import org.eclipse.debug.ui.commands.IStatusMonitor; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; public interface IPresentationErrorListener { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java index 51a4afa91..e09245532 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java @@ -41,6 +41,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor; import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext; @@ -51,7 +52,6 @@ import org.eclipse.debug.ui.AbstractDebugView; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugModelPresentation; import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.debug.ui.commands.IStatusMonitor; import org.eclipse.debug.ui.contexts.DebugContextEvent; import org.eclipse.debug.ui.contexts.IDebugContextListener; import org.eclipse.jface.action.IAction; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java index 464fc7592..aa05ee304 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java @@ -634,25 +634,29 @@ public class DebugUITools { /** * Sets whether step filters should be applied to step commands. This * setting is a global option applied to all registered debug targets. - * + * <p> + * Since 3.3, this is equivalent to calling <code>DebugPlugin.setUseStepFilters(boolean)</code>. + * </p> * @param useStepFilters whether step filters should be applied to step * commands * @since 3.0 * @see org.eclipse.debug.core.model.IStepFilters */ public static void setUseStepFilters(boolean useStepFilters) { - DebugUIPlugin.getDefault().getStepFilterManager().setUseStepFilters(useStepFilters); + DebugPlugin.setUseStepFilters(useStepFilters); } /** * Returns whether step filters are applied to step commands. - * + * <p> + * Since 3.3, this is equivalent to calling <code>DebugPlugin.isUseStepFilters()</code>. + * </p> * @return whether step filters are applied to step commands * @since 3.0 * @see org.eclipse.debug.core.model.IStepFilters */ public static boolean isUseStepFilters() { - return DebugUIPlugin.getDefault().getStepFilterManager().isUseStepFilters(); + return DebugPlugin.isUseStepFilters(); } /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IBooleanStatusMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IBooleanStatusMonitor.java deleted file mode 100644 index 4d9ca9e14..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IBooleanStatusMonitor.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - - -/** - * A status monitor that accepts a boolean result. Used by debug commands - * to specify enabled state. - * <p> - * Clients are not intended to implement this interface. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IBooleanStatusMonitor extends IStatusMonitor { - - /** - * Sets the result of a boolean request. - * - * @param result the result - */ - public void setResult(boolean result); -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDebugCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDebugCommand.java deleted file mode 100644 index a1b3d79d9..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDebugCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - - -/** - * A debug command represents a debugger function that can be enabled or disabled - * and executed. Specific commands extend this interface. - * <p> - * The debug platform defines interfaces for common debug commands and provides - * actions that operate against these interfaces. For example, the platform - * provides a terminate action that operates on the active debug context. The - * action delegates to the active context's <code>ITerminateCommand</code> - * implementation to update its enabled state and execute the command. Debug - * model elements may implement supported command interfaces directly or - * provide them as adapters. - * </p> - * <p> - * Clients are not intended to implement this interface directly. Clients may - * implement specific command interfaces that extend this interface. - * </p> - * @see org.eclipse.core.runtime.IAdaptable - * @see IDisconnectCommand - * @see IDropToFrameCommand - * @see IResumeCommand - * @see IStepFiltersCommand - * @see IStepIntoCommand - * @see IStepOverCommand - * @see IStepReturnCommand - * @see ISuspendCommand - * @see ITerminateCommand - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IDebugCommand { - - /** - * Determines whether this command may be executed on the specified element - * by reporting enabled state to the given monitor. - * <p> - * Implementations must be non-blocking and may respond asynchronously to the - * given monitor. Errors can reported by setting an appropriate status - * on the given monitor or cancelled by calling <code>setCancelled(boolean)</code>. - * A <code>null</code> status is equivalent to an OK status. When a request is - * complete, has encountered an error, or cancelled, implementations must call - * <code>done()</code> on the given monitor. - * </p> - * @param element element for which this command may be enabled - * @param monitor accepts enabled state - */ - public void canExecute(Object element, IBooleanStatusMonitor monitor); - - /** - * Executes this command on the specified element reporting status - * to the given monitor and returns whether this command should - * remain enabled while the command is executing. - * <p> - * Implementations must be non-blocking and may respond asynchronously to the - * given monitor. Errors can reported by setting an appropriate status - * on the given monitor or cancelled by calling <code>setCancelled(boolean)</code>. - * A <code>null</code> status is equivalent to an OK status. When a request is - * complete, has encountered an error, or cancelled, implementations must call - * <code>done()</code> on the given monitor. - * </p> - * @param element element to execute command on - * @param monitor status monitor - * @return whether the command remains enabled while command is executing - */ - public boolean execute(Object element, IStatusMonitor monitor); - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDisconnectCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDisconnectCommand.java deleted file mode 100644 index 66e3c7268..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDisconnectCommand.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A disconnect command disconnects the debug user interface from - * a debug session. Typically a disconnect command is supported by remote - * debuggers allowing the debug user interface to disconnect and the - * remote process to continue. - * <p> - * Clients may implement this interface. The debug platform provides a - * disconnect action that delegates to this command interface. As well, the - * debug platform provides an implementation of the disconnect command registered - * as an adapter on objects that implement {@link org.eclipse.debug.core.model.IDisconnect}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IDisconnectCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDropToFrameCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDropToFrameCommand.java deleted file mode 100644 index cdbfc4dc4..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IDropToFrameCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A drop to frame command typically resets a program's instruction pointer - * to the first executable line of code associated with a stack frame. - * <p> - * Clients may implement this interface. The debug platform provides a - * drop to frame action that delegates to this command interface. As well, the - * debug platform provides an implementation of the drop to frame command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.IDropToFrame}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IDropToFrameCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IResumeCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IResumeCommand.java deleted file mode 100644 index 5b4fa1415..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IResumeCommand.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A resume command typically resumes execution of a suspended program. - * <p> - * Clients may implement this interface. The debug platform provides a - * resume action that delegates to this command interface. As well, the - * debug platform provides an implementation of the resume command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.ISuspendResume}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IResumeCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepFiltersCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepFiltersCommand.java deleted file mode 100644 index 900ce01c9..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepFiltersCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A step filters command typically toggles the use of step filters - * in a debug session. - * <p> - * Clients may implement this interface. The debug platform provides a - * toggle step filters action that delegates to this command interface. As well, the - * debug platform provides an implementation of the step filters command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.IStepFilters}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IStepFiltersCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepIntoCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepIntoCommand.java deleted file mode 100644 index aa09ca839..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepIntoCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A step into command typically steps into the next instruction to - * be executed. - * <p> - * Clients may implement this interface. The debug platform provides a - * step into action that delegates to this command interface. As well, the - * debug platform provides an implementation of the step into command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.IStep}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IStepIntoCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepOverCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepOverCommand.java deleted file mode 100644 index 3399170c2..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepOverCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A step over command typically steps over the next instruction or line - * of code to be executed. - * <p> - * Clients may implement this interface. The debug platform provides a - * step over action that delegates to this command interface. As well, the - * debug platform provides an implementation of the step over command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.IStep}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IStepOverCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepReturnCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepReturnCommand.java deleted file mode 100644 index ad6f827e6..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/IStepReturnCommand.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A step return command typically steps out of the current method or function - * that the debugger is suspended in. - * <p> - * Clients may implement this interface. The debug platform provides a - * step return action that delegates to this command interface. As well, the - * debug platform provides an implementation of the step return command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.IStep}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface IStepReturnCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/ISuspendCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/ISuspendCommand.java deleted file mode 100644 index 324881a09..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/ISuspendCommand.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A suspend command typically suspends an executing program. - * <p> - * Clients may implement this interface. The debug platform provides a - * suspend action that delegates to this command interface. As well, the - * debug platform provides an implementation of the suspend command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.ISuspendResume}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface ISuspendCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/ITerminateCommand.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/ITerminateCommand.java deleted file mode 100644 index 16577c8f6..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/ITerminateCommand.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.debug.ui.commands; - -/** - * A terminate command typically terminates an executing program. - * <p> - * Clients may implement this interface. The debug platform provides a - * terminate action that delegates to this command interface. As well, the - * debug platform provides an implementation of the terminate command registered - * as an adapter on objects that implement - * {@link org.eclipse.debug.core.model.ITerminate}. - * </p> - * @since 3.3 - * <p> - * <strong>EXPERIMENTAL</strong>. This interface has been added as - * part of a work in progress. There is no guarantee that this API will - * remain unchanged during the 3.3 release cycle. Please do not use this API - * without consulting with the Platform/Debug team. - * </p> - */ -public interface ITerminateCommand extends IDebugCommand { - -} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/package.html b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/package.html deleted file mode 100644 index 127501663..000000000 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/commands/package.html +++ /dev/null @@ -1,28 +0,0 @@ -<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> -<html> - -<head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -<title>Debug Commands</title> -</head> - -<body link="#0000FF" vlink="#800080"> - -<p align="left">Provides a set of interfaces for common debug commands.</p> - -<h2 align="left">Package Specification</h2> - -<p>This package provides a set interfaces for common debug commands. A debug command - represent a debugger function that can be enabled or disabled and executed. - The debug platform provides actions corresponding to the common debug commands. - The actions delegate to the command interfaces to determine enabled state and - execute.</p> -<p>A debugger implementation can provide its own implementation of a command by - implementing a command interface directly, or by providing an adapter that implements - the command interface. The debug platform's actions update enabled state and - execute based on the active debug context. The debug platform provides implementations - of the common debug commands for debuggers that are an implementation of the - standard debug model. For example, the debug platform registers an <code>IStepOverCommand</code> - adapter for implementations of <code>IStep</code>.</p> -</body> -</html> |