# HG changeset patch # User dadubrow # Date 1242765665 18000 # Node ID cffbaf03383764168294c982abf6d18900020824 # Parent 88b7eb94b003e6ff4d9c5d4a593f71b1028e60d9 [Bug 9085] Add new TCP/IP connection type with port mappings and new service interface to optionally provide defaults. diff -r 88b7eb94b003 -r cffbaf033837 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Tue May 19 15:33:01 2009 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Tue May 19 15:41:05 2009 -0500 @@ -31,6 +31,7 @@ ConnectionSettingsPage.StatusLabel=Status ConnectionSettingsPage.UnlabeledPackageLabel=Unlabeled package ConnectionsView.DeleteActionLabel=Delete Connection +ConnectionsView.DescriptionColumnHeader=Description ConnectionsView.EditActionLabel=Edit Connection Settings ConnectionsView.HelpActionLabel=Connection Documentation ConnectionsView.NameColumnHeader=Connection/Services diff -r 88b7eb94b003 -r cffbaf033837 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Tue May 19 15:33:01 2009 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Tue May 19 15:41:05 2009 -0500 @@ -283,7 +283,7 @@ if (!status.getEStatus().equals(EStatus.IN_USE)) { // if in-use, we show it in the connection row String longDescription = status.getLongDescription(); if (longDescription != null) - longDescription = TextUtils.canonicalizeNewlines(longDescription, " "); + longDescription = TextUtils.canonicalizeNewlines(longDescription, " "); //$NON-NLS-1$ return longDescription; } } @@ -381,7 +381,7 @@ TreeViewerColumn descriptionColumn = new TreeViewerColumn(viewer, SWT.LEFT); descriptionColumn.setLabelProvider(new DescriptionLabelProvider()); - descriptionColumn.getColumn().setText("Description"); + descriptionColumn.getColumn().setText(Messages.getString("ConnectionsView.DescriptionColumnHeader")); //$NON-NLS-1$ viewer.setContentProvider(new TreeNodeContentProvider()); viewer.setInput(loadConnections()); diff -r 88b7eb94b003 -r cffbaf033837 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCPIPPortMappingConnectionFactory.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCPIPPortMappingConnectionFactory.java Tue May 19 15:33:01 2009 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/connection/TCPIPPortMappingConnectionFactory.java Tue May 19 15:41:05 2009 -0500 @@ -19,6 +19,7 @@ import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; import com.nokia.carbide.remoteconnections.interfaces.*; +import com.nokia.carbide.trk.support.Messages; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.viewers.*; @@ -156,16 +157,16 @@ updatePortMappings(initialSettings); Label label = new Label(composite, SWT.NONE); GridDataFactory.defaultsFor(label).span(2, 1).applyTo(label); - label.setText("Service to port mappings"); + label.setText(Messages.getString("TCPIPPortMappingConnectionFactory.ViewerLabel")); //$NON-NLS-1$ viewer = new TableViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION); viewer.setContentProvider(new ArrayContentProvider()); TableViewerColumn serviceColumn = new TableViewerColumn(viewer, SWT.LEFT); - serviceColumn.getColumn().setText("Service"); + serviceColumn.getColumn().setText(Messages.getString("TCPIPPortMappingConnectionFactory.ServiceHeader")); //$NON-NLS-1$ TableViewerColumn portColumn = new TableViewerColumn(viewer, SWT.RIGHT); - portColumn.getColumn().setText("Port"); + portColumn.getColumn().setText(Messages.getString("TCPIPPortMappingConnectionFactory.PortHeader")); //$NON-NLS-1$ portColumn.setEditingSupport(new PortColumnEditingSupport(viewer)); viewer.setLabelProvider(new TableLabelProvider()); @@ -174,9 +175,9 @@ Table table = viewer.getTable(); table.setHeaderVisible(true); GridDataFactory.defaultsFor(table).span(2, 1).hint(SWT.DEFAULT, 60).grab(true, false).applyTo(table); - table.setToolTipText("Service to port mappings for this connection. Port settings are user editable"); + table.setToolTipText(Messages.getString("TCPIPPortMappingConnectionFactory.ViewerTooltip")); //$NON-NLS-1$ table.setData(UID, "TCPIPPortMappingConnectionFactory.table"); //$NON-NLS-1$ - table.setData("viewer", viewer); + table.setData("viewer", viewer); //$NON-NLS-1$ packColumns(); } diff -r 88b7eb94b003 -r cffbaf033837 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties Tue May 19 15:33:01 2009 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties Tue May 19 15:41:05 2009 -0500 @@ -29,6 +29,10 @@ TCPIPConnectionFactory.NoAddressError=Please provide a valid IP address TCPIPConnectionType.Desc=TCP/IP settings TCPIPConnectionType.Label=TCP/IP +TCPIPPortMappingConnectionFactory.PortHeader=Port +TCPIPPortMappingConnectionFactory.ServiceHeader=Service +TCPIPPortMappingConnectionFactory.ViewerLabel=Service to port mappings +TCPIPPortMappingConnectionFactory.ViewerTooltip=Service to port mappings for this connection. Port settings are user editable TracingConnectedService.BadVersionResponseError=Response from TraceCore was corrupted TracingConnectedService.DownLabel=Not accessible TracingConnectedService.ErrorStatus=Error: diff -r 88b7eb94b003 -r cffbaf033837 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Tue May 19 15:33:01 2009 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TRKConnectedService.java Tue May 19 15:41:05 2009 -0500 @@ -116,7 +116,7 @@ private Version getTRKVersionFromOSTUSB(String port) throws ConnectionFailException { ITCConnection conn = TCFClassFactory.createITCVirtualSerialConnection(port); - conn.setDecodeFormat("ost"); + conn.setDecodeFormat("ost"); //$NON-NLS-1$ return getTRKVersionUsingTCF(conn, (byte)0x90, (byte)0x90); } diff -r 88b7eb94b003 -r cffbaf033837 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java Tue May 19 15:33:01 2009 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/service/TracingConnectedService.java Tue May 19 15:41:05 2009 -0500 @@ -76,7 +76,7 @@ private boolean getTraceCoreResponseFromOSTUSB(String port) throws ConnectionFailException { ITCConnection conn = TCFClassFactory.createITCVirtualSerialConnection(port); - conn.setDecodeFormat("ost"); + conn.setDecodeFormat("ost"); //$NON-NLS-1$ return getTraceCoreResponseUsingTCF(conn, true, (byte)0x0, (byte)0x0, TC_REQ_OST, new IMessageValidator() { public boolean isValidMessage(byte[] message) {