1
1
/*******************************************************************************
2
- * Copyright (c) 2000, 2013 IBM Corporation and others.
2
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
3
3
*
4
4
* This program and the accompanying materials
5
5
* are made available under the terms of the Eclipse Public License 2.0
11
11
* Contributors:
12
12
* IBM Corporation - initial API and implementation
13
13
14
+ * Alexander Fedorov (ArSysOp) - https://github.com/eclipse-platform/eclipse.platform/issues/1668
14
15
*******************************************************************************/
15
16
16
17
package org .eclipse .core .externaltools .internal ;
18
+
19
+ import org .eclipse .core .externaltools .internal .launchConfigurations .ExternalToolsProgramMessages ;
20
+ import org .eclipse .core .runtime .preferences .PreferenceMetadata ;
21
+ import org .eclipse .debug .core .ILaunchAttribute ;
22
+ import org .eclipse .debug .core .ILaunchAttributeIdentity ;
23
+
17
24
/**
18
25
* Defines the constants available for client use.
19
26
* <p>
@@ -30,71 +37,77 @@ public interface IExternalToolConstants {
30
37
String EMPTY_STRING = "" ; //$NON-NLS-1$
31
38
32
39
/**
33
- * Plug-in identifier for external tools UI (value <code>org.eclipse.ui.externaltools</code>).
40
+ * Plug-in identifier for external tools UI (value
41
+ * <code>org.eclipse.ui.externaltools</code>).
34
42
*/
35
- String UI_PLUGIN_ID = "org.eclipse.ui.externaltools" ; //$NON-NLS-1$;
43
+ String UI_PLUGIN_ID = "org.eclipse.ui.externaltools" ; //$NON-NLS-1$ ;
36
44
37
45
/**
38
- * Plug-in identifier for external tools core (value <code>org.eclipse.core.externaltools</code>).
46
+ * Plug-in identifier for external tools core (value
47
+ * <code>org.eclipse.core.externaltools</code>).
39
48
*/
40
- String PLUGIN_ID = "org.eclipse.core.externaltools" ; //$NON-NLS-1$;
49
+ String PLUGIN_ID = "org.eclipse.core.externaltools" ; //$NON-NLS-1$ ;
41
50
42
51
// ------- Refresh Variables -------
43
52
/**
44
- * Variable that expands to the workspace root object (value <code>workspace</code>).
53
+ * Variable that expands to the workspace root object (value
54
+ * <code>workspace</code>).
45
55
*/
46
56
String VAR_WORKSPACE = "workspace" ; //$NON-NLS-1$
47
57
/**
48
- * Variable that expands to the project resource (value <code>project</code>).
58
+ * Variable that expands to the project resource (value
59
+ * <code>project</code>).
49
60
*/
50
61
String VAR_PROJECT = "project" ; //$NON-NLS-1$
51
62
/**
52
- * Variable that expands to the container resource (value <code>container</code>).
63
+ * Variable that expands to the container resource (value
64
+ * <code>container</code>).
53
65
*/
54
66
String VAR_CONTAINER = "container" ; //$NON-NLS-1$
55
67
/**
56
68
* Variable that expands to a resource (value <code>resource</code>).
57
69
*/
58
70
String VAR_RESOURCE = "resource" ; //$NON-NLS-1$
59
71
/**
60
- * Variable that expands to the working set object (value <code>working_set</code>).
72
+ * Variable that expands to the working set object (value
73
+ * <code>working_set</code>).
61
74
*/
62
75
String VAR_WORKING_SET = "working_set" ; //$NON-NLS-1$
63
76
// ------- Tool Types -------
64
77
/**
65
- * External tool type for programs such as executables, batch files,
66
- * shell scripts, etc (value <code>programType</code>).
78
+ * External tool type for programs such as executables, batch files, shell
79
+ * scripts, etc (value <code>programType</code>).
67
80
*/
68
- String TOOL_TYPE_PROGRAM = "programType" ; //$NON-NLS-1$;
81
+ String TOOL_TYPE_PROGRAM = "programType" ; //$NON-NLS-1$ ;
69
82
70
83
// ------- Build Types -------
71
84
/**
72
- * Build type indicating an incremental project build request for
73
- * the external tool running as a builder (value <code>incremental</code>).
85
+ * Build type indicating an incremental project build request for the
86
+ * external tool running as a builder (value <code>incremental</code>).
74
87
*/
75
88
String BUILD_TYPE_INCREMENTAL = "incremental" ; //$NON-NLS-1$
76
89
77
90
/**
78
- * Build type indicating a full project build request for
79
- * the external tool running as a builder (value <code>full</code>).
91
+ * Build type indicating a full project build request for the external tool
92
+ * running as a builder (value <code>full</code>).
80
93
*/
81
94
String BUILD_TYPE_FULL = "full" ; //$NON-NLS-1$
82
95
83
96
/**
84
- * Build type indicating an automatic project build request for
85
- * the external tool running as a builder (value <code>auto</code>).
97
+ * Build type indicating an automatic project build request for the external
98
+ * tool running as a builder (value <code>auto</code>).
86
99
*/
87
100
String BUILD_TYPE_AUTO = "auto" ; //$NON-NLS-1$
88
101
89
102
/**
90
- * Build type indicating a clean project build request for
91
- * the external tool running as a builder (value <code>clean</code>).
103
+ * Build type indicating a clean project build request for the external tool
104
+ * running as a builder (value <code>clean</code>).
92
105
*/
93
106
String BUILD_TYPE_CLEAN = "clean" ; //$NON-NLS-1$
94
107
95
108
/**
96
- * Build type indicating no project build request for
97
- * the external tool running as a builder (value <code>none</code>).
109
+ * Build type indicating no project build request for the external tool
110
+ * running as a builder (value <code>none</code>).
98
111
*/
99
112
String BUILD_TYPE_NONE = "none" ; //$NON-NLS-1$
100
113
@@ -129,32 +142,35 @@ public interface IExternalToolConstants {
129
142
/**
130
143
* Boolean attribute indicating if external tool output should be captured.
131
144
* Default value is <code>false</code>.
132
- * @deprecated since 3.1 Replaced by <code>org.eclipse.debug.core.DebugPlugin.ATTR_CAPTURE_OUTPUT</code>
145
+ *
146
+ * @deprecated since 3.1 Replaced by
147
+ * <code>org.eclipse.debug.core.DebugPlugin.ATTR_CAPTURE_OUTPUT</code>
133
148
*/
134
- @ Deprecated String ATTR_CAPTURE_OUTPUT = UI_PLUGIN_ID + ".ATTR_CAPTURE_OUTPUT" ; //$NON-NLS-1$
149
+ @ Deprecated
150
+ String ATTR_CAPTURE_OUTPUT = UI_PLUGIN_ID + ".ATTR_CAPTURE_OUTPUT" ; //$NON-NLS-1$
135
151
/**
136
152
* String attribute identifying the location of an external. Default value
137
153
* is <code>null</code>. Encoding is tool specific.
138
154
*/
139
155
String ATTR_LOCATION = UI_PLUGIN_ID + ".ATTR_LOCATION" ; //$NON-NLS-1$
140
156
141
157
/**
142
- * Boolean attribute indicating if the user should be prompted for
143
- * arguments before running a tool. Default value is <code>false</code>.
144
- * THIS ATTRIBUTE IS NOT USED.
158
+ * Boolean attribute indicating if the user should be prompted for arguments
159
+ * before running a tool. Default value is <code>false</code>. THIS
160
+ * ATTRIBUTE IS NOT USED.
145
161
*/
146
162
String ATTR_PROMPT_FOR_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_PROMPT_FOR_ARGUMENTS" ; //$NON-NLS-1$
147
163
148
164
/**
149
- * String attribute identifying the scope of resources that should trigger an
150
- * external tool to run. Default value is <code>null</code>
151
- * indicating that the builder will be triggered for all changes.
165
+ * String attribute identifying the scope of resources that should trigger
166
+ * an external tool to run. Default value is <code>null</code> indicating
167
+ * that the builder will be triggered for all changes.
152
168
*/
153
169
String ATTR_BUILDER_SCOPE = UI_PLUGIN_ID + ".ATTR_BUILD_SCOPE" ; //$NON-NLS-1$
154
170
155
171
/**
156
- * String attribute containing an array of build kinds for which an
157
- * external tool builder should be run.
172
+ * String attribute containing an array of build kinds for which an external
173
+ * tool builder should be run.
158
174
*/
159
175
String ATTR_RUN_BUILD_KINDS = UI_PLUGIN_ID + ".ATTR_RUN_BUILD_KINDS" ; //$NON-NLS-1$
160
176
@@ -178,16 +194,17 @@ public interface IExternalToolConstants {
178
194
String ATTR_WORKING_DIRECTORY = UI_PLUGIN_ID + ".ATTR_WORKING_DIRECTORY" ; //$NON-NLS-1$
179
195
180
196
/**
181
- * String attribute identifying whether an external tool builder configuration
182
- * is enabled. The default value is <code>true</code>, which indicates
183
- * that the configuration will be executed as appropriate by the builder.
197
+ * String attribute identifying whether an external tool builder
198
+ * configuration is enabled. The default value is <code>true</code>, which
199
+ * indicates that the configuration will be executed as appropriate by the
200
+ * builder.
184
201
*/
185
202
String ATTR_BUILDER_ENABLED = UI_PLUGIN_ID + ".ATTR_BUILDER_ENABLED" ; //$NON-NLS-1$
186
203
187
204
/**
188
- * Boolean attribute identifying whether an external tool launcher should execute
189
- * synchronously (value <code>false</code>) or asynchronously (value <code>true</code>).
190
- * Default value is
205
+ * Boolean attribute identifying whether an external tool launcher should
206
+ * execute synchronously (value <code>false</code>) or asynchronously (value
207
+ * <code>true</code>). Default value is
191
208
*/
192
209
String ATTR_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" ; //$NON-NLS-1$
193
210
@@ -197,17 +214,20 @@ public interface IExternalToolConstants {
197
214
int ERR_INTERNAL_ERROR = 150 ;
198
215
199
216
/**
200
- * String attribute identifying a non-external tool builder launch configuration that is disabled
201
- * The value is the name of the disabled builder.
217
+ * String attribute identifying a non-external tool builder launch
218
+ * configuration that is disabled The value is the name of the disabled
219
+ * builder.
202
220
*/
203
- String ATTR_DISABLED_BUILDER = UI_PLUGIN_ID + ".ATTR_DISABLED_BUILDER" ; //$NON-NLS-1$
221
+ String ATTR_DISABLED_BUILDER = UI_PLUGIN_ID + ".ATTR_DISABLED_BUILDER" ; //$NON-NLS-1$
204
222
205
223
/**
206
- * boolean attribute identifying that an external tool builder has been configured for triggering
207
- * using the <code>ICommand.setBuilding(int)</code> mechanism
224
+ * boolean attribute identifying that an external tool builder has been
225
+ * configured for triggering using the
226
+ * <code>ICommand.setBuilding(int)</code> mechanism
227
+ *
208
228
* @since 3.1
209
229
*/
210
- String ATTR_TRIGGERS_CONFIGURED = UI_PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED" ; //$NON-NLS-1$
230
+ String ATTR_TRIGGERS_CONFIGURED = UI_PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED" ; //$NON-NLS-1$
211
231
212
232
/**
213
233
* String attribute identifying the build scope for a launch configuration.
@@ -221,4 +241,37 @@ public interface IExternalToolConstants {
221
241
* <code>true</code>.
222
242
*/
223
243
String ATTR_INCLUDE_REFERENCED_PROJECTS = UI_PLUGIN_ID + ".ATTR_INCLUDE_REFERENCED_PROJECTS" ; //$NON-NLS-1$
244
+
245
+ /**
246
+ * {@link ILaunchAttribute<String>} identifying the location of an external.
247
+ * Default value is <code>null</code>. Encoding is tool specific.
248
+ */
249
+ ILaunchAttribute <String > LAUNCH_ATTRIBUTE_LOCATION = ILaunchAttribute .DEFAULT .create (//
250
+ new PreferenceMetadata <>(String .class , //
251
+ ILaunchAttributeIdentity .DEFAULT .create (ATTR_LOCATION ).id (), //
252
+ (String ) null , // unspecified by default
253
+ ExternalToolsProgramMessages .LaunchAttributeLocation_name ));
254
+
255
+ /**
256
+ * {@link ILaunchAttribute<String>} identifying the working directory of an
257
+ * external tool. Default value is <code>null</code>, which indicates a
258
+ * default working directory, which is tool specific.
259
+ */
260
+ ILaunchAttribute <String > LAUNCH_ATTRIBUTE_WORKING_DIRECTORY = ILaunchAttribute .DEFAULT .create (//
261
+ new PreferenceMetadata <>(String .class , //
262
+ ILaunchAttributeIdentity .DEFAULT .create (ATTR_WORKING_DIRECTORY ).id (), //
263
+ (String ) null , // unspecified by default
264
+ ExternalToolsProgramMessages .LaunchAttributeWorkingDirectory_name ));
265
+
266
+ /**
267
+ * {@link ILaunchAttribute<String>} containing the arguments that should be
268
+ * passed to the tool. Default value is <code>null</code>, and encoding is
269
+ * tool specific.
270
+ */
271
+ ILaunchAttribute <String > LAUNCH_ATTRIBUTE_ARGUMENTS = ILaunchAttribute .DEFAULT .create (//
272
+ new PreferenceMetadata <>(String .class , //
273
+ ILaunchAttributeIdentity .DEFAULT .create (ATTR_TOOL_ARGUMENTS ).id (), //
274
+ (String ) null , // unspecified by default
275
+ ExternalToolsProgramMessages .LaunchAttributeArguments_name ));
276
+
224
277
}
0 commit comments