Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 59181 Details for
Bug 150652
[evaluation] Force early return
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
force-return.patch (text/plain), 29.67 KB, created by
Darin Wright
on 2007-02-16 13:49:55 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2007-02-16 13:49:55 EST
Size:
29.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.debug.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug.ui/plugin.xml,v >retrieving revision 1.438 >diff -u -r1.438 plugin.xml >--- plugin.xml 15 Feb 2007 16:13:44 -0000 1.438 >+++ plugin.xml 16 Feb 2007 18:48:11 -0000 >@@ -113,32 +113,6 @@ > label="%JDTDebugActionSet.label" > visible="false" > id="org.eclipse.jdt.debug.ui.JDTDebugActionSet"> >- <menu >- label="%RunMenu.label" >- path="additions" >- id="org.eclipse.ui.run"> >- <separator >- name="jdtGroup"> >- </separator> >- </menu> >- <action >- definitionId="org.eclipse.jdt.debug.ui.commands.AddClassPrepareBreakpoint" >- label="%classPrepareAction.label" >- icon="$nl$/icons/full/obj16/class_obj.gif" >- helpContextId="add_class_prepare_action_context" >- class="org.eclipse.jdt.internal.debug.ui.breakpoints.AddClassPrepareBreakpointAction" >- menubarPath="org.eclipse.ui.run/breakpointGroup" >- id="org.eclipse.jdt.debug.ui.actions.AddClassPrepareBreakpoint"> >- </action> >- <action >- definitionId="org.eclipse.jdt.debug.ui.commands.AddExceptionBreakpoint" >- label="%exceptionAction.accel.label" >- icon="$nl$/icons/full/elcl16/exc_catch.gif" >- helpContextId="add_exception_action_context" >- class="org.eclipse.jdt.internal.debug.ui.breakpoints.AddExceptionAction" >- menubarPath="org.eclipse.ui.run/breakpointGroup" >- id="org.eclipse.jdt.debug.ui.actions.AddExceptionBreakpoint"> >- </action> > <action > definitionId="org.eclipse.jdt.debug.ui.commands.StepIntoSelection" > label="%stepIntoSelectionAction.label" >@@ -158,6 +132,24 @@ > </objectClass> > </and> > </enablement> >+ </action> >+ <action >+ definitionId="org.eclipse.jdt.debug.ui.commands.AddClassPrepareBreakpoint" >+ label="%classPrepareAction.label" >+ icon="$nl$/icons/full/obj16/class_obj.gif" >+ helpContextId="add_class_prepare_action_context" >+ class="org.eclipse.jdt.internal.debug.ui.breakpoints.AddClassPrepareBreakpointAction" >+ menubarPath="org.eclipse.ui.run/breakpointGroup" >+ id="org.eclipse.jdt.debug.ui.actions.AddClassPrepareBreakpoint"> >+ </action> >+ <action >+ definitionId="org.eclipse.jdt.debug.ui.commands.AddExceptionBreakpoint" >+ label="%exceptionAction.accel.label" >+ icon="$nl$/icons/full/elcl16/exc_catch.gif" >+ helpContextId="add_exception_action_context" >+ class="org.eclipse.jdt.internal.debug.ui.breakpoints.AddExceptionAction" >+ menubarPath="org.eclipse.ui.run/breakpointGroup" >+ id="org.eclipse.jdt.debug.ui.actions.AddExceptionBreakpoint"> > </action> > <action > id="org.eclipse.jdt.debug.ui.actions.Execute" >@@ -2268,6 +2260,12 @@ > description="%ActionDefinition.breakpointproperties.description" > id="org.eclipse.jdt.debug.ui.breakpoint.properties" > name="%CommandDefinition.breakpointproperties.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.debug.ui.category.run" >+ description="%Command.description.ForceReturn" >+ id="org.eclipse.jdt.debug.ui.commands.ForceReturn" >+ name="%Command.name.ForceReturn"> > </command> > </extension> > <extension point="org.eclipse.ui.bindings"> >@@ -2633,6 +2631,11 @@ > name="%ActionContext.breakpointsview.name" > parentId="org.eclipse.ui.contexts.window"> > </context> >+ <context >+ id="org.eclipse.jdt.debug.ui.evaluation" >+ name="Java Debug Expression Evaluation" >+ > >+ </context> > </extension> > <extension > point="org.eclipse.debug.ui.debugModelContextBindings"> >@@ -2945,6 +2948,30 @@ > </updater> > </extension> > <extension >+ point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="menu:org.eclipse.ui.run?after=profileGroup"> >+ <separator >+ name="jdtGroup" >+ visible="true"> >+ </separator> >+ </menuContribution> >+ <menuContribution >+ locationURI="menu:org.eclipse.debug.ui.DebugView?after=basic"> >+ <separator >+ name="javaActions" >+ visible="true"> >+ </separator> >+ </menuContribution> >+ <menuContribution >+ locationURI="menu:org.eclipse.ui.run?after=jdtGroup"> >+ <command >+ commandId="org.eclipse.jdt.debug.ui.commands.ForceReturn" >+ style="push"> >+ </command> >+ </menuContribution> >+ </extension> >+ <extension > point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors"> > <hyperlinkDetector > activate="true" >@@ -2955,5 +2982,39 @@ > targetId="org.eclipse.jdt.ui.javaCode"> > </hyperlinkDetector> > </extension> >+ <extension >+ point="org.eclipse.ui.handlers"> >+ <handler >+ class="org.eclipse.jdt.internal.debug.ui.evaluation.ForceReturnHandler" >+ commandId="org.eclipse.jdt.debug.ui.commands.ForceReturn"> >+ <activeWhen> >+ <with >+ variable="activePartId"> >+ <equals >+ value="org.eclipse.jdt.debug.ui.DisplayView"> >+ </equals> >+ </with> >+ </activeWhen> >+ <enabledWhen> >+ <with >+ variable="activeContexts"> >+ <test >+ property="org.eclipse.jdt.debug.ui.contains" >+ value="org.eclipse.jdt.debug.ui.evaluation"> >+ </test> >+ </with> >+ </enabledWhen> >+ </handler> >+ </extension> >+ <extension >+ point="org.eclipse.core.expressions.propertyTesters"> >+ <propertyTester >+ class="org.eclipse.jdt.internal.debug.ui.evaluation.EvaluationPropertyTester" >+ id="org.eclipse.jdt.debug.ui.evaluationPropertyTester" >+ namespace="org.eclipse.jdt.debug.ui" >+ properties="contains" >+ type="java.lang.Object"> >+ </propertyTester> >+ </extension> > > </plugin> >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug.ui/plugin.properties,v >retrieving revision 1.200 >diff -u -r1.200 plugin.properties >--- plugin.properties 15 Feb 2007 16:13:44 -0000 1.200 >+++ plugin.properties 16 Feb 2007 18:48:03 -0000 >@@ -21,6 +21,9 @@ > allinstances.label=All Ins&tances... > allinstances.tooltip=Displays a popup window showing all live instances of the selected object in the current running VM > >+Command.name.ForceReturn=&Force Return >+Command.description.ForceReturn=Returns the value of the selected expression from the current method >+ > caughtAction.label=&Caught > > VariablesViewJavaSubmenu.label=&Java >Index: ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java,v >retrieving revision 1.133 >diff -u -r1.133 JDIDebugUIPlugin.java >--- ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java 14 Feb 2007 19:13:55 -0000 1.133 >+++ ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java 16 Feb 2007 18:48:12 -0000 >@@ -114,6 +114,11 @@ > public static final String COMMAND_INSPECT = "org.eclipse.jdt.debug.ui.commands.Inspect"; //$NON-NLS-1$ > > /** >+ * Whether this plug-in is in debug mode. >+ */ >+ public static boolean DEBUG = false; >+ >+ /** > * Java Debug UI plug-in instance > */ > private static JDIDebugUIPlugin fgPlugin; >@@ -333,6 +338,7 @@ > */ > public void start(BundleContext context) throws Exception { > super.start(context); >+ DEBUG = "true".equals(Platform.getDebugOption("org.eclipse.jdt.debug.ui/debug")); //$NON-NLS-1$//$NON-NLS-2$ > JavaDebugOptionsManager.getDefault().startup(); > ResourcesPlugin.getWorkspace().addSaveParticipant(this, new ISaveParticipant() { > public void doneSaving(ISaveContext context) {} >Index: ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java,v >retrieving revision 1.76 >diff -u -r1.76 JavaDebugOptionsManager.java >--- ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java 8 May 2006 20:35:07 -0000 1.76 >+++ ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java 16 Feb 2007 18:48:12 -0000 >@@ -11,7 +11,6 @@ > package org.eclipse.jdt.internal.debug.ui; > > >-import com.ibm.icu.text.MessageFormat; > import java.util.ArrayList; > import java.util.List; > import java.util.StringTokenizer; >@@ -58,6 +57,7 @@ > import org.eclipse.jdt.internal.debug.core.logicalstructures.IJavaStructuresListener; > import org.eclipse.jdt.internal.debug.core.logicalstructures.JavaLogicalStructures; > import org.eclipse.jdt.internal.debug.ui.actions.JavaBreakpointPropertiesAction; >+import org.eclipse.jdt.internal.debug.ui.evaluation.EvaluationContextManager2; > import org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookLauncher; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.util.IPropertyChangeListener; >@@ -68,6 +68,7 @@ > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; > >+import com.ibm.icu.text.MessageFormat; > import com.sun.jdi.InvocationException; > import com.sun.jdi.ObjectReference; > >@@ -182,6 +183,7 @@ > debugPlugin.getLaunchManager().addLaunchListener(this); > debugPlugin.getBreakpointManager().addBreakpointListener(this); > EvaluationContextManager.startup(); >+ EvaluationContextManager2.startup(); > } > > /** >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.16 >diff -u -r1.16 MANIFEST.MF >--- META-INF/MANIFEST.MF 18 Sep 2006 15:26:39 -0000 1.16 >+++ META-INF/MANIFEST.MF 16 Feb 2007 18:48:11 -0000 >@@ -17,6 +17,7 @@ > org.eclipse.jdt.internal.debug.ui.console;x-internal:=true, > org.eclipse.jdt.internal.debug.ui.contentassist;x-internal:=true, > org.eclipse.jdt.internal.debug.ui.display;x-internal:=true, >+ org.eclipse.jdt.internal.debug.ui.evaluation;x-internal:=true, > org.eclipse.jdt.internal.debug.ui.heapwalking;x-internal:=true, > org.eclipse.jdt.internal.debug.ui.jres;x-internal:=true, > org.eclipse.jdt.internal.debug.ui.launcher;x-internal:=true, >Index: .options >=================================================================== >RCS file: .options >diff -N .options >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .options 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+org.eclipse.jdt.debug.ui/debug=false >+org.eclipse.jdt.debug.ui/debug/evaluation/contextManager=false >Index: ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationContextManager2.java >=================================================================== >RCS file: ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationContextManager2.java >diff -N ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationContextManager2.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationContextManager2.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,232 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 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.jdt.internal.debug.ui.evaluation; >+ >+import java.util.HashMap; >+import java.util.Map; >+ >+import org.eclipse.core.runtime.IAdaptable; >+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.Job; >+import org.eclipse.debug.ui.DebugUITools; >+import org.eclipse.debug.ui.contexts.DebugContextEvent; >+import org.eclipse.debug.ui.contexts.IDebugContextListener; >+import org.eclipse.debug.ui.contexts.IDebugContextProvider; >+import org.eclipse.jdt.debug.core.IJavaStackFrame; >+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.IWorkbenchPartSite; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.contexts.IContextActivation; >+import org.eclipse.ui.contexts.IContextService; >+import org.eclipse.ui.progress.UIJob; >+ >+/** >+ * @since 3.3 >+ */ >+public class EvaluationContextManager2 implements IDebugContextListener { >+ >+ /** >+ * Context that is enabled when there is a valid context for performing >+ * an expression evaluation. >+ */ >+ private static final String EVALUATION_CONTEXT_ID = "org.eclipse.jdt.debug.ui.evaluation"; //$NON-NLS-1$ >+ >+ /** >+ * Debug flag for tracing information >+ */ >+ private static boolean DEBUG_EVALUATION_CONTEXT_MANAGER = false; >+ >+ static { >+ DEBUG_EVALUATION_CONTEXT_MANAGER = JDIDebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$ >+ Platform.getDebugOption("org.eclipse.jdt.debug.ui/debug/evaluation/contextManager")); //$NON-NLS-1$ >+ } >+ >+ class UpdateJobFamily { >+ public UpdateJobFamily(IWorkbenchWindow window) { >+ fWindow = window; >+ } >+ public IWorkbenchWindow fWindow; >+ } >+ >+ class UpdateContextJob extends Job { >+ >+ private DebugContextEvent fEvent; >+ private IWorkbenchWindow fWindow; >+ >+ /** >+ * @param name >+ */ >+ public UpdateContextJob(DebugContextEvent event, IWorkbenchWindow window) { >+ super("Update expression evaluation context"); //$NON-NLS-1$ >+ fEvent = event; >+ fWindow = window; >+ setSystem(true); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object) >+ */ >+ public boolean belongsTo(Object family) { >+ if (family instanceof UpdateJobFamily) { >+ UpdateJobFamily ujf = (UpdateJobFamily) family; >+ return ujf.fWindow.equals(fWindow); >+ } >+ return false; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ protected IStatus run(IProgressMonitor monitor) { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("[Evaluation] Updating enablement"); //$NON-NLS-1$ >+ } >+ boolean activate = false; >+ if (!monitor.isCanceled()) { >+ ISelection context = fEvent.getContext(); >+ if (context instanceof IStructuredSelection) { >+ IStructuredSelection ss = (IStructuredSelection) context; >+ Object firstElement = ss.getFirstElement(); >+ if (firstElement instanceof IAdaptable) { >+ IAdaptable adaptable = (IAdaptable) firstElement; >+ Object adapter = adaptable.getAdapter(IJavaStackFrame.class); >+ if (adapter != null) { >+ // TODO: scrap book >+ activate = true; >+ } >+ } >+ } >+ } >+ IContextService service = (IContextService) fWindow.getService(IContextService.class); >+ if (service != null) { >+ if (activate) { >+ if (!service.getActiveContextIds().contains(EVALUATION_CONTEXT_ID)) { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("[Evaluation]\tSchedule activation"); //$NON-NLS-1$ >+ } >+ Job job = new PerformActivation(service); >+ job.schedule(); >+ } else { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("[Evaluation]\tStill enabled"); //$NON-NLS-1$ >+ } >+ } >+ } else { >+ IContextActivation activation = (IContextActivation) fActivations.remove(service); >+ if (activation != null) { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("[Evaluation]\tSchedule deactivation"); //$NON-NLS-1$ >+ } >+ Job job = new PerformDeactivation(activation); >+ job.schedule(); >+ } else { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("[Evaluation]\tStill deactivated"); //$NON-NLS-1$ >+ } >+ } >+ } >+ } >+ return Status.OK_STATUS; >+ } >+ >+ } >+ >+ /** >+ * Map of context activations per service >+ */ >+ private Map fActivations = new HashMap(); >+ >+ class PerformActivation extends UIJob { >+ >+ private IContextService fService; >+ >+ /** >+ * @param name >+ */ >+ public PerformActivation(IContextService service) { >+ super("Activate evaluation context"); //$NON-NLS-1$ >+ fService = service; >+ setSystem(true); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ public IStatus runInUIThread(IProgressMonitor monitor) { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("[Evaluation] Activate " + EVALUATION_CONTEXT_ID); //$NON-NLS-1$ >+ } >+ IContextActivation activation = fService.activateContext(EVALUATION_CONTEXT_ID); >+ fActivations.put(fService, activation); >+ return Status.OK_STATUS; >+ } >+ >+ } >+ >+ class PerformDeactivation extends UIJob { >+ >+ private IContextActivation fActivation; >+ >+ /** >+ * @param name >+ */ >+ public PerformDeactivation(IContextActivation activation) { >+ super("Deactivate evaluation context"); //$NON-NLS-1$ >+ fActivation = activation; >+ setSystem(true); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ public IStatus runInUIThread(IProgressMonitor monitor) { >+ if (DEBUG_EVALUATION_CONTEXT_MANAGER) { >+ System.out.println("Evaluation] Deactivate " + EVALUATION_CONTEXT_ID); //$NON-NLS-1$ >+ } >+ fActivation.getContextService().deactivateContext(fActivation); >+ return Status.OK_STATUS; >+ } >+ >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent) >+ */ >+ public void debugContextChanged(DebugContextEvent event) { >+ if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) { >+ IDebugContextProvider provider = (IDebugContextProvider) event.getSource(); >+ IWorkbenchPart part = provider.getPart(); >+ if (part != null) { >+ IWorkbenchPartSite site = part.getSite(); >+ if (site != null) { >+ IWorkbenchWindow window = site.getWorkbenchWindow(); >+ if (window != null) { >+ Job.getJobManager().cancel(new UpdateJobFamily(window)); >+ Job job = new UpdateContextJob(event, window); >+ job.schedule(100); >+ } >+ } >+ } >+ } >+ } >+ >+ public static void startup() { >+ EvaluationContextManager2 manager = new EvaluationContextManager2(); >+ DebugUITools.getDebugContextManager().addDebugContextListener(manager); >+ } >+ >+} >Index: ui/org/eclipse/jdt/internal/debug/ui/evaluation/ForceReturnHandler.java >=================================================================== >RCS file: ui/org/eclipse/jdt/internal/debug/ui/evaluation/ForceReturnHandler.java >diff -N ui/org/eclipse/jdt/internal/debug/ui/evaluation/ForceReturnHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/jdt/internal/debug/ui/evaluation/ForceReturnHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,43 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 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.jdt.internal.debug.ui.evaluation; >+ >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.ui.PlatformUI; >+ >+/** >+ * @since 3.3 >+ */ >+public class ForceReturnHandler extends AbstractHandler { >+ >+ public ForceReturnHandler() { >+ System.out.println("CREATED"); >+ System.out.println(PlatformUI.getWorkbench().getActiveWorkbenchWindow()); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) >+ */ >+ public Object execute(ExecutionEvent arg0) throws ExecutionException { >+ // TODO Auto-generated method stub >+ return null; >+ } >+ >+ public void dispose() { >+ System.out.println("DISPOSED"); >+ super.dispose(); >+ } >+ >+ >+ >+} >Index: ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationPropertyTester.java >=================================================================== >RCS file: ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationPropertyTester.java >diff -N ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationPropertyTester.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/jdt/internal/debug/ui/evaluation/EvaluationPropertyTester.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,40 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 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.jdt.internal.debug.ui.evaluation; >+ >+import java.util.Collection; >+ >+import org.eclipse.core.expressions.PropertyTester; >+ >+/** >+ * @since 3.3 >+ */ >+public class EvaluationPropertyTester extends PropertyTester { >+ >+ /** >+ * Tests for containment in a collection >+ */ >+ public static final String PROP_CONTAINS = "contains"; //$NON-NLS-1$ >+ >+ public EvaluationPropertyTester() { >+ } >+ >+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { >+ if (PROP_CONTAINS.equals(property)) { >+ if (receiver instanceof Collection) { >+ Collection collection = (Collection) receiver; >+ return collection.contains(expectedValue); >+ } >+ } >+ return false; >+ } >+ >+} >#P org.eclipse.debug.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/plugin.xml,v >retrieving revision 1.392 >diff -u -r1.392 plugin.xml >--- plugin.xml 15 Feb 2007 17:40:56 -0000 1.392 >+++ plugin.xml 16 Feb 2007 18:48:20 -0000 >@@ -170,20 +170,6 @@ > label="%BreakpointActionSet.label" > visible="false" > id="org.eclipse.debug.ui.breakpointActionSet"> >- <menu >- label="%RunMenu.label" >- path="additions" >- id="org.eclipse.ui.run"> >- <separator >- name="breakpointGroup"> >- </separator> >- <groupMarker >- name="lineBreakpointGroup"> >- </groupMarker> >- <groupMarker >- name="emptyBreakpointGroup"> >- </groupMarker> >- </menu> > <action > disabledIcon="$nl$/icons/full/dlcl16/rem_all_co.gif" > label="%RemoveAllBreakpointsAction.label" >@@ -248,26 +234,6 @@ > label="%DebugActionSet.label" > visible="false" > id="org.eclipse.debug.ui.debugActionSet"> >- <menu >- label="%RunMenu.label" >- path="additions" >- id="org.eclipse.ui.run"> >- <separator >- name="stepGroup"> >- </separator> >- <groupMarker >- name="stepIntoGroup"> >- </groupMarker> >- <groupMarker >- name="stepOverGroup"> >- </groupMarker> >- <groupMarker >- name="stepReturnGroup"> >- </groupMarker> >- <groupMarker >- name="emptyStepGroup"> >- </groupMarker> >- </menu> > <action > id="org.eclipse.debug.ui.actions.ToggleStepFilters" > hoverIcon="$nl$/icons/full/elcl16/stepbystep_co.gif" >@@ -362,23 +328,6 @@ > label="%LaunchActionSet.label" > visible="false" > id="org.eclipse.debug.ui.launchActionSet"> >- <menu >- label="%RunMenu.label" >- path="additions" >- id="org.eclipse.ui.run"> >- <separator >- name="relaunchGroup"> >- </separator> >- <separator >- name="runGroup"> >- </separator> >- <separator >- name="debugGroup"> >- </separator> >- <separator >- name="emptyLaunchGroup"> >- </separator> >- </menu> > <action > class="org.eclipse.debug.internal.ui.actions.OpenRunConfigurations" > definitionId="org.eclipse.debug.ui.commands.OpenRunConfigurations" >@@ -482,17 +431,6 @@ > label="%ProfileActionSet.label" > visible="false" > id="org.eclipse.debug.ui.profileActionSet"> >- <menu >- label="%RunMenu.label" >- path="additions" >- id="org.eclipse.ui.run"> >- <separator >- name="relaunchGroup"> >- </separator> >- <separator >- name="profileGroup"> >- </separator> >- </menu> > <action > id="org.eclipse.debug.internal.ui.actions.ProfileDropDownAction" > toolbarPath="org.eclipse.debug.ui.launchActionSet/debug" >@@ -1501,10 +1439,11 @@ > id="org.eclipse.debug.ui.commands.OpenDebugConfigurations"> > </command> > <command >- name="%ActionDefinition.debugLast.name" > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.debugLast.description" >- id="org.eclipse.debug.ui.commands.DebugLast"> >+ helpContextId="debug_last_action_context" >+ id="org.eclipse.debug.ui.commands.DebugLast" >+ name="%ActionDefinition.debugLast.name"> > </command> > <command > name="%ActionDefinition.runLast.name" >@@ -2286,6 +2225,74 @@ > </wizard> > </extension> > <extension >+ point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="menu:org.eclipse.ui.main.menu"> >+ <menu >+ id="org.eclipse.ui.run" >+ label="%RunMenu.label" >+ mnemonic="R" >+ tooltip="The main run menu"> >+ <separator >+ name="stepGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="stepIntoGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="stepOverGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="stepReturnGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="emptyStepGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="relaunchGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="debugGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="runGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="profileGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="emptyLaunchGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="breakpointGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="lineBreakpointGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="emptyBreakpointGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="additions"> >+ </separator> >+ >+ </menu> >+ </menuContribution> >+ </extension> >+ <extension > point="org.eclipse.ui.exportWizards"> > <wizard > category="org.eclipse.ui.Basic"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 150652
:
59181
|
59310
|
60733