Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/LaunchVariableManager.java5
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/RefreshLaunchVariableRegistry.java (renamed from org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/RefreshScopeVariableRegistry.java)4
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/SimpleLaunchVariableRegistry.java (renamed from org.eclipse.debug.core/core/org/eclipse/debug/internal/core/SimpleVariableRegistry.java)7
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java20
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java8
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java18
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java6
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java4
8 files changed, 35 insertions, 37 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/LaunchVariableManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/LaunchVariableManager.java
index 5cc7f5cc8..d30e8d595 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/LaunchVariableManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/LaunchVariableManager.java
@@ -13,13 +13,12 @@ package org.eclipse.debug.internal.core.variables;
import org.eclipse.debug.core.variables.IContextLaunchVariable;
import org.eclipse.debug.core.variables.ILaunchVariableManager;
import org.eclipse.debug.core.variables.ISimpleLaunchVariable;
-import org.eclipse.debug.internal.core.SimpleVariableRegistry;
public class LaunchVariableManager implements ILaunchVariableManager {
- private static SimpleVariableRegistry fgSimpleVariableRegistry;
+ private static SimpleLaunchVariableRegistry fgSimpleVariableRegistry;
private static ContextLaunchVariableRegistry fgContextVariableRegistry;
- private static RefreshScopeVariableRegistry fgRefreshVariableRegistry;
+ private static RefreshLaunchVariableRegistry fgRefreshVariableRegistry;
public IContextLaunchVariable getContextVariable(String name) {
return fgContextVariableRegistry.getVariable(name);
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/RefreshScopeVariableRegistry.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/RefreshLaunchVariableRegistry.java
index 564d5c2a2..532c83de3 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/RefreshScopeVariableRegistry.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/RefreshLaunchVariableRegistry.java
@@ -15,12 +15,12 @@ import org.eclipse.debug.core.DebugPlugin;
/**
* Registry of all available refresh scope variables.
*/
-public class RefreshScopeVariableRegistry extends ContextLaunchVariableRegistry {
+public class RefreshLaunchVariableRegistry extends ContextLaunchVariableRegistry {
/**
* Creates the registry and loads the variables.
*/
- public RefreshScopeVariableRegistry() {
+ public RefreshLaunchVariableRegistry() {
super(DebugPlugin.EXTENSION_POINT_REFRESH_LAUNCH_VARIABLES);
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/SimpleVariableRegistry.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/SimpleLaunchVariableRegistry.java
index 7c3a2b348..e8482f2be 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/SimpleVariableRegistry.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/SimpleLaunchVariableRegistry.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.debug.internal.core;
+package org.eclipse.debug.internal.core.variables;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -32,6 +32,7 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.variables.ILaunchVariableInitializer;
import org.eclipse.debug.core.variables.ISimpleLaunchVariable;
import org.eclipse.debug.core.variables.SimpleLaunchVariable;
+import org.eclipse.debug.internal.core.LaunchManager;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -41,7 +42,7 @@ import org.w3c.dom.NodeList;
* A registry of simple variables, used for retrieving launch configuration
* variable objects based on their names.
*/
-public class SimpleVariableRegistry {
+public class SimpleLaunchVariableRegistry {
private static final String PREF_SIMPLE_VARIABLES="simpleVariables"; //$NON-NLS-1$
// Variable extension point constants
@@ -58,7 +59,7 @@ public class SimpleVariableRegistry {
private Map fVariables= new HashMap();
- public SimpleVariableRegistry() {
+ public SimpleLaunchVariableRegistry() {
loadExtensions();
loadVariables();
}
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java
index 18a37201c..3ca85ed89 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java
@@ -21,10 +21,9 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.variables.IContextLaunchVariableRegistry;
import org.eclipse.debug.core.variables.ILaunchVariableConstants;
-import org.eclipse.debug.core.variables.ISimpleLaunchVariableRegistry;
-import org.eclipse.debug.core.variables.VariableUtil;
+import org.eclipse.debug.core.variables.ILaunchVariableManager;
+import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
import org.eclipse.debug.ui.launchVariables.VariableSelectionDialog;
import org.eclipse.jface.dialogs.IDialogConstants;
@@ -435,7 +434,7 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
*/
private String validateVariables(String value) {
int start= 0;
- VariableUtil.VariableDefinition variable = VariableUtil.extractVariableDefinition(value, start);
+ LaunchVariableUtil.VariableDefinition variable = LaunchVariableUtil.extractVariableDefinition(value, start);
while (variable.start != -1) {
if (variable.end == -1) {
return ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsMainTab.Invalid_Expected_closing_}"); //$NON-NLS-1$
@@ -443,19 +442,18 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
if (variable.name == null || variable.name.length() == 0) {
return ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsMainTab.No_variable_specified"); //$NON-NLS-1$
}
- IContextLaunchVariableRegistry contextVariableRegistry = DebugPlugin.getDefault().getContextVariableRegistry();
- ISimpleLaunchVariableRegistry simpleVariableRegistry= DebugPlugin.getDefault().getSimpleVariableRegistry();
- if (contextVariableRegistry.getVariable(variable.name) == null && simpleVariableRegistry.getVariable(variable.name) == null) {
+ ILaunchVariableManager manager= DebugPlugin.getDefault().getLaunchVariableManager();
+ if (manager.getContextVariable(variable.name) == null && manager.getSimpleVariable(variable.name) == null) {
return MessageFormat.format(ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsMainTab.Unknown_variable"), new String[] {variable.name}); //$NON-NLS-1$
}
start= variable.end;
- variable = VariableUtil.extractVariableDefinition(value, start);
+ variable = LaunchVariableUtil.extractVariableDefinition(value, start);
}
return null;
}
private boolean containsVariable(String value) {
- return VariableUtil.extractVariableDefinition(value, 0).start != -1;
+ return LaunchVariableUtil.extractVariableDefinition(value, 0).start != -1;
}
/**
@@ -513,7 +511,7 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
}
IResource resource = (IResource)results[0];
StringBuffer buf = new StringBuffer();
- VariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, resource.getFullPath().toString(), buf);
+ LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, resource.getFullPath().toString(), buf);
String text= buf.toString();
if (text != null) {
locationField.setText(text);
@@ -536,7 +534,7 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
Object[] resource = containerDialog.getResult();
String text= null;
if (resource != null && resource.length > 0) {
- text= VariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, ((IPath)resource[0]).toString());
+ text= LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, ((IPath)resource[0]).toString());
}
if (text != null) {
workDirectoryField.setText(text);
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
index 6775d00c4..71e551bda 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
@@ -26,7 +26,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.variables.VariableUtil;
+import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.debug.ui.launchVariables.RefreshTab;
import org.eclipse.debug.ui.launchVariables.VariableContextManager;
import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
@@ -80,7 +80,7 @@ public class ExternalToolsUtil {
abort(MessageFormat.format(ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.Location_not_specified_by_{0}_1"), new String[] { configuration.getName()}), null, 0); //$NON-NLS-1$
} else {
MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.Could_not_resolve_location._3"), null); //$NON-NLS-1$
- String expandedLocation = VariableUtil.expandVariables(location, status, VariableContextManager.getDefault().getVariableContext());
+ String expandedLocation = LaunchVariableUtil.expandVariables(location, status, VariableContextManager.getDefault().getVariableContext());
if (status.isOK()) {
if (expandedLocation == null || expandedLocation.length() == 0) {
String msg = MessageFormat.format(ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.invalidLocation_{0}"), new Object[] { configuration.getName()}); //$NON-NLS-1$
@@ -135,7 +135,7 @@ public class ExternalToolsUtil {
String location = configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) null);
if (location != null) {
MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.Could_not_resolve_working_directory._4"), null); //$NON-NLS-1$
- String expandedLocation = VariableUtil.expandVariables(location, status, VariableContextManager.getDefault().getVariableContext());
+ String expandedLocation = LaunchVariableUtil.expandVariables(location, status, VariableContextManager.getDefault().getVariableContext());
if (status.isOK()) {
if (expandedLocation != null && expandedLocation.length() > 0) {
File path = new File(expandedLocation);
@@ -169,7 +169,7 @@ public class ExternalToolsUtil {
String args = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, (String) null);
if (args != null) {
MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.Could_not_resolve_an_argument._1"), null); //$NON-NLS-1$
- String[] expandedArgs = VariableUtil.expandStrings(args, status, VariableContextManager.getDefault().getVariableContext());
+ String[] expandedArgs = LaunchVariableUtil.expandStrings(args, status, VariableContextManager.getDefault().getVariableContext());
if (status.isOK()) {
return expandedArgs;
} else {
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java
index 3f7d4c70c..d26a94d69 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java
@@ -21,7 +21,7 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.variables.ILaunchVariableConstants;
-import org.eclipse.debug.core.variables.VariableUtil;
+import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
/**
@@ -123,8 +123,8 @@ public final class ExternalToolMigration {
config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals((String) commandArgs.get(TAG_SHOW_CONSOLE)));
config.setAttribute(IExternalToolConstants.ATTR_RUN_IN_BACKGROUND, TRUE.equals((String) commandArgs.get(TAG_RUN_BKGRND)));
config.setAttribute(IExternalToolConstants.ATTR_PROMPT_FOR_ARGUMENTS, TRUE.equals((String) commandArgs.get(TAG_PROMPT_ARGS)));
- config.setAttribute(VariableUtil.ATTR_REFRESH_SCOPE, (String) commandArgs.get(TAG_REFRESH_SCOPE));
- config.setAttribute(VariableUtil.ATTR_REFRESH_RECURSIVE, TRUE.equals((String) commandArgs.get(TAG_REFRESH_RECURSIVE)));
+ config.setAttribute(LaunchVariableUtil.ATTR_REFRESH_SCOPE, (String) commandArgs.get(TAG_REFRESH_SCOPE));
+ config.setAttribute(LaunchVariableUtil.ATTR_REFRESH_RECURSIVE, TRUE.equals((String) commandArgs.get(TAG_REFRESH_RECURSIVE)));
config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) commandArgs.get(TAG_RUN_BUILD_KINDS));
@@ -172,9 +172,9 @@ public final class ExternalToolMigration {
// Update the location...
String location = (String) args.get(TAG_TOOL_LOCATION);
if (location != null) {
- VariableUtil.VariableDefinition varDef = VariableUtil.extractVariableDefinition(location, 0);
+ LaunchVariableUtil.VariableDefinition varDef = LaunchVariableUtil.extractVariableDefinition(location, 0);
if (ILaunchVariableConstants.VAR_WORKSPACE_LOC.equals(varDef.name)) {
- location = VariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_RESOURCE_LOC, varDef.argument);
+ location = LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_RESOURCE_LOC, varDef.argument);
}
config.setAttribute(IExternalToolConstants.ATTR_LOCATION, location);
}
@@ -182,11 +182,11 @@ public final class ExternalToolMigration {
// Update the refresh scope...
String refresh = (String) args.get(TAG_TOOL_REFRESH);
if (refresh != null) {
- VariableUtil.VariableDefinition varDef = VariableUtil.extractVariableDefinition(refresh, 0);
+ LaunchVariableUtil.VariableDefinition varDef = LaunchVariableUtil.extractVariableDefinition(refresh, 0);
if ("none".equals(varDef.name)) { //$NON-NLS-1$
refresh = null;
}
- config.setAttribute(VariableUtil.ATTR_REFRESH_SCOPE, refresh);
+ config.setAttribute(LaunchVariableUtil.ATTR_REFRESH_SCOPE, refresh);
}
// Update the arguments
@@ -196,7 +196,7 @@ public final class ExternalToolMigration {
int start = 0;
ArrayList targets = new ArrayList();
StringBuffer buffer = new StringBuffer();
- VariableUtil.VariableDefinition varDef = VariableUtil.extractVariableDefinition(arguments, start);
+ LaunchVariableUtil.VariableDefinition varDef = LaunchVariableUtil.extractVariableDefinition(arguments, start);
while (varDef.end != -1) {
if ("ant_target".equals(varDef.name) && varDef.argument != null) { //$NON-NLS-1$
targets.add(varDef.argument);
@@ -205,7 +205,7 @@ public final class ExternalToolMigration {
buffer.append(arguments.substring(start, varDef.end));
}
start = varDef.end;
- varDef = VariableUtil.extractVariableDefinition(arguments, start);
+ varDef = LaunchVariableUtil.extractVariableDefinition(arguments, start);
}
buffer.append(arguments.substring(start, arguments.length()));
arguments = buffer.toString();
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
index 55993220a..27009acdc 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
@@ -26,7 +26,7 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.variables.VariableUtil;
+import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.debug.ui.launchVariables.RefreshTab;
import org.eclipse.debug.ui.launchVariables.VariableContextManager;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -137,7 +137,7 @@ public class ProgramLaunchDelegate implements ILaunchConfigurationDelegate {
return;
}
- String[] envp = VariableUtil.getEnvironment(configuration, VariableContextManager.getDefault().getVariableContext());
+ String[] envp = LaunchVariableUtil.getEnvironment(configuration, VariableContextManager.getDefault().getVariableContext());
if (monitor.isCanceled()) {
return;
@@ -167,7 +167,7 @@ public class ProgramLaunchDelegate implements ILaunchConfigurationDelegate {
if (ExternalToolsUtil.isBackground(configuration)) {
// refresh resources after process finishes
- if (VariableUtil.getRefreshScope(configuration) != null) {
+ if (LaunchVariableUtil.getRefreshScope(configuration) != null) {
BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, process);
refresher.startBackgroundRefresh();
}
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
index 83293668d..458008013 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
@@ -14,7 +14,7 @@ package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.debug.core.variables.ILaunchVariableConstants;
-import org.eclipse.debug.core.variables.VariableUtil;
+import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsMainTab;
import org.eclipse.ui.externaltools.internal.model.IExternalToolsHelpContextIds;
@@ -41,7 +41,7 @@ public class ProgramMainTab extends ExternalToolsMainTab {
return;
}
StringBuffer buf = new StringBuffer();
- VariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, file.getFullPath().toString(), buf);
+ LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, file.getFullPath().toString(), buf);
String text= buf.toString();
if (text != null) {
locationField.setText(text);

Back to the top