debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/AttachMainTab.java
equal
deleted
inserted
replaced
16 */ |
16 */ |
17 package com.nokia.cdt.internal.debug.launch.ui; |
17 package com.nokia.cdt.internal.debug.launch.ui; |
18 |
18 |
19 import com.freescale.cdt.debug.cw.core.RemoteConnectionsTRKHelper; |
19 import com.freescale.cdt.debug.cw.core.RemoteConnectionsTRKHelper; |
20 import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; |
20 import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; |
21 import com.nokia.carbide.remoteconnections.interfaces.IClientServiceSiteUI; |
21 import com.nokia.carbide.remoteconnections.interfaces.IClientServiceSiteUI2; |
22 import com.nokia.carbide.remoteconnections.interfaces.IConnection; |
22 import com.nokia.carbide.remoteconnections.interfaces.IClientServiceSiteUI2.IListener; |
23 import com.nokia.carbide.remoteconnections.interfaces.IClientServiceSiteUI.IListener; |
|
24 import com.nokia.cdt.internal.debug.launch.LaunchPlugin; |
23 import com.nokia.cdt.internal.debug.launch.LaunchPlugin; |
25 |
24 |
26 import org.eclipse.core.runtime.CoreException; |
25 import org.eclipse.core.runtime.CoreException; |
27 import org.eclipse.debug.core.ILaunchConfiguration; |
26 import org.eclipse.debug.core.ILaunchConfiguration; |
28 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; |
27 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; |
34 |
33 |
35 protected Label remoteLabel; |
34 protected Label remoteLabel; |
36 protected Text remoteText; |
35 protected Text remoteText; |
37 protected Label argsLabel; |
36 protected Label argsLabel; |
38 protected Text argsText; |
37 protected Text argsText; |
39 protected IConnection connection; |
38 protected String connection; |
40 protected IClientServiceSiteUI clientSiteUI; |
39 protected IClientServiceSiteUI2 clientSiteUI; |
41 |
40 |
42 public AttachMainTab() { |
41 public AttachMainTab() { |
43 super(DONT_CHECK_PROGRAM); |
42 super(DONT_CHECK_PROGRAM); |
44 } |
43 } |
45 |
44 |
57 |
56 |
58 fProjLabel.setToolTipText(Messages.getString("RunModeMainTab.8")); //$NON-NLS-1$ |
57 fProjLabel.setToolTipText(Messages.getString("RunModeMainTab.8")); //$NON-NLS-1$ |
59 fProjText.setToolTipText(Messages.getString("RunModeMainTab.8")); //$NON-NLS-1$ |
58 fProjText.setToolTipText(Messages.getString("RunModeMainTab.8")); //$NON-NLS-1$ |
60 |
59 |
61 createVerticalSpacer(comp, 1); |
60 createVerticalSpacer(comp, 1); |
62 clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI(LaunchPlugin.getTRKService()); |
61 clientSiteUI = RemoteConnectionsActivator.getConnectionsManager().getClientSiteUI2(LaunchPlugin.getTRKService()); |
63 clientSiteUI.createComposite(comp); |
62 clientSiteUI.createComposite(comp); |
64 clientSiteUI.addListener(new IListener() { |
63 clientSiteUI.addListener(new IListener() { |
65 public void connectionSelected() { |
64 public void connectionSelected() { |
66 connection = clientSiteUI.getSelectedConnection(); |
65 connection = clientSiteUI.getSelectedConnection(); |
67 updateLaunchConfigurationDialog(); |
66 updateLaunchConfigurationDialog(); |
83 super.initializeFrom(config); |
82 super.initializeFrom(config); |
84 try { |
83 try { |
85 if (!RemoteConnectionsTRKHelper.configUsesConnectionAttribute(config)) { |
84 if (!RemoteConnectionsTRKHelper.configUsesConnectionAttribute(config)) { |
86 config = RemoteConnectionsTRKHelper.attemptUpdateLaunchConfiguration(config.getWorkingCopy()); |
85 config = RemoteConnectionsTRKHelper.attemptUpdateLaunchConfiguration(config.getWorkingCopy()); |
87 } |
86 } |
88 connection = RemoteConnectionsTRKHelper.getConnectionFromConfig(config); |
87 connection = RemoteConnectionsTRKHelper.getConnectionIdFromConfig(config); |
89 } catch (CoreException e) { |
88 } catch (CoreException e) { |
90 } |
89 } |
91 if (connection != null) |
90 if (connection != null) |
92 clientSiteUI.selectConnection(connection); |
91 clientSiteUI.selectConnection(connection); |
93 else { |
92 else { |
96 } |
95 } |
97 |
96 |
98 public void performApply(ILaunchConfigurationWorkingCopy config) { |
97 public void performApply(ILaunchConfigurationWorkingCopy config) { |
99 super.performApply(config); |
98 super.performApply(config); |
100 if (connection != null) { |
99 if (connection != null) { |
101 config.setAttribute(RemoteConnectionsTRKHelper.CONNECTION_ATTRIBUTE, connection.getIdentifier()); |
100 config.setAttribute(RemoteConnectionsTRKHelper.CONNECTION_ATTRIBUTE, connection); |
102 } |
101 } |
103 } |
102 } |
104 |
103 |
105 /* |
104 /* |
106 * (non-Javadoc) |
105 * (non-Javadoc) |