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 8540 Details for
Bug 54117
Contextual Launch should use XML Expression Language
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]
patches org.eclipse.jdt.debug.ui
org.eclipse.jdt.debug.ui.xml.patch (text/plain), 8.18 KB, created by
Chris Tilt
on 2004-03-12 15:11:35 EST
(
hide
)
Description:
patches org.eclipse.jdt.debug.ui
Filename:
MIME Type:
Creator:
Chris Tilt
Created:
2004-03-12 15:11:35 EST
Size:
8.18 KB
patch
obsolete
>Index: plugin.xml >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/plugin.xml,v >retrieving revision 1.266 >diff -u -r1.266 plugin.xml >--- plugin.xml 11 Mar 2004 23:16:56 -0000 1.266 >+++ plugin.xml 12 Mar 2004 20:00:20 -0000 >@@ -1904,19 +1904,32 @@ > icon="icons/full/ctool16/java_app.gif" > helpContextId="org.eclipse.jdt.debug.ui.shortcut_local_java_application" > modes="run, debug" >- nameFilter="*.java" >- filterClass="org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut" > class="org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut" > id="org.eclipse.jdt.debug.ui.localJavaShortcut"> >- <contextLabel >- mode="run" >- label="%ContextualRunJavaApplication.label"/> >- <contextLabel >- mode="debug" >- label="%ContextualDebugJavaApplication.label"/> >- <filter >- name="ContextualLaunchActionFilter" >- value="supportsContextualLaunch"/> >+ <!-- Contextual Launch work in progress -c.tilt --> >+ <contextualLaunch> >+ <enablement> >+ <with variable="selection"> >+ <count value="1"/> >+ <iterate> >+ <or> >+ <test property="org.eclipse.debug.ui.matchesPattern" value="*.java"/> >+ <test property="org.eclipse.debug.ui.matchesPattern" value="*.class"/> >+ </or> >+ <!-- waiting for fixes from HEAD >+ <test property="org.eclipse.jdt.ui.hasMainType"/> >+ --> >+ </iterate> >+ </with> >+ </enablement> >+ <contextLabel >+ mode="run" >+ label="%ContextualRunJavaApplication.label"/> >+ <contextLabel >+ mode="debug" >+ label="%ContextualDebugJavaApplication.label"/> >+ </contextualLaunch> >+ <!-- End Contextual Launch work in progress --> > <perspective > id="org.eclipse.jdt.ui.JavaPerspective"> > </perspective> >@@ -1935,19 +1948,31 @@ > icon="icons/full/ctool16/java_applet.gif" > helpContextId="org.eclipse.jdt.debug.ui.shortcut_java_applet" > modes="run, debug" >- nameFilter="*.java" >- filterClass="org.eclipse.jdt.internal.debug.ui.launcher.JavaAppletLaunchShortcut" > class="org.eclipse.jdt.internal.debug.ui.launcher.JavaAppletLaunchShortcut" > id="org.eclipse.jdt.debug.ui.javaAppletShortcut"> >- <filter >- name="ContextualLaunchActionFilter" >- value="supportsContextualLaunch"/> >- <contextLabel >- mode="run" >- label="%ContextualRunJavaApplet.label"/> >- <contextLabel >- mode="debug" >- label="%ContextualDebugJavaApplet.label"/> >+ <contextualLaunch> >+ <enablement> >+ <with variable="selection"> >+ <count value="1"/> >+ <iterate> >+ <or> >+ <test property="org.eclipse.debug.ui.matchesPattern" value="*.java"/> >+ <test property="org.eclipse.debug.ui.matchesPattern" value="*.class"/> >+ </or> >+ <!-- waiting for fixes from HEAD >+ <test property="org.eclipse.jdt.isApplet"/> >+ --> >+ </iterate> >+ </with> >+ </enablement> >+ <contextLabel >+ mode="run" >+ label="%ContextualRunJavaApplet.label"/> >+ <contextLabel >+ mode="debug" >+ label="%ContextualDebugJavaApplet.label"/> >+ </contextualLaunch> >+ end work in progress --> > <perspective > id="org.eclipse.jdt.ui.JavaPerspective"> > </perspective> >Index: ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaAppletLaunchShortcut.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaAppletLaunchShortcut.java,v >retrieving revision 1.12 >diff -u -r1.12 JavaAppletLaunchShortcut.java >--- ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaAppletLaunchShortcut.java 8 Feb 2004 21:50:42 -0000 1.12 >+++ ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaAppletLaunchShortcut.java 12 Mar 2004 20:00:29 -0000 >@@ -14,6 +14,7 @@ > import java.util.ArrayList; > import java.util.Collections; > import java.util.HashSet; >+import java.util.Iterator; > import java.util.List; > import java.util.Set; > >@@ -51,7 +52,7 @@ > import org.eclipse.ui.dialogs.ElementListSelectionDialog; > import org.eclipse.ui.editors.text.WorkspaceOperationRunner; > >-public class JavaAppletLaunchShortcut implements ILaunchShortcut, ILaunchFilter { >+public class JavaAppletLaunchShortcut implements ILaunchShortcut { > > private static final String EMPTY_STRING = ""; //$NON-NLS-1$ > >@@ -268,29 +269,7 @@ > } > return (IStructuredSelection)selection; > } >- /* (non-Javadoc) >- * @see org.eclipse.ui.IActionFilter#testAttribute(java.lang.Object, java.lang.String, java.lang.String) >- */ >- public boolean testAttribute(IResource target, String name, String value) { >- if ("ContextualLaunchActionFilter".equals(name)) { //$NON-NLS-1$ >- return isApplet(target); >- } else if ("NameMatches".equals(name)) { //$NON-NLS-1$ >- return nameMatches(target, value); >- } >- return false; >- } >- /** >- * Test if the name of the target resource matches a pattern. >- * >- * @param target selected resource from workspace >- * @param value regular expression pattern to test >- * @return true if the pattern matches the resource name, false otherwise >- */ >- private boolean nameMatches(IResource resource, String pattern) { >- String filename = resource.getName(); >- StringMatcher sm = new StringMatcher(pattern, true, false); >- return sm.match(filename); >- } >+ > /** > * Check if the specified resource is an Applet. > * @return <code>true</code> if the target resource is an Applet, >Index: ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaApplicationLaunchShortcut.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaApplicationLaunchShortcut.java,v >retrieving revision 1.13 >diff -u -r1.13 JavaApplicationLaunchShortcut.java >--- ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaApplicationLaunchShortcut.java 24 Feb 2004 19:04:31 -0000 1.13 >+++ ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaApplicationLaunchShortcut.java 12 Mar 2004 20:00:29 -0000 >@@ -58,7 +58,7 @@ > /** > * Performs single click launching for local Java applications. > */ >-public class JavaApplicationLaunchShortcut implements ILaunchShortcut, ILaunchFilter { >+public class JavaApplicationLaunchShortcut implements ILaunchShortcut { > > /** > * @param search the java elements to search for a main type >@@ -294,31 +294,6 @@ > } else { > MessageDialog.openError(getShell(), LauncherMessages.getString("JavaApplicationAction.Launch_failed_7"), LauncherMessages.getString("JavaApplicationLaunchShortcut.The_selection_does_not_contain_a_main_type._2")); //$NON-NLS-1$ //$NON-NLS-2$ > } >- } >- >- /* (non-Javadoc) >- * @see org.eclipse.ui.IActionFilter#testAttribute(java.lang.Object, java.lang.String, java.lang.String) >- */ >- public boolean testAttribute(IResource target, String name, String value) { >- if ("ContextualLaunchActionFilter".equals(name)) { //$NON-NLS-1$ >- return hasMain(target); >- } else if ("NameMatches".equals(name)) { //$NON-NLS-1$ >- return nameMatches(target, value); >- } >- return false; >- } >- >- /** >- * Test if the name of the target resource matches a pattern. >- * >- * @param target selected resource from workspace >- * @param value regular expression pattern to test >- * @return true if the pattern matches the resource name, false otherwise >- */ >- private boolean nameMatches(IResource target, String regexp) { >- String filename = target.getName(); >- StringMatcher sm = new StringMatcher(regexp, true, false); >- return sm.match(filename); > } > > /**
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 54117
:
8516
| 8540 |
8542