Community
Participate
Working Groups
(See #53736 for the history behind this) Currently, it is not possible to extend your launch shortcuts to add another mode without using internal JDT API. The launch shortcuts themselves are internal, and they also have internal dependencies. Duplicating the entire internal dependency tree is just not feasible. I would like to request that some API be provided in order to extend your launch shortcuts. Perhaps one way to do this is to make the launch shortcuts themselves public? Or, make the immediate (first-level) dependencies public.
Deferred. In the meantime, I suggest subclassing the internal actions. Post 3.0, we can look at moving these actions to API.
Another extensibility problem here is the list of perspectives a shortcut should appear in. Consider the scenario where I create a new perspective, and I want to have the run/debug toolbar launch buttons. The only way I can get the launch shortcuts to show up in my perspective is to redefine them in my plugin.xml.
*** Bug 61361 has been marked as a duplicate of this bug. ***
The only two internal APIs required by TPTP are: org.eclipse.jdt.internal.debug.ui.launcher.JavaAppletLaunchShortcut org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut
*** Bug 127590 has been marked as a duplicate of this bug. ***
*** Bug 170233 has been marked as a duplicate of this bug. ***
Re-opening
TPTP still have the following dependencies on JDT internal code. plugins/org.eclipse.hyades.trace.ui/src/org/eclipse/hyades/trace/ui/internal/launcher/ProfileJavaAppletShortcut.java: - it extends org.eclipse.jdt.internal.debug.ui.launcher.JavaAppletLaunchShortcut; + within this class, following methods are called: - getConfigurationType() - findLaunchConfiguration(type, configType) - chooseType(types, mode) - chooseConfiguration(configList) - createConfiguration(type)) plugins/org.eclipse.hyades.trace.ui/src/org/eclipse/hyades/trace/ui/internal/launcher/ProfileJavaApplicationShortcut.java: - it extends org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut; + within this class, following methods are called: - getConfigurationType() - findLaunchConfiguration(type, configType) - chooseConfiguration(configList) - createConfiguration(type))
Created attachment 77400 [details] first run This patch provides 3 classes as new API, provided in the package org.eclipse.jdt.debug.ui.launcher. 1. JavaLaunchShortcut the abstract parent class of the two shortcuts in question (in the event contributors want base java functionality for their new shortcut(s)) 2. JavaApplicationLaunchShortcut, jdt.debug's implementation for java application launching 3. JavaAppletLaunchShortcut, jdt.debug's implementaiton for java applet launching Methods exposed through new API 1. getConfigurationType() 2. createConfiguration(IType type) 3. chooseType(IType[] types, String title) 4. findTypes(Object[] elements, IRunnableContext context) 5. getTypeSelectionTitle() 6. getEditorEmptyMessage() 7. getSelectionEmptyMessage() 8. findLaunchConfiguration(IType type, ILaunchConfigurationType configType) 9. chooseConfiguration(List configList) This review patch does not include documentation updates Eugene, could review the patch to see if all of TPTP's API requirements would be satisfied with this implementation?
Thanks Michael, The patch looks good to me. Could you also make getShell() protected?
released to HEAD adding in the getShell() method.
please verify Darin W
Verified. Moved the classes to the existing package org.eclipse.jdt.debug.ui.launchConfigurations to avoid adding a new API package. Updated javadoc and changed 'findLaunchConfiguration' to only find existing configurations rather than create a new one.