Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2006-09-13 15:09:18 -0400
committerMichael Rennie2006-09-13 15:09:18 -0400
commitcb58d87712559cf2335251ba81b8d36732c9f79d (patch)
treeebc796605284764e6922d626149c59d40fa1fc0a /org.eclipse.debug.core
parent4b4c01b51692d209933f6f3981094f77f292aadb (diff)
downloadeclipse.platform.debug-cb58d87712559cf2335251ba81b8d36732c9f79d.tar.gz
eclipse.platform.debug-cb58d87712559cf2335251ba81b8d36732c9f79d.tar.xz
eclipse.platform.debug-cb58d87712559cf2335251ba81b8d36732c9f79d.zip
Bug 157059
extensible launch options
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/buildnotes_platform-debug.html4
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java7
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java15
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchOption.java53
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java2
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties1
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java136
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchOption.java97
-rw-r--r--org.eclipse.debug.core/plugin.properties1
-rw-r--r--org.eclipse.debug.core/plugin.xml9
-rw-r--r--org.eclipse.debug.core/schema/launchDelegates.exsd310
-rw-r--r--org.eclipse.debug.core/schema/launchOptions.exsd136
12 files changed, 551 insertions, 220 deletions
diff --git a/org.eclipse.debug.core/buildnotes_platform-debug.html b/org.eclipse.debug.core/buildnotes_platform-debug.html
index 402b25a21..54f278f05 100644
--- a/org.eclipse.debug.core/buildnotes_platform-debug.html
+++ b/org.eclipse.debug.core/buildnotes_platform-debug.html
@@ -20,6 +20,10 @@
<li>deprecated <code>IDebugUIConstants.ATTR_CONSOLE_ENCODING</code>.</li>
<li>added <code>DebugUITools.getLastLaunch(String id)</code> - provides access to the last launch in
each launch group.</li>
+ <li>Add <code>launchOptions</code> schema -- provides a new mechanism for providing launch options to the launching framework</li>
+ <li>Added <code>ILaunchOption</code> -- which describes a single contributed launch option within the launch manager</li>
+ <li>Added <code>ILaunchManager.getLaunchOptions()</code> -- returns and array of all of the <code>ILaunchOptions</code> registered with the launch manager</li>
+ <li>Added <code>ILaunchManager.getLaunchOption(String id)</code> -- returns the <code>ILaunchOption</code> associated with the given unique id, or <code>null</code></li>
</ul>
<h2>Sep 12, 2006</h2>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
index 2055fb10e..aa7a94bc4 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
@@ -182,6 +182,13 @@ public class DebugPlugin extends Plugin {
public static final String EXTENSION_POINT_SOURCE_PATH_COMPUTERS = "sourcePathComputers"; //$NON-NLS-1$
/**
+ * Simple identifier constant for the launch options extension point
+ *
+ * @since 3.3
+ */
+ public static final String EXTENSION_POINT_LAUNCH_OPTIONS = "launchOptions"; //$NON-NLS-1$
+
+ /**
* Status code indicating an unexpected internal error.
*/
public static final int INTERNAL_ERROR = 120;
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
index 7cbf24ba6..3b8ade65d 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
@@ -225,6 +225,21 @@ public interface ILaunchManager {
public ILaunchMode[] getLaunchModes();
/**
+ * Returns the launch option registered with the given id
+ * @param optionId the unique id of the launch option
+ * @return the lauch option associated with ther specified id or <code>null</code> if not found
+ * @since 3.3
+ */
+ public ILaunchOption getLaunchOption(String optionId);
+
+ /**
+ * Returns all registered launch options
+ * @return all registered launch options
+ * @since 3.3
+ */
+ public ILaunchOption[] getLaunchOptions();
+
+ /**
* Returns a collection of launch configurations that required migration to be
* compatible with current tooling.
*
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchOption.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchOption.java
new file mode 100644
index 000000000..c499fdf94
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchOption.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.core;
+
+/**
+ * This interface describes a launch option.
+ * Clients can contribute launch options via the <code>launchOptions</code> extension point.
+ *
+ * Example contribution of the debug launch option:
+ * <pre>
+ * <extension
+ point="org.eclipse.debug.core.launchOptions">
+ <launchOption
+ id="org.eclipse.debug.core.debug"
+ label="Debug"
+ option="debug">
+ </launchOption>
+ </extension>
+ * </pre>
+ *
+ * Clients are NOT intended to implement this interface
+ *
+ * @since 3.3
+ *
+ */
+public interface ILaunchOption {
+
+
+ /**
+ * @return the human readable label for this launch option e.g. 'Debug'
+ */
+ public String getLabel();
+
+ /**
+ * Returns the launch option defined for this extension. The option is non-translatable, one word and
+ * all lowercase.
+ * @return the option defined by this extension
+ */
+ public String getOption();
+
+ /**
+ * @return the unique id provided for this option e.g. org.eclipse.debug.core.debug
+ */
+ public String getIdentifier();
+}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
index 799fc5c87..e74950c80 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
@@ -26,6 +26,8 @@ public class DebugCoreMessages extends NLS {
public static String DebugPlugin_0;
public static String DebugPlugin_1;
public static String EnvironmentVariableResolver_0;
+
+ public static String LaunchOption_0;
public static String SystemPropertyResolver_0;
public static String InputStreamMonitor_label;
public static String Launch_terminate_failed;
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
index f5ae64d8e..5f409e7e3 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
@@ -52,6 +52,7 @@ LaunchManager_Source_locator_does_not_exist___0__13=Source locator does not exis
LaunchManager_30=Unable to retrieve shared launch configuration file for {0}
LaunchMode_1=Required attribute {0} missing for launchMode extension.
LaunchMode_0={0} As
+LaunchOption_0=Required attribute {0} missing for launch option extension
LogicalStructureType_7=Required attribute {0} missing for logicalStructureType extension.
LogicalStructureType_0=<Missing Description>
LogicalStructureProvider_0=Required attribute modelIdentifier missing for logicalStructureType extension.
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index 1f3a906f6..2fd936943 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -57,8 +57,6 @@ import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IResourceProxy;
import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -81,6 +79,7 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchListener;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.ILaunchMode;
+import org.eclipse.debug.core.ILaunchOption;
import org.eclipse.debug.core.ILaunchesListener;
import org.eclipse.debug.core.ILaunchesListener2;
import org.eclipse.debug.core.IStatusHandler;
@@ -558,6 +557,13 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
private Map fLaunchModes = null;
/**
+ * Registered launch options, or <code>null</code> if not initialized
+ * Map is of the form <code>Map<id, option></code>
+ * @since 3.3
+ */
+ private HashMap fLaunchOptions = null;
+
+ /**
* List of contributed launch delegates (delegates contributed for existing
* launch configuration types).
*/
@@ -863,7 +869,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* added/changed/removed..
*/
public void fireUpdate(ILaunch launch, int update) {
- getLaunchNotifier().notify(launch, update);
+ new LaunchNotifier().notify(launch, update);
}
/**
@@ -871,7 +877,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* added/changed/removed.
*/
public void fireUpdate(ILaunch[] launches, int update) {
- getLaunchesNotifier().notify(launches, update);
+ new LaunchesNotifier().notify(launches, update);
}
/**
@@ -918,7 +924,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
fLaunchConfigurationIndex = new ArrayList(20);
List configs = findLocalLaunchConfigurations();
verifyConfigurations(configs, fLaunchConfigurationIndex);
- configs = findLaunchConfigurations(getWorkspaceRoot());
+ configs = findLaunchConfigurations(ResourcesPlugin.getWorkspace().getRoot());
verifyConfigurations(configs, fLaunchConfigurationIndex);
} finally {
hookResourceChangeListener();
@@ -1244,27 +1250,21 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* @see ILaunchManager#getLaunchConfigurationType(String)
*/
public ILaunchConfigurationType getLaunchConfigurationType(String id) {
- Iterator iter = getLaunchConfigurationTypeList().iterator();
- while (iter.hasNext()) {
- ILaunchConfigurationType type = (ILaunchConfigurationType)iter.next();
- if (type.getIdentifier().equals(id)) {
- return type;
+ ILaunchConfigurationType[] types = getLaunchConfigurationTypes();
+ for(int i = 0; i < types.length; i++) {
+ if (types[i].getIdentifier().equals(id)) {
+ return types[i];
}
}
return null;
}
-
- private List getLaunchConfigurationTypeList() {
- initializeLaunchConfigurationTypes();
- return fLaunchConfigurationTypes;
- }
-
+
/**
* @see ILaunchManager#getLaunchConfigurationTypes()
*/
public ILaunchConfigurationType[] getLaunchConfigurationTypes() {
- List types= getLaunchConfigurationTypeList();
- return (ILaunchConfigurationType[])types.toArray(new ILaunchConfigurationType[types.size()]);
+ initializeLaunchConfigurationTypes();
+ return (ILaunchConfigurationType[])fLaunchConfigurationTypes.toArray(new ILaunchConfigurationType[fLaunchConfigurationTypes.size()]);
}
/**
@@ -1276,10 +1276,6 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
}
}
- private LaunchesNotifier getLaunchesNotifier() {
- return new LaunchesNotifier();
- }
-
/* (non-Javadoc)
* @see org.eclipse.debug.core.ILaunchManager#getLaunchMode(java.lang.String)
*/
@@ -1297,8 +1293,21 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
return (ILaunchMode[]) collection.toArray(new ILaunchMode[collection.size()]);
}
- private LaunchNotifier getLaunchNotifier() {
- return new LaunchNotifier();
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchManager#getLaunchOption(java.lang.String)
+ */
+ public ILaunchOption getLaunchOption(String optionId) {
+ initializeLaunchOptions();
+ return (ILaunchOption)fLaunchOptions.get(optionId);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchManager#getLaunchOptions()
+ */
+ public ILaunchOption[] getLaunchOptions() {
+ initializeLaunchOptions();
+ Collection col = fLaunchOptions.values();
+ return (ILaunchOption[])col.toArray(new ILaunchOption[col.size()]);
}
/**
@@ -1309,8 +1318,9 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
protected List getLocalLaunchConfigurations() {
Iterator iter = getAllLaunchConfigurations().iterator();
List configs = new ArrayList();
+ ILaunchConfiguration config = null;
while (iter.hasNext()) {
- ILaunchConfiguration config = (ILaunchConfiguration)iter.next();
+ config = (ILaunchConfiguration)iter.next();
if (config.isLocal()) {
configs.add(config);
}
@@ -1465,22 +1475,13 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
initializeSourceContainerTypes();
return (ISourcePathComputer) sourcePathComputers.get(id);
}
-
-
- private IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- private IWorkspaceRoot getWorkspaceRoot() {
- return getWorkspace().getRoot();
- }
/**
* Starts listening for resource change events
*/
private synchronized void hookResourceChangeListener() {
if (!fListening) {
- getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
fListening = true;
}
}
@@ -1516,11 +1517,9 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
if (fContributedDelegates == null) {
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.getUniqueIdentifier(), DebugPlugin.EXTENSION_POINT_LAUNCH_DELEGATES);
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
- fContributedDelegates= new ArrayList(infos.length);
- for (int i= 0; i < infos.length; i++) {
- IConfigurationElement configurationElement = infos[i];
- ContributedDelegate delegate = new ContributedDelegate(configurationElement);
- fContributedDelegates.add(delegate);
+ fContributedDelegates = new ArrayList(infos.length);
+ for (int i= 0; i < infos.length; i++) {
+ fContributedDelegates.add(new ContributedDelegate(infos[i]));
}
}
}
@@ -1547,23 +1546,41 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
*/
private synchronized void initializeLaunchModes() {
if (fLaunchModes == null) {
- IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.getUniqueIdentifier(), DebugPlugin.EXTENSION_POINT_LAUNCH_MODES);
- IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
- fLaunchModes = new HashMap();
- for (int i= 0; i < infos.length; i++) {
- IConfigurationElement configurationElement = infos[i];
- try {
- ILaunchMode mode = new LaunchMode(configurationElement);
+ try {
+ IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.getUniqueIdentifier(), DebugPlugin.EXTENSION_POINT_LAUNCH_MODES);
+ IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
+ fLaunchModes = new HashMap();
+ ILaunchMode mode = null;
+ for (int i= 0; i < infos.length; i++) {
+ mode = new LaunchMode(infos[i]);
fLaunchModes.put(mode.getIdentifier(), mode);
- } catch (CoreException e) {
- DebugPlugin.log(e);
}
-
- }
+ }
+ catch (CoreException e) {DebugPlugin.log(e);}
}
}
/**
+ * Initializes the listing of registered launch options. Does no work if the mapping is already populated.
+ * @since 3.3
+ */
+ private synchronized void initializeLaunchOptions() {
+ if(fLaunchOptions == null) {
+ try {
+ IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.getUniqueIdentifier(), DebugPlugin.EXTENSION_POINT_LAUNCH_OPTIONS);
+ IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
+ fLaunchOptions = new HashMap();
+ ILaunchOption option = null;
+ for(int i = 0; i < infos.length; i++) {
+ option = new LaunchOption(infos[i]);
+ fLaunchOptions.put(option.getIdentifier(), option);
+ }
+ }
+ catch(CoreException ce) {DebugPlugin.log(ce);}
+ }
+ }
+
+ /**
* Initializes source container type and source path computer extensions.
*/
private synchronized void initializeSourceContainerTypes() {
@@ -1738,7 +1755,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* @param config the launch configuration that was changed
*/
protected void launchConfigurationChanged(ILaunchConfiguration config) {
- removeInfo(config);
+ fLaunchConfigurations.remove(config);
clearConfigNameCache();
if (isValid(config)) {
// in case the config has been refreshed and it was removed from the
@@ -1760,7 +1777,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* @param config the launch configuration that was deleted
*/
protected void launchConfigurationDeleted(ILaunchConfiguration config) {
- removeInfo(config);
+ fLaunchConfigurations.remove(config);
getAllLaunchConfigurations().remove(config);
getConfigurationNotifier().notify(config, REMOVED);
clearConfigNameCache();
@@ -1822,17 +1839,6 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
}
/**
- * Removes the given launch configuration from the cache of configurations.
- * When a local configuration is deleted, this method is called, as there will
- * be no resource delta generated to auto-update the cache.
- *
- * @param configuration the configuration to remove
- */
- private void removeInfo(ILaunchConfiguration configuration) {
- fLaunchConfigurations.remove(configuration);
- }
-
- /**
* @see ILaunchManager#removeLaunch(ILaunch)
*/
public void removeLaunch(final ILaunch launch) {
@@ -1966,7 +1972,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
clearAllLaunchConfigurations();
- getWorkspace().removeResourceChangeListener(this);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
}
/**
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchOption.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchOption.java
new file mode 100644
index 000000000..eee0e5325
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchOption.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchOption;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * Proxy to a launch option extension
+ *
+ * @since 3.3
+ */
+public class LaunchOption implements ILaunchOption {
+
+ //constants for attribute names
+ private static final String ID = "id"; //$NON-NLS-1$
+ private static final String LABEL = "label"; //$NON-NLS-1$
+ private static final String OPTION = "option"; //$NON-NLS-1$
+
+ /**
+ * The associated configuration element
+ */
+ private IConfigurationElement fElement = null;
+
+ /**
+ * Constructor
+ * @param element the element to associate this launch option with
+ */
+ public LaunchOption(IConfigurationElement element) throws CoreException {
+ fElement = element;
+ verifyAttributesExist();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchOption#getIdentifier()
+ */
+ public String getIdentifier() {
+ return fElement.getAttribute(ID);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchOption#getLabel()
+ */
+ public String getLabel() {
+ return fElement.getAttribute(LABEL);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchOption#getOption()
+ */
+ public String getOption() {
+ return fElement.getAttribute(OPTION);
+ }
+
+ /**
+ * Checks to ensure that all of the required attributes are present in the <code>IConfigurationElement</code>
+ * @return true if all attributes are present, throws <code>CoreException</code> otherwise
+ * @throws CoreException
+ */
+ private void verifyAttributesExist() throws CoreException {
+ if(fElement != null) {
+ if(fElement.getAttribute(ID) == null) {
+ missingAttribute(ID);
+ }
+ if(fElement.getAttribute(LABEL) == null) {
+ missingAttribute(LABEL);
+ }
+ if(fElement.getAttribute(OPTION) == null) {
+ missingAttribute(OPTION);
+ }
+ }
+ }
+
+ /**
+ * Throws a <code>CoreException</code> indicating the specified attribute is missing from the extension
+ * point definition
+ * @param attrName the attribute name that is missing
+ * @throws CoreException
+ */
+ private void missingAttribute(String attrName) throws CoreException {
+ throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugPlugin.INTERNAL_ERROR, MessageFormat.format(DebugCoreMessages.LaunchOption_0, new String[]{attrName}), null));
+ }
+}
diff --git a/org.eclipse.debug.core/plugin.properties b/org.eclipse.debug.core/plugin.properties
index 732d0f776..7a75466cb 100644
--- a/org.eclipse.debug.core/plugin.properties
+++ b/org.eclipse.debug.core/plugin.properties
@@ -25,6 +25,7 @@ logicalStructureTypesExtensionPointName=Logical Structure Types
logicalStructureProvidersExtensionPointName=Logical Structure Providers
sourceContainerTypesName = Source Container Types
sourcePathComputersName = Source Path Computers
+launchOptionsExtensionpointName=Launch Options
run=&Run
debug=&Debug
diff --git a/org.eclipse.debug.core/plugin.xml b/org.eclipse.debug.core/plugin.xml
index b661755e9..f622ecbb1 100644
--- a/org.eclipse.debug.core/plugin.xml
+++ b/org.eclipse.debug.core/plugin.xml
@@ -18,6 +18,7 @@
<extension-point id="sourceContainerTypes" name="%sourceContainerTypesName" schema="schema/sourceContainerTypes.exsd"/>
<extension-point id="sourcePathComputers" name="%sourcePathComputersName" schema="schema/sourcePathComputers.exsd"/>
<extension-point id="logicalStructureProviders" name="%logicalStructureProvidersExtensionPointName" schema="schema/logicalStructureProviders.exsd"/>
+ <extension-point id="launchOptions" name="%launchOptionsExtensionpointName" schema="schema/launchOptions.exsd"/>
<!-- Extensions -->
<extension
@@ -159,6 +160,14 @@
class="org.eclipse.debug.internal.core.sourcelookup.SourceLocatorMementoComparator"
id="org.eclipse.debug.core.sourceLocatorMementoComparator">
</launchConfigurationComparator>
+ </extension>
+ <extension
+ point="org.eclipse.debug.core.launchOptions">
+ <launchOption
+ id="org.eclipse.debug.core.debug"
+ label="Debug"
+ option="debug">
+ </launchOption>
</extension>
</plugin>
diff --git a/org.eclipse.debug.core/schema/launchDelegates.exsd b/org.eclipse.debug.core/schema/launchDelegates.exsd
index 8e9271c85..f2771cf3a 100644
--- a/org.eclipse.debug.core/schema/launchDelegates.exsd
+++ b/org.eclipse.debug.core/schema/launchDelegates.exsd
@@ -1,155 +1,155 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.core" id="launchDelegates" name="Launch Delegates"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for contributing a launch delegate to an existing launch configuration type for one or more launch modes. Since launch modes are extensible, it may be neccessary to contribute additional launch delegates to an existing launch configuration type. Each launch delegate is contributed for a specific launch configuration type. A launch delegate supports one or more launch modes, and specifies a delegate responsible for the implementation of launching.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="launchDelegate" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="launchDelegate">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this launch delegate.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="delegate" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements &lt;code&gt;ILaunchConfigurationDelegate&lt;/code&gt;.
-Launch configuration instances of this delegate&apos;s type will delegate to instances of this class to perform launching.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.core.model.ILaunchConfigurationDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="modes" type="string" use="required">
- <annotation>
- <documentation>
- specifies a comma-separated list of the modes this lauch delegate supports.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- identifier of an existing launch configuration type that this launch delegate is capable of launching.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="sourcePathComputerId" type="string">
- <annotation>
- <documentation>
- The unique identifier of a sourcePathComputer extension that is used to compute a default source lookup path for launch configurations of this type. Since 3.1, this attribute cab be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source path computer can be specified per launch configuration type.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="sourceLocatorId" type="string">
- <annotation>
- <documentation>
- The unique identifier of a sourceLocator extension that is used to create the source locator for sessions launched using launch configurations of this type. Since 3.1, this attribute can be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source locater can be specified per launch configuration type.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a launch delegate extension point:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.debug.core.launchDelegates&quot;&gt;
- &lt;launchDelegate
- id=&quot;com.example.ExampleProfileDelegate&quot;
- delegate=&quot;com.example.ExampleProfileDelegate&quot;
- type=&quot;org.eclipse.jdt.launching.localJavaApplication&quot;
- modes=&quot;profile&quot;&gt;
- &lt;/launchDelegate&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-In the example above, the specified launch delegate is contributed to launch Java applications in profile mode.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute &lt;b&gt;delegate&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.debug.core.model.ILaunchConfigurationDelegate&lt;/b&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
-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
-&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.debug.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.debug.core" id="launchDelegates" name="Launch Delegates"/>
+ </appInfo>
+ <documentation>
+ This extension point provides a mechanism for contributing a launch delegate to an existing launch configuration type for one or more launch modes. Since launch modes are extensible, it may be neccessary to contribute additional launch delegates to an existing launch configuration type. Each launch delegate is contributed for a specific launch configuration type. A launch delegate supports one or more launch modes, and specifies a delegate responsible for the implementation of launching.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="launchDelegate" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="launchDelegate">
+ <annotation>
+ <appInfo>
+ <meta.element labelAttribute="name"/>
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ specifies a unique identifier for this launch delegate.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="delegate" type="string" use="required">
+ <annotation>
+ <documentation>
+ specifies the fully qualified name of the Java class that implements &lt;code&gt;ILaunchConfigurationDelegate&lt;/code&gt;.
+Launch configuration instances of this delegate&apos;s type will delegate to instances of this class to perform launching.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.debug.core.model.ILaunchConfigurationDelegate"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="modes" type="string" use="required">
+ <annotation>
+ <documentation>
+ specifies a comma-separated list of the modes this lauch delegate supports.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ identifier of an existing launch configuration type that this launch delegate is capable of launching.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="sourcePathComputerId" type="string">
+ <annotation>
+ <documentation>
+ The unique identifier of a sourcePathComputer extension that is used to compute a default source lookup path for launch configurations of this type. Since 3.1, this attribute cab be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source path computer can be specified per launch configuration type.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="sourceLocatorId" type="string">
+ <annotation>
+ <documentation>
+ The unique identifier of a sourceLocator extension that is used to create the source locator for sessions launched using launch configurations of this type. Since 3.1, this attribute can be specified in a launchDelegate extension when unspecified in the assocaited launchConfigurationType extension. Only one source locater can be specified per launch configuration type.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 3.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ The following is an example of a launch delegate extension point:
+
+&lt;p&gt;
+&lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.debug.core.launchDelegates&quot;&gt;
+ &lt;launchDelegate
+ id=&quot;com.example.ExampleProfileDelegate&quot;
+ delegate=&quot;com.example.ExampleProfileDelegate&quot;
+ type=&quot;org.eclipse.jdt.launching.localJavaApplication&quot;
+ modes=&quot;profile&quot;&gt;
+ &lt;/launchDelegate&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+
+In the example above, the specified launch delegate is contributed to launch Java applications in profile mode.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ Value of the attribute &lt;b&gt;delegate&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.debug.core.model.ILaunchConfigurationDelegate&lt;/b&gt;.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
+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
+&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.debug.core/schema/launchOptions.exsd b/org.eclipse.debug.core/schema/launchOptions.exsd
new file mode 100644
index 000000000..f3527f010
--- /dev/null
+++ b/org.eclipse.debug.core/schema/launchOptions.exsd
@@ -0,0 +1,136 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.debug.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.debug.core" id="launchOptions" name="Launch Options"/>
+ </appInfo>
+ <documentation>
+ This extension point is used to contribute launch options to the launch manager.
+Launch options are used as modifiers when executing a launch configuration.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="launchOption" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="launchOption">
+ <annotation>
+ <appInfo>
+ <meta.element translatable="true"/>
+ </appInfo>
+ </annotation>
+ <complexType>
+ <attribute name="label" type="string" use="required">
+ <annotation>
+ <documentation>
+ A human readable label for the option e.g. Debug
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ this is a unique id for the launch option e.g. org.eclipse.debug.debugLaunchOption
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="option" type="string" use="required">
+ <annotation>
+ <documentation>
+ the name of the option itself, described as one word all lowercase e.g. debug
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ Eclipse 3.3 M2
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ &lt;extension
+ point=&quot;org.eclipse.debug.core.launchOptions&quot;&gt;
+ &lt;launchOption
+ id=&quot;org.eclipse.debug.core.debug&quot;
+ label=&quot;Debug&quot;
+ option=&quot;debug&quot;&gt;
+ &lt;/launchOption&gt;
+ &lt;/extension&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ The name of a launch option must be a human readable form, as well the option attribute must be a single word all lowercase.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2003, 2005 IBM Corporation and others.&lt;br&gt;
+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
+&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>

Back to the top