--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Wed Jan 13 11:12:24 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Wed Jan 13 11:50:35 2010 -0600
@@ -55,13 +55,13 @@
/**
- * Listener interface for connections which are added, removed and set as default
+ * Listener interface for connections which are added, removed and set as current
* @since 3.0
*/
public interface IConnectionListener {
void connectionAdded(IConnection connection);
void connectionRemoved(IConnection connection);
- void defaultConnectionSet(IConnection connection);
+ void currentConnectionSet(IConnection connection);
}
/**
@@ -155,23 +155,23 @@
void removeConnectionListener(IConnectionListener listener);
/**
- * Sets the default connection.
+ * Sets the current connection.
* @param connection IConnection
* @since 3.0
*/
- void setDefaultConnection(IConnection connection);
+ void setCurrentConnection(IConnection connection);
/**
- * Returns the default connection.
+ * Returns the current connection.
* @return IConnection
* @since 3.0
*/
- IConnection getDefaultConnection();
+ IConnection getCurrentConnection();
/**
* Returns the IClientServiceSiteUI2 for a service. Filters connection types to those that
* are supported by the service. Connection list UI as well as new and edit wizards are filtered.
- * Allows selecting a "default" connection which maps to #getDefaultConnection()
+ * Allows selecting a "current" connection which maps to #getCurrentConnection()
* when you use #ensureConenction().
* @param service IService
* @return IClientServiceSiteUI2
@@ -194,7 +194,7 @@
IConnection ensureConnection(String connectionId, IService service) throws CoreException;
/**
- * Returns a connection from an id (including the default connection id) or null if none found.
+ * Returns a connection from an id (including the current connection id) or null if none found.
* @param connectionId String
* @param service IService
* @return IConnection
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Jan 13 11:12:24 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Jan 13 11:50:35 2010 -0600
@@ -81,7 +81,7 @@
private static final String NAME_FMT = "{0} ({1})"; //$NON-NLS-1$
// this is exposed to other clients inside this plugin but it is not public knowledge
- public static final String DEFAULT_CONNECTION_ID = RemoteConnectionsActivator.PLUGIN_ID + ".defaultConnection"; //$NON-NLS-1$
+ public static final String CURRENT_CONNECTION_ID = RemoteConnectionsActivator.PLUGIN_ID + ".currentConnection"; //$NON-NLS-1$
private static Registry instance = new Registry();
@@ -93,7 +93,7 @@
private ListenerList<IConnectionsManagerListener> listeners;
private List<IConnectedServiceFactory> connectedServiceFactories;
private ListenerList<IConnectionListener> connectionListeners;
- private IConnection defaultConnection;
+ private IConnection currentConnection;
private Map<IConnection, IConnectionStatusChangedListener> connectionListenerMap;
public static Registry instance() {
@@ -338,8 +338,8 @@
}
public IConnection findConnection(String connectionId) {
- if (DEFAULT_CONNECTION_ID.equals(connectionId))
- return getDefaultConnection();
+ if (CURRENT_CONNECTION_ID.equals(connectionId))
+ return getCurrentConnection();
for (IConnection connection : connectionToConnectedServices.keySet()) {
if (connection.getIdentifier().equals(connectionId)) {
@@ -394,29 +394,13 @@
public void removeConnection(IConnection connection) {
disposeConnection(connection);
connectionToConnectedServices.remove(connection);
- if (connection == defaultConnection) {
- defaultConnection = null;
- pickNewDefaultConnection();
+ if (connection == currentConnection) {
+ currentConnection = null;
}
fireConnectionStoreChanged();
fireConnectionRemoved(connection);
}
- private void pickNewDefaultConnection() {
- Set<IConnection> connections = connectionToConnectedServices.keySet();
- // try to get a dynamic connection
- for (IConnection connection : connections) {
- if (connection instanceof IConnection2 &&
- ((IConnection2) connection).isDynamic()) {
- setDefaultConnection(connection);
- break;
- }
- }
- // otherwise, any connection will do
- if (defaultConnection == null && !connections.isEmpty())
- setDefaultConnection(connections.iterator().next());
- }
-
private void disposeConnection(IConnection connection) {
List<IConnectedService> connectedServices = connectionToConnectedServices.get(connection);
if (connectedServices != null) {
@@ -513,11 +497,11 @@
}
}
- private void fireDefaultConnectionSet(IConnection connection) {
+ private void fireCurrentConnectionSet(IConnection connection) {
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.defaultConnectionSet(connection);
+ listener.currentConnectionSet(connection);
}
}
@@ -539,17 +523,15 @@
return getCompatibleServices(connection.getConnectionType()).contains(service);
}
- public void setDefaultConnection(IConnection connection) {
+ public void setCurrentConnection(IConnection connection) {
if (connectionToConnectedServices.keySet().contains(connection)) {
- defaultConnection = connection;
- fireDefaultConnectionSet(connection);
+ currentConnection = connection;
+ fireCurrentConnectionSet(connection);
}
}
- public IConnection getDefaultConnection() {
- if (defaultConnection == null)
- pickNewDefaultConnection();
- return defaultConnection;
+ public IConnection getCurrentConnection() {
+ return currentConnection;
}
public void disconnect(final IConnection2 connection) {
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Wed Jan 13 11:12:24 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Wed Jan 13 11:50:35 2010 -0600
@@ -188,8 +188,8 @@
if (id == null) {
return null;
}
- if (id.equals(Registry.DEFAULT_CONNECTION_ID)) {
- return RemoteConnectionsActivator.getConnectionsManager().getDefaultConnection();
+ if (id.equals(Registry.CURRENT_CONNECTION_ID)) {
+ return RemoteConnectionsActivator.getConnectionsManager().getCurrentConnection();
}
for (IConnection connection : RemoteConnectionsActivator.getConnectionsManager().getConnections()) {
if (connection.getIdentifier().equals(id)) {
@@ -201,16 +201,16 @@
/**
* Set the selected input.
- * @param connection existing connection or <code>null</code> for the default
+ * @param connection existing connection or <code>null</code> for the current
*/
private void setViewerInput(IConnection connection) {
List<IConnection> compatible = getCompatibleConnections();
connectionNames = new LinkedHashMap<String, String>();
- // update the default
- IConnection defaultConnection = RemoteConnectionsActivator.getConnectionsManager().getDefaultConnection();
+ // update the current
+ IConnection currentConnection = RemoteConnectionsActivator.getConnectionsManager().getCurrentConnection();
- connectionNames.put(Registry.DEFAULT_CONNECTION_ID, createDefaultConnectionName(defaultConnection));
+ connectionNames.put(Registry.CURRENT_CONNECTION_ID, createCurrentConnectionName(currentConnection));
for (IConnection conn : compatible) {
connectionNames.put(conn.getIdentifier(), conn.getDisplayName());
@@ -231,7 +231,7 @@
}
editButton.setEnabled(!viewer.getSelection().isEmpty());
- // fire listener in case we selected anew or the default connection changed
+ // fire listener in case we selected anew or the current connection changed
fireConnectionSelected();
}
@@ -241,14 +241,14 @@
if (viewer != null && viewer.getContentProvider() != null) {
// try to preserve the currently selected item, if it's a concrete
- // connection; if it's default, allow for the new default to be chosen.
+ // connection; if it's current, allow for the new current to be chosen.
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
Object value = selection.getFirstElement();
String current = null;
if (value instanceof String) {
current = (String) value;
}
- if (Registry.DEFAULT_CONNECTION_ID.equals(current)) {
+ if (Registry.CURRENT_CONNECTION_ID.equals(current)) {
current = null;
}
setViewerInput(getActualConnection(current));
@@ -258,13 +258,13 @@
}
/**
- * @param defaultConnection
+ * @param currentConnection
* @return
*/
- private String createDefaultConnectionName(IConnection defaultConnection) {
- return MessageFormat.format(Messages.getString("ClientServiceSiteUI2.DefaultConnectionFormat"), //$NON-NLS-1$
- defaultConnection != null ? defaultConnection.getDisplayName() :
- Messages.getString("ClientServiceSiteUI2.DefaultConnection_NoneDetected")); //$NON-NLS-1$
+ private String createCurrentConnectionName(IConnection currentConnection) {
+ return MessageFormat.format(Messages.getString("ClientServiceSiteUI2.CurrentConnectionFormat"), //$NON-NLS-1$
+ currentConnection != null ? currentConnection.getDisplayName() :
+ Messages.getString("ClientServiceSiteUI2.CurrentConnection_NoneDetected")); //$NON-NLS-1$
}
private void initializeDialogUnits(Composite parent) {
@@ -319,13 +319,13 @@
requiredConnectionTypes));
}
- // check whether the default is compatible with the service and connection type
- if (Registry.DEFAULT_CONNECTION_ID.equals(connection)) {
+ // check whether the current is compatible with the service and connection type
+ if (Registry.CURRENT_CONNECTION_ID.equals(connection)) {
IConnection actual = getActualConnection(connection);
if (actual == null) {
return new Status(IStatus.ERROR, RemoteConnectionsActivator.PLUGIN_ID,
MessageFormat.format(
- Messages.getString("ClientServiceSiteUI2.NoDefaultConnection"), //$NON-NLS-1$
+ Messages.getString("ClientServiceSiteUI2.NoCurrentConnection"), //$NON-NLS-1$
service.getDisplayName(),
requiredConnectionTypes));
}
@@ -341,9 +341,9 @@
if (!found) {
return new Status(IStatus.WARNING, RemoteConnectionsActivator.PLUGIN_ID,
MessageFormat.format(
- Messages.getString("ClientServiceSiteUI2.IncompatibleDefaultConnectionService") //$NON-NLS-1$
+ Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionService") //$NON-NLS-1$
+ "\n" //$NON-NLS-1$
- + Messages.getString("ClientServiceSiteUI2.IncompatibleDefaultConnectionFixupAdvice"), //$NON-NLS-1$
+ + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice"), //$NON-NLS-1$
actual.getDisplayName(),
service.getDisplayName()));
}
@@ -352,9 +352,9 @@
if (!isCompatibleConnection(actual)) {
return new Status(IStatus.WARNING, RemoteConnectionsActivator.PLUGIN_ID,
MessageFormat.format(
- Messages.getString("ClientServiceSiteUI2.IncompatibleDefaultConnectionType") //$NON-NLS-1$
+ Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionType") //$NON-NLS-1$
+ "\n" //$NON-NLS-1$
- + Messages.getString("ClientServiceSiteUI2.IncompatibleDefaultConnectionFixupAdvice"), //$NON-NLS-1$
+ + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice"), //$NON-NLS-1$
actual.getDisplayName(),
requiredConnectionTypes));
@@ -424,9 +424,9 @@
}
/* (non-Javadoc)
- * @see com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener#defaultConnectionSet(com.nokia.carbide.remoteconnections.interfaces.IConnection)
+ * @see com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener#currentConnectionSet(com.nokia.carbide.remoteconnections.interfaces.IConnection)
*/
- public void defaultConnectionSet(IConnection connection) {
+ public void currentConnectionSet(IConnection connection) {
refreshUI();
}
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Wed Jan 13 11:12:24 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Wed Jan 13 11:50:35 2010 -0600
@@ -68,7 +68,7 @@
/**
* This widget appears in the Eclipse trim and allows the user to select the
- * "default" device connection and also see its status at a glance.
+ * "current" device connection and also see its status at a glance.
* <p>
* Note: the UI for this control should behave similarly to that of the News Reader
* trim. Due to the way we're modifying the icon and the state dynamically
@@ -86,7 +86,7 @@
private CLabel connectionInfo;
private ToolItem connectionIcon;
private IConnectionsManager manager;
- private IConnection defaultConnection;
+ private IConnection currentConnection;
private ListenerBlock listenerBlock;
private ToolTip tooltip;
private MouseAdapter toolbarListener;
@@ -122,9 +122,9 @@
}
/* (non-Javadoc)
- * @see com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener#defaultConnectionSet(com.nokia.carbide.remoteconnections.interfaces.IConnection)
+ * @see com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener#currentConnectionSet(com.nokia.carbide.remoteconnections.interfaces.IConnection)
*/
- public void defaultConnectionSet(IConnection connection) {
+ public void currentConnectionSet(IConnection connection) {
updateUI();
}
@@ -163,7 +163,7 @@
@Override
protected Control createControl(Composite parent) {
- // This UI is recreated whenever the default connection changes.
+ // This UI is recreated whenever the current connection changes.
// This is gross. The normal parent of this is a toolbar,
// but we cannot add arbitrary stuff to the toolbar besides
@@ -200,16 +200,16 @@
connectionInfo = new CLabel(container, SWT.NONE);
GridDataFactory.fillDefaults().grab(false, true).applyTo(connectionInfo);
- String text = Messages.getString("ConnectionStatusSelectorContribution_NoDefaultConnectionMessage"); //$NON-NLS-1$
- defaultConnection = manager.getDefaultConnection();
- if (defaultConnection != null)
- text = defaultConnection.getDisplayName();
+ String text = Messages.getString("ConnectionStatusSelectorContribution_NoCurrentConnectionMessage"); //$NON-NLS-1$
+ currentConnection = manager.getCurrentConnection();
+ if (currentConnection != null)
+ text = currentConnection.getDisplayName();
connectionInfo.setText(text);
attachListeners();
- updateConnectionStatus(getConnectionStatus(defaultConnection));
+ updateConnectionStatus(getConnectionStatus(currentConnection));
// Yuck, toolbars and items have a wonky UI. We need to do these events on the parent,
@@ -305,17 +305,17 @@
if (dynamicConnections.size() + staticConnections.size() == 0) {
label.setText(Messages.getString("ConnectionStatusSelectorContribution.NoConnectionsDefinedOrDetected")); //$NON-NLS-1$
} else {
- label.setText(Messages.getString("ConnectionStatusSelectorContribution_SelectTheDefaultConnectionMessage")); //$NON-NLS-1$
+ label.setText(Messages.getString("ConnectionStatusSelectorContribution_SelectTheCurrentConnectionMessage")); //$NON-NLS-1$
for (IConnection connection : dynamicConnections) {
- createConnectionMenuItem(menu, connection, defaultConnection, number++);
+ createConnectionMenuItem(menu, connection, currentConnection, number++);
}
if (!staticConnections.isEmpty())
new MenuItem(menu, SWT.SEPARATOR);
for (IConnection connection : staticConnections) {
- createConnectionMenuItem(menu, connection, defaultConnection, number++);
+ createConnectionMenuItem(menu, connection, currentConnection, number++);
}
}
@@ -334,25 +334,25 @@
/**
* @param menu
* @param connection
- * @param defaultConnection
+ * @param currentConnection
*/
private MenuItem createConnectionMenuItem(Menu menu,
final IConnection connection,
- IConnection defaultConnection,
+ IConnection currentConnection,
int number) {
MenuItem item = new MenuItem(menu, SWT.CHECK);
- boolean isDefault = false;
- isDefault = connection.equals(defaultConnection);
+ boolean isCurrent = false;
+ isCurrent = connection.equals(currentConnection);
- item.setSelection(isDefault);
+ item.setSelection(isCurrent);
item.setText(MessageFormat.format("&{0} - {1}", number, connection.getDisplayName())); //$NON-NLS-1$
item.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- manager.setDefaultConnection(connection);
+ manager.setCurrentConnection(connection);
}
});
@@ -363,17 +363,17 @@
manager.addConnectionListener(listenerBlock);
Registry.instance().addConnectionStoreChangedListener(listenerBlock);
- if (defaultConnection != null) {
- if (defaultConnection instanceof IConnection2) {
- ((IConnection2) defaultConnection).addStatusChangedListener(listenerBlock);
+ if (currentConnection != null) {
+ if (currentConnection instanceof IConnection2) {
+ ((IConnection2) currentConnection).addStatusChangedListener(listenerBlock);
}
}
}
private void removeListeners() {
- if (defaultConnection != null) {
- if (defaultConnection instanceof IConnection2) {
- ((IConnection2) defaultConnection).removeStatusChangedListener(listenerBlock);
+ if (currentConnection != null) {
+ if (currentConnection instanceof IConnection2) {
+ ((IConnection2) currentConnection).removeStatusChangedListener(listenerBlock);
}
}
manager.removeConnectionListener(listenerBlock);
@@ -402,8 +402,8 @@
protected void openConnectionsView() {
try {
IViewPart view = WorkbenchUtils.getView(ConnectionsView.VIEW_ID);
- if (defaultConnection != null && view instanceof ConnectionsView) {
- ((ConnectionsView) view).setSelectedConnection(defaultConnection);
+ if (currentConnection != null && view instanceof ConnectionsView) {
+ ((ConnectionsView) view).setSelectedConnection(currentConnection);
}
}
catch (PartInitException e) {
@@ -412,13 +412,13 @@
}
/**
- * @param defaultConnection
+ * @param currentConnection
* @param status
* @return
*/
- private String createConnectionStatusTooltip(IConnection defaultConnection,
+ private String createConnectionStatusTooltip(IConnection currentConnection,
IConnectionStatus status) {
- if (defaultConnection == null) {
+ if (currentConnection == null) {
return Messages.getString("ConnectionStatusSelectorContribution.NoDynamicOrManualConnectionsTooltip"); //$NON-NLS-1$
}
@@ -429,13 +429,13 @@
if (TextUtils.isEmpty(statusString)) {
// fallback string; the status should not be empty
- if (ConnectionUIUtils.isSomeServiceInUse(defaultConnection))
+ if (ConnectionUIUtils.isSomeServiceInUse(currentConnection))
statusString = Messages.getString("ConnectionStatusSelectorContribution.InUse"); //$NON-NLS-1$
else
statusString = Messages.getString("ConnectionStatusSelectorContribution.NotInUse"); //$NON-NLS-1$
}
- return MessageFormat.format(Messages.getString("ConnectionStatusSelectorContribution.ConnectionStatusFormat"), defaultConnection.getDisplayName(), statusString); //$NON-NLS-1$
+ return MessageFormat.format(Messages.getString("ConnectionStatusSelectorContribution.ConnectionStatusFormat"), currentConnection.getDisplayName(), statusString); //$NON-NLS-1$
}
private String createStatusString(IConnectionStatus status) {
@@ -474,10 +474,10 @@
if (status != null)
statusImage = ConnectionUIUtils.getConnectionStatusImage(status);
else
- statusImage = ConnectionUIUtils.getConnectionImage(defaultConnection);
+ statusImage = ConnectionUIUtils.getConnectionImage(currentConnection);
connectionIcon.setImage(statusImage);
- String tip = createConnectionStatusTooltip(defaultConnection, status);
+ String tip = createConnectionStatusTooltip(currentConnection, status);
connectionInfo.setToolTipText(tip);
String preamble = Messages.getString("ConnectionStatusSelectorContribution.IconTooltipPrefixMessage"); //$NON-NLS-1$
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Wed Jan 13 11:12:24 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Wed Jan 13 11:50:35 2010 -0600
@@ -7,17 +7,17 @@
ClientServiceSiteUI.EditButtonLabel=Edit...
ClientServiceSiteUI.NewButtonLabel=New...
ClientServiceSiteUI.UseConnectionGroupLabel=Use connection
-ClientServiceSiteUI2.DefaultConnection_NoneDetected=none detected or defined
-ClientServiceSiteUI2.DefaultConnectionFormat=Current connection ({0})
+ClientServiceSiteUI2.CurrentConnection_NoneDetected=none detected or defined
+ClientServiceSiteUI2.CurrentConnectionFormat=Current connection ({0})
ClientServiceSiteUI2.DeletedConnectionDisplayName=<<nonexistent connection {0}>>
ClientServiceSiteUI2.EditButtonLabel=Edit...
ClientServiceSiteUI2.NewButtonLabel=New...
ClientServiceSiteUI2.UseConnectionGroupLabel=Use connection
ClientServiceSiteUI2.NoConnectionError=A valid remote connection must be selected. If none exist, connect a device or create a connection one supporting {0} via {1}.
-ClientServiceSiteUI2.NoDefaultConnection=No current connection is available. Connect a device or create a connection supporting {0} via {1}.
-ClientServiceSiteUI2.IncompatibleDefaultConnectionType=The current connection ''{0}'' does not support connection type: ''{1}''.
-ClientServiceSiteUI2.IncompatibleDefaultConnectionService=The current connection ''{0}'' does not support the service: ''{1}''.
-ClientServiceSiteUI2.IncompatibleDefaultConnectionFixupAdvice=Either connect an appropriate device or select a compatible connection.
+ClientServiceSiteUI2.NoCurrentConnection=No current connection is available. Connect a device or create a connection supporting {0} via {1}.
+ClientServiceSiteUI2.IncompatibleCurrentConnectionType=The current connection ''{0}'' does not support connection type: ''{1}''.
+ClientServiceSiteUI2.IncompatibleCurrentConnectionService=The current connection ''{0}'' does not support the service: ''{1}''.
+ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice=Either connect an appropriate device or select a compatible connection.
ClientServiceSiteUI2.Or=or
ConnectionSettingsPage.AgentTestTabLabel=Set Connection Settings
ConnectionSettingsPage.ConnectionSettingsGroupLabel=Connection Settings
@@ -52,7 +52,7 @@
ConnectionsView.EditActionLabel=Edit Settings...
ConnectionsView.NoHelpActionLabel=Help Unavailable...
ConnectionsView.HelpActionLabel=Help for {0} Connection...
-ConnectionsView.SetDefaultActionLabel=Make Current
+ConnectionsView.SetCurrentActionLabel=Make Current
ConnectionsView.NameColumnHeader=Connection/Services
ConnectionsView.NewActionLabel=New Connection...
ConnectionsView.RefreshActionLabel=Refresh Status
@@ -72,8 +72,8 @@
ConnectionTypePage.SupportedServicesLabel=Supported Services: {0}
ConnectionTypePage.Title=Edit connection name and type
ConnectionTypePage.ViewerLabel=Connection Type:
-ConnectionStatusSelectorContribution_NoDefaultConnectionMessage=No current connection
-ConnectionStatusSelectorContribution_SelectTheDefaultConnectionMessage=Switvh the current connection:
+ConnectionStatusSelectorContribution_NoCurrentConnectionMessage=No current connection
+ConnectionStatusSelectorContribution_SelectTheCurrentConnectionMessage=Switch the current connection:
ConnectionStatusSelectorContribution.ConnectionStatusFormat={0}: {1}
ConnectionStatusSelectorContribution.IconTooltipPrefixMessage=Click to open the Remote Connections View.\n\n
ConnectionStatusSelectorContribution.InUse=In use
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Wed Jan 13 11:12:24 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Wed Jan 13 11:50:35 2010 -0600
@@ -122,7 +122,7 @@
private static final String REFRESH_ACTION = "ConnectionsView.refresh"; //$NON-NLS-1$
private static final String DELETE_ACTION = "ConnectionsView.delete"; //$NON-NLS-1$
private static final String HELP_ACTION = "ConnectionsView.help"; //$NON-NLS-1$
- private static final String SET_DEFAULT_ACTION = "ConnectionsView.makeDefault"; //$NON-NLS-1$
+ private static final String SET_CURRENT_ACTION = "ConnectionsView.makeCurrent"; //$NON-NLS-1$
private KeyAdapter keyListener;
private boolean isDisposed;
@@ -222,7 +222,7 @@
@Override
public Font getFont(Object element) {
if (element instanceof TreeNode) {
- if (((TreeNode)element).getValue().equals(Registry.instance().getDefaultConnection())) {
+ if (((TreeNode)element).getValue().equals(Registry.instance().getCurrentConnection())) {
return boldViewerFont;
}
}
@@ -538,7 +538,7 @@
connectionListener = new IConnectionListener() {
- public void defaultConnectionSet(IConnection connection) {
+ public void currentConnectionSet(IConnection connection) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
viewer.refresh(true);
@@ -621,7 +621,7 @@
helpAction.setText(helpAction.getText());
manager.add(helpAction);
}
- manager.add(getAction(SET_DEFAULT_ACTION));
+ manager.add(getAction(SET_CURRENT_ACTION));
}
}
@@ -780,20 +780,20 @@
connectionSelectedActions.add(action);
desc = ConnectionUIUtils.CONNECTION_IMGDESC;
- action = new Action(Messages.getString("ConnectionsView.SetDefaultActionLabel"), desc) { //$NON-NLS-1$
+ action = new Action(Messages.getString("ConnectionsView.SetCurrentActionLabel"), desc) { //$NON-NLS-1$
@Override
public boolean isEnabled() {
- return !ObjectUtils.equals(Registry.instance().getDefaultConnection(), getSelectedConnection());
+ return !ObjectUtils.equals(Registry.instance().getCurrentConnection(), getSelectedConnection());
}
@Override
public void run() {
- Registry.instance().setDefaultConnection(getSelectedConnection());
+ Registry.instance().setCurrentConnection(getSelectedConnection());
setEnabled(false);
}
};
- action.setId(SET_DEFAULT_ACTION);
+ action.setId(SET_CURRENT_ACTION);
actions.add(action);
connectionSelectedActions.add(action);