Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableConstants.java68
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableManager.java49
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/ResourceExpander.java6
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java5
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java6
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java4
6 files changed, 59 insertions, 79 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableConstants.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableConstants.java
deleted file mode 100644
index 1a4911647..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableConstants.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.core.variables;
-
-/**
- * Variable constants defining the name of variables contributed
- * by the debug plug-in.
- *
- * @since 3.0
- */
-public interface ILaunchVariableConstants {
-
- /**
- * Variable that expands to the absolute path on the system's hard drive
- * to the workspace directory (value <code>workspace_loc</code>).
- */
- public static final String VAR_WORKSPACE_LOC = "workspace_loc"; //$NON-NLS-1$
- /**
- * Variable that expands to the absolute path on the system's hard drive
- * to a project's directory (value <code>project_loc</code>).
- */
- public static final String VAR_PROJECT_LOC = "project_loc"; //$NON-NLS-1$
- /**
- * Variable that expands to the full path, relative to the workspace root,
- * of a project (value <code>project_path</code>).
- */
- public static final String VAR_PROJECT_PATH = "project_path"; //$NON-NLS-1$
- /**
- * Variable that expands to the name of a project (value <code>project_name</code>).
- */
- public static final String VAR_PROJECT_NAME = "project_name"; //$NON-NLS-1$
- /**
- * Variable that expands to the absolute path on the system's hard drive
- * to a resource's location (value <code>resource_loc</code>).
- */
- public static final String VAR_RESOURCE_LOC = "resource_loc"; //$NON-NLS-1$
- /**
- * Variable that expands to the full path, relative to the workspace root,
- * of a resource (value <code>resource_path</code>).
- */
- public static final String VAR_RESOURCE_PATH = "resource_path"; //$NON-NLS-1$
- /**
- * Variable that expands to the name of a resource (value <code>resource_name</code>).
- */
- public static final String VAR_RESOURCE_NAME = "resource_name"; //$NON-NLS-1$
- /**
- * Variable that expands to the absolute path on the system's hard drive
- * to a resource's containing directory (value <code>container_loc</code>).
- */
- public static final String VAR_CONTAINER_LOC = "container_loc"; //$NON-NLS-1$
- /**
- * Variable that expands to the full path, relative to the workspace root,
- * of a resource's parent (value <code>container_path</code>).
- */
- public static final String VAR_CONTAINER_PATH = "container_path"; //$NON-NLS-1$
- /**
- * Variable that expands to the name of a resource's parent (value <code>container_name</code>).
- */
- public static final String VAR_CONTAINER_NAME = "container_name"; //$NON-NLS-1$
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableManager.java
index c03293376..ab4d755d9 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/variables/ILaunchVariableManager.java
@@ -26,6 +26,55 @@ package org.eclipse.debug.core.variables;
* @see org.eclipse.debug.core.variables.IContextLaunchVariable
*/
public interface ILaunchVariableManager {
+
+ /**
+ * Variable that expands to the absolute path on the system's hard drive
+ * to the workspace directory (value <code>workspace_loc</code>).
+ */
+ public static final String VAR_WORKSPACE_LOC = "workspace_loc"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the absolute path on the system's hard drive
+ * to a project's directory (value <code>project_loc</code>).
+ */
+ public static final String VAR_PROJECT_LOC = "project_loc"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the full path, relative to the workspace root,
+ * of a project (value <code>project_path</code>).
+ */
+ public static final String VAR_PROJECT_PATH = "project_path"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the name of a project (value <code>project_name</code>).
+ */
+ public static final String VAR_PROJECT_NAME = "project_name"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the absolute path on the system's hard drive
+ * to a resource's location (value <code>resource_loc</code>).
+ */
+ public static final String VAR_RESOURCE_LOC = "resource_loc"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the full path, relative to the workspace root,
+ * of a resource (value <code>resource_path</code>).
+ */
+ public static final String VAR_RESOURCE_PATH = "resource_path"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the name of a resource (value <code>resource_name</code>).
+ */
+ public static final String VAR_RESOURCE_NAME = "resource_name"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the absolute path on the system's hard drive
+ * to a resource's containing directory (value <code>container_loc</code>).
+ */
+ public static final String VAR_CONTAINER_LOC = "container_loc"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the full path, relative to the workspace root,
+ * of a resource's parent (value <code>container_path</code>).
+ */
+ public static final String VAR_CONTAINER_PATH = "container_path"; //$NON-NLS-1$
+ /**
+ * Variable that expands to the name of a resource's parent (value <code>container_name</code>).
+ */
+ public static final String VAR_CONTAINER_NAME = "container_name"; //$NON-NLS-1$
+
/**
* Returns the context variable with the given name or <code>null</code>
* if no such variable exists. If multiple context variables with the given name
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/ResourceExpander.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/ResourceExpander.java
index 72a2dd1b7..9c4f37efa 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/ResourceExpander.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/variables/ResourceExpander.java
@@ -80,9 +80,9 @@ public class ResourceExpander extends DefaultVariableExpander {
* expand to paths relative to the workspace root.
*/
private boolean isPathVariable(String varTag) {
- return varTag.equals(ILaunchVariableConstants.VAR_CONTAINER_PATH) ||
- varTag.equals(ILaunchVariableConstants.VAR_PROJECT_PATH) ||
- varTag.equals(ILaunchVariableConstants.VAR_RESOURCE_PATH);
+ return varTag.equals(ILaunchVariableManager.VAR_CONTAINER_PATH) ||
+ varTag.equals(ILaunchVariableManager.VAR_PROJECT_PATH) ||
+ varTag.equals(ILaunchVariableManager.VAR_RESOURCE_PATH);
}
/**
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 20bf96ad3..aacbe1edc 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,7 +21,6 @@ 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.ILaunchVariableConstants;
import org.eclipse.debug.core.variables.ILaunchVariableManager;
import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
@@ -511,7 +510,7 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
}
IResource resource = (IResource)results[0];
StringBuffer buf = new StringBuffer();
- LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, resource.getFullPath().toString(), buf);
+ LaunchVariableUtil.buildVariableTag(ILaunchVariableManager.VAR_WORKSPACE_LOC, resource.getFullPath().toString(), buf);
String text= buf.toString();
if (text != null) {
locationField.setText(text);
@@ -534,7 +533,7 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
Object[] resource = containerDialog.getResult();
String text= null;
if (resource != null && resource.length > 0) {
- text= LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, ((IPath)resource[0]).toString());
+ text= LaunchVariableUtil.buildVariableTag(ILaunchVariableManager.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/registry/ExternalToolMigration.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java
index d26a94d69..51e6e102e 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
@@ -20,7 +20,7 @@ import org.eclipse.debug.core.DebugPlugin;
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.ILaunchVariableManager;
import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
@@ -173,8 +173,8 @@ public final class ExternalToolMigration {
String location = (String) args.get(TAG_TOOL_LOCATION);
if (location != null) {
LaunchVariableUtil.VariableDefinition varDef = LaunchVariableUtil.extractVariableDefinition(location, 0);
- if (ILaunchVariableConstants.VAR_WORKSPACE_LOC.equals(varDef.name)) {
- location = LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_RESOURCE_LOC, varDef.argument);
+ if (ILaunchVariableManager.VAR_WORKSPACE_LOC.equals(varDef.name)) {
+ location = LaunchVariableUtil.buildVariableTag(ILaunchVariableManager.VAR_RESOURCE_LOC, varDef.argument);
}
config.setAttribute(IExternalToolConstants.ATTR_LOCATION, location);
}
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 458008013..491d4bf2e 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
@@ -13,7 +13,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.ILaunchVariableManager;
import org.eclipse.debug.core.variables.LaunchVariableUtil;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsMainTab;
@@ -41,7 +41,7 @@ public class ProgramMainTab extends ExternalToolsMainTab {
return;
}
StringBuffer buf = new StringBuffer();
- LaunchVariableUtil.buildVariableTag(ILaunchVariableConstants.VAR_WORKSPACE_LOC, file.getFullPath().toString(), buf);
+ LaunchVariableUtil.buildVariableTag(ILaunchVariableManager.VAR_WORKSPACE_LOC, file.getFullPath().toString(), buf);
String text= buf.toString();
if (text != null) {
locationField.setText(text);

Back to the top