diff options
author | Mike Rennie | 2013-02-21 21:03:05 +0000 |
---|---|---|
committer | Mike Rennie | 2013-02-21 21:03:05 +0000 |
commit | cc6a544e78dbb27322e50e3777b530edce3f8a36 (patch) | |
tree | 882176a6a06502720b8a351aa54e291fd140e4e5 | |
parent | 504d958744ff794bdc541092acfee3a50299e9f9 (diff) | |
download | eclipse.platform.debug-cc6a544e78dbb27322e50e3777b530edce3f8a36.tar.gz eclipse.platform.debug-cc6a544e78dbb27322e50e3777b530edce3f8a36.tar.xz eclipse.platform.debug-cc6a544e78dbb27322e50e3777b530edce3f8a36.zip |
Bug 322689 - [resolver] stringVariablePresentation extension pointI20130224-2000I20130223-1500I20130222-2000
requires impementation of internal interface
8 files changed, 172 insertions, 146 deletions
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF index 2885563ef..d5bbbaa64 100644 --- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF @@ -70,7 +70,8 @@ Export-Package: org.eclipse.debug.internal.ui; org.eclipse.debug.ui.console, org.eclipse.debug.ui.contexts, org.eclipse.debug.ui.memory, - org.eclipse.debug.ui.sourcelookup + org.eclipse.debug.ui.sourcelookup, + org.eclipse.debug.ui.stringsubstitution Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)", org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)", org.eclipse.ui;bundle-version="[3.5.0,4.0.0)", diff --git a/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd b/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd index 44100ccc0..613c623a9 100644 --- a/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd +++ b/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd @@ -1,122 +1,122 @@ -<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="stringVariablePresentations" name="String Variable Presentations"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for contributing a user interface/presentation for a string substitution variable (i.e. a context variable or value variable).
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="variablePresentation" 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="variablePresentation">
- <complexType>
- <attribute name="variableName" type="string" use="required">
- <annotation>
- <documentation>
- specifies the variable this presentation is for
- </documentation>
- <appInfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.core.variables.dynamicVariables/variable/@name"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="argumentSelector" type="string" use="required">
- <annotation>
- <documentation>
- specifies a fully qualified name of a Java class that implements <code>IArgumentSelector</code>
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.debug.internal.ui.stringsubstitution.IArgumentSelector"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.1
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a variable presentation contribution:
-<pre>
-<extension point="org.eclipse.debug.ui.stringVariablePresentations">
- <variablePresentation
- variableName="example_variable"
- argumentSelector="com.example.ExampleArgumentChooser">
- </variablePresentation>
-</extension>
-</pre>
-In the above example, the contributed presentation will be used for the variable named "example_variable". An argument selector is specified to configure an argument applicable to the variable.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>argumentSelector</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.stringsubstitution.IArgumentSelector</b>.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2005 IBM Corporation and others.<br>
-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
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appInfo> + <meta.schema plugin="org.eclipse.debug.ui" id="stringVariablePresentations" name="String Variable Presentations"/> + </appInfo> + <documentation> + This extension point provides a mechanism for contributing a user interface/presentation for a string substitution variable (i.e. a context variable or value variable). + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appInfo> + <meta.element /> + </appInfo> + </annotation> + <complexType> + <sequence> + <element ref="variablePresentation" 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="variablePresentation"> + <complexType> + <attribute name="variableName" type="string" use="required"> + <annotation> + <documentation> + specifies the variable this presentation is for + </documentation> + <appInfo> + <meta.attribute kind="identifier" basedOn="org.eclipse.core.variables.dynamicVariables/variable/@name"/> + </appInfo> + </annotation> + </attribute> + <attribute name="argumentSelector" type="string" use="required"> + <annotation> + <documentation> + specifies a fully qualified name of a Java class that implements <code>IArgumentSelector</code> + </documentation> + <appInfo> + <meta.attribute kind="java" basedOn=":org.eclipse.debug.ui.stringsubstitution.IArgumentSelector"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appInfo> + <meta.section type="since"/> + </appInfo> + <documentation> + 2.1 + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="examples"/> + </appInfo> + <documentation> + The following is an example of a variable presentation contribution: +<pre> +<extension point="org.eclipse.debug.ui.stringVariablePresentations"> + <variablePresentation + variableName="example_variable" + argumentSelector="com.example.ExampleArgumentChooser"> + </variablePresentation> +</extension> +</pre> +In the above example, the contributed presentation will be used for the variable named "example_variable". An argument selector is specified to configure an argument applicable to the variable. + </documentation> + </annotation> + + + <annotation> + <appInfo> + <meta.section type="copyright"/> + </appInfo> + <documentation> + Copyright (c) 2003, 2013 IBM Corporation and others.<br> +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 +<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="apiInfo"/> + </appInfo> + <documentation> + Value of the attribute <b>argumentSelector</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.stringsubstitution.IArgumentSelector</b>. + </documentation> + </annotation> + +</schema> diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/IArgumentSelector.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/IArgumentSelector.java index 025697c2c..ae6190466 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/IArgumentSelector.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/IArgumentSelector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2013 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 @@ -10,10 +10,6 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.stringsubstitution; -import org.eclipse.core.variables.IStringVariable; -import org.eclipse.swt.widgets.Shell; - - /** * A variable presentation extension can contribute an argument selector * which is use to configure the argument for a string substitution @@ -21,16 +17,5 @@ import org.eclipse.swt.widgets.Shell; * * @since 3.0 */ -public interface IArgumentSelector { - - /** - * Selects and returns an argument for the given variable, - * or <code>null</code> if none. - * - * @param variable the variable an arugment is being seleted for - * @param the shell to create any dialogs on, or <code>null</code> if none - * @return argument for the given variable or <code>null</code> - * if none - */ - public String selectArgument(IStringVariable variable, Shell shell); +public interface IArgumentSelector extends org.eclipse.debug.ui.stringsubstitution.IArgumentSelector{ } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceSelector.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceSelector.java index d6e0f6ad7..edc465e1a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceSelector.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceSelector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2013 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 @@ -13,6 +13,7 @@ package org.eclipse.debug.internal.ui.stringsubstitution; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.variables.IStringVariable; +import org.eclipse.debug.ui.stringsubstitution.IArgumentSelector; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.dialogs.ResourceListSelectionDialog; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java index 5832140b6..c3c87ae66 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2013 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 @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.stringsubstitution; -import com.ibm.icu.text.MessageFormat; import java.util.HashMap; import java.util.Map; @@ -20,6 +19,9 @@ import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.Platform; import org.eclipse.core.variables.IStringVariable; import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.ui.stringsubstitution.IArgumentSelector; + +import com.ibm.icu.text.MessageFormat; /** * Manages argument selectors (choosers) for string variables. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SystemPropertyArgumentSelector.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SystemPropertyArgumentSelector.java index b633cacf3..4f5d2157b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SystemPropertyArgumentSelector.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SystemPropertyArgumentSelector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -11,6 +11,7 @@ package org.eclipse.debug.internal.ui.stringsubstitution; import org.eclipse.core.variables.IStringVariable; +import org.eclipse.debug.ui.stringsubstitution.IArgumentSelector; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java index e51c52ce6..1065f1769 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2013 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 @@ -22,7 +22,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.IDebugHelpContextIds; import org.eclipse.debug.internal.ui.SWTFactory; import org.eclipse.debug.internal.ui.preferences.StringVariablePreferencePage; -import org.eclipse.debug.internal.ui.stringsubstitution.IArgumentSelector; +import org.eclipse.debug.ui.stringsubstitution.IArgumentSelector; import org.eclipse.debug.internal.ui.stringsubstitution.StringSubstitutionMessages; import org.eclipse.debug.internal.ui.stringsubstitution.StringVariableLabelProvider; import org.eclipse.debug.internal.ui.stringsubstitution.StringVariablePresentationManager; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.java new file mode 100644 index 000000000..d2c919228 --- /dev/null +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2013 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.stringsubstitution; + +import org.eclipse.core.variables.IStringVariable; +import org.eclipse.swt.widgets.Shell; + + +/** + * A variable presentation extension can contribute an argument selector + * which is use to configure the argument for a string substitution + * variable. + * + * @since 3.9 + */ +public interface IArgumentSelector { + + /** + * Selects and returns an argument for the given variable, + * or <code>null</code> if none. + * + * @param variable the variable an argument is being selected for + * @param the shell to create any dialogs on, or <code>null</code> if none + * @return argument for the given variable or <code>null</code> + * if none + */ + public String selectArgument(IStringVariable variable, Shell shell); +} |