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

(-)src/org/eclipse/hyades/trace/ui/internal/core/TraceProfileUI.java (+22 lines)
Lines 21-26 Link Here
21
import org.eclipse.core.runtime.IStatus;
21
import org.eclipse.core.runtime.IStatus;
22
import org.eclipse.debug.core.ILaunchConfiguration;
22
import org.eclipse.debug.core.ILaunchConfiguration;
23
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
23
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
24
import org.eclipse.hyades.security.internal.util.ConnectUtil;
24
import org.eclipse.hyades.trace.internal.ui.PDPluginImages;
25
import org.eclipse.hyades.trace.internal.ui.PDPluginImages;
25
import org.eclipse.hyades.trace.ui.UIPlugin;
26
import org.eclipse.hyades.trace.ui.UIPlugin;
26
import org.eclipse.hyades.trace.ui.internal.launcher.ILaunchConfigurationTabUpdater;
27
import org.eclipse.hyades.trace.ui.internal.launcher.ILaunchConfigurationTabUpdater;
Lines 52-57 Link Here
52
import org.eclipse.swt.layout.GridLayout;
53
import org.eclipse.swt.layout.GridLayout;
53
import org.eclipse.swt.widgets.Button;
54
import org.eclipse.swt.widgets.Button;
54
import org.eclipse.swt.widgets.Composite;
55
import org.eclipse.swt.widgets.Composite;
56
import org.eclipse.swt.widgets.Control;
55
import org.eclipse.swt.widgets.Display;
57
import org.eclipse.swt.widgets.Display;
56
import org.eclipse.swt.widgets.Label;
58
import org.eclipse.swt.widgets.Label;
57
import org.eclipse.swt.widgets.Shell;
59
import org.eclipse.swt.widgets.Shell;
Lines 546-551 Link Here
546
		this.launchConfiguration = conf;
548
		this.launchConfiguration = conf;
547
				
549
				
548
		if (!(checkBoxTreeViewer.getInput() instanceof DataCollectorTreeInput) || 
550
		if (!(checkBoxTreeViewer.getInput() instanceof DataCollectorTreeInput) || 
551
			((DataCollectorTreeInput)checkBoxTreeViewer.getInput()).getConfiguration() == null ||
549
			!((DataCollectorTreeInput)checkBoxTreeViewer.getInput()).getConfiguration().equals(conf))
552
			!((DataCollectorTreeInput)checkBoxTreeViewer.getInput()).getConfiguration().equals(conf))
550
		{
553
		{
551
			
554
			
Lines 566-571 Link Here
566
		{
569
		{
567
			String currentHost = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
570
			String currentHost = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_HOSTNAME, CommonUITraceConstants.LOCAL_HOST);
568
			int currentPort = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
571
			int currentPort = conf.getAttribute(IProfileLaunchConfigurationConstants.ATTR_PORT, UIPlugin.getDefault().getPreferenceStore().getDefaultInt(CommonUIConstants.LOCALHOST_PORT));
572
			
573
			
574
			ConnectUtil connect = new ConnectUtil( currentHost, ""+currentPort,null);
575
			Control[] controls= checkBoxTreeViewer.getTree().getParent().getParent().getChildren();
576
			Label label = (Label) controls[0];
577
			if(connect.connect(false) != ConnectUtil.CONNECTION_SUCCESS){
578
				label.setForeground(new Color(null,255, 0, 0));
579
				label.setText(TraceMessages.CONH_ERROR_);
580
				
581
				checkBoxTreeViewer.setInput(null);
582
				errorMessage =  TraceMessages.CONH_ERROR_;
583
				
584
				return;
585
			}else{
586
				label.setForeground(new Color(null,0, 0, 0));
587
				label.setText(TraceMessages.LAUNCH_INSTRUCTION);			
588
			}
589
			
590
			
569
			if (lastHost != null && (!lastHost.equals(currentHost) || lastPort != currentPort))
591
			if (lastHost != null && (!lastHost.equals(currentHost) || lastPort != currentPort))
570
			{
592
			{
571
				checkBoxTreeViewer.setInput(new DataCollectorTreeInput(conf));
593
				checkBoxTreeViewer.setInput(new DataCollectorTreeInput(conf));

Return to bug 194619