Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Burns2004-12-07 22:22:09 +0000
committerJared Burns2004-12-07 22:22:09 +0000
commit19ad8d0bc7e76ca4aad1a601f6b685d0a7b2e879 (patch)
tree77a37bf00ee2e62c51347e65fdf510de61e68a04 /org.eclipse.core.variables
parent335e5217e2c31d152972bd10c8da2e329c21bebe (diff)
downloadeclipse.platform.debug-19ad8d0bc7e76ca4aad1a601f6b685d0a7b2e879.tar.gz
eclipse.platform.debug-19ad8d0bc7e76ca4aad1a601f6b685d0a7b2e879.tar.xz
eclipse.platform.debug-19ad8d0bc7e76ca4aad1a601f6b685d0a7b2e879.zip
Bug 45977 - Contribute variables should indicate the plugin that contributed them
Diffstat (limited to 'org.eclipse.core.variables')
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java10
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java12
2 files changed, 22 insertions, 0 deletions
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
index aa646f7d0..b29ce4e9c 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
@@ -555,4 +555,14 @@ public class StringVariableManager implements IStringVariableManager {
public void validateStringVariables(String expression) throws CoreException {
new StringSubstitutionEngine().validateStringVariables(expression, this);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.variables.IStringVariableManager#getContributingPluginId(org.eclipse.core.variables.IStringVariable)
+ */
+ public String getContributingPluginId(IStringVariable variable) {
+ if (variable instanceof StringVariable) {
+ return ((StringVariable) variable).getConfigurationElement().getNamespace();
+ }
+ return null;
+ }
}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java
index 8d0a311c8..de36166fb 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java
@@ -71,6 +71,18 @@ public interface IStringVariableManager {
* if none
*/
public IDynamicVariable getDynamicVariable(String name);
+
+ /**
+ * Returns the plugin identifier of the plugin that contributed the
+ * given variable via extension or <code>null</code> if the given
+ * variable wasn't contributed via extension.
+ *
+ * @param variable the variable
+ * @return the plugin identifier of the plugin that contributed the
+ * given variable or <code>null</code>
+ * @since 3.1
+ */
+ public String getContributingPluginId(IStringVariable variable);
/**
* Recursively resolves and replaces all variable references in the given

Back to the top