Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Roldan Betancort2009-05-20 19:40:21 +0000
committerVictor Roldan Betancort2009-05-20 19:40:21 +0000
commit4f642ff0e03e43277eecd13ad23b547aadd1f102 (patch)
tree209fb85ac2e107654eac8830ae112d11c1ffb9f5 /plugins/org.eclipse.net4j.examples
parent8fa5aebdac03f0ecf8b959397ca291a603dbd9a2 (diff)
downloadcdo-4f642ff0e03e43277eecd13ad23b547aadd1f102.tar.gz
cdo-4f642ff0e03e43277eecd13ad23b547aadd1f102.tar.xz
cdo-4f642ff0e03e43277eecd13ad23b547aadd1f102.zip
[272193] [UI] Externalize Strings (Net4j)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272193
Diffstat (limited to 'plugins/org.eclipse.net4j.examples')
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/EchoProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClient.java6
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServer.java6
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadClientAction.java10
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadServer.java12
6 files changed, 19 insertions, 19 deletions
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/EchoProtocol.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/EchoProtocol.java
index 809f920490..e95d14dcae 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/EchoProtocol.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/EchoProtocol.java
@@ -16,7 +16,7 @@ package org.eclipse.net4j.examples.echo;
*/
public interface EchoProtocol
{
- public static final String PROTOCOL_NAME = "echo";
+ public static final String PROTOCOL_NAME = "echo"; //$NON-NLS-1$
public static final short ECHO_SIGNAL = 1;
}
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClient.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClient.java
index 0b548e5120..6ef78c100e 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClient.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClient.java
@@ -42,16 +42,16 @@ public class EchoClient
try
{
// Start a connector that represents the client side of a physical connection
- IConnector connector = (IConnector)container.getElement("org.eclipse.net4j.connectors", "tcp", "localhost:2036");
+ IConnector connector = (IConnector)container.getElement("org.eclipse.net4j.connectors", "tcp", "localhost:2036"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// Open a virtual channel with the ECHO protocol, send an ECHO request and close the channel
EchoClientProtocol protocol = new EchoClientProtocol(connector);
- EchoRequest request = new EchoRequest(protocol, "My cool message");
+ EchoRequest request = new EchoRequest(protocol, "My cool message"); //$NON-NLS-1$
String echo = request.send();
protocol.close();
System.out.println();
- System.out.println("ECHO: " + echo);
+ System.out.println("ECHO: " + echo); //$NON-NLS-1$
System.out.println();
}
finally
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServer.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServer.java
index e857e08506..92c7222d97 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServer.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/server/EchoServer.java
@@ -45,10 +45,10 @@ public class EchoServer
try
{
// Start an acceptor
- IAcceptor acceptor = (IAcceptor)container.getElement("org.eclipse.net4j.acceptors", "tcp", "0.0.0.0:2036");
- OM.LOG.info("Accepting connections: " + acceptor);
+ IAcceptor acceptor = (IAcceptor)container.getElement("org.eclipse.net4j.acceptors", "tcp", "0.0.0.0:2036"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ OM.LOG.info("Accepting connections: " + acceptor); //$NON-NLS-1$
- System.out.println("Press any key to shutdown");
+ System.out.println("Press any key to shutdown"); //$NON-NLS-1$
while (IOUtil.IN().read() == -1)
{
Thread.sleep(200);
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadClientAction.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadClientAction.java
index 7b66892b74..f9450c70f9 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadClientAction.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadClientAction.java
@@ -59,7 +59,7 @@ public class UploadClientAction implements IWorkbenchWindowActionDelegate, Uploa
if (path != null)
{
final File file = new File(path);
- new Job("Uploading file")
+ new Job("Uploading file") //$NON-NLS-1$
{
@Override
protected IStatus run(IProgressMonitor monitor)
@@ -67,7 +67,7 @@ public class UploadClientAction implements IWorkbenchWindowActionDelegate, Uploa
try
{
boolean replaced = transferFile(file, monitor);
- OM.LOG.info("File " + path + (replaced ? " replaced" : " stored") + " on the Net4j server.");
+ OM.LOG.info("File " + path + (replaced ? " replaced" : " stored") + " on the Net4j server."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
return Status.OK_STATUS;
}
catch (MonitorCanceledException ex)
@@ -76,7 +76,7 @@ public class UploadClientAction implements IWorkbenchWindowActionDelegate, Uploa
}
catch (Exception ex)
{
- return new Status(IStatus.ERROR, OM.BUNDLE_ID, "Problem with upload of " + path, ex);
+ return new Status(IStatus.ERROR, OM.BUNDLE_ID, "Problem with upload of " + path, ex); //$NON-NLS-1$
}
finally
{
@@ -102,8 +102,8 @@ public class UploadClientAction implements IWorkbenchWindowActionDelegate, Uploa
try
{
// Start a connector that represents the client side of a physical connection
- IConnector connector = (IConnector)IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.connectors", "tcp",
- "localhost:2036");
+ IConnector connector = (IConnector)IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.connectors", "tcp", //$NON-NLS-1$ //$NON-NLS-2$
+ "localhost:2036"); //$NON-NLS-1$
// Open a virtual channel with the ECHO protocol, send an ECHO request and close the channel
protocol = new SignalProtocol<Object>(PROTOCOL_NAME);
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadProtocol.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadProtocol.java
index da243ca831..e45ce68eb8 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadProtocol.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadProtocol.java
@@ -16,7 +16,7 @@ package org.eclipse.net4j.examples.transfer;
*/
public interface UploadProtocol
{
- public static final String PROTOCOL_NAME = "upload";
+ public static final String PROTOCOL_NAME = "upload"; //$NON-NLS-1$
public static final short UPLOAD_SIGNAL_ID = 1;
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadServer.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadServer.java
index 611f5bea63..94a4fbb6a9 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadServer.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/transfer/UploadServer.java
@@ -40,7 +40,7 @@ import java.io.FileOutputStream;
*/
public class UploadServer implements UploadProtocol
{
- public static final String FOLDER_NAME = "/temp";
+ public static final String FOLDER_NAME = "/temp"; //$NON-NLS-1$
public static void main(String[] args) throws Exception
{
@@ -59,13 +59,13 @@ public class UploadServer implements UploadProtocol
try
{
// Start an acceptor
- IAcceptor acceptor = (IAcceptor)container.getElement("org.eclipse.net4j.acceptors", "tcp", "0.0.0.0:2036");
- OM.LOG.info("Accepting connections: " + acceptor);
+ IAcceptor acceptor = (IAcceptor)container.getElement("org.eclipse.net4j.acceptors", "tcp", "0.0.0.0:2036"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ OM.LOG.info("Accepting connections: " + acceptor); //$NON-NLS-1$
new File(FOLDER_NAME).mkdirs();
- OM.LOG.info("Upload folder: " + FOLDER_NAME);
+ OM.LOG.info("Upload folder: " + FOLDER_NAME); //$NON-NLS-1$
- System.out.println("Press any key to shutdown");
+ System.out.println("Press any key to shutdown"); //$NON-NLS-1$
while (System.in.read() == -1)
{
Thread.sleep(200);
@@ -126,7 +126,7 @@ public class UploadServer implements UploadProtocol
String fileName = in.readString();
File file = new File(FOLDER_NAME, fileName);
replaced = file.exists();
- System.out.println((replaced ? "Replacing " : "Storing ") + file.getAbsolutePath());
+ System.out.println((replaced ? "Replacing " : "Storing ") + file.getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
monitor.begin((int)size);
BufferedOutputStream out = null;

Back to the top