debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceSection.java
equal
deleted
inserted
replaced
33 /** |
33 /** |
34 * Present the "Connect to device" section with a short description. |
34 * Present the "Connect to device" section with a short description. |
35 */ |
35 */ |
36 public class ConnectToDeviceSection extends AbstractLaunchWizardSection implements IConnectionListener { |
36 public class ConnectToDeviceSection extends AbstractLaunchWizardSection implements IConnectionListener { |
37 |
37 |
38 private static final String NO_CURRENT_CONNECTION_MSG = "No current connection is defined or detected."; |
38 private static final String NO_CURRENT_CONNECTION_MSG = Messages.getString("ConnectToDeviceSection.NoConnectionMsg"); //$NON-NLS-1$ |
39 private final IConnectionsManager manager; |
39 private final IConnectionsManager manager; |
40 |
40 |
41 /** |
41 /** |
42 * @param unifiedLaunchOptionsPage |
42 * @param unifiedLaunchOptionsPage |
43 * |
43 * |
44 */ |
44 */ |
45 public ConnectToDeviceSection(LaunchWizardData data, UnifiedLaunchOptionsPage launchOptionsPage) { |
45 public ConnectToDeviceSection(LaunchWizardData data, UnifiedLaunchOptionsPage launchOptionsPage) { |
46 super(data, "Connect to device", launchOptionsPage); |
46 super(data, Messages.getString("ConnectToDeviceSection.Title"), launchOptionsPage); //$NON-NLS-1$ |
47 manager = RemoteConnectionsActivator.getConnectionsManager(); |
47 manager = RemoteConnectionsActivator.getConnectionsManager(); |
48 } |
48 } |
49 |
49 |
50 public void createControl(Composite parent) { |
50 public void createControl(Composite parent) { |
51 createSection(parent, 0); |
51 createSection(parent, 0); |
76 |
76 |
77 return status; |
77 return status; |
78 } |
78 } |
79 |
79 |
80 static String getStandardPNPMessage() { |
80 static String getStandardPNPMessage() { |
81 return "You may plug in a device over USB or activate it over WLAN, or create a new connection now for your device."; |
81 return Messages.getString("ConnectToDeviceSection.StdPNPMsg"); //$NON-NLS-1$ |
82 } |
82 } |
83 |
83 |
84 @Override |
84 @Override |
85 protected void updateUI() { |
85 protected void updateUI() { |
86 if (control == null || control.isDisposed()) |
86 if (control == null || control.isDisposed()) |
87 return; |
87 return; |
88 |
88 |
89 String msg; |
89 String msg; |
90 if (data.getConnection() != null) |
90 if (data.getConnection() != null) |
91 msg = MessageFormat.format("The current connection is now ''{0}''.", data.getConnectionName()); |
91 msg = MessageFormat.format(Messages.getString("ConnectToDeviceSection.CurrentConnectionLabel"), data.getConnectionName()); //$NON-NLS-1$ |
92 else |
92 else |
93 msg = MessageFormat.format("{0} {1}", NO_CURRENT_CONNECTION_MSG, getStandardPNPMessage()); |
93 msg = MessageFormat.format("{0} {1}", NO_CURRENT_CONNECTION_MSG, getStandardPNPMessage()); //$NON-NLS-1$ |
94 |
94 |
95 descriptionLabel.setText(msg); |
95 descriptionLabel.setText(msg); |
96 launchOptionsPage.changed(); |
96 launchOptionsPage.changed(); |
97 } |
97 } |
98 |
98 |