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 186713
Collapse All | Expand All

(-)src/org/eclipse/hyades/trace/ui/internal/launcher/ProfileExternalJavaApplicationTabGroup.java (-1 / +1 lines)
Lines 29-35 Link Here
29
		ProfileHostTab _hostTab = new ProfileHostTab();
29
		ProfileHostTab _hostTab = new ProfileHostTab();
30
		tabs.add(_hostTab);
30
		tabs.add(_hostTab);
31
		tabs.add(new ProfileMainTab(_hostTab));
31
		tabs.add(new ProfileMainTab(_hostTab));
32
		tabs.add(new JavaArgumentsTab());		
32
		tabs.add(new ExternalJavaArgumentsTab());		
33
		tabs.add(new ProfileTab(false));
33
		tabs.add(new ProfileTab(false));
34
		tabs.add(new DestinationTab());
34
		tabs.add(new DestinationTab());
35
		tabs.add(new ProfileEnvironmentTab());
35
		tabs.add(new ProfileEnvironmentTab());
(-)src/org/eclipse/hyades/trace/ui/internal/launcher/ExternalJavaArgumentsTab.java (+45 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2008 Intel Corporation.
3
 * All rights reserved. This content is made available under
4
 * the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html       
7
 * $Id$
8
 *
9
 * Contributors:
10
 * Intel - Initial contribution
11
 **********************************************************************/ 
12
13
package org.eclipse.hyades.trace.ui.internal.launcher;
14
15
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.debug.core.ILaunchConfiguration;
17
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
18
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants;
19
20
public class ExternalJavaArgumentsTab extends JavaArgumentsTab {
21
22
	private boolean isValidated = true;
23
	
24
	public boolean isValid(ILaunchConfiguration config) {
25
		try {
26
			// directory shouldn't be validated if target host isn't localhost 
27
			if (config.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME,
28
					CommonUITraceConstants.LOCAL_HOST).equals(CommonUITraceConstants.LOCAL_HOST)) {
29
				isValidated = true;
30
				return super.isValid(config);
31
			}
32
		} catch (CoreException e) {
33
			e.printStackTrace();
34
		}
35
		isValidated = false;
36
		return true;
37
	}
38
	
39
	public String getErrorMessage() {
40
		if (isValidated) {
41
			return super.getErrorMessage();
42
		} 
43
		return null;
44
	}
45
}

Return to bug 186713