Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-03 22:32:16 +0000
committerslewis2008-03-03 22:32:16 +0000
commit3bc09f96fa1197be2ac6f87052be6ddb64418515 (patch)
treebf9fbd93b81890c8ad43409614e598b0782aae51 /examples
parent7e2b316893955de3fe714ffe1b0eb3507dbca6a4 (diff)
downloadorg.eclipse.ecf-3bc09f96fa1197be2ac6f87052be6ddb64418515.tar.gz
org.eclipse.ecf-3bc09f96fa1197be2ac6f87052be6ddb64418515.tar.xz
org.eclipse.ecf-3bc09f96fa1197be2ac6f87052be6ddb64418515.zip
Externalized strings
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java1
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java3
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java6
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileData.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java33
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferSharedObject.java106
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/SharedObjectInputStream.java3
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ShowURLSharedObject.java9
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/StartProgramSharedObject.java32
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java52
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/CollabClient.java10
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Messages.java68
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ServerStartup.java6
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Trace.java32
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/JoinGroupWizardAction.java5
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/OpenSharedEditorAction.java29
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/SetSharedEditorSelectionAction.java5
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/URIClientConnectAction.java24
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties68
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AccountStart.java17
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AutoLoginPreferencePage.java5
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/CollabStart.java5
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/ConnectionDetails.java18
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/Discovery.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/URLListFieldEditor.java6
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java205
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatWindow.java34
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ClientPreferencePage.java17
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java77
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/EditorHelper.java53
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizard.java44
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizardPage.java41
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LabelFieldEditor.java2
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java35
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatView.java5
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties44
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SharedObjectContainerUI.java107
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SpacerFieldEditor.java2
40 files changed, 636 insertions, 581 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
index 8ff199667..d321c494e 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
@@ -79,7 +79,6 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
private static final String HANDLE_STARTED_TYPING_MSG = "handleStartedTyping"; //$NON-NLS-1$
public static final String SHARED_MARKER_TYPE = ClientPlugin.SHARED_MARKER_TYPE;
- public static final String SHARED_MARKER_KEY = ClientPlugin.SHARED_MARKER_KEY;
public static final String ID = "chat"; //$NON-NLS-1$
private static final String DEFAULT_WINDOW_TITLE = Messages.EclipseCollabSharedObject_WINDOW_TITLE;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java
index 0cfaf3225..63474c50d 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransfer.java
@@ -24,6 +24,7 @@ import org.eclipse.ecf.core.sharedobject.SharedObjectAddAbortException;
import org.eclipse.ecf.core.sharedobject.SharedObjectInitException;
import org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ecf.internal.example.collab.ui.FileReceiverUI;
import org.eclipse.ecf.internal.example.collab.ui.FileSenderUI;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -181,7 +182,7 @@ public class EclipseFileTransfer extends FileTransferSharedObject implements Fil
*/
public void run() {
if (ClientPlugin.getDefault().getPluginPreferences().getBoolean(ClientPlugin.PREF_CONFIRM_FILE_RECEIVE)) {
- final MessageDialog dialog = new MessageDialog(ClientPlugin.getDefault().getActiveShell(), "File Receive Confirmation", null, "Accept file?", MessageDialog.QUESTION, null, 0);
+ final MessageDialog dialog = new MessageDialog(ClientPlugin.getDefault().getActiveShell(), Messages.EclipseFileTransfer_DIALOG_RECEIVE_CONF_TITLE, null, Messages.EclipseFileTransfer_DIALOG_RECEIVE_CONF_TEXT, MessageDialog.QUESTION, null, 0);
dialog.setBlockOnOpen(true);
final int response = dialog.open();
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java
index 70dcc04ef..dbcaa84e8 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/EclipseFileTransferAndLaunch.java
@@ -44,18 +44,18 @@ public class EclipseFileTransferAndLaunch extends EclipseFileTransfer {
try {
Program.launch(fileName);
} catch (final IllegalArgumentException e1) {
- ClientPlugin.log("Exception launching " + localFile, e1);
+ ClientPlugin.log(MessageLoader.getString("EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING") + localFile, e1); //$NON-NLS-1$
Display.getDefault().asyncExec(new Runnable() {
public void run() {
MessageDialog
.openInformation(
null,
MessageLoader
- .getString("Program Launch Failed"),
+ .getString(MessageLoader.getString("EclipseFileTransferAndLaunch.PROGRAM_LAUNCH_MSGBOX_TITLE")), //$NON-NLS-1$
MessageLoader
.getString(NLS
.bind(
- "Program launch failed for {0}\nException: {1}",
+ MessageLoader.getString("EclipseFileTransferAndLaunch.PROGRAM_LAUNCH_MSGBOX_TEXT"), //$NON-NLS-1$
localFile
.getAbsolutePath(),
e1.getMessage())));
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileData.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileData.java
index 8606b10fc..2566ee599 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileData.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileData.java
@@ -44,6 +44,6 @@ public class FileData implements Serializable {
}
public String toString() {
- return "FileData[" + read + ";" + isDone() + "]";
+ return "FileData[" + read + ";" + isDone() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
} \ No newline at end of file
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java
index c289691f2..fac5d5fef 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferParams.java
@@ -33,25 +33,19 @@ public class FileTransferParams implements Serializable {
static {
try {
- String str = System.getProperty(FileTransferParams.class.getName()
- + ".FILECHUNKSIZE", "" + DEFAULT_CHUNK_SIZE);
+ String str = System.getProperty(FileTransferParams.class.getName() + ".FILECHUNKSIZE", "" + DEFAULT_CHUNK_SIZE); //$NON-NLS-1$ //$NON-NLS-2$
DEFAULT_CHUNK_SIZE = Integer.parseInt(str);
- str = System.getProperty(FileTransferParams.class.getName()
- + ".FILEWAITTIME", DEFAULT_WAIT_TIME + "");
+ str = System.getProperty(FileTransferParams.class.getName() + ".FILEWAITTIME", DEFAULT_WAIT_TIME + ""); //$NON-NLS-1$ //$NON-NLS-2$
DEFAULT_WAIT_TIME = Integer.parseInt(str);
- str = System.getProperty(FileTransferParams.class.getName()
- + ".FILELENGTH", DEFAULT_FILE_LENGTH + "");
+ str = System.getProperty(FileTransferParams.class.getName() + ".FILELENGTH", DEFAULT_FILE_LENGTH + ""); //$NON-NLS-1$ //$NON-NLS-2$
DEFAULT_FILE_LENGTH = Integer.parseInt(str);
- str = System.getProperty(FileTransferParams.class.getName()
- + ".FILEINCLUDESERVER", "false");
+ str = System.getProperty(FileTransferParams.class.getName() + ".FILEINCLUDESERVER", "false"); //$NON-NLS-1$ //$NON-NLS-2$
DEFAULT_INCLUDE_SERVER = Boolean.getBoolean(str);
- } catch (Exception e) {
+ } catch (final Exception e) {
}
}
- public FileTransferParams(File aFile, int chunkSize, int waitTime,
- Date startDate, boolean includeServer, long length,
- FileTransferListener listener) {
+ public FileTransferParams(File aFile, int chunkSize, int waitTime, Date startDate, boolean includeServer, long length, FileTransferListener listener) {
remoteFile = aFile;
if (chunkSize == -1)
this.chunkSize = DEFAULT_CHUNK_SIZE;
@@ -70,8 +64,7 @@ public class FileTransferParams implements Serializable {
}
public FileTransferParams() {
- this(null, DEFAULT_CHUNK_SIZE, DEFAULT_WAIT_TIME, null,
- DEFAULT_INCLUDE_SERVER, DEFAULT_FILE_LENGTH, null);
+ this(null, DEFAULT_CHUNK_SIZE, DEFAULT_WAIT_TIME, null, DEFAULT_INCLUDE_SERVER, DEFAULT_FILE_LENGTH, null);
}
public File getRemoteFile() {
@@ -135,12 +128,12 @@ public class FileTransferParams implements Serializable {
}
public String toString() {
- StringBuffer sb = new StringBuffer("FileTransferParams[");
- sb.append(remoteFile).append(";").append(chunkSize).append(";");
- sb.append(waitTime).append(";");
- sb.append(startDate).append(";").append(includeServer).append(";");
- sb.append(length).append(";").append(rate).append(";");
- sb.append(progressListener).append("]");
+ final StringBuffer sb = new StringBuffer("FileTransferParams["); //$NON-NLS-1$
+ sb.append(remoteFile).append(";").append(chunkSize).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(waitTime).append(";"); //$NON-NLS-1$
+ sb.append(startDate).append(";").append(includeServer).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(length).append(";").append(rate).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(progressListener).append("]"); //$NON-NLS-1$
return sb.toString();
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferSharedObject.java
index 8f5780a18..abf262b4a 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/FileTransferSharedObject.java
@@ -28,17 +28,18 @@ import org.eclipse.ecf.core.sharedobject.ReplicaSharedObjectDescription;
import org.eclipse.ecf.core.sharedobject.SharedObjectInitException;
import org.eclipse.ecf.example.collab.share.SharedObjectMsg;
import org.eclipse.ecf.example.collab.share.TransactionSharedObject;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.osgi.util.NLS;
public class FileTransferSharedObject extends TransactionSharedObject {
public static final int DEFAULT_START_WAIT_INTERVAL = 5000;
- private static final String HANDLEDATA_MSG = "handleData";
- private static final String HANDLEDONE_MSG = "handleDone";
- private static final String STARTSENDTOALL_MSG = "startSendToAll";
+ private static final String HANDLEDATA_MSG = "handleData"; //$NON-NLS-1$
+ private static final String HANDLEDONE_MSG = "handleDone"; //$NON-NLS-1$
+ private static final String STARTSENDTOALL_MSG = "startSendToAll"; //$NON-NLS-1$
- private static final String START_MSG = "start";
+ private static final String START_MSG = "start"; //$NON-NLS-1$
// Both host and container
protected FileTransferParams transferParams;
protected FileTransferListener progressListener;
@@ -65,12 +66,11 @@ public class FileTransferSharedObject extends TransactionSharedObject {
progressListener = transferParams.getProgressListener();
}
- public FileTransferSharedObject(ID receiver, InputStream ins,
- FileTransferParams params) {
+ public FileTransferSharedObject(ID receiver, InputStream ins, FileTransferParams params) {
targetReceiver = receiver;
Assert.isNotNull(ins);
if (ins == null)
- throw new NullPointerException("Input stream cannot be null");
+ throw new NullPointerException(Messages.FileTransferSharedObject_EXCEPTION_INPUTSTREAM_NOT_NULL);
setInputStream(ins);
transferParams = (params == null) ? new FileTransferParams() : params;
progressListener = transferParams.getProgressListener();
@@ -113,9 +113,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
if (!isHost() && !getContext().isGroupManager()) {
// Then notify listener about starting the receive
if (progressListener != null)
- progressListener.receiveStart(this, transferParams
- .getRemoteFile(), transferParams.getLength(),
- transferParams.getRate());
+ progressListener.receiveStart(this, transferParams.getRemoteFile(), transferParams.getLength(), transferParams.getRate());
// Open output file
openOutputFile();
if (transferParams.getLength() != -1)
@@ -123,17 +121,14 @@ public class FileTransferSharedObject extends TransactionSharedObject {
} else {
// Just notify listener (if any) about the sending
if (progressListener != null)
- progressListener.sendStart(this,
- transferParams.getLength(), transferParams
- .getRate());
+ progressListener.sendStart(this, transferParams.getLength(), transferParams.getRate());
}
- } catch (Exception e) {
+ } catch (final Exception e) {
try {
// Respond with create failure message back to host
- getContext().sendCreateResponse(getHomeContainerID(), e,
- getNextReplicateID());
- } catch (Exception e1) {
- log("Exception sending failure back to host", e1);
+ getContext().sendCreateResponse(getHomeContainerID(), e, getNextReplicateID());
+ } catch (final Exception e1) {
+ log("Exception sending failure back to host", e1); //$NON-NLS-1$
}
return;
}
@@ -142,9 +137,9 @@ public class FileTransferSharedObject extends TransactionSharedObject {
}
protected void openOutputFile() throws IOException {
- File aFile = transferParams.getRemoteFile();
+ final File aFile = transferParams.getRemoteFile();
if (aFile == null)
- throw new IOException("Remote file is null");
+ throw new IOException(Messages.FileTransferSharedObject_EXCEPTION_REMOTE_FILE_NOT_NULL);
// If this is a server, and we shouldn't create a copy of ourselves on a
// server
// then we skip the file creation totally
@@ -153,17 +148,16 @@ public class FileTransferSharedObject extends TransactionSharedObject {
setOutputStream(null);
} else {
try {
- String parent = aFile.getParent();
+ final String parent = aFile.getParent();
if (parent != null && new File(parent).mkdirs())
/**/;
- } catch (Exception ex) {
+ } catch (final Exception ex) {
// Log this exception.
- log(NLS.bind("Exception creating local directory for ", aFile),
+ log(NLS.bind("Exception creating local directory for ", aFile), //$NON-NLS-1$
ex);
}
- setOutputStream(new BufferedOutputStream(
- new FileOutputStream(aFile)));
+ setOutputStream(new BufferedOutputStream(new FileOutputStream(aFile)));
}
}
@@ -179,34 +173,31 @@ public class FileTransferSharedObject extends TransactionSharedObject {
// if we're replicating on activation