Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 309899 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/tm/internal/terminal/local/LocalTerminalConnector.java (-9 / +43 lines)
Lines 13-19 Link Here
13
package org.eclipse.tm.internal.terminal.local;
13
package org.eclipse.tm.internal.terminal.local;
14
14
15
import java.io.OutputStream;
15
import java.io.OutputStream;
16
import java.text.Format;
17
import java.text.MessageFormat;
18
16
import org.eclipse.core.runtime.CoreException;
19
import org.eclipse.core.runtime.CoreException;
20
import org.eclipse.core.runtime.IStatus;
21
import org.eclipse.core.runtime.Status;
17
import org.eclipse.debug.core.DebugEvent;
22
import org.eclipse.debug.core.DebugEvent;
18
import org.eclipse.debug.core.DebugException;
23
import org.eclipse.debug.core.DebugException;
19
import org.eclipse.debug.core.DebugPlugin;
24
import org.eclipse.debug.core.DebugPlugin;
Lines 26-31 Link Here
26
import org.eclipse.debug.core.model.IStreamMonitor;
31
import org.eclipse.debug.core.model.IStreamMonitor;
27
import org.eclipse.debug.core.model.IStreamsProxy;
32
import org.eclipse.debug.core.model.IStreamsProxy;
28
import org.eclipse.debug.ui.IDebugUIConstants;
33
import org.eclipse.debug.ui.IDebugUIConstants;
34
import org.eclipse.jface.dialogs.ErrorDialog;
35
import org.eclipse.swt.widgets.Display;
36
import org.eclipse.swt.widgets.Shell;
29
import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities;
37
import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities;
30
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory;
38
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory;
31
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessRegistry;
39
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessRegistry;
Lines 171-192 Link Here
171
		control.setState(TerminalState.CONNECTING);
179
		control.setState(TerminalState.CONNECTING);
172
		ILaunchConfigurationWorkingCopy workingCopy = null;
180
		ILaunchConfigurationWorkingCopy workingCopy = null;
173
		ILaunchConfiguration configuration = null;
181
		ILaunchConfiguration configuration = null;
182
		String configurationName = null;
174
		try {
183
		try {
175
184
176
			String configurationName = settings.getLaunchConfigurationName();
185
			configurationName = settings.getLaunchConfigurationName();
177
			configuration = LocalTerminalUtilities.findLaunchConfiguration(configurationName);
186
			configuration = LocalTerminalUtilities.findLaunchConfiguration(configurationName);
187
		}
188
		catch (CoreException exception) {
178
189
179
			// Always set the the process factory ID and enable console output (there is no need
190
			Shell shell = Display.getDefault().getActiveShell();
180
			// to restore these attributes afterwards; disabling console output does not make
191
			String title = LocalTerminalMessages.errorTitleCouldNotConnectToTerminal;
181
			// sense for terminal launches and will be overridden when the configuration is
192
			Format text;
182
			// actually launched):
193
			text = new MessageFormat(LocalTerminalMessages.errorLaunchConfigurationNoLongerExists);
183
			//
194
			String message = text.format(new Object[] {configurationName});
195
			IStatus status = new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, message);
196
			ErrorDialog.openError(shell, title, null, status);
197
			control.setState(TerminalState.CLOSED);
198
			return;
199
		}
200
		try {
201
202
			String oldFactoryID = configuration.getAttribute(ATTR_PROCESS_FACTORY_ID, (String)null);
184
			workingCopy = configuration.getWorkingCopy();
203
			workingCopy = configuration.getWorkingCopy();
185
			workingCopy.setAttribute(ATTR_CAPTURE_OUTPUT, true);
204
			workingCopy.setAttribute(ATTR_CAPTURE_OUTPUT, true);
186
			workingCopy.setAttribute(ATTR_CAPTURE_IN_CONSOLE, true);
205
			workingCopy.setAttribute(ATTR_CAPTURE_IN_CONSOLE, true);
187
			workingCopy.setAttribute(ATTR_PROCESS_FACTORY_ID, LocalTerminalProcessFactory.ID);
206
			workingCopy.setAttribute(ATTR_PROCESS_FACTORY_ID, LocalTerminalProcessFactory.ID);
188
			configuration = workingCopy.doSave();
207
			configuration = workingCopy.doSave();
189
			launch = configuration.launch(ILaunchManager.RUN_MODE, null);
208
			try {
209
210
				launch = configuration.launch(ILaunchManager.RUN_MODE, null);
211
			}
212
			finally {
213
214
				// The process factory ID is used to distinguish between launches that originate
215
				// from the terminal connector and launches that originate from the launch dialog.
216
				// After launching, the original ID is restored so that the launch is not mistaken
217
				// as originating from the terminal connector UI when it is launched via the launch
218
				// dialog the next time:
219
				//
220
				workingCopy = configuration.getWorkingCopy();
221
				workingCopy.setAttribute(ATTR_PROCESS_FACTORY_ID, oldFactoryID);
222
				workingCopy.doSave();
223
			}
190
224
191
			// To prevent a console from being allocated, the launch will actually not contain a
225
			// To prevent a console from being allocated, the launch will actually not contain a
192
			// reference to the runtime process. The process has to be obtained from the
226
			// reference to the runtime process. The process has to be obtained from the
Lines 257-265 Link Here
257
			//
291
			//
258
			LocalTerminalProcessRegistry.addProcessBackToFinishedLaunch(launch);
292
			LocalTerminalProcessRegistry.addProcessBackToFinishedLaunch(launch);
259
293
260
			// Now, terminate the process if it hasn't been terminated already:
294
			// Now, terminate the process if it was ever started and hasn't been terminated already:
261
			//
295
			//
262
			if (launch.canTerminate()) {
296
			if (launch != null && launch.canTerminate()) {
263
297
264
				launch.terminate();
298
				launch.terminate();
265
				//
299
				//
(-)src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchListProvider.java (-1 / +1 lines)
Lines 51-57 Link Here
51
	public Object[] getElements(Object input) {
51
	public Object[] getElements(Object input) {
52
52
53
		ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
53
		ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
54
		ILaunchConfigurationType type = LocalTerminalUtilities.PROGRAM_LAUNCH_TYPE;
54
		ILaunchConfigurationType type = LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE;
55
		ILaunchConfiguration[] configurations = null;
55
		ILaunchConfiguration[] configurations = null;
56
		try {
56
		try {
57
57
(-)src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.java (+9 lines)
Lines 80-85 Link Here
80
	/** The error message for an invalid working directory location. */
80
	/** The error message for an invalid working directory location. */
81
	public static String invalidWorkingDirectory;
81
	public static String invalidWorkingDirectory;
82
82
83
	/** The error message for attempting to directly launch a Terminal launch configuration. */
84
	public static String errorDirectLaunch;
85
86
	/** The error message for attempting to launch a no longer existing launch configuration. */
87
	public static String errorLaunchConfigurationNoLongerExists;
88
89
	/** The error dialog title for failed terminal connections. */
90
	public static String errorTitleCouldNotConnectToTerminal;
91
83
	/** The title string of the warning displayed when terminal launches are still running. */
92
	/** The title string of the warning displayed when terminal launches are still running. */
84
	public static String warningTitleTerminalsStillRunning;
93
	public static String warningTitleTerminalsStillRunning;
85
94
(-)src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties (+7 lines)
Lines 28-33 Link Here
28
invalidLocation=Executable does not exist for the external tool named ''{0}''
28
invalidLocation=Executable does not exist for the external tool named ''{0}''
29
invalidWorkingDirectory=The path {0} is not a directory and cannot be used as working directory \
29
invalidWorkingDirectory=The path {0} is not a directory and cannot be used as working directory \
30
 for ''{1}''
30
 for ''{1}''
31
errorDirectLaunch=Terminal launch configurations can only be launched from the Terminal view. \
32
 Please open the Terminal view and click the view's Settings button to select and launch a local \
33
 Terminal.
34
errorLaunchConfigurationNoLongerExists=The launch configuration ''{0}'' that is selected in the \
35
 Terminal Settings does no longer exist. Please open the Settings dialog to select a valid launch \
36
 configuration.
37
errorTitleCouldNotConnectToTerminal=Could not connect to Terminal
31
warningTitleTerminalsStillRunning=Warning: Terminals with active processes are still running
38
warningTitleTerminalsStillRunning=Warning: Terminals with active processes are still running
32
warningMessageTerminalsStillRunning=The workbench is about to be shut down even though one or more \
39
warningMessageTerminalsStillRunning=The workbench is about to be shut down even though one or more \
33
 terminals with active processes are still running. You may abort the shut-down of the workbench \
40
 terminals with active processes are still running. You may abort the shut-down of the workbench \
(-)src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettingsPage.java (-2 / +12 lines)
Lines 37-42 Link Here
37
import org.eclipse.swt.widgets.Shell;
37
import org.eclipse.swt.widgets.Shell;
38
import org.eclipse.swt.widgets.Table;
38
import org.eclipse.swt.widgets.Table;
39
import org.eclipse.swt.widgets.Widget;
39
import org.eclipse.swt.widgets.Widget;
40
import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities;
40
import org.eclipse.tm.internal.terminal.local.ui.DependentHeightComposite;
41
import org.eclipse.tm.internal.terminal.local.ui.DependentHeightComposite;
41
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
42
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
42
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
43
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
Lines 78-83 Link Here
78
	 */
79
	 */
79
	public void createControl(Composite parent) {
80
	public void createControl(Composite parent) {
80
81
82
		ILaunchConfiguration defaultConfiguration;
83
		defaultConfiguration = LocalTerminalLaunchUtilities.createDefaultLaunchConfiguration();
81
		Composite enclosing = parent.getParent();
84
		Composite enclosing = parent.getParent();
82
		Layout enclosingLayout = enclosing.getLayout();
85
		Layout enclosingLayout = enclosing.getLayout();
83
		int extra = 0;
86
		int extra = 0;
Lines 127-132 Link Here
127
		//       in having it be a part of the ISettingsPage interface
130
		//       in having it be a part of the ISettingsPage interface
128
		//
131
		//
129
		loadSettings();
132
		loadSettings();
133
		if (defaultConfiguration != null) {
134
135
			// If there is only one configuration (the default one), then make sure it gets
136
			// selected:
137
			//
138
			viewer.setSelection(new StructuredSelection(defaultConfiguration), true);
139
		}
130
	}
140
	}
131
141
132
	/**
142
	/**
Lines 229-236 Link Here
229
			ILaunchConfigurationWorkingCopy newlyCreatedConfiguration;
239
			ILaunchConfigurationWorkingCopy newlyCreatedConfiguration;
230
			ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
240
			ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
231
			String baseName = LocalTerminalMessages.newTerminalLaunchName;
241
			String baseName = LocalTerminalMessages.newTerminalLaunchName;
232
			String uniqueName = launchManager.generateUniqueLaunchConfigurationNameFrom(baseName);
242
			String uniqueName = launchManager.generateLaunchConfigurationName(baseName);
233
			ILaunchConfigurationType type = LocalTerminalUtilities.PROGRAM_LAUNCH_TYPE;
243
			ILaunchConfigurationType type = LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE;
234
			try {
244
			try {
235
245
236
				newlyCreatedConfiguration = type.newInstance(null, uniqueName);
246
				newlyCreatedConfiguration = type.newInstance(null, uniqueName);
(-)src/org/eclipse/tm/internal/terminal/local/LocalTerminalUtilities.java (-3 / +3 lines)
Lines 56-65 Link Here
56
	public final static ILaunchManager LAUNCH_MANAGER = DebugPlugin.getDefault().getLaunchManager();
56
	public final static ILaunchManager LAUNCH_MANAGER = DebugPlugin.getDefault().getLaunchManager();
57
57
58
	/**
58
	/**
59
	 * The {@link ILaunchConfigurationType} for "Program" launches (in the "External Tools"
59
	 * The {@link ILaunchConfigurationType} for "Terminal" launches (in the "External Tools"
60
	 * category).
60
	 * category).
61
	 */
61
	 */
62
	public final static ILaunchConfigurationType PROGRAM_LAUNCH_TYPE =
62
	public final static ILaunchConfigurationType TERMINAL_LAUNCH_TYPE =
63
		LAUNCH_MANAGER.getLaunchConfigurationType(LOCAL_TERMINAL);
63
		LAUNCH_MANAGER.getLaunchConfigurationType(LOCAL_TERMINAL);
64
64
65
	/**
65
	/**
Lines 74-80 Link Here
74
74
75
		ILaunchConfiguration[] configuration;
75
		ILaunchConfiguration[] configuration;
76
		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
76
		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
77
		configuration = manager.getLaunchConfigurations(LocalTerminalUtilities.PROGRAM_LAUNCH_TYPE);
77
		configuration = manager.getLaunchConfigurations(LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE);
78
		int numberOfConfigurations = configuration.length;
78
		int numberOfConfigurations = configuration.length;
79
		for (int index = 0; index < numberOfConfigurations; index++) {
79
		for (int index = 0; index < numberOfConfigurations; index++) {
80
80
(-)src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchDelegate.java (+15 lines)
Lines 32-37 Link Here
32
import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator;
32
import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator;
33
import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages;
33
import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages;
34
import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities;
34
import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities;
35
import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory;
35
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
36
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
36
import org.eclipse.ui.PlatformUI;
37
import org.eclipse.ui.PlatformUI;
37
38
Lines 80-85 Link Here
80
	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch,
81
	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch,
81
	IProgressMonitor progressMonitor) throws CoreException {
82
	IProgressMonitor progressMonitor) throws CoreException {
82
83
84
		String processFactoryID;
85
		processFactoryID = configuration.getAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, EMPTY);
86
		if (!LocalTerminalProcessFactory.ID.equals(processFactoryID)) {
87
88
			// This launch was not launched via the terminal connector UI but via the launch dialog;
89
			// the launch needs to be explicitly connected to a terminal (otherwise it will appear
90
			// in the regular console), so launching from the launch dialog or from the launch
91
			// history is not supported right now.
92
			//
93
			String message = LocalTerminalMessages.errorDirectLaunch;
94
			IStatus status = new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, message);
95
			throw new CoreException(status);
96
		}
97
83
		// Extract all relevant information from the ILaunchConfiguration; the original
98
		// Extract all relevant information from the ILaunchConfiguration; the original
84
		// ProgramLaunchDelegate class checks for cancellation again and again after each step,
99
		// ProgramLaunchDelegate class checks for cancellation again and again after each step,
85
		// which is a somewhat suspect pattern; however, for now, LocalTerminalLaunchDelegate
100
		// which is a somewhat suspect pattern; however, for now, LocalTerminalLaunchDelegate
(-)src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchUtilities.java (+82 lines)
Lines 16-31 Link Here
16
import org.eclipse.core.runtime.IPath;
16
import org.eclipse.core.runtime.IPath;
17
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.IStatus;
18
import org.eclipse.core.runtime.Path;
18
import org.eclipse.core.runtime.Path;
19
import org.eclipse.core.runtime.Platform;
19
import org.eclipse.core.runtime.Status;
20
import org.eclipse.core.runtime.Status;
20
import org.eclipse.core.variables.IStringVariableManager;
21
import org.eclipse.core.variables.IStringVariableManager;
21
import org.eclipse.core.variables.VariablesPlugin;
22
import org.eclipse.core.variables.VariablesPlugin;
22
import org.eclipse.debug.core.DebugPlugin;
23
import org.eclipse.debug.core.DebugPlugin;
23
import org.eclipse.debug.core.ILaunchConfiguration;
24
import org.eclipse.debug.core.ILaunchConfiguration;
25
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
26
import org.eclipse.debug.core.ILaunchManager;
24
import org.eclipse.debug.ui.DebugUITools;
27
import org.eclipse.debug.ui.DebugUITools;
25
import org.eclipse.osgi.util.NLS;
28
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.swt.graphics.Image;
29
import org.eclipse.swt.graphics.Image;
27
import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator;
30
import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator;
28
import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages;
31
import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages;
32
import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities;
29
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
33
import org.eclipse.tm.internal.terminal.provisional.api.Logger;
30
34
31
/**
35
/**
Lines 176-181 Link Here
176
		return null;
180
		return null;
177
	}
181
	}
178
182
183
	/**
184
	 * Creates an initial default launch configuration for starting a shell if no terminal/program
185
	 * launch configurations are defined yet.
186
	 *
187
	 * @return new {@link ILaunchConfiguration}, or {@code null} if there were already some
188
	 * terminal/program launch configurations defined
189
	 */
190
	public static ILaunchConfiguration createDefaultLaunchConfiguration() {
191
192
		ILaunchConfiguration[] configs;
193
		ILaunchManager manager = LocalTerminalUtilities.LAUNCH_MANAGER;
194
		try {
195
196
			configs = manager.getLaunchConfigurations(LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE);
197
			if (configs == null || configs.length == 0) {
198
199
				// Create a default launch configuration only if there aren't any terminal launch
200
				// configurations defined at all:
201
				//
202
				ILaunchConfigurationWorkingCopy workingCopy;
203
				workingCopy = createNewLaunchConfigurationWorkingCopy();
204
				return workingCopy.doSave();
205
			}
206
		}
207
		catch (CoreException exception)
208
		{
209
			exception.printStackTrace(); // TODO: implement proper exception handling
210
		}
211
		return null;
212
	}
213
214
	/**
215
	 * Creates an {@link ILaunchConfigurationWorkingCopy} that uses the default shell as its
216
	 * executable and the user's home directory as the working directory.
217
	 *
218
	 * @return an unsaved {@link ILaunchConfigurationWorkingCopy}
219
	 * @throws CoreException if the {@link ILaunchConfigurationWorkingCopy} could not be
220
	 * instantiated
221
	 * @see #getDefaultShell()
222
	 */
223
	public static ILaunchConfigurationWorkingCopy createNewLaunchConfigurationWorkingCopy()
224
	throws CoreException {
225
226
		ILaunchConfigurationWorkingCopy workingCopy;
227
		ILaunchManager manager = LocalTerminalUtilities.LAUNCH_MANAGER;
228
		String userHome = System.getProperty("user.home", "/"); //$NON-NLS-1$//$NON-NLS-2$
229
		String name = manager.generateLaunchConfigurationName("Terminal"); //$NON-NLS-1$
230
		workingCopy = LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE.newInstance(null, name);
231
		workingCopy.setAttribute(ATTR_LOCATION, getDefaultShell().getAbsolutePath());
232
		workingCopy.setAttribute(ATTR_WORKING_DIRECTORY, userHome);
233
		return workingCopy;
234
	}
235
236
	/**
237
	 * Returns the system's default shell. First, this method will read the value of the environment
238
	 * variable {@code SHELL}. If that variable is not set, it will default to {@code cmd.exe} on
239
	 * Windows systems, and to {@code /bin/sh} on all other systems.
240
	 *
241
	 * @return a {@link File} pointing to the default shell (the underlying file is not guaranteed
242
	 * to exist in the file system)
243
	 */
244
	public static File getDefaultShell() {
245
246
		String shell = System.getenv("SHELL"); //$NON-NLS-1$
247
		if (shell == null) {
248
249
			if (Platform.OS_WIN32.equals(Platform.getOS())) {
250
251
				shell = "C:\\Windows\\System32\\cmd.exe"; //$NON-NLS-1$
252
			}
253
			else {
254
255
				shell = "/bin/sh"; //$NON-NLS-1$
256
			}
257
		}
258
		return new File(shell);
259
	}
260
179
	//------------------------------------- PRIVATE SECTION --------------------------------------//
261
	//------------------------------------- PRIVATE SECTION --------------------------------------//
180
262
181
	private static IStringVariableManager getStringVariableManager() {
263
	private static IStringVariableManager getStringVariableManager() {
(-)src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalLaunchTabGroup.java (-4 / +3 lines)
Lines 34-45 Link Here
34
* @author Mirko Raner
34
* @author Mirko Raner
35
* @version $Revision: 1.1 $
35
* @version $Revision: 1.1 $
36
**/
36
**/
37
public class LocalTerminalLaunchTabGroup extends AbstractLaunchConfigurationTabGroup
37
public class LocalTerminalLaunchTabGroup extends AbstractLaunchConfigurationTabGroup {
38
implements IDebugUIConstants {
39
38
40
	private final static String ID = "id"; //$NON-NLS-1$
39
	private final static String ID = "id"; //$NON-NLS-1$
41
	private final static String CLASS = "class"; //$NON-NLS-1$
40
	private final static String CLASS = "class"; //$NON-NLS-1$
42
	private final static String LC_TAB_GROUPS = EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS;
43
	private final static String PROGRAM_TAB_GROUP =
41
	private final static String PROGRAM_TAB_GROUP =
44
		"org.eclipse.ui.externaltools.launchConfigurationTabGroup.program"; //$NON-NLS-1$
42
		"org.eclipse.ui.externaltools.launchConfigurationTabGroup.program"; //$NON-NLS-1$
45
43
Lines 81-87 Link Here
81
		//
79
		//
82
		IConfigurationElement[] element;
80
		IConfigurationElement[] element;
83
		IExtensionRegistry registry = Platform.getExtensionRegistry();
81
		IExtensionRegistry registry = Platform.getExtensionRegistry();
84
		element = registry.getConfigurationElementsFor(IDebugUIConstants.PLUGIN_ID, LC_TAB_GROUPS);
82
		final String TAB_GROUPS = IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS;
83
		element = registry.getConfigurationElementsFor(IDebugUIConstants.PLUGIN_ID, TAB_GROUPS);
85
		int numberOfElements = element.length;
84
		int numberOfElements = element.length;
86
		for (int index = 0; index < numberOfElements; index++) {
85
		for (int index = 0; index < numberOfElements; index++) {
87
86
(-)src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalSettingsTab.java (+17 lines)
Lines 231-236 Link Here
231
	}
231
	}
232
232
233
	/**
233
	/**
234
	 * Prevents Terminal launch configurations from being started directly from the launch
235
	 * configuration dialog. The <b>Run</b> button in the dialog will only be enabled if all tabs
236
	 * consider a launch configuration valid.
237
	 *
238
	 * TODO: previously used launches can still be launched via the launch history
239
	 *       (see {@code ExternalToolMenuDelegate#fillMenu(Menu)})
240
	 *
241
	 * @param configuration the {@link ILaunchConfiguration}
242
	 * @return always {@code false}
243
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(ILaunchConfiguration)
244
	 */
245
	public boolean isValid(ILaunchConfiguration configuration) {
246
247
		return false;
248
	}
249
250
	/**
234
	 * Handles selection of any of the buttons in the tab.
251
	 * Handles selection of any of the buttons in the tab.
235
	 *
252
	 *
236
	 * @param event the {@link SelectionEvent}
253
	 * @param event the {@link SelectionEvent}

Return to bug 309899