null
if not in the workspace
*/
protected IFile getFileForCandidate(ILaunchConfiguration candidate) {
- IFile file = null;
- String expandedLocation = null;
- String location = null;
- IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
- try {
- location = candidate.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String) null);
- if (location != null) {
- expandedLocation = manager.performStringSubstitution(location);
- if (expandedLocation != null) {
- file = AntLaunchingUtil.getFileForLocation(expandedLocation, null);
- }
- }
- }
- catch (CoreException e) {
- // do nothing
- }
- return file;
+ return IExternalToolConstants.LAUNCH_ATTRIBUTE_LOCATION.probe(candidate).map(l -> AntLaunchingUtil.getFileForLocation(l, null)).orElse(null);
}
@Override
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
index 0c3cb274e37..8c67adb9a66 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Alexander Fedorov (ArSysOp) - API to process launch configuration attributes
*******************************************************************************/
package org.eclipse.ant.internal.ui;
@@ -20,7 +21,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
@@ -100,7 +100,7 @@ private AntUtil() {
/**
* Returns a single-string of the strings for storage.
- *
+ *
* @param strings
* the array of strings
* @return a single-string representation of the strings or null
if the array is empty.
@@ -112,7 +112,7 @@ public static String combineStrings(String[] strings) {
/**
* Returns an array of targets to be run, or null
if none are specified (indicating the default target or implicit target should be
* run).
- *
+ *
* @param configuration
* launch configuration
* @return array of target names, or null
@@ -126,7 +126,7 @@ public static String[] getTargetNames(ILaunchConfiguration configuration) throws
/**
* Returns a map of properties to be defined for the build, or null
if none are specified (indicating no additional properties
* specified for the build).
- *
+ *
* @param configuration
* launch configuration
* @return map of properties (name --> value), or null
@@ -139,7 +139,7 @@ public static Mapnull
@@ -153,7 +153,7 @@ public static String getAntHome(ILaunchConfiguration configuration) throws CoreE
/**
* Returns an array of property files to be used for the build, or null
if none are specified (indicating no additional property
* files specified for the build).
- *
+ *
* @param configuration
* launch configuration
* @return array of property file names, or null
@@ -195,7 +195,7 @@ public static AntTargetNode[] getTargets(String path, ILaunchConfiguration confi
}
private static Mapnull
if the global classpath is to be used.
- *
+ *
* @param config
* launch configuration
* @return a list of URL
- *
+ *
* @throws CoreException
* if file does not exist, IO problems, or invalid format.
*/
@@ -373,7 +371,7 @@ private static String expandVariableString(String variableString, String invalid
/**
* Returns the list of target names to run
- *
+ *
* @param extraAttibuteValue
* the external tool's extra attribute value for the run targets key.
* @return a list of target names
@@ -384,7 +382,7 @@ public static String[] parseRunTargets(String extraAttibuteValue) {
/**
* Returns the list of Strings that were delimiter separated.
- *
+ *
* @param delimString
* the String to be tokenized based on the delimiter
* @param delim
@@ -397,7 +395,7 @@ public static String[] parseString(String delimString, String delim) {
/**
* Returns an IFile with the given fully qualified path (relative to the workspace root). The returned IFile may or may not exist.
- *
+ *
* @param fullPath
* the path to look up
* @return the {@link IFile} which may or may not exist
@@ -446,9 +444,9 @@ public static IHyperlink getLocationLink(String path, File buildFileParent) {
/**
* Returns the workspace file associated with the given path in the local file system, or null
if none. If the path happens to be a
* relative path, then the path is interpreted as relative to the specified parent file.
- *
+ *
* Attempts to handle linked files; the first found linked file with the correct path is returned.
- *
+ *
* @return file or null
* @see org.eclipse.core.resources.IWorkspaceRoot#findFilesForLocation(IPath)
*/
@@ -459,7 +457,7 @@ public static IFile getFileForLocation(String path, File buildFileParent) {
/**
* Migrates the classpath in the given configuration from the old format to the new format. The old format is not preserved. Instead, the default
* classpath will be used. However, ANT_HOME settings are preserved.
- *
+ *
* @param configuration
* a configuration to migrate
* @throws CoreException
@@ -500,7 +498,7 @@ private static int getOffset(int line, int column, ITextEditor editor) {
/**
* Opens the given editor on the buildfile of the provided node and selects that node in the editor.
- *
+ *
* @param page
* the page to open the editor in
* @param editorDescriptor
@@ -540,7 +538,7 @@ public static void openInEditor(IWorkbenchPage page, IEditorDescriptor editorDes
/**
* Opens an editor on the buildfile of the provided node and selects that node in the editor.
- *
+ *
* @param page
* the page to open the editor in
* @param node
@@ -639,9 +637,9 @@ public static boolean isKnownAntFile(IResource resource) {
/**
* Returns if the given extension is a known extension to Ant i.e. a supported content type extension.
- *
+ *
* @return true if the file extension is supported false otherwise
- *
+ *
* @since 3.8
*/
public static boolean isKnownAntFile(File file) {
@@ -666,7 +664,7 @@ public static boolean isKnownAntFile(File file) {
/**
* Returns an array of build file names from the ant preference store
- *
+ *
* @return an array of build file names
* @since 3.6
*/
@@ -682,7 +680,7 @@ public static String[] getKnownBuildfileNames() {
/**
* Returns if the given file is a known build file name, based on the given names from the Ant > Names preference
- *
+ *
* @return true if the name of the file is given in the Ant > Names preference, false otherwise
* @since 3.6
*/
@@ -698,7 +696,7 @@ public static boolean isKnownBuildfileName(String filename) {
/**
* A helper method to extract the build filename extensions as defined in the extender of the content-types extension-point.
- *
+ *
* @return An empty array or list of filename extensions as specified in the content-types extension
* @since 3.8
*/
@@ -719,7 +717,7 @@ public static String[] getKnownBuildFileExtensions() {
/**
* A helper method to construct a RegEx pattern out of the extensions
- *
+ *
* @return A String that is a RegEx pattern representing the extensions
* @since 3.8
*/
@@ -734,7 +732,7 @@ public static String getKnownBuildFileExtensionsAsPattern() {
/**
* Returns if the given file name is known as a build file. This method consults all of the known file extensions from the Ant-defined content
* types
- *
+ *
* @return true
if the file name matches an Ant build file pattern false
otherwise
* @since 3.8
*/
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java
index 95bac0f450a..99a6316071d 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,9 +10,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Alexander Fedorov (ArSysOp) - API to process launch configuration attributes
*******************************************************************************/
package org.eclipse.ant.internal.ui.launchConfigurations;
+import java.util.Optional;
+
import org.eclipse.ant.internal.core.IAntCoreConstants;
import org.eclipse.ant.internal.ui.AntUIPlugin;
import org.eclipse.ant.internal.ui.AntUtil;
@@ -24,7 +27,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -45,44 +47,27 @@
public class AntMainTab extends ExternalToolsMainTab {
- private String fCurrentLocation = null;
+ private Optional
@@ -30,26 +36,31 @@ public interface IExternalToolConstants {
String EMPTY_STRING = ""; //$NON-NLS-1$
/**
- * Plug-in identifier for external tools UI (value org.eclipse.ui.externaltools
).
+ * Plug-in identifier for external tools UI (value
+ * org.eclipse.ui.externaltools
).
*/
- String UI_PLUGIN_ID = "org.eclipse.ui.externaltools"; //$NON-NLS-1$;
+ String UI_PLUGIN_ID = "org.eclipse.ui.externaltools"; //$NON-NLS-1$ ;
/**
- * Plug-in identifier for external tools core (value org.eclipse.core.externaltools
).
+ * Plug-in identifier for external tools core (value
+ * org.eclipse.core.externaltools
).
*/
- String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$;
+ String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$ ;
// ------- Refresh Variables -------
/**
- * Variable that expands to the workspace root object (value workspace
).
+ * Variable that expands to the workspace root object (value
+ * workspace
).
*/
String VAR_WORKSPACE = "workspace"; //$NON-NLS-1$
/**
- * Variable that expands to the project resource (value project
).
+ * Variable that expands to the project resource (value
+ * project
).
*/
String VAR_PROJECT = "project"; //$NON-NLS-1$
/**
- * Variable that expands to the container resource (value container
).
+ * Variable that expands to the container resource (value
+ * container
).
*/
String VAR_CONTAINER = "container"; //$NON-NLS-1$
/**
@@ -57,44 +68,45 @@ public interface IExternalToolConstants {
*/
String VAR_RESOURCE = "resource"; //$NON-NLS-1$
/**
- * Variable that expands to the working set object (value working_set
).
+ * Variable that expands to the working set object (value
+ * working_set
).
*/
String VAR_WORKING_SET = "working_set"; //$NON-NLS-1$
// ------- Tool Types -------
/**
- * External tool type for programs such as executables, batch files,
- * shell scripts, etc (value programType
).
+ * External tool type for programs such as executables, batch files, shell
+ * scripts, etc (value programType
).
*/
- String TOOL_TYPE_PROGRAM = "programType"; //$NON-NLS-1$;
+ String TOOL_TYPE_PROGRAM = "programType"; //$NON-NLS-1$ ;
// ------- Build Types -------
/**
- * Build type indicating an incremental project build request for
- * the external tool running as a builder (value incremental
).
+ * Build type indicating an incremental project build request for the
+ * external tool running as a builder (value incremental
).
*/
String BUILD_TYPE_INCREMENTAL = "incremental"; //$NON-NLS-1$
/**
- * Build type indicating a full project build request for
- * the external tool running as a builder (value full
).
+ * Build type indicating a full project build request for the external tool
+ * running as a builder (value full
).
*/
String BUILD_TYPE_FULL = "full"; //$NON-NLS-1$
/**
- * Build type indicating an automatic project build request for
- * the external tool running as a builder (value auto
).
+ * Build type indicating an automatic project build request for the external
+ * tool running as a builder (value auto
).
*/
String BUILD_TYPE_AUTO = "auto"; //$NON-NLS-1$
/**
- * Build type indicating a clean project build request for
- * the external tool running as a builder (value clean
).
+ * Build type indicating a clean project build request for the external tool
+ * running as a builder (value clean
).
*/
String BUILD_TYPE_CLEAN = "clean"; //$NON-NLS-1$
/**
- * Build type indicating no project build request for
- * the external tool running as a builder (value none
).
+ * Build type indicating no project build request for the external tool
+ * running as a builder (value none
).
*/
String BUILD_TYPE_NONE = "none"; //$NON-NLS-1$
@@ -129,9 +141,12 @@ public interface IExternalToolConstants {
/**
* Boolean attribute indicating if external tool output should be captured.
* Default value is false
.
- * @deprecated since 3.1 Replaced by org.eclipse.debug.core.DebugPlugin.ATTR_CAPTURE_OUTPUT
+ *
+ * @deprecated since 3.1 Replaced by
+ * org.eclipse.debug.core.DebugPlugin.ATTR_CAPTURE_OUTPUT
*/
- @Deprecated String ATTR_CAPTURE_OUTPUT = UI_PLUGIN_ID + ".ATTR_CAPTURE_OUTPUT"; //$NON-NLS-1$
+ @Deprecated
+ String ATTR_CAPTURE_OUTPUT = UI_PLUGIN_ID + ".ATTR_CAPTURE_OUTPUT"; //$NON-NLS-1$
/**
* String attribute identifying the location of an external. Default value
* is null
. Encoding is tool specific.
@@ -139,22 +154,37 @@ public interface IExternalToolConstants {
String ATTR_LOCATION = UI_PLUGIN_ID + ".ATTR_LOCATION"; //$NON-NLS-1$
/**
- * Boolean attribute indicating if the user should be prompted for
- * arguments before running a tool. Default value is false
.
- * THIS ATTRIBUTE IS NOT USED.
+ * {@link ILaunchAttributeIdentity} identifying the location of an external.
+ *
+ * @see IExternalToolConstants#LAUNCH_ATTRIBUTE_LOCATION
+ */
+ ILaunchAttributeIdentity LAUNCH_ATTRIBUTE_IDENTITY_LOCATION = ILaunchAttributeIdentity.of(ATTR_LOCATION);
+
+ /**
+ * {@link ILaunchAttributenull
. Encoding is tool specific.
+ *
+ * @see IExternalToolConstants#LAUNCH_ATTRIBUTE_IDENTITY_LOCATION
+ */
+ ILaunchAttributefalse
. THIS
+ * ATTRIBUTE IS NOT USED.
*/
String ATTR_PROMPT_FOR_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_PROMPT_FOR_ARGUMENTS"; //$NON-NLS-1$
/**
- * String attribute identifying the scope of resources that should trigger an
- * external tool to run. Default value is null
- * indicating that the builder will be triggered for all changes.
+ * String attribute identifying the scope of resources that should trigger
+ * an external tool to run. Default value is null
indicating
+ * that the builder will be triggered for all changes.
*/
String ATTR_BUILDER_SCOPE = UI_PLUGIN_ID + ".ATTR_BUILD_SCOPE"; //$NON-NLS-1$
/**
- * String attribute containing an array of build kinds for which an
- * external tool builder should be run.
+ * String attribute containing an array of build kinds for which an external
+ * tool builder should be run.
*/
String ATTR_RUN_BUILD_KINDS = UI_PLUGIN_ID + ".ATTR_RUN_BUILD_KINDS"; //$NON-NLS-1$
@@ -170,6 +200,23 @@ public interface IExternalToolConstants {
*/
String ATTR_TOOL_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_TOOL_ARGUMENTS"; //$NON-NLS-1$
+ /**
+ * {@link ILaunchAttributeIdentity} containing the arguments that should be
+ * passed to the tool
+ *
+ * @see IExternalToolConstants#LAUNCH_ATTRIBUTE_ARGUMENTS
+ */
+ ILaunchAttributeIdentity LAUNCH_ATTRIBUTE_IDENTITY_ARGUMENTS = ILaunchAttributeIdentity.of(ATTR_TOOL_ARGUMENTS);
+
+ /**
+ * {@link ILaunchAttributenull
, and encoding is
+ * tool specific.
+ *
+ * @see IExternalToolConstants#LAUNCH_ATTRIBUTE_IDENTITY_ARGUMENTS
+ */
+ ILaunchAttributenull
, which indicates a default working
@@ -178,16 +225,34 @@ public interface IExternalToolConstants {
String ATTR_WORKING_DIRECTORY = UI_PLUGIN_ID + ".ATTR_WORKING_DIRECTORY"; //$NON-NLS-1$
/**
- * String attribute identifying whether an external tool builder configuration
- * is enabled. The default value is true
, which indicates
- * that the configuration will be executed as appropriate by the builder.
+ * {@link ILaunchAttributeIdentity} identifying the working directory of an
+ * external tool.
+ *
+ * @see IExternalToolConstants#LAUNCH_ATTRIBUTE_WORKING_DIRECTORY
+ */
+ ILaunchAttributeIdentity LAUNCH_ATTRIBUTE_IDENTITY_WORKING_DIRECTORY = ILaunchAttributeIdentity.of(ATTR_WORKING_DIRECTORY);
+
+ /**
+ * {@link ILaunchAttributenull
, which indicates a
+ * default working directory, which is tool specific.
+ *
+ * @see IExternalToolConstants#LAUNCH_ATTRIBUTE_IDENTITY_WORKING_DIRECTORY
+ */
+ ILaunchAttributetrue
, which
+ * indicates that the configuration will be executed as appropriate by the
+ * builder.
*/
String ATTR_BUILDER_ENABLED = UI_PLUGIN_ID + ".ATTR_BUILDER_ENABLED"; //$NON-NLS-1$
/**
- * Boolean attribute identifying whether an external tool launcher should execute
- * synchronously (value false
) or asynchronously (value true
).
- * Default value is
+ * Boolean attribute identifying whether an external tool launcher should
+ * execute synchronously (value false
) or asynchronously (value
+ * true
). Default value is
*/
String ATTR_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$
@@ -197,17 +262,20 @@ public interface IExternalToolConstants {
int ERR_INTERNAL_ERROR = 150;
/**
- * String attribute identifying a non-external tool builder launch configuration that is disabled
- * The value is the name of the disabled builder.
+ * String attribute identifying a non-external tool builder launch
+ * configuration that is disabled The value is the name of the disabled
+ * builder.
*/
- String ATTR_DISABLED_BUILDER = UI_PLUGIN_ID + ".ATTR_DISABLED_BUILDER"; //$NON-NLS-1$
+ String ATTR_DISABLED_BUILDER = UI_PLUGIN_ID + ".ATTR_DISABLED_BUILDER"; //$NON-NLS-1$
/**
- * boolean attribute identifying that an external tool builder has been configured for triggering
- * using the ICommand.setBuilding(int)
mechanism
+ * boolean attribute identifying that an external tool builder has been
+ * configured for triggering using the
+ * ICommand.setBuilding(int)
mechanism
+ *
* @since 3.1
*/
- String ATTR_TRIGGERS_CONFIGURED = UI_PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED"; //$NON-NLS-1$
+ String ATTR_TRIGGERS_CONFIGURED = UI_PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED"; //$NON-NLS-1$
/**
* String attribute identifying the build scope for a launch configuration.
@@ -221,4 +289,5 @@ public interface IExternalToolConstants {
* true
.
*/
String ATTR_INCLUDE_REFERENCED_PROJECTS = UI_PLUGIN_ID + ".ATTR_INCLUDE_REFERENCED_PROJECTS"; //$NON-NLS-1$
+
}
diff --git a/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java b/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
index 33f4daeb853..090d6f6e41f 100644
--- a/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
+++ b/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2022 IBM Corporation and others.
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -12,11 +12,13 @@
* IBM Corporation - initial API and implementation
* Keith Seitz (keiths@redhat.com) - Bug 27243 (environment variables contribution)
* dakshinamurthy.karra@gmail.com - bug 165371
+ * Alexander Fedorov (ArSysOp) - API to process launch configuration attributes
*******************************************************************************/
package org.eclipse.core.externaltools.internal.launchConfigurations;
import java.io.File;
+import java.util.Optional;
import org.eclipse.core.externaltools.internal.IExternalToolConstants;
import org.eclipse.core.resources.IProject;
@@ -144,12 +146,7 @@ public static IPath getWorkingDirectory(ILaunchConfiguration configuration) thro
* configuration attribute, or if unable to resolve any variables
*/
public static String[] getArguments(ILaunchConfiguration configuration) throws CoreException {
- String args = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, (String) null);
- if (args != null) {
- String expanded = getStringVariableManager().performStringSubstitution(args);
- return parseStringIntoList(expanded);
- }
- return null;
+ return Optional.of(IExternalToolConstants.LAUNCH_ATTRIBUTE_LOCATION.read(configuration)).map(ExternalToolsCoreUtil::parseStringIntoList).orElse(null);
}
private static IStringVariableManager getStringVariableManager() {
diff --git a/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java b/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
index b733eb9ed02..53c80a794fc 100644
--- a/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
+++ b/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Alexander Fedorov (ArSysOp) - API to process launch configuration attributes
*******************************************************************************/
package org.eclipse.core.externaltools.internal.launchConfigurations;
@@ -29,6 +30,15 @@ public class ExternalToolsProgramMessages extends NLS {
public static String ExternalToolsUtil_invalidLocation__0_;
public static String ExternalToolsUtil_invalidDirectory__0_;
+
+ public static String LaunchAttributeArguments_name;
+
+
+ public static String LaunchAttributeLocation_name;
+
+
+ public static String LaunchAttributeWorkingDirectory_name;
+
static {
// load message values from bundle file
NLS.initializeMessages(BUNDLE_NAME, ExternalToolsProgramMessages.class);
diff --git a/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties b/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
index 7d91899381d..01e01b6fe2c 100644
--- a/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
+++ b/debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2025 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# Alexander Fedorov (ArSysOp) - API to process launch configuration attributes
###############################################################################
BackgroundResourceRefresher_0=Refreshing resources...
@@ -20,4 +21,7 @@ ProgramLaunchDelegate_5=[pid: {0}]
ExternalToolsUtil_Location_not_specified_by__0__1=Location not specified by {0}
ExternalToolsUtil_invalidLocation__0_ = The file does not exist for the external tool named {0}.
-ExternalToolsUtil_invalidDirectory__0_ = The working directory {0} does not exist for the external tool named {1}.
\ No newline at end of file
+ExternalToolsUtil_invalidDirectory__0_ = The working directory {0} does not exist for the external tool named {1}.
+LaunchAttributeArguments_name=Arguments
+LaunchAttributeLocation_name=Location
+LaunchAttributeWorkingDirectory_name=Working Directory
diff --git a/debug/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchAttribute.java b/debug/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchAttribute.java
new file mode 100644
index 00000000000..1cd99eaedfd
--- /dev/null
+++ b/debug/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchAttribute.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2024, 2025 ArSysOp.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Alexander Fedorov (ArSysOp) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Function;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+
+/**
+ *
+ * The definition of {@link ILaunchConfiguration} attribute convenience to:
+ *
+ *
+ *
+ * @since 3.23
+ */
+public interface ILaunchAttribute
+ * Returns the attribute value or fails with {@link CoreException}, may
+ * return null
value
+ *
+ * @param configuration the launch configuration to read attribute from,
+ * must not be null
+ * @return the attribute value, may return null
+ */
+ V read(ILaunchConfiguration configuration) throws CoreException;
+
+ /**
+ * "Probes" the value of launch configuration attribute.
+ * Returns {@link Optional} in case of read failure or null
+ * value to let caller decide how to proceed
+ *
+ * @param configuration the launch configuration to read attribute from,
+ * must not be null
+ * @return the {@link Optional} with attribute value
+ */
+ Optionalnull
+ * @param value the value, may be null
+ */
+ void write(ILaunchConfigurationWorkingCopy working, V value);
+
+ /**
+ * creates an instance of {@link ILaunchAttribute} using primitives (useful
+ * for existing code)
+ *
+ * @param null
+ * @param type the value type of the attribute, must not be
+ * null
+ * @param value the {@link Function} to calculate of default value of the
+ * attribute from {@link ILaunchConfiguration}, must not be
+ * null
+ * @param name the name of the attribute, must not be null
+ * @return created instance of {@link ILaunchAttribute}
+ */
+ static null
. Encoding is tool specific.
- * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_LOCATION}
+ *
+ * @deprecated use
+ * {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#LAUNCH_ATTRIBUTE_IDENTITY_LOCATION}
*/
@Deprecated String ATTR_LOCATION = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_LOCATION;
@@ -204,7 +207,9 @@ public interface IExternalToolConstants {
/**
* String attribute containing the arguments that should be passed to the
* tool. Default value is null
, and encoding is tool specific.
- * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_TOOL_ARGUMENTS}
+ *
+ * @deprecated use
+ * {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#LAUNCH_ATTRIBUTE_IDENTITY_ARGUMENTS}
*/
@Deprecated String ATTR_TOOL_ARGUMENTS = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_TOOL_ARGUMENTS;
@@ -212,9 +217,12 @@ public interface IExternalToolConstants {
* String attribute identifying the working directory of an external tool.
* Default value is null
, which indicates a default working
* directory, which is tool specific.
- * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_WORKING_DIRECTORY}
+ *
+ * @deprecated use
+ * {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#LAUNCH_ATTRIBUTE_IDENTITY_WORKING_DIRECTORY}
*/
- @Deprecated String ATTR_WORKING_DIRECTORY = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_WORKING_DIRECTORY;
+ @Deprecated
+ String ATTR_WORKING_DIRECTORY = org.eclipse.core.externaltools.internal.IExternalToolConstants.LAUNCH_ATTRIBUTE_IDENTITY_WORKING_DIRECTORY.id();
/**
* String attribute identifying whether an external tool builder configuration
diff --git a/debug/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF b/debug/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
index 3d7bc00b7cc..40216b2a147 100644
--- a/debug/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.externaltools; singleton:=true
-Bundle-Version: 3.6.500.qualifier
+Bundle-Version: 3.6.600.qualifier
Bundle-Activator: org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin