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
else if (remoteMember == null) {
try {
- ReplicaSharedObjectDescription createInfo = getReplicaDescription(targetReceiver);
+ final ReplicaSharedObjectDescription createInfo = getReplicaDescription(targetReceiver);
if (createInfo != null) {
getContext().sendCreate(targetReceiver, createInfo);
return;
}
- } catch (IOException e) {
- log("Could not send createFail message", e);
+ } catch (final IOException e) {
+ log("Could not send createFail message", e); //$NON-NLS-1$
}
}
}
- public void init(ISharedObjectConfig config)
- throws SharedObjectInitException {
+ public void init(ISharedObjectConfig config) throws SharedObjectInitException {
super.init(config);
- Map map = config.getProperties();
- Object[] args = (Object[]) map.get(ARGS_PROPERTY_NAME);
+ final Map map = config.getProperties();
+ final Object[] args = (Object[]) map.get(ARGS_PROPERTY_NAME);
if (args != null && args.length == 1) {
transferParams = (FileTransferParams) args[0];
progressListener = transferParams.getProgressListener();
}
}
- protected ReplicaSharedObjectDescription getReplicaDescription(
- ID remoteMember) {
- HashMap map = new HashMap();
- map.put(ARGS_PROPERTY_NAME, new Object[] { transferParams });
- return new ReplicaSharedObjectDescription(getClass(), getID(),
- getConfig().getHomeContainerID(), map, getNextReplicateID());
+ protected ReplicaSharedObjectDescription getReplicaDescription(ID remoteMember) {
+ final HashMap map = new HashMap();
+ map.put(ARGS_PROPERTY_NAME, new Object[] {transferParams});
+ return new ReplicaSharedObjectDescription(getClass(), getID(), getConfig().getHomeContainerID(), map, getNextReplicateID());
}
protected boolean sendData(ID rcvr, FileData data) throws IOException {
@@ -216,8 +207,8 @@ public class FileTransferSharedObject extends TransactionSharedObject {
}
protected boolean sendChunk(ID rcvr) throws IOException {
- FileData data = new FileData(inputStream, transferParams.getChunkSize());
- int size = data.getDataSize();
+ final FileData data = new FileData(inputStream, transferParams.getChunkSize());
+ final int size = data.getDataSize();
if (progressListener != null && size != -1)
progressListener.sendData(this, size);
return sendData(rcvr, data);
@@ -226,7 +217,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
protected void handleData(FileData data) {
preSaveData(data);
// Then save the file data.
- int size = data.getDataSize();
+ final int size = data.getDataSize();
if (progressListener != null && size != -1)
progressListener.receiveData(this, size);
saveData(data);
@@ -246,15 +237,15 @@ public class FileTransferSharedObject extends TransactionSharedObject {
// Save data locally...if we have an output stream
try {
if (outputStream != null) {
- long len = transferParams.getLength();
+ final long len = transferParams.getLength();
dataWritten += data.getDataSize();
if (len != -1 && dataWritten > len)
- throw new IOException("File larger than " + len);
+ throw new IOException(NLS.bind(Messages.FileTransferSharedObject_EXCEPTION_FILE_LARGER_THAN_LEN, String.valueOf(len)));
data.saveData(outputStream);
// Flush to verify that data was saved.
outputStream.flush();
}
- } catch (Exception e) {
+ } catch (final Exception e) {
// Give subclasses opportunity to deal with this
notifyExceptionOnSave(e);
// Report failure back to host if we're not disconnected
@@ -263,9 +254,9 @@ public class FileTransferSharedObject extends TransactionSharedObject {
forwardMsgHome(SharedObjectMsg.createMsg(HANDLEDONE_MSG, e));
// Make sure everything is cleaned up
hardClose();
- } catch (Exception e1) {
+ } catch (final Exception e1) {
// If this fails...then we should be outta here
- log("Exception sending done msg back to host", e1);
+ log("Exception sending done msg back to host", e1); //$NON-NLS-1$
}
if (progressListener != null)
progressListener.receiveDone(this, e);
@@ -278,7 +269,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
try {
// Make sure everything is cleaned up
hardClose();
- } catch (Exception e1) {
+ } catch (final Exception e1) {
// If this fails...then we should be outta here
except = e1;
notifyExceptionOnClose(except);
@@ -289,10 +280,9 @@ public class FileTransferSharedObject extends TransactionSharedObject {
if (progressListener != null)
progressListener.receiveDone(this, except);
try {
- forwardMsgHome(SharedObjectMsg
- .createMsg(HANDLEDONE_MSG, except));
- } catch (Exception e) {
- log("Exception sending done message home", e);
+ forwardMsgHome(SharedObjectMsg.createMsg(HANDLEDONE_MSG, except));
+ } catch (final Exception e) {
+ log("Exception sending done message home", e); //$NON-NLS-1$
}
// Now call doneReceiving...which may destroy us
doneReceiving();
@@ -347,7 +337,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
protected void start() {
if (isHost()) {
- Date start = transferParams.getStartDate();
+ final Date start = transferParams.getStartDate();
if (start != null && start.after(new Date())) {
try {
preWait();
@@ -356,7 +346,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
}
// Asynchronous tail recursion.
sendSelf(SharedObjectMsg.createMsg(START_MSG));
- } catch (Exception e) {
+ } catch (final Exception e) {
}
} else {
preStartSending();
@@ -376,7 +366,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
// Call subclass overrideable method before sending chunk
preChunkSent();
// Send chunk
- boolean res = sendChunk(targetReceiver);
+ final boolean res = sendChunk(targetReceiver);
// Call subclass overrideable method after sending chunk
chunkSent();
if (!res) {
@@ -394,7 +384,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
hardClose();
doneSending(null);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
doneSending(e);
}
}
@@ -403,14 +393,14 @@ public class FileTransferSharedObject extends TransactionSharedObject {
if (inputStream != null) {
try {
inputStream.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
}
inputStream = null;
}
if (outputStream != null) {
try {
outputStream.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
}
outputStream = null;
}
@@ -421,7 +411,7 @@ public class FileTransferSharedObject extends TransactionSharedObject {
// Make sure things are cleaned up properly in case of wrong trousers
try {
hardClose();
- } catch (Exception e) {
+ } catch (final Exception e) {
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/SharedObjectInputStream.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/SharedObjectInputStream.java
index 052a56630..5fccf6fdc 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/SharedObjectInputStream.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/io/SharedObjectInputStream.java
@@ -17,6 +17,7 @@ import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import org.eclipse.ecf.core.sharedobject.util.SimpleFIFOQueue;
+import org.eclipse.ecf.internal.example.collab.Messages;
public class SharedObjectInputStream extends InputStream {
protected SimpleFIFOQueue queue = new SimpleFIFOQueue();
@@ -48,7 +49,7 @@ public class SharedObjectInputStream extends InputStream {
if (currentRead >= currentLength) {
Data d = (Data) queue.dequeue();
if (d == null)
- throw new IOException("No data");
+ throw new IOException(Messages.SharedObjectInputStream_EXCEPTION_NO_DATA);
resetStreams(d);
}
currentRead++;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ShowURLSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ShowURLSharedObject.java
index cb2e44759..b9035e178 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ShowURLSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/ShowURLSharedObject.java
@@ -24,6 +24,7 @@ import org.eclipse.ecf.core.sharedobject.ReplicaSharedObjectDescription;
import org.eclipse.ecf.core.sharedobject.SharedObjectInitException;
import org.eclipse.ecf.example.collab.share.GenericSharedObject;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
@@ -90,7 +91,7 @@ public class ShowURLSharedObject extends GenericSharedObject {
if (createInfo != null)
getContext().sendCreate(receiver, createInfo);
} catch (IOException e) {
- log("Exception in replicateSelf", e);
+ log("Exception in replicateSelf", e); //$NON-NLS-1$
}
}
}
@@ -106,12 +107,12 @@ public class ShowURLSharedObject extends GenericSharedObject {
browser = support.createBrowser(null);
browser.openURL(new URL(url));
} catch (Exception e) {
- MessageDialog.openError(null, "Error in Open URL", NLS
- .bind("Error: {0}", e.getLocalizedMessage()));
+ MessageDialog.openError(null, Messages.ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TITLE, NLS
+ .bind(Messages.ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TEXT, e.getLocalizedMessage()));
ClientPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR,
ClientPlugin.PLUGIN_ID, IStatus.ERROR,
- "Error in openURL", e));
+ Messages.ShowURLSharedObject_STATUS_OPENURL_MESSAGE, e));
}
}
});
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/StartProgramSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/StartProgramSharedObject.java
index e7aaa11ba..5ab287881 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/StartProgramSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/url/StartProgramSharedObject.java
@@ -22,7 +22,7 @@ import org.eclipse.ecf.example.collab.share.GenericSharedObject;
import org.eclipse.ecf.internal.example.collab.Trace;
public class StartProgramSharedObject extends GenericSharedObject {
- public static Trace myDebug = Trace.create("progsharedobject");
+ public static Trace myDebug = Trace.create("progsharedobject"); //$NON-NLS-1$
public static final Boolean DEFAULT_INCLUDE_SERVER = Boolean.FALSE;
// Host values
protected String[] cmds;
@@ -78,7 +78,7 @@ public class StartProgramSharedObject extends GenericSharedObject {
}
protected void replicate(ID remoteMember) {
- debug("replicateSelf(" + remoteMember + ")");
+ debug("replicateSelf(" + remoteMember + ")"); //$NON-NLS-1$ //$NON-NLS-2$
// If we don't have a specific receiver, simply allow superclass to
// handle replication.
if (receiver == null) {
@@ -95,7 +95,7 @@ public class StartProgramSharedObject extends GenericSharedObject {
getContext().sendCreate(receiver, createInfo);
}
} catch (IOException e) {
- log("Exception in replicateSelf", e);
+ log("Exception in replicateSelf", e); //$NON-NLS-1$
return;
}
}
@@ -105,9 +105,9 @@ public class StartProgramSharedObject extends GenericSharedObject {
throws SharedObjectInitException {
super.init(config);
Map props = config.getProperties();
- debug("props is " + props);
- Object[] args = (Object[]) props.get("args");
- debug("args is " + args);
+ debug("props is " + props); //$NON-NLS-1$
+ Object[] args = (Object[]) props.get("args"); //$NON-NLS-1$
+ debug("args is " + args); //$NON-NLS-1$
if (args != null && args.length > 4) {
receiver = (ID) args[0];
cmds = (String[]) args[1];
@@ -124,22 +124,22 @@ public class StartProgramSharedObject extends GenericSharedObject {
(replicaEnv == null) ? env : replicaEnv, includeHost,
includeServer };
HashMap map = new HashMap();
- map.put("args", args);
+ map.put("args", args); //$NON-NLS-1$
return new ReplicaSharedObjectDescription(getClass(), getID(),
getHomeContainerID(), map, getNextReplicateID());
}
public void activated(ID[] others) {
- debug("activated()");
+ debug("activated()"); //$NON-NLS-1$
try {
if (!getContext().isGroupManager()
|| includeServer.equals(Boolean.TRUE)) {
startup();
} else {
- debug("Not executing commands because is server");
+ debug("Not executing commands because is server"); //$NON-NLS-1$
}
} catch (Exception e) {
- debug(e, "Exception on startup()");
+ debug(e, "Exception on startup()"); //$NON-NLS-1$
/*
* For now, just ignore failure.
*/
@@ -153,24 +153,24 @@ public class StartProgramSharedObject extends GenericSharedObject {
* called after the activated method completes its operations.
*/
protected void postActivated() {
- debug("postActivated()");
+ debug("postActivated()"); //$NON-NLS-1$
}
protected void startup() throws Exception {
- debug("startup()");
+ debug("startup()"); //$NON-NLS-1$
if (cmds != null) {
// This is all trace output
if (Trace.ON && myDebug != null) {
- myDebug.msg("Executing command line:");
+ myDebug.msg("Executing command line:"); //$NON-NLS-1$
if (cmds != null) {
for (int i = 0; i < cmds.length; i++) {
- myDebug.msg(" " + cmds[i] + " ");
+ myDebug.msg(" " + cmds[i] + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
}
- myDebug.msg("With enviromnent:");
+ myDebug.msg("With enviromnent:"); //$NON-NLS-1$
if (env != null) {
for (int i = 0; i < env.length; i++) {
- myDebug.msg(" " + env[i] + " ");
+ myDebug.msg(" " + env[i] + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java
index 93cd5f91f..c91cc23e3 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPlugin.java
@@ -126,7 +126,7 @@ public class ClientPlugin extends AbstractUIPlugin implements ClientPluginConsta
*/
protected ImageRegistry createImageRegistry() {
final ImageRegistry registry = super.createImageRegistry();
- registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/default_provider_image.gif").createImage());
+ registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/default_provider_image.gif").createImage()); //$NON-NLS-1$
return registry;
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java
index f8b340f54..c08696bbc 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ClientPluginConstants.java
@@ -13,35 +13,35 @@ package org.eclipse.ecf.internal.example.collab;
public interface ClientPluginConstants {
- public static final String DEFAULT_WIN32_APPSHARE_NAME = "appsharewin32display";
- public static final String DEFAULT_FILE_TRANSFER_CHUNKTIME_NAME = "filetransferchunksize";
- public static final String DEFAULT_FILE_TRANSFER_DELAY_NAME = "filetransferdelay";
+ public static final String DEFAULT_WIN32_APPSHARE_NAME = "appsharewin32display"; //$NON-NLS-1$
+ public static final String DEFAULT_FILE_TRANSFER_CHUNKTIME_NAME = "filetransferchunksize"; //$NON-NLS-1$
+ public static final String DEFAULT_FILE_TRANSFER_DELAY_NAME = "filetransferdelay"; //$NON-NLS-1$
/*
* Contants for perference items.
*/
- public static final String PREF_USE_CHAT_WINDOW = "useChatWindow";
- public static final String PREF_DISPLAY_TIMESTAMP = "displayTimeStamp";
- public static final String PREF_CHAT_FONT = "chatFont";
- public static final String PREF_FILE_TRANSFER_RATE = "fileTransferRate";
- public static final String PREF_CONFIRM_FILE_SEND = "confirmFileSend";
- public static final String PREF_CONFIRM_REMOTE_VIEW = "confirmRemoteView";
- public static final String PREF_FILE_SEND_PATH = "findSendPath";
- public static final String PREF_CONFIRM_FILE_RECEIVE = "confirmFileReceive";
- public static final String PREF_ME_TEXT_COLOR = "prefMeTextColor";
- public static final String PREF_OTHER_TEXT_COLOR = "prefOtherTextColor";
- public static final String PREF_SYSTEM_TEXT_COLOR = "prefSystemTextColor";
-
- public static final String PREF_START_SERVER = "startServerOnStartup";
- public static final String PREF_REGISTER_SERVER = "registerServerOnStartup";
-
- public static final String PREF_SHAREDEDITOR_PLAY_EVENTS_IMMEDIATELY = "sharedEditorShowEvents";
- public static final String PREF_SHAREDEDITOR_ASK_RECEIVER = "sharedEditorAskReceiver";
- public static final String PREF_STORE_PASSWORD = "storePassword";
-
- public static final String SHARED_MARKER_TYPE = "org.eclipse.ecf.example.collab.sharedmarker";
- public static final String SHARED_MARKER_KEY = "owner";
-
- public static final String DECORATION_DEFAULT_PROVIDER = "DECORATION_DEFAULT_PROVIDER";
+ public static final String PREF_USE_CHAT_WINDOW = "useChatWindow"; //$NON-NLS-1$
+ public static final String PREF_DISPLAY_TIMESTAMP = "displayTimeStamp"; //$NON-NLS-1$
+ public static final String PREF_CHAT_FONT = "chatFont"; //$NON-NLS-1$
+ public static final String PREF_FILE_TRANSFER_RATE = "fileTransferRate"; //$NON-NLS-1$
+ public static final String PREF_CONFIRM_FILE_SEND = "confirmFileSend"; //$NON-NLS-1$
+ public static final String PREF_CONFIRM_REMOTE_VIEW = "confirmRemoteView"; //$NON-NLS-1$
+ public static final String PREF_FILE_SEND_PATH = "findSendPath"; //$NON-NLS-1$
+ public static final String PREF_CONFIRM_FILE_RECEIVE = "confirmFileReceive"; //$NON-NLS-1$
+ public static final String PREF_ME_TEXT_COLOR = "prefMeTextColor"; //$NON-NLS-1$
+ public static final String PREF_OTHER_TEXT_COLOR = "prefOtherTextColor"; //$NON-NLS-1$
+ public static final String PREF_SYSTEM_TEXT_COLOR = "prefSystemTextColor"; //$NON-NLS-1$
+
+ public static final String PREF_START_SERVER = "startServerOnStartup"; //$NON-NLS-1$
+ public static final String PREF_REGISTER_SERVER = "registerServerOnStartup"; //$NON-NLS-1$
+
+ public static final String PREF_SHAREDEDITOR_PLAY_EVENTS_IMMEDIATELY = "sharedEditorShowEvents"; //$NON-NLS-1$
+ public static final String PREF_SHAREDEDITOR_ASK_RECEIVER = "sharedEditorAskReceiver"; //$NON-NLS-1$
+ public static final String PREF_STORE_PASSWORD = "storePassword"; //$NON-NLS-1$
+
+ public static final String SHARED_MARKER_TYPE = "org.eclipse.ecf.example.collab.sharedmarker"; //$NON-NLS-1$
+ public static final String SHARED_MARKER_KEY = "owner"; //$NON-NLS-1$
+
+ public static final String DECORATION_DEFAULT_PROVIDER = "DECORATION_DEFAULT_PROVIDER"; //$NON-NLS-1$
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/CollabClient.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/CollabClient.java
index 880a272b4..d84d1f0c2 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/CollabClient.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/CollabClient.java
@@ -30,9 +30,9 @@ import org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject;
import org.eclipse.ecf.internal.example.collab.ui.SharedObjectContainerUI;
public class CollabClient {
- public static final String WORKSPACE_NAME = "<workspace>";
+ public static final String WORKSPACE_NAME = Messages.CollabClient_WORKSPACE_NAME;
- public static final String GENERIC_CONTAINER_CLIENT_NAME = "ecf.generic.client";
+ public static final String GENERIC_CONTAINER_CLIENT_NAME = "ecf.generic.client"; //$NON-NLS-1$
static Hashtable clients = new Hashtable();
@@ -139,7 +139,7 @@ public class CollabClient {
public static String getNameForResource(IResource res) {
String preName = res.getName().trim();
- if (preName == null || preName.equals("")) {
+ if (preName == null || preName.equals("")) { //$NON-NLS-1$
preName = WORKSPACE_NAME;
}
return preName;
@@ -248,8 +248,8 @@ public class CollabClient {
username = nickname;
} else {
username = new URI(targetID.getName()).getUserInfo();
- if (username == null || username.equals(""))
- username = System.getProperty("user.name");
+ if (username == null || username.equals("")) //$NON-NLS-1$
+ username = System.getProperty("user.name"); //$NON-NLS-1$
}
return username;
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java
index 19a389933..d3fc91204 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/EditorCompoundContributionItem.java
@@ -103,7 +103,7 @@ public class EditorCompoundContributionItem extends CompoundContributionItem {
}
final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
if (collabsharedobject != null) {
- collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength());
+ collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength()); //$NON-NLS-1$
}
}
};
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Messages.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Messages.java
index 2ffcd224b..bec2037a8 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Messages.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Messages.java
@@ -18,6 +18,32 @@ import org.eclipse.osgi.util.NLS;
*/
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.example.collab.messages"; //$NON-NLS-1$
+ public static String AccountStart_EXCEPTION_LOADING_CONNECTION_DETAILS;
+ public static String AccountStart_EXCEPTION_SAVING_CONNECTION_DETAILS;
+ public static String AutoLoginPreferencePage_URILISTEDITOR_TEXT;
+ public static String ChatWindow_SHELL_TEXT;
+ public static String ClientPreferencePage_ASK_RECEIVER_FOR_PERMISSION;
+ public static String ClientPreferencePage_CHAT_COLOR_FOR_ME_FIELD;
+ public static String ClientPreferencePage_CHAT_COLOR_FOR_SYSTEM_FIELD;
+ public static String ClientPreferencePage_CHAT_TEXT_COLOR_FOR_OTHER_FIELD;
+ public static String ClientPreferencePage_CHAT_WINDOW_FONT_FIELD;
+ public static String ClientPreferencePage_PLAY_EDITOR_EVENTS_IMMEDIATELY;
+ public static String ClientPreferencePage_SHOW_TIME_FOR_CHAT_FIELD;
+ public static String ClientPreferencePage_USE_CHAT_WINDOW_FIELD_TEXT;
+ public static String CollabClient_WORKSPACE_NAME;
+ public static String CollabStart_EXCEPTION_STARTING_CONNECTION;
+ public static String CollabStart_STATUS_OK_MESSAGE;
+ public static String ConnectionDialog_AUTOLOGIN_TEXT;
+ public static String ConnectionDialog_CHOOSE_PROVIDER_MESSAGE;
+ public static String ConnectionDialog_CONNECT_PAGE_TITLE;
+ public static String ConnectionDialog_CONNECT_TEXT;
+ public static String ConnectionDialog_CONNECTION_TITLE;
+ public static String ConnectionDialog_JOIN_GROUP_FIELD_TEXT;
+ public static String ConnectionDialog_NICKNAME_TEXT;
+ public static String ConnectionDialog_PASSWORD_TEXT;
+ public static String ConnectionDialog_PROTOCOL_TEXT;
+ public static String ConnectionDialog_SELECT_PROVIDER_DESCRIPTION;
+ public static String ConnectionDialog_TEMPLATE_URL;
public static String EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR;
public static String EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR_TITLE;
public static String EclipseCollabHyperlink_MESSAGE_EXCEPTION_OPEN_EDITOR;
@@ -36,16 +62,58 @@ public class Messages extends NLS {
public static String EclipseCollabSharedObject_UNKNOWN_USERNAME;
public static String EclipseCollabSharedObject_WINDOW_TITLE;
public static String EclipseCollabSharedObject_WORKSPACE_RESOURCE_NAME;
+ public static String EclipseFileTransfer_DIALOG_RECEIVE_CONF_TEXT;
+ public static String EclipseFileTransfer_DIALOG_RECEIVE_CONF_TITLE;
public static String EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_MESSAGE;
public static String EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_TITLE;
public static String EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME;
+ public static String FileTransferSharedObject_EXCEPTION_FILE_LARGER_THAN_LEN;
+ public static String FileTransferSharedObject_EXCEPTION_INPUTSTREAM_NOT_NULL;
+ public static String FileTransferSharedObject_EXCEPTION_REMOTE_FILE_NOT_NULL;
+ public static String JoinGroupWizard_CONNECT;
+ public static String JoinGroupWizard_COULD_NOT_CONNECT;
+ public static String JoinGroupWizardAction_PROJECT_MENU_CONNECT_TEXT;
+ public static String JoinGroupWizardAction_PROJECT_MENU_DISCONNECT_TEXT;
+ public static String JoinGroupWizardPage_COMPLETE_ACCOUNT_INFO;
+ public static String JoinGroupWizardPage_CONNECT_GENERIC_TITLE;
+ public static String JoinGroupWizardPage_DEFAULT_SERVER;
+ public static String JoinGroupWizardPage_GROUPID;
+ public static String JoinGroupWizardPage_NICKNAME;
+ public static String JoinGroupWizardPage_PROTOCOL;
+ public static String JoinGroupWizardPage_TEMPLATE;
+ public static String LineChatClientView_CHANGED_NAME_TO;
+ public static String LineChatClientView_EXCEPTION_MSGBOX_TEXT;
+ public static String LineChatClientView_EXCEPTION_MSGBOX_TITLE;
+ public static String LineChatClientView_EXCEPTION_SENDING_FILE;
+ public static String LineChatClientView_SEND_COMPLETED;
+ public static String LineChatClientView_SENDING_FILE;
+ public static String LineChatClientView_TYPING;
+ public static String LineChatView_EXCEPTION_VIEW_NOT_INITIALIZED;
+ public static String LineChatView_NO_CONNECT_MESSAGE;
+ public static String OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TEXT;
+ public static String OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TITLE;
+ public static String SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TEXT;
+ public static String SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TITLE;
+ public static String SharedObjectContainerUI_JAVA_VERSION_LABEL;
+ public static String SharedObjectContainerUI_LANGUAGE_LABEL;
+ public static String SharedObjectContainerUI_OS_LABEL;
+ public static String SharedObjectContainerUI_OSGI_VERSION_LABEL;
+ public static String SharedObjectContainerUI_PROJECT_LABEL;
+ public static String SharedObjectContainerUI_TIME_LABEL;
+ public static String SharedObjectContainerUI_TIME_ZONE_LABEL;
+ public static String SharedObjectInputStream_EXCEPTION_NO_DATA;
public static String SharedObjectMsg_EXCEPTION_METHOD_NOT_NULL;
public static String SharedObjectMsg_EXCEPTION_NOT_SERIALIZABLE;
public static String SharedObjectMsg_EXCEPTION_NULL_TARGET;
+ public static String ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TEXT;
+ public static String ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TITLE;
+ public static String ShowURLSharedObject_STATUS_OPENURL_MESSAGE;
public static String TransactionSharedObject_EXCEPTION_FROM_ABORT;
public static String TransactionSharedObject_EXCEPTION_INTERUPTED;
public static String TransactionSharedObject_EXCEPTION_ON_COMMIT_MESSAGE;
public static String TransactionSharedObject_EXCEPTION_TIMEOUT;
+ public static String URIClientConnectAction_CONNECT_JOB_NAME;
+ public static String URLListFieldEditor_BUTTON_REMOVE_TEXT;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ServerStartup.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ServerStartup.java
index 549921e2e..0db1518df 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ServerStartup.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ServerStartup.java
@@ -27,7 +27,7 @@ import org.eclipse.ecf.server.generic.app.ServerConfigParser;
public class ServerStartup {
static TCPServerSOContainerGroup serverGroups[] = null;
- static final String SERVER_FILE_NAME = "ServerStartup.xml";
+ static final String SERVER_FILE_NAME = "ServerStartup.xml"; //$NON-NLS-1$
static List servers = new ArrayList();
public ServerStartup() throws Exception {
@@ -52,7 +52,7 @@ public class ServerStartup {
try {
s.dispose();
} catch (final Exception e) {
- ClientPlugin.log("Exception destroying server " + s.getConfig().getID());
+ ClientPlugin.log("Exception destroying server " + s.getConfig().getID()); //$NON-NLS-1$
}
}
}
@@ -79,7 +79,7 @@ public class ServerStartup {
final NamedGroup group = (NamedGroup) g.next();
final TCPServerSOContainer cont = createServerContainer(group.getIDForGroup(), serverGroups[j], group.getName(), connect.getTimeout());
servers.add(cont);
- ClientPlugin.log("ECF group server created: " + cont.getConfig().getID().getName());
+ ClientPlugin.log("ECF group server created: " + cont.getConfig().getID().getName()); //$NON-NLS-1$
}
serverGroups[j].putOnTheAir();
j++;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Trace.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Trace.java
index 8fa04b980..6cff739d9 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Trace.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/Trace.java
@@ -19,26 +19,26 @@ import java.util.Date;
import org.eclipse.core.runtime.Platform;
public class Trace {
- private static final String TRACENAME = "org.eclipse.ecf.example.collab.Trace";
+ private static final String TRACENAME = "org.eclipse.ecf.example.collab.Trace"; //$NON-NLS-1$
- public static final String tracePrefix = "(trace)";
+ public static final String tracePrefix = "(trace)"; //$NON-NLS-1$
public static boolean ON = false;
protected static boolean isEclipse = false;
- protected static String pluginName = "";
- protected static String debugPrefix = "/debug/";
+ protected static String pluginName = ""; //$NON-NLS-1$
+ protected static String debugPrefix = "/debug/"; //$NON-NLS-1$
protected static PrintStream getPrintStream(String outputFileName) {
if (outputFileName != null)
try {
File f = new File(outputFileName);
PrintStream ps = new PrintStream(new FileOutputStream(f, true));
- System.out.println(TRACENAME + " directed to "
+ System.out.println(TRACENAME + " directed to " //$NON-NLS-1$
+ f.getCanonicalPath());
return ps;
} catch (Exception e) {
- System.err.println("Exception opening output file '"
- + outputFileName + "' for tracing...using System.out");
+ System.err.println("Exception opening output file '" //$NON-NLS-1$
+ + outputFileName + "' for tracing...using System.out"); //$NON-NLS-1$
}
return System.out;
}
@@ -57,7 +57,7 @@ public class Trace {
pluginName = ClientPlugin.getDefault().getBundle()
.getSymbolicName();
} catch (Exception e) {
- System.out.println("WARNING: Platform not available for trace");
+ System.out.println("WARNING: Platform not available for trace"); //$NON-NLS-1$
}
isEclipse = true;
}
@@ -69,7 +69,7 @@ public class Trace {
.getDebugOption(pluginName + debugPrefix + key);
if (res != null) {
if (Boolean.valueOf(res).booleanValue())
- return new Trace(pluginName + "(" + key + ")");
+ return new Trace(pluginName + "(" + key + ")"); //$NON-NLS-1$ //$NON-NLS-2$
else
return null;
} else {
@@ -94,7 +94,7 @@ public class Trace {
protected static String getTimeString() {
Date d = new Date();
- SimpleDateFormat df = new SimpleDateFormat("[MM/dd/yy;HH:mm:ss:SSS]");
+ SimpleDateFormat df = new SimpleDateFormat("[MM/dd/yy;HH:mm:ss:SSS]"); //$NON-NLS-1$
return df.format(d);
}
@@ -104,30 +104,30 @@ public class Trace {
public static String convertStringAToString(String[] strings) {
if (strings == null)
- return "";
+ return ""; //$NON-NLS-1$
StringBuffer sb = new StringBuffer();
for (int i = 0; i < strings.length; i++) {
if (strings[i] == null)
- sb.append("(null)");
+ sb.append("(null)"); //$NON-NLS-1$
else
sb.append(strings[i]);
if (i != (strings.length - 1))
- sb.append(";");
+ sb.append(";"); //$NON-NLS-1$
}
return sb.toString();
}
public static String convertObjectAToString(Object[] objs) {
if (objs == null)
- return "";
+ return ""; //$NON-NLS-1$
StringBuffer sb = new StringBuffer();
for (int i = 0; i < objs.length; i++) {
if (objs[i] == null)
- sb.append("(null)");
+ sb.append("(null)"); //$NON-NLS-1$
else
sb.append(objs[i].toString());
if (i != (objs.length - 1))
- sb.append(";");
+ sb.append(";"); //$NON-NLS-1$
}
return sb.toString();
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/JoinGroupWizardAction.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/JoinGroupWizardAction.java
index a26e7b106..36626d92b 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/JoinGroupWizardAction.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/JoinGroupWizardAction.java
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject;
import org.eclipse.ecf.internal.example.collab.ClientEntry;
import org.eclipse.ecf.internal.example.collab.CollabClient;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ecf.internal.example.collab.ui.JoinGroupWizard;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
@@ -32,8 +33,8 @@ import org.eclipse.ui.PlatformUI;
public class JoinGroupWizardAction implements IObjectActionDelegate,
IWorkbenchWindowActionDelegate {
- private static final String CONNECT_PROJECT_MENU_TEXT = "Connect Project to Collaboration Group...";
- private static final String DISCONNECT_PROJECT_MENU_TEXT = "Disconnect Project";
+ private static final String CONNECT_PROJECT_MENU_TEXT = Messages.JoinGroupWizardAction_PROJECT_MENU_CONNECT_TEXT;
+ private static final String DISCONNECT_PROJECT_MENU_TEXT = Messages.JoinGroupWizardAction_PROJECT_MENU_DISCONNECT_TEXT;
private IResource resource;
private boolean connected = false;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/OpenSharedEditorAction.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/OpenSharedEditorAction.java
index 160b1aa25..17f9824da 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/OpenSharedEditorAction.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/OpenSharedEditorAction.java
@@ -17,10 +17,12 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject;
import org.eclipse.ecf.internal.example.collab.ClientEntry;
import org.eclipse.ecf.internal.example.collab.CollabClient;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
@@ -37,9 +39,8 @@ public class OpenSharedEditorAction implements IObjectActionDelegate {
protected ClientEntry isConnected(IResource res) {
if (res == null)
return null;
- CollabClient client = CollabClient.getDefault();
- ClientEntry entry = client.isConnected(res,
- CollabClient.GENERIC_CONTAINER_CLIENT_NAME);
+ final CollabClient client = CollabClient.getDefault();
+ final ClientEntry entry = client.isConnected(res, CollabClient.GENERIC_CONTAINER_CLIENT_NAME);
return entry;
}
@@ -47,23 +48,15 @@ public class OpenSharedEditorAction implements IObjectActionDelegate {
if (file == null) {
return;
}
- IProject project = file.getProject();
- ClientEntry entry = isConnected(project);
+ final IProject project = file.getProject();
+ final ClientEntry entry = isConnected(project);
if (entry == null) {
- MessageDialog
- .openInformation(
- targetPart.getSite().getWorkbenchWindow()
- .getShell(),
- "Project Not Connected to Collaboration Group",
- "Project '"
- + project.getName()
- + "' not connected to any collaboration session. To connect project, open context menu for project and choose Communications->Connect Project to Collaboration Group...");
+ MessageDialog.openInformation(targetPart.getSite().getWorkbenchWindow().getShell(), Messages.OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TITLE, NLS.bind(Messages.OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TEXT, project.getName()));
return;
}
- EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
+ final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
if (collabsharedobject != null) {
- collabsharedobject.sendLaunchEditorForFile(null, file
- .getProjectRelativePath().toString());
+ collabsharedobject.sendLaunchEditorForFile(null, file.getProjectRelativePath().toString());
}
}
@@ -71,8 +64,8 @@ public class OpenSharedEditorAction implements IObjectActionDelegate {
action.setEnabled(false);
file = null;
if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Object obj = ss.getFirstElement();
+ final IStructuredSelection ss = (IStructuredSelection) selection;
+ final Object obj = ss.getFirstElement();
// now try to set relevant file
if (obj instanceof IFile) {
file = (IFile) obj;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/SetSharedEditorSelectionAction.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/SetSharedEditorSelectionAction.java
index 1fe511bc7..01cca9235 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/SetSharedEditorSelectionAction.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/SetSharedEditorSelectionAction.java
@@ -16,6 +16,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject;
import org.eclipse.ecf.internal.example.collab.ClientEntry;
import org.eclipse.ecf.internal.example.collab.CollabClient;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.ITextSelection;
@@ -77,12 +78,12 @@ public class SetSharedEditorSelectionAction implements IEditorActionDelegate {
final IProject project = file.getProject();
final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
if (entry == null) {
- MessageDialog.openInformation(getWorkbench().getDisplay().getActiveShell(), "Not Connected to Collaboration Session", "Not connected to any collaboration group. To connect, open Collaboration View");
+ MessageDialog.openInformation(getWorkbench().getDisplay().getActiveShell(), Messages.SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TITLE, Messages.SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TEXT);
return;
}
final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
if (collabsharedobject != null) {
- collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength());
+ collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength()); //$NON-NLS-1$
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/URIClientConnectAction.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/URIClientConnectAction.java
index b94362df9..589aa993c 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/URIClientConnectAction.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/actions/URIClientConnectAction.java
@@ -19,11 +19,13 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.internal.example.collab.CollabClient;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ecf.internal.example.collab.start.AccountStart;
import org.eclipse.ecf.internal.example.collab.start.ConnectionDetails;
import org.eclipse.ecf.ui.dialogs.ContainerConnectErrorDialog;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
@@ -44,9 +46,7 @@ public class URIClientConnectAction implements IWorkbenchWindowActionDelegate {
client = CollabClient.getDefault();
}
- public URIClientConnectAction(String containerType, String uri,
- String nickname, String password, IResource project,
- boolean autoLoginFlag) {
+ public URIClientConnectAction(String containerType, String uri, String nickname, String password, IResource project, boolean autoLoginFlag) {
this();
this.containerType = containerType;
this.uri = uri;
@@ -70,16 +70,14 @@ public class URIClientConnectAction implements IWorkbenchWindowActionDelegate {
public IStatus run(IProgressMonitor pm) {
try {
- client.createAndConnectClient(containerType, uri, nickname,
- password, project);
+ client.createAndConnectClient(containerType, uri, nickname, password, project);
if (autoLogin)
saveAutoLoginInfo();
} catch (final ContainerConnectException e) {
removeAutoLoginInfo();
Display.getDefault().syncExec(new Runnable() {
public void run() {
- new ContainerConnectErrorDialog(null, uri, e
- .getStatus()).open();
+ new ContainerConnectErrorDialog(null, uri, e.getStatus()).open();
}
});
} catch (final Exception e) {
@@ -93,21 +91,19 @@ public class URIClientConnectAction implements IWorkbenchWindowActionDelegate {
}
private void saveAutoLoginInfo() {
- AccountStart as = new AccountStart();
- as.addConnectionDetails(new ConnectionDetails(containerType, uri,
- nickname, password));
+ final AccountStart as = new AccountStart();
+ as.addConnectionDetails(new ConnectionDetails(containerType, uri, nickname, password));
as.saveConnectionDetailsToPreferenceStore();
}
private void removeAutoLoginInfo() {
- AccountStart as = new AccountStart();
- as.removeConnectionDetails(new ConnectionDetails(containerType,
- uri, nickname, password));
+ final AccountStart as = new AccountStart();
+ as.removeConnectionDetails(new ConnectionDetails(containerType, uri, nickname, password));
}
}
public void run(IAction action) {
- new ClientConnectJob("Connect for " + projectName).schedule();
+ new ClientConnectJob(NLS.bind(Messages.URIClientConnectAction_CONNECT_JOB_NAME, projectName)).schedule();
}
public void selectionChanged(IAction action, ISelection selection) {
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
index 1e5073141..855e8ace5 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties
@@ -1,3 +1,29 @@
+AccountStart_EXCEPTION_LOADING_CONNECTION_DETAILS=Exception loading connection details
+AccountStart_EXCEPTION_SAVING_CONNECTION_DETAILS=Exception saving connection details
+AutoLoginPreferencePage_URILISTEDITOR_TEXT=The following will be connected upon ECF start
+ChatWindow_SHELL_TEXT=Team Chat {0}
+ClientPreferencePage_ASK_RECEIVER_FOR_PERMISSION=Ask receiver for permission to display shared editor events
+ClientPreferencePage_CHAT_COLOR_FOR_ME_FIELD=Chat Text Color For Me:
+ClientPreferencePage_CHAT_COLOR_FOR_SYSTEM_FIELD=Chat Text Color For System:
+ClientPreferencePage_CHAT_TEXT_COLOR_FOR_OTHER_FIELD=Chat Text Color For Other:
+ClientPreferencePage_CHAT_WINDOW_FONT_FIELD=Chat window font:
+ClientPreferencePage_PLAY_EDITOR_EVENTS_IMMEDIATELY=Play shared editor events immediately
+ClientPreferencePage_SHOW_TIME_FOR_CHAT_FIELD=Show time for each chat entry
+ClientPreferencePage_USE_CHAT_WINDOW_FIELD_TEXT=Display ECF Collaboration outside of the workbench
+CollabClient_WORKSPACE_NAME=<workspace>
+CollabStart_EXCEPTION_STARTING_CONNECTION=Exception in starting connection
+CollabStart_STATUS_OK_MESSAGE=OK
+ConnectionDialog_AUTOLOGIN_TEXT=Login &automatically at startup
+ConnectionDialog_CHOOSE_PROVIDER_MESSAGE=Please choose a provider and supply connection parameters.
+ConnectionDialog_CONNECT_PAGE_TITLE=Connect with ECF
+ConnectionDialog_CONNECT_TEXT=Connect
+ConnectionDialog_CONNECTION_TITLE=ECF Connection
+ConnectionDialog_JOIN_GROUP_FIELD_TEXT=Group ID:
+ConnectionDialog_NICKNAME_TEXT=Nickname:
+ConnectionDialog_PASSWORD_TEXT=Password:
+ConnectionDialog_PROTOCOL_TEXT=Connection Protocol
+ConnectionDialog_SELECT_PROVIDER_DESCRIPTION=Select protocol provider, complete account info and login
+ConnectionDialog_TEMPLATE_URL=<protocol>://<machinename>:<port>/<servicename>
EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR=Exception in openEditorAndSelectForFile
EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR_TITLE=Open Editor Failed
EclipseCollabHyperlink_MESSAGE_EXCEPTION_OPEN_EDITOR=Cannot open editor for {0}. It was not found in your workspace.
@@ -16,13 +42,55 @@ EclipseCollabSharedObject_TREE_TOP_LABEL=Presence
EclipseCollabSharedObject_UNKNOWN_USERNAME=<unknown>
EclipseCollabSharedObject_WINDOW_TITLE=Chat
EclipseCollabSharedObject_WORKSPACE_RESOURCE_NAME=<workspace>
+EclipseFileTransfer_DIALOG_RECEIVE_CONF_TEXT=Accept file?
+EclipseFileTransfer_DIALOG_RECEIVE_CONF_TITLE=File Receive Confirmation
EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_MESSAGE=Not connected to any collaboration group. To connect, open Collaboration View
EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_TITLE=Not Connected to Collaboration Session
EditorCompoundContributionItem_SHARE_SELECTION_MENU_ITEM_NAME=Share Selection
+FileTransferSharedObject_EXCEPTION_FILE_LARGER_THAN_LEN=File larger than {0}
+FileTransferSharedObject_EXCEPTION_INPUTSTREAM_NOT_NULL=Input stream cannot be null
+FileTransferSharedObject_EXCEPTION_REMOTE_FILE_NOT_NULL=Remote file is null
+JoinGroupWizard_CONNECT=Collaboration Connect
+JoinGroupWizard_COULD_NOT_CONNECT=Could not connect to {0}
+JoinGroupWizardAction_PROJECT_MENU_CONNECT_TEXT=Connect Project to Collaboration Group...
+JoinGroupWizardAction_PROJECT_MENU_DISCONNECT_TEXT=Disconnect Project
+JoinGroupWizardPage_COMPLETE_ACCOUNT_INFO=Complete account info and choose 'Finish' to login.
+JoinGroupWizardPage_CONNECT_GENERIC_TITLE=Connect Generic Client
+JoinGroupWizardPage_DEFAULT_SERVER=ecftcp://ecf.eclipse.org:3282/server
+JoinGroupWizardPage_GROUPID=Group ID:
+JoinGroupWizardPage_NICKNAME=Nickname:
+JoinGroupWizardPage_PROTOCOL=Protocol:
+JoinGroupWizardPage_TEMPLATE=ecftcp://<server>:<port>/<groupname>
+LineChatClientView_CHANGED_NAME_TO={0} changed name to {1}
+LineChatClientView_EXCEPTION_MSGBOX_TEXT=Exception creating instance of {0}. \nException:
+LineChatClientView_EXCEPTION_MSGBOX_TITLE=Make Object Exception
+LineChatClientView_EXCEPTION_SENDING_FILE=Exception {0} sending file {1}
+LineChatClientView_SEND_COMPLETED=\tSend of {0} completed
+LineChatClientView_SENDING_FILE=\tSending {0}
+LineChatClientView_TYPING={0} is typing...
+LineChatView_EXCEPTION_VIEW_NOT_INITIALIZED=View not initialized
+LineChatView_NO_CONNECT_MESSAGE=No collaboration sessions joined.\n\nTo join a project-specific collaboration session, select a project in either the Navigator or Package Explorer view,\nright-click to open context menu for project, and choose Communications->Connect Project to Collaboration Group...
+OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TEXT=Project {0} not connected to any collaboration session. To connect project, open context menu for project and choose Communications->Connect Project to Collaboration Group...
+OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TITLE=Project Not Connected to Collaboration Group
+SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TEXT=Not connected to any collaboration group. To connect, open Collaboration View
+SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TITLE=Not Connected to Collaboration Session
+SharedObjectContainerUI_JAVA_VERSION_LABEL=Java:
+SharedObjectContainerUI_LANGUAGE_LABEL=Language:
+SharedObjectContainerUI_OS_LABEL=OS:
+SharedObjectContainerUI_OSGI_VERSION_LABEL=OSGi Version:
+SharedObjectContainerUI_PROJECT_LABEL=Project:
+SharedObjectContainerUI_TIME_LABEL=Time:
+SharedObjectContainerUI_TIME_ZONE_LABEL=Time Zone:
+SharedObjectInputStream_EXCEPTION_NO_DATA=No data
SharedObjectMsg_EXCEPTION_METHOD_NOT_NULL=methodname cannot be null
SharedObjectMsg_EXCEPTION_NOT_SERIALIZABLE=Parameter {0} not Serializable
SharedObjectMsg_EXCEPTION_NULL_TARGET=Null target
+ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TEXT=Error: {0}
+ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TITLE=Error in Open URL
+ShowURLSharedObject_STATUS_OPENURL_MESSAGE=Error in openURL
TransactionSharedObject_EXCEPTION_FROM_ABORT=Abort received
TransactionSharedObject_EXCEPTION_INTERUPTED=Wait interrupted
TransactionSharedObject_EXCEPTION_ON_COMMIT_MESSAGE=Exception sending commit message
TransactionSharedObject_EXCEPTION_TIMEOUT=Timeout waiting for create responses
+URIClientConnectAction_CONNECT_JOB_NAME=Connect for {0}
+URLListFieldEditor_BUTTON_REMOVE_TEXT=Remove
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AccountStart.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AccountStart.java
index 9dd502cdf..fb5c7f648 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AccountStart.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AccountStart.java
@@ -18,11 +18,12 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
public class AccountStart {
- private static final String SAVED = "saved-connections";
+ private static final String SAVED = "saved-connections"; //$NON-NLS-1$
private static final int BACKING_STORE_SAVE_ERROR = 1001;
private static final int BACKING_STORE_LOAD_ERROR = 1002;
private Map connectionDetails = new HashMap();
@@ -55,7 +56,7 @@ public class AccountStart {
ClientPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR, ClientPlugin.PLUGIN_ID,
BACKING_STORE_LOAD_ERROR,
- "Exception loading connection details", e));
+ Messages.AccountStart_EXCEPTION_LOADING_CONNECTION_DETAILS, e));
}
}
@@ -83,7 +84,7 @@ public class AccountStart {
ClientPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR, ClientPlugin.PLUGIN_ID,
BACKING_STORE_SAVE_ERROR,
- "Exception saving connection details", e));
+ Messages.AccountStart_EXCEPTION_SAVING_CONNECTION_DETAILS, e));
}
}
@@ -98,17 +99,17 @@ public class AccountStart {
Preferences node = connections.node(target);
if (node != null) {
addConnectionDetails(new ConnectionDetails(node.get(
- ConnectionDetails.CONTAINER_TYPE, ""), node.get(
- ConnectionDetails.TARGET_URI, ""), node.get(
- ConnectionDetails.NICKNAME, ""), node.get(
- ConnectionDetails.PASSWORD, "")));
+ ConnectionDetails.CONTAINER_TYPE, ""), node.get( //$NON-NLS-1$
+ ConnectionDetails.TARGET_URI, ""), node.get( //$NON-NLS-1$
+ ConnectionDetails.NICKNAME, ""), node.get( //$NON-NLS-1$
+ ConnectionDetails.PASSWORD, ""))); //$NON-NLS-1$
}
}
} catch (BackingStoreException e) {
ClientPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR, ClientPlugin.PLUGIN_ID,
BACKING_STORE_LOAD_ERROR,
- "Exception loading connection details", e));
+ Messages.AccountStart_EXCEPTION_LOADING_CONNECTION_DETAILS, e));
}
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AutoLoginPreferencePage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AutoLoginPreferencePage.java
index 086fb8cb0..b77220a79 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AutoLoginPreferencePage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/AutoLoginPreferencePage.java
@@ -13,6 +13,7 @@ package org.eclipse.ecf.internal.example.collab.start;
import java.util.Collection;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.swt.widgets.Button;
@@ -35,8 +36,8 @@ public class AutoLoginPreferencePage extends FieldEditorPreferencePage
}
protected void createFieldEditors() {
- addField(new URLListFieldEditor("urilisteditor",
- "The following will be connected upon ECF start",
+ addField(new URLListFieldEditor("urilisteditor", //$NON-NLS-1$
+ Messages.AutoLoginPreferencePage_URILISTEDITOR_TEXT,
getFieldEditorParent()));
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/CollabStart.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/CollabStart.java
index 012014236..0d7d9359d 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/CollabStart.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/CollabStart.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.ecf.core.start.IECFStart;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
import org.eclipse.ecf.internal.example.collab.CollabClient;
+import org.eclipse.ecf.internal.example.collab.Messages;
public class CollabStart implements IECFStart {
Discovery discovery = null;
@@ -33,9 +34,9 @@ public class CollabStart implements IECFStart {
}
} catch (Exception e) {
return new Status(IStatus.ERROR, ClientPlugin.PLUGIN_ID, 200,
- "Exception in starting connection", e);
+ Messages.CollabStart_EXCEPTION_STARTING_CONNECTION, e);
}
- return new Status(IStatus.OK, ClientPlugin.PLUGIN_ID, 100, "OK", null);
+ return new Status(IStatus.OK, ClientPlugin.PLUGIN_ID, 100, Messages.CollabStart_STATUS_OK_MESSAGE, null);
}
private void startConnection(ConnectionDetails details) throws Exception {
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/ConnectionDetails.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/ConnectionDetails.java
index 947a94475..c1aa60de3 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/ConnectionDetails.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/ConnectionDetails.java
@@ -12,10 +12,10 @@ package org.eclipse.ecf.internal.example.collab.start;
public class ConnectionDetails {
- public static final String CONTAINER_TYPE = "containerType";
- public static final String TARGET_URI = "targetURI";
- public static final String NICKNAME = "nickname";
- public static final String PASSWORD = "password";
+ public static final String CONTAINER_TYPE = "containerType"; //$NON-NLS-1$
+ public static final String TARGET_URI = "targetURI"; //$NON-NLS-1$
+ public static final String NICKNAME = "nickname"; //$NON-NLS-1$
+ public static final String PASSWORD = "password"; //$NON-NLS-1$
String containerType;
String targetURI;
@@ -59,11 +59,11 @@ public class ConnectionDetails {
}
public String toString() {
- StringBuffer sb = new StringBuffer("ConnectionDetails[");
- sb.append(CONTAINER_TYPE).append("=").append(containerType).append(";");
- sb.append(TARGET_URI).append("=").append(targetURI).append(";");
- sb.append(NICKNAME).append("=").append(nickname).append(";");
- sb.append(PASSWORD).append("=").append(password).append("]");
+ StringBuffer sb = new StringBuffer("ConnectionDetails["); //$NON-NLS-1$
+ sb.append(CONTAINER_TYPE).append("=").append(containerType).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(TARGET_URI).append("=").append(targetURI).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(NICKNAME).append("=").append(nickname).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(PASSWORD).append("=").append(password).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
return sb.toString();
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/Discovery.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/Discovery.java
index eb9784c5c..e3da7cd04 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/Discovery.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/Discovery.java
@@ -28,7 +28,7 @@ public class Discovery {
}
private void startDiscovery() throws Exception {
- container = ContainerFactory.getDefault().createContainer("ecf.discovery.jmdns");
+ container = ContainerFactory.getDefault().createContainer("ecf.discovery.jmdns"); //$NON-NLS-1$
container.connect(null, null);
discoveryContainer = (IDiscoveryContainerAdapter) container.getAdapter(IDiscoveryContainerAdapter.class);
discoveryContainer.addServiceTypeListener(new CollabServiceTypeListener());
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/URLListFieldEditor.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/URLListFieldEditor.java
index 4adfd4a24..852577d81 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/URLListFieldEditor.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/start/URLListFieldEditor.java
@@ -13,6 +13,8 @@ package org.eclipse.ecf.internal.example.collab.start;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.jface.resource.JFaceResources;
@@ -103,7 +105,7 @@ public class URLListFieldEditor extends FieldEditor {
}
private void createButtons(Composite box) {
- removeButton = createPushButton(box, "Remove");
+ removeButton = createPushButton(box, Messages.URLListFieldEditor_BUTTON_REMOVE_TEXT);
}
private Button createPushButton(Composite parent, String key) {
@@ -186,7 +188,7 @@ public class URLListFieldEditor extends FieldEditor {
Collection contents = as.getConnectionDetails();
for (Iterator i = contents.iterator(); i.hasNext();) {
ConnectionDetails cd = (ConnectionDetails) i.next();
- String uri = cd.getContainerType() + ":" + cd.getTargetURI();
+ String uri = cd.getContainerType() + ":" + cd.getTargetURI(); //$NON-NLS-1$
list.add(uri);
list.setData(uri, cd);
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
index 09e138d15..15bf54014 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
@@ -57,6 +57,7 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.StyleRange;
@@ -98,7 +99,7 @@ import org.eclipse.ui.views.IViewDescriptor;
import org.eclipse.ui.views.IViewRegistry;
public class ChatComposite extends Composite {
- private static final String CHAT_OUTPUT_FONT = "ChatFont";
+ private static final String CHAT_OUTPUT_FONT = "ChatFont"; //$NON-NLS-1$
final LineChatClientView view;
private Color meColor = null;
private Color otherColor = null;
@@ -111,19 +112,16 @@ public class ChatComposite extends Composite {
Action outputCopy = null;
Action outputPaste = null;
Action outputSelectAll = null;
- Action sendComponent = null;
- Action sendComponentToServer = null;
Action sendFileToGroup = null;
Action sendFileToGroupAndLaunch = null;
Action sendMessage = null;
- Action startProgram = null;
Action closeGroup = null;
Action sendShowViewRequest = null;
Action showChatWindow;
- protected final String TEXT_INPUT_INIT = MessageLoader.getString("LineChatClientView.textinputinit");
+ protected final String TEXT_INPUT_INIT = MessageLoader.getString("LineChatClientView.textinputinit"); //$NON-NLS-1$
protected static final int DEFAULT_INPUT_HEIGHT = 25;
protected static final int DEFAULT_INPUT_SEPARATOR = 5;
@@ -176,7 +174,7 @@ public class ChatComposite extends Composite {
textoutput = createStyledTextWidget(sf);
textoutput.setLayoutData(new GridData(SWT.FILL));
final String fontName = ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_CHAT_FONT);
- if (!(fontName == null) && !(fontName.equals(""))) {
+ if (!(fontName == null) && !(fontName.equals(""))) { //$NON-NLS-1$
final FontRegistry fr = ClientPlugin.getDefault().getFontRegistry();
final FontData[] newFont = {new FontData(fontName)};
@@ -253,10 +251,10 @@ public class ChatComposite extends Composite {
result.setDocument(new Document());
return result.getTextWidget();
} catch (final Exception e) {
- ClientPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, ClientPlugin.PLUGIN_ID, IStatus.WARNING, "Source viewer not available. Hyperlinking will be disabled.", e));
+ ClientPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, ClientPlugin.PLUGIN_ID, IStatus.WARNING, MessageLoader.getString("ChatComposite.NO_HYPERLINKING"), e)); //$NON-NLS-1$
return new StyledText(parent, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
} catch (final NoClassDefFoundError e) {
- ClientPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, ClientPlugin.PLUGIN_ID, IStatus.WARNING, "Source viewer not available. Hyperlinking will be disabled.", e));
+ ClientPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, ClientPlugin.PLUGIN_ID, IStatus.WARNING, MessageLoader.getString("ChatComposite.NO_HYPERLINKING"), e)); //$NON-NLS-1$
return new StyledText(parent, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
}
}
@@ -387,7 +385,7 @@ public class ChatComposite extends Composite {
}
private void sendImage(final User toUser) {
- if (MessageDialog.openQuestion(null, "Screen Capture", "To initiate screen capture, click OK, wait 5 seconds,\nand then select capture region with arrow cursor.")) {
+ if (MessageDialog.openQuestion(null, MessageLoader.getString("ChatComposite.DIALOG_SCREEN_CAPTURE_TITLE"), MessageLoader.getString("ChatComposite.DIALOG_SCREEN_CAPTURE_TEXT"))) { //$NON-NLS-1$ //$NON-NLS-2$
final Job job = new ScreenCaptureJob(getDisplay(), toUser.getUserID(), toUser.getNickname(), new IImageSender() {
public void sendImage(ID targetID, ImageData imageData) {
view.lch.sendImage(toUser.getUserID(), imageData);
@@ -411,7 +409,7 @@ public class ChatComposite extends Composite {
sendImage(user);
}
};
- sendImageToUser.setText("Send Screen Capture to " + user.getNickname());
+ sendImageToUser.setText(NLS.bind(MessageLoader.getString("ChatComposite.SEND_SCREEN_CAPTURE_TEXT"), user.getNickname())); //$NON-NLS-1$
sendImageToUser.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
man.add(sendImageToUser);
@@ -420,7 +418,7 @@ public class ChatComposite extends Composite {
sendFileToUser(user, false);
}
};
- sendFileToUser.setText("Send File to " + user.getNickname() + "...");
+ sendFileToUser.setText(NLS.bind(MessageLoader.getString("ChatComposite.SEND_FILE_TEXT"), user.getNickname())); //$NON-NLS-1$
sendFileToUser.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
// XXX disabled
sendFileToUser.setEnabled(false);
@@ -431,7 +429,7 @@ public class ChatComposite extends Composite {
sendFileToUser(user, true);
}
};
- sendFileToUserAndLaunch.setText("Send File to " + user.getNickname() + " and launch...");
+ sendFileToUserAndLaunch.setText(NLS.bind(MessageLoader.getString("ChatComposite.SEND_FILE_AND_LAUNCH_TEXT"), user.getNickname())); //$NON-NLS-1$
sendFileToUserAndLaunch.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
// XXX disabled
sendFileToUserAndLaunch.setEnabled(false);
@@ -442,90 +440,41 @@ public class ChatComposite extends Composite {
sendCoBrowseToUser(user);
}
};
- coBrowseToUser.setText("Co-Browse Web with " + user.getNickname() + "...");
+ coBrowseToUser.setText(NLS.bind(MessageLoader.getString("ChatComposite.COBROWSE_TEXT"), user.getNickname())); //$NON-NLS-1$
man.add(coBrowseToUser);
- /*
- * Action startProgramToUser = new Action() { public void run() {
- * startProgram(user); } }; startProgramToUser.setText( "Start
- * Program for " + user.getNickname() + "...");
- * man.add(startProgramToUser);
- */
man.add(new Separator());
- /*
- * Action startAppShareToUser = new Action() { public void run() {
- * sendAppShare(user.getUserID()); } };
- */
- // startAppShareToUser.setText("Start Application Share with "
- // + user.getNickname() + "...");
- // man.add(startAppShareToUser);
- // startAppShareToUser.setEnabled(Platform.getOS().equalsIgnoreCase(Platform.OS_WIN32)&&
- // !LineChatView.appShareActive());
man.add(new Separator());
final Action ringUser = new Action() {
public void run() {
sendRingMessageToUser(user);
}
};
- ringUser.setText("Ring " + user.getNickname() + "...");
+ ringUser.setText(NLS.bind(MessageLoader.getString("ChatComposite.RING_OTHER_TEXT"), user.getNickname())); //$NON-NLS-1$
man.add(ringUser);
final Action sendMessageToUser = new Action() {
public void run() {
sendPrivateTextMsg(user);
}
};
- sendMessageToUser.setText("Send Private Message to " + user.getNickname() + "...");
+ sendMessageToUser.setText(NLS.bind(MessageLoader.getString("ChatComposite.SEND_PRIVATE_MESSAGE_TEXT"), user.getNickname())); //$NON-NLS-1$
man.add(sendMessageToUser);
- /*
- * Action sendCVSUpdateRequest = new Action() { public void run() {
- * sendCVSUpdateRequest(user); } };
- */
- // sendCVSUpdateRequest.setText("Send CVS Update Request to
- // "+user.getNickname()+"...");
- // man.add(sendCVSUpdateRequest);
final Action sendShowViewRequest = new Action() {
public void run() {
sendShowViewRequest(user);
}
};
- sendShowViewRequest.setText("Send Show View Request to " + user.getNickname() + "...");
+ sendShowViewRequest.setText(NLS.bind(MessageLoader.getString("ChatComposite.SEND_SHOW_VIEW_REQUEST_TEXT"), user.getNickname())); //$NON-NLS-1$
man.add(sendShowViewRequest);
- /*
- * man.add(new Separator()); Action createProxy = new Action() {
- * public void run() { sendEclipseComponent(user); } };
- * createProxy.setText("Send EclipseProjectComponent to " +
- * user.getNickname() + "..."); man.add(createProxy);
- *
- * Action messageProxy = new Action() { public void run() {
- * messageEclipseComponent(user); } }; messageProxy.setText("Message
- * EclipseProjectComponent for " + user.getNickname() + "...");
- * messageProxy.setEnabled(this.view.proxyObjects.size() > 0);
- *
- * man.add(messageProxy); Action removeProxy = new Action() { public
- * void run() { removeEclipseComponent(user); } };
- * removeProxy.setText("Remove EclipseProjectComponent for " +
- * user.getNickname() + "...");
- * removeProxy.setEnabled(this.view.proxyObjects.size() > 0);
- * man.add(removeProxy);
- */
- /*
- * man.add(new Separator());
- *
- * Action createObject = new Action() { public void run() {
- * sendRepObjectToGroup(user); } }; createObject.setText( "Send
- * Replicated Object to " + user.getNickname() + "...");
- * man.add(createObject);
- */
-
} else {
// This is a menu to us
final Action sendMessageToUser = new Action() {
public void run() {
- MessageDialog.openError(null, "Message to " + user.getNickname(), "Talking to yourself again aren't you!!\n\n\tUsername: " + user.getNickname() + "\n\tID: " + user.getUserID().getName());
+ MessageDialog.openError(null, MessageLoader.getString("ChatComposite.MESSAGE_TO_TITLE") + user.getNickname(), MessageLoader.getString("ChatComposite.MESSAGE_TO_TEXT") + user.getNickname() + "\n\tID: " + user.getUserID().getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
};
- sendMessageToUser.setText("Send Message to Yourself");
+ sendMessageToUser.setText(MessageLoader.getString("ChatComposite.MENU_SEND_MESSAGE_TO_YOURSELF_TEXT")); //$NON-NLS-1$
man.add(sendMessageToUser);
}
// other plug-ins can contribute there actions here
@@ -596,7 +545,7 @@ public class ChatComposite extends Composite {
}
public ISelection getSelection() {
- ISelection selection = new TextSelection(textoutput.getSelectionRange().x, textoutput.getSelectionRange().y);
+ final ISelection selection = new TextSelection(textoutput.getSelectionRange().x, textoutput.getSelectionRange().y);
return selection;
}
@@ -606,7 +555,7 @@ public class ChatComposite extends Composite {
public void setSelection(ISelection selection) {
if (selection instanceof ITextSelection) {
- ITextSelection textSelection = (ITextSelection) selection;
+ final ITextSelection textSelection = (ITextSelection) selection;
textoutput.setSelection(textSelection.getOffset(), textSelection.getOffset() + textSelection.getLength());
}
}
@@ -640,16 +589,16 @@ public class ChatComposite extends Composite {
outputSelectAll();
}
};
- outputSelectAll.setText(MessageLoader.getString("LineChatClientView.contextmenu.selectall"));
- outputSelectAll.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.selectall.tooltip"));
+ outputSelectAll.setText(MessageLoader.getString("LineChatClientView.contextmenu.selectall")); //$NON-NLS-1$
+ outputSelectAll.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.selectall.tooltip")); //$NON-NLS-1$
outputSelectAll.setAccelerator(SWT.CTRL | 'A');
outputCopy = new Action() {
public void run() {
outputCopy();
}
};
- outputCopy.setText(MessageLoader.getString("LineChatClientView.contextmenu.copy"));
- outputCopy.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.copy.tooltip"));
+ outputCopy.setText(MessageLoader.getString("LineChatClientView.contextmenu.copy")); //$NON-NLS-1$
+ outputCopy.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.copy.tooltip")); //$NON-NLS-1$
outputCopy.setAccelerator(SWT.CTRL | 'C');
outputCopy.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
@@ -658,16 +607,16 @@ public class ChatComposite extends Composite {
outputClear();
}
};
- outputClear.setText(MessageLoader.getString("LineChatClientView.contextmenu.clear"));
- outputClear.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.clear.tooltip"));
+ outputClear.setText(MessageLoader.getString("LineChatClientView.contextmenu.clear")); //$NON-NLS-1$
+ outputClear.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.clear.tooltip")); //$NON-NLS-1$
outputPaste = new Action() {
public void run() {
outputPaste();
}
};
- outputPaste.setText(MessageLoader.getString("LineChatClientView.contextmenu.paste"));
- outputPaste.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.paste.tooltip"));
+ outputPaste.setText(MessageLoader.getString("LineChatClientView.contextmenu.paste")); //$NON-NLS-1$
+ outputPaste.setToolTipText(MessageLoader.getString("LineChatClientView.contextmenu.paste.tooltip")); //$NON-NLS-1$
outputPaste.setAccelerator(SWT.CTRL | 'V');
outputPaste.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
@@ -676,7 +625,7 @@ public class ChatComposite extends Composite {
sendFileToGroup(false);
}
};
- sendFileToGroup.setText(MessageLoader.getString("LineChatClientView.contextmenu.sendfile"));
+ sendFileToGroup.setText(MessageLoader.getString("LineChatClientView.contextmenu.sendfile")); //$NON-NLS-1$
sendFileToGroup.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
// XXX disabled
sendFileToGroup.setEnabled(false);
@@ -685,20 +634,13 @@ public class ChatComposite extends Composite {
sendCoBrowseToUser(null);
}
};
- coBrowseURL.setText(MessageLoader.getString("LineChatClientView.contextmenu.cobrowse"));
-
- startProgram = new Action() {
- public void run() {
- startProgram(null);
- }
- };
- startProgram.setText(MessageLoader.getString("LineChatClientView.contextmenu.runprogram"));
+ coBrowseURL.setText(MessageLoader.getString("LineChatClientView.contextmenu.cobrowse")); //$NON-NLS-1$
appShare = new Action() {
public void run() {
}
};
- appShare.setText(MessageLoader.getString("LineChatClientView.contextmenu.appshare"));
+ appShare.setText(MessageLoader.getString("LineChatClientView.contextmenu.appshare")); //$NON-NLS-1$
appShare.setEnabled(Platform.getOS().equalsIgnoreCase(Platform.OS_WIN32));
sendMessage = new Action() {
@@ -706,20 +648,7 @@ public class ChatComposite extends Composite {
sendMessageToGroup();
}
};
- sendMessage.setText(MessageLoader.getString("LineChatClientView.contextmenu.sendmessage"));
- sendComponent = new Action() {
- public void run() {
- sendRepObjectToGroup(null);
- }
- };
- sendComponent.setText(MessageLoader.getString("LineChatClientView.contextmenu.repobject"));
- sendComponentToServer = new Action() {
- public void run() {
- sendRepObjectToServer();
- }
- };
- sendComponentToServer.setText(MessageLoader.getString("LineChatClientView.contextmenu.repobjectserver"));
- sendComponentToServer.setEnabled(false);
+ sendMessage.setText(MessageLoader.getString("LineChatClientView.contextmenu.sendmessage")); //$NON-NLS-1$
// Close projectGroup
closeGroup = new Action() {
@@ -727,7 +656,7 @@ public class ChatComposite extends Composite {
closeProjectGroup(null);
}
};
- closeGroup.setText(MessageLoader.getString("LineChatClientView.contextmenu.leaveGroup"));
+ closeGroup.setText(MessageLoader.getString("LineChatClientView.contextmenu.leaveGroup")); //$NON-NLS-1$
closeGroup.setEnabled(true);
sendShowViewRequest = new Action() {
@@ -735,7 +664,7 @@ public class ChatComposite extends Composite {
sendShowViewRequest(null);
}
};
- sendShowViewRequest.setText(MessageLoader.getString("LineChatClientView.contextmenu.sendShowViewRequest"));
+ sendShowViewRequest.setText(MessageLoader.getString("LineChatClientView.contextmenu.sendShowViewRequest")); //$NON-NLS-1$
sendShowViewRequest.setEnabled(true);
if (chatWindow != null) {
@@ -746,7 +675,7 @@ public class ChatComposite extends Composite {
chatWindow.getShell().forceActive();
}
};
- showChatWindow.setText("Show chat window");
+ showChatWindow.setText(MessageLoader.getString("ChatComposite.SHOW_CHAT_WINDOW_TEXT")); //$NON-NLS-1$
}
}
@@ -795,7 +724,7 @@ public class ChatComposite extends Composite {
}
public void dispose() {
- for (Iterator i = images.values().iterator(); i.hasNext();)
+ for (final Iterator i = images.values().iterator(); i.hasNext();)
((Image) i.next()).dispose();
images = null;
@@ -808,7 +737,7 @@ public class ChatComposite extends Composite {
if (element instanceof IViewRegistry)
return ((IViewRegistry) element).getCategories();
else if (element instanceof IViewCategory) {
- IViewDescriptor[] children = ((IViewCategory) element).getViews();
+ final IViewDescriptor[] children = ((IViewCategory) element).getViews();
for (int i = 0; i < children.length; ++i)
parents.put(children[i], element);
@@ -845,11 +774,11 @@ public class ChatComposite extends Composite {
parents.clear();
}
});
- dlg.setTitle(MessageLoader.getString("LineChatClientView.contextmenu.sendShowViewRequest"));
- dlg.setMessage(MessageLoader.getString("LineChatClientView.contextmenu.sendShowViewRequest.dialog.title"));
+ dlg.setTitle(MessageLoader.getString("LineChatClientView.contextmenu.sendShowViewRequest")); //$NON-NLS-1$
+ dlg.setMessage(MessageLoader.getString("LineChatClientView.contextmenu.sendShowViewRequest.dialog.title")); //$NON-NLS-1$
dlg.addFilter(new ViewerFilter() {
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof IViewDescriptor && "org.eclipse.ui.internal.introview".equals(((IViewDescriptor) element).getId()))
+ if (element instanceof IViewDescriptor && "org.eclipse.ui.internal.introview".equals(((IViewDescriptor) element).getId())) //$NON-NLS-1$
return false;
else
return true;
@@ -860,16 +789,16 @@ public class ChatComposite extends Composite {
public IStatus validate(Object[] selection) {
for (int i = 0; i < selection.length; ++i)
if (!(selection[i] instanceof IViewDescriptor))
- return new Status(Status.ERROR, ClientPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null);
+ return new Status(Status.ERROR, ClientPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
- return new Status(Status.OK, ClientPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null);
+ return new Status(Status.OK, ClientPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
}
});
final IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
dlg.setInput(reg);
final IDialogSettings dlgSettings = ClientPlugin.getDefault().getDialogSettings();
- final String DIALOG_SETTINGS = "SendShowViewRequestDialog";
- final String SELECTION_SETTING = "SELECTION";
+ final String DIALOG_SETTINGS = "SendShowViewRequestDialog"; //$NON-NLS-1$
+ final String SELECTION_SETTING = "SELECTION"; //$NON-NLS-1$
IDialogSettings section = dlgSettings.getSection(DIALOG_SETTINGS);
if (section == null)
section = dlgSettings.addNewSection(DIALOG_SETTINGS);
@@ -905,7 +834,7 @@ public class ChatComposite extends Composite {
}
protected void closeProjectGroup(User user) {
- if (MessageDialog.openConfirm(null, MessageLoader.getString("LineChatClientView.contextmenu.closeMessageTitle"), MessageLoader.getString("LineChatClientView.contextmenu.closeMessageMessage") + this.view.name + "'?")) {
+ if (MessageDialog.openConfirm(null, MessageLoader.getString("LineChatClientView.contextmenu.closeMessageTitle"), MessageLoader.getString("LineChatClientView.contextmenu.closeMessageMessage") + this.view.name + "'?")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
this.view.lch.chatGUIDestroy();
}
@@ -913,8 +842,8 @@ public class ChatComposite extends Composite {
}
protected void outputClear() {
- if (MessageDialog.openConfirm(null, "Confirm Clear Text Output", "Are you sure you want to clear output?"))
- textoutput.setText("");
+ if (MessageDialog.openConfirm(null, MessageLoader.getString("ChatComposite.DIALOG_CONFIRM_CLEAR_TITLE"), MessageLoader.getString("ChatComposite.DIALOG_CONFIRM_CLEAR_TEXT"))) //$NON-NLS-1$ //$NON-NLS-2$
+ textoutput.setText(""); //$NON-NLS-1$
}
protected void outputCopy() {
@@ -968,10 +897,10 @@ public class ChatComposite extends Composite {
ChatComposite.this.view.createObject(null, org.eclipse.ecf.example.collab.share.io.EclipseFileTransfer.class.getName(), new String[] {FileSenderUI.class.getName(), ID.class.getName(), java.io.InputStream.class.getName(), FileTransferParams.class.getName(), ID.class.getName()}, args);
}
}
- }, "FileRepObject creator").start();
+ }, "FileRepObject creator").start(); //$NON-NLS-1$
} catch (final Exception e) {
if (this.view.lch != null)
- this.view.lch.chatException(e, "readStreamAndSend()");
+ this.view.lch.chatException(e, "readStreamAndSend()"); //$NON-NLS-1$
}
}
@@ -980,10 +909,10 @@ public class ChatComposite extends Composite {
String res = null;
ID userID = null;
if (user != null) {
- res = getID("Co-Browse URL to " + user.getNickname(), "URL to Browse:", "http://");
+ res = getID(NLS.bind(MessageLoader.getString("ChatComposite.COBROWSE_TITLE"), user.getNickname()), MessageLoader.getString("ChatComposite.COBROWSE_URL_TEXT"), "http://"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
userID = user.getUserID();
} else {
- res = getID("Co-Browse URL", "URL to Browse:", "http://");
+ res = getID(MessageLoader.getString("ChatComposite.DIALOG_COBROWSE_TITLE"), MessageLoader.getString("ChatComposite.DIALOG_COBROWSE_TEXT"), MessageLoader.getString("ChatComposite.DIALOG_COBROWSE_HTTPPREFIX")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (res != null) {
final Object[] args = {userID, res};
@@ -999,11 +928,11 @@ public class ChatComposite extends Composite {
} catch (final IOException e) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- MessageDialog.openError(null, "Local File Copy Error", "Exception copying file locally. Cancelling file transfer.\nException: " + e);
+ MessageDialog.openError(null, MessageLoader.getString("ChatComposite.DIALOG_COPY_ERROR_TITLE"), MessageLoader.getString("ChatComposite.DIALOG_COPY_ERROR_TEXT") + e); //$NON-NLS-1$ //$NON-NLS-2$
}
});
if (this.view.lch != null)
- this.view.lch.chatException(e, "sendFile(" + pathName + "/" + fileName + ")");
+ this.view.lch.chatException(e, "sendFile(" + pathName + "/" + fileName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return;
}
@@ -1013,19 +942,19 @@ public class ChatComposite extends Composite {
} catch (final java.io.FileNotFoundException e) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- MessageDialog.openError(null, "File Open Error", "File '" + fileName + "' not found\nException: " + e);
+ MessageDialog.openError(null, MessageLoader.getString("ChatComposite.DIALOG_FILE_OPEN_ERROR_TITLE"), NLS.bind(MessageLoader.getString("ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT"), fileName, e.getLocalizedMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
});
if (this.view.lch != null)
- this.view.lch.chatException(e, "File '" + fileName + "' not found.");
+ this.view.lch.chatException(e, NLS.bind(MessageLoader.getString("ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT1"), fileName)); //$NON-NLS-1$
}
readStreamAndSend(ins, fileName, startDate, target, launch);
}
protected void sendFileToGroup(boolean launch) {
final FileDialog fd = new FileDialog(Display.getDefault().getActiveShell(), SWT.OPEN);
- fd.setFilterPath(System.getProperty("user.dir"));
- fd.setText("Select File for Group");
+ fd.setFilterPath(System.getProperty("user.dir")); //$NON-NLS-1$
+ fd.setText(MessageLoader.getString("ChatComposite.SELECT_FILE_FOR_GROUP_TEXT")); //$NON-NLS-1$
final String res = fd.open();
if (res != null) {
final java.io.File selected = new java.io.File(res);
@@ -1036,8 +965,8 @@ public class ChatComposite extends Composite {
protected void sendFileToUser(User user, boolean launch) {
final FileDialog fd = new FileDialog(Display.getDefault().getActiveShell(), SWT.OPEN);
- fd.setFilterPath(System.getProperty("user.dir"));
- fd.setText("Select File for " + user.getNickname());
+ fd.setFilterPath(System.getProperty("user.dir")); //$NON-NLS-1$
+ fd.setText(NLS.bind(MessageLoader.getString("ChatComposite.SELECt_FILE_TITLE"), user.getNickname())); //$NON-NLS-1$
final String res = fd.open();
if (res != null) {
final java.io.File selected = new java.io.File(res);
@@ -1047,8 +976,8 @@ public class ChatComposite extends Composite {
}
protected void sendMessageToGroup() {
- final String res = getID("Send Message to Group", "Message For Group:", "");
- if (res != null & !res.equals("")) {
+ final String res = getID(MessageLoader.getString("ChatComposite.MESSAGE_TO_GROUP_TITLE"), MessageLoader.getString("ChatComposite.MESSAGE_TO_GROUP_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (res != null & !res.equals("")) { //$NON-NLS-1$
final String[] args = {res, this.view.userdata.getNickname()};
this.view.createObject(null, LineChatClientView.MESSAGECLASSNAME, args);
}
@@ -1056,15 +985,15 @@ public class ChatComposite extends Composite {
protected void sendPrivateTextMsg(User data) {
if (this.view.lch != null) {
- final String res = getID("Private Message for " + data.getNickname(), "Message: ", "");
+ final String res = getID(MessageLoader.getString("ChatComposite.PRIVATE_MESSAGE_TITLE") + data.getNickname(), MessageLoader.getString("ChatComposite.PRIVATE_MESSAGE_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (res != null)
this.view.lch.sendPrivateMessageToUser(data, res);
}
}
protected void sendRepObjectToGroup(User user) {
- final String result = getID("Send Replicated Object", "Replicated Object Class and Args (separated by whitespace):", "");
- if (result != null && !result.equals("")) {
+ final String result = getID(MessageLoader.getString("ChatComposite.SEND_REPLICATED_OBJECT_TITLE"), MessageLoader.getString("ChatComposite.SEND_REPLICATED_OBJECT_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (result != null && !result.equals("")) { //$NON-NLS-1$
this.view.createObject(null, getCommand(result), getArgs(result));
}
}
@@ -1077,9 +1006,9 @@ public class ChatComposite extends Composite {
String res = null;
if (this.view.lch != null) {
if (data != null) {
- res = getID("Ring " + data.getNickname(), "Ring Message: ", "");
+ res = getID(MessageLoader.getString("ChatComposite.RING_TITLE") + data.getNickname(), MessageLoader.getString("ChatComposite.RING_MESSAGE_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- res = getID("Ring Group", "Ring Message: ", "");
+ res = getID(MessageLoader.getString("ChatComposite.RING_GROUP_TITLE"), MessageLoader.getString("ChatComposite.RING_MESSAGE_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (res != null)
this.view.lch.sendRingMessageToUser(data, res);
@@ -1090,9 +1019,9 @@ public class ChatComposite extends Composite {
String res = null;
ID receiver = null;
if (ud == null) {
- res = getID("Start Program for Group", "Program to Start:", "");
+ res = getID(MessageLoader.getString("ChatComposite.START_PROGRAM_GROUP_TITLE"), MessageLoader.getString("ChatComposite.START_PROGRAM_GROUP_TEXT"), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- res = getID("Start Program for " + ud.getNickname(), "Program to Start for " + ud.getNickname() + ":", "");
+ res = getID(MessageLoader.getString("ChatComposite.START_PROGRAM_TITLE") + ud.getNickname(), MessageLoader.getString("ChatComposite.START_PROGRAM_TEXT") + ud.getNickname() + ":", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
receiver = ud.getUserID();
}
if (res != null)
@@ -1140,7 +1069,7 @@ public class ChatComposite extends Composite {
public void propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
if (event.getProperty().equals(ClientPlugin.PREF_CHAT_FONT)) {
final String fontName = ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_CHAT_FONT);
- if (!(fontName == null) && !(fontName.equals(""))) {
+ if (!(fontName == null) && !(fontName.equals(""))) { //$NON-NLS-1$
final FontRegistry fr = ClientPlugin.getDefault().getFontRegistry();
final FontData[] newFont = {new FontData(fontName)};
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatWindow.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatWindow.java
index 4bb2f4d2e..026a042e9 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatWindow.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatWindow.java
@@ -11,9 +11,11 @@
package org.eclipse.ecf.internal.example.collab.ui;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ecf.ui.SharedImages;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.window.ApplicationWindow;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.ShellAdapter;
@@ -28,18 +30,15 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-/**
- * @author pnehrer
- */
public class ChatWindow extends ApplicationWindow {
private static final long FLASH_INTERVAL = 600;
- private LineChatClientView view;
+ private final LineChatClientView view;
- private TableViewer table;
+ private final TableViewer table;
- private String initText;
+ private final String initText;
private ChatComposite chat;
@@ -51,7 +50,7 @@ public class ChatWindow extends ApplicationWindow {
private final Runnable flipImage = new Runnable() {
public void run() {
- Shell shell = getShell();
+ final Shell shell = getShell();
if (shell != null && !shell.isDisposed())
if (blank == shell.getImage()) {
if (image != null && !image.isDisposed())
@@ -65,8 +64,7 @@ public class ChatWindow extends ApplicationWindow {
private Flash flash;
- public ChatWindow(LineChatClientView view, TableViewer table,
- String initText) {
+ public ChatWindow(LineChatClientView view, TableViewer table, String initText) {
super(null);
this.view = view;
this.table = table;
@@ -81,13 +79,13 @@ public class ChatWindow extends ApplicationWindow {
*/
protected void configureShell(final Shell newShell) {
super.configureShell(newShell);
- newShell.setText("Team Chat: " + view.name);
+ newShell.setText(NLS.bind(Messages.ChatWindow_SHELL_TEXT, view.name));
image = SharedImages.getImage(SharedImages.IMG_USER_AVAILABLE);
newShell.setImage(image);
- RGB[] colors = new RGB[2];
+ final RGB[] colors = new RGB[2];
colors[0] = new RGB(0, 0, 0);
colors[1] = new RGB(255, 255, 255);
- ImageData data = new ImageData(16, 16, 1, new PaletteData(colors));
+ final ImageData data = new ImageData(16, 16, 1, new PaletteData(colors));
data.transparentPixel = 0;
blank = new Image(newShell.getDisplay(), data);
@@ -139,10 +137,9 @@ public class ChatWindow extends ApplicationWindow {
if (composite.isFocusControl())
return true;
else {
- Control[] children = composite.getChildren();
+ final Control[] children = composite.getChildren();
for (int i = 0; i < children.length; ++i)
- if (children[i] instanceof Composite
- && hasFocus((Composite) children[i]))
+ if (children[i] instanceof Composite && hasFocus((Composite) children[i]))
return true;
else if (children[i].isFocusControl())
return true;
@@ -164,8 +161,7 @@ public class ChatWindow extends ApplicationWindow {
synchronized (flash) {
if (flashing) {
flashing = false;
- if (!getShell().isDisposed() && image != null
- && !image.isDisposed())
+ if (!getShell().isDisposed() && image != null && !image.isDisposed())
getShell().setImage(image);
}
}
@@ -204,7 +200,7 @@ public class ChatWindow extends ApplicationWindow {
try {
while (!flashing && !disposed)
wait();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
break;
}
}
@@ -216,7 +212,7 @@ public class ChatWindow extends ApplicationWindow {
synchronized (this) {
try {
wait(FLASH_INTERVAL);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
break;
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ClientPreferencePage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ClientPreferencePage.java
index b2a8c609e..56171adce 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ClientPreferencePage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ClientPreferencePage.java
@@ -12,6 +12,7 @@
package org.eclipse.ecf.internal.example.collab.ui;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
@@ -68,33 +69,33 @@ public class ClientPreferencePage extends FieldEditorPreferencePage implements
public void createFieldEditors() {
addField(new BooleanFieldEditor(ClientPlugin.PREF_USE_CHAT_WINDOW,
- "Display ECF Collaboration outside of the workbench",
+ Messages.ClientPreferencePage_USE_CHAT_WINDOW_FIELD_TEXT,
getFieldEditorParent()));
addField(new BooleanFieldEditor(ClientPlugin.PREF_DISPLAY_TIMESTAMP,
- "Show time for each chat entry", getFieldEditorParent()));
+ Messages.ClientPreferencePage_SHOW_TIME_FOR_CHAT_FIELD, getFieldEditorParent()));
addField(new FontFieldEditor(ClientPlugin.PREF_CHAT_FONT,
- "Chat window font:", getFieldEditorParent()));
+ Messages.ClientPreferencePage_CHAT_WINDOW_FONT_FIELD, getFieldEditorParent()));
// addField(new
// BooleanFieldEditor(ClientPlugin.PREF_CONFIRM_FILE_RECEIVE, "Confirm
// before receiving file.", getFieldEditorParent()));
// addField(new SpacerFieldEditor(
// getFieldEditorParent()));
addField(new ColorFieldEditor(ClientPlugin.PREF_ME_TEXT_COLOR,
- "Chat Text Color For Me:", getFieldEditorParent()));
+ Messages.ClientPreferencePage_CHAT_COLOR_FOR_ME_FIELD, getFieldEditorParent()));
addField(new ColorFieldEditor(ClientPlugin.PREF_OTHER_TEXT_COLOR,
- "Chat Text Color For Other:", getFieldEditorParent()));
+ Messages.ClientPreferencePage_CHAT_TEXT_COLOR_FOR_OTHER_FIELD, getFieldEditorParent()));
addField(new ColorFieldEditor(ClientPlugin.PREF_SYSTEM_TEXT_COLOR,
- "Chat Text Color For System:", getFieldEditorParent()));
+ Messages.ClientPreferencePage_CHAT_COLOR_FOR_SYSTEM_FIELD, getFieldEditorParent()));
addField(new SpacerFieldEditor(getFieldEditorParent()));
playImmediate = new BooleanFieldEditor(
ClientPlugin.PREF_SHAREDEDITOR_PLAY_EVENTS_IMMEDIATELY,
- "Play shared editor events immediately", getFieldEditorParent());
+ Messages.ClientPreferencePage_PLAY_EDITOR_EVENTS_IMMEDIATELY, getFieldEditorParent());
addField(playImmediate);
askParent = getFieldEditorParent();
ask = new BooleanFieldEditor(
ClientPlugin.PREF_SHAREDEDITOR_ASK_RECEIVER,
- "Ask receiver for permission to display shared editor events",
+ Messages.ClientPreferencePage_ASK_RECEIVER_FOR_PERMISSION,
askParent);
addField(ask);
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java
index 9454783d6..733c9d3c8 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ConnectionDialog.java
@@ -20,6 +20,7 @@ import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.ContainerTypeDescription;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
import org.eclipse.ecf.internal.example.collab.ClientPluginConstants;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -55,43 +56,43 @@ public class ConnectionDialog extends TitleAreaDialog {
protected static final String CLASSNAME = JoinGroupWizardPage.class
.getName();
- protected static final String USER_NAME_SYSTEM_PROPERTY = "user.name";
+ protected static final String USER_NAME_SYSTEM_PROPERTY = "user.name"; //$NON-NLS-1$
- protected static final String ISSERVER_PROP_NAME = CLASSNAME + ".isServer";
+ protected static final String ISSERVER_PROP_NAME = CLASSNAME + ".isServer"; //$NON-NLS-1$
protected static final String DEFAULTGROUPID_PROP_NAME = CLASSNAME
- + ".defaultgroupid";
+ + ".defaultgroupid"; //$NON-NLS-1$
protected static final String EXAMPLEGROUPID_PROP_NAME = CLASSNAME
- + ".examplegroupid";
+ + ".examplegroupid"; //$NON-NLS-1$
protected static final String USEPASSWORD_PROP_NAME = CLASSNAME
- + ".usepassword";
+ + ".usepassword"; //$NON-NLS-1$
protected static final String USENICKNAME_PROP_NAME = CLASSNAME
- + ".usenickname";
+ + ".usenickname"; //$NON-NLS-1$
- protected static final String URLPREFIX_NAME = CLASSNAME + ".urlprefix";
+ protected static final String URLPREFIX_NAME = CLASSNAME + ".urlprefix"; //$NON-NLS-1$
protected static final String GROUPIDLABEL_PROP_NAME = CLASSNAME
- + ".groupIDLabel";
+ + ".groupIDLabel"; //$NON-NLS-1$
protected static final String NAMESPACE_PROP_NAME = CLASSNAME
- + ".namespace";
+ + ".namespace"; //$NON-NLS-1$
- protected static final String PAGE_DESCRIPTION = "Select protocol provider, complete account info and login";
+ protected static final String PAGE_DESCRIPTION = Messages.ConnectionDialog_SELECT_PROVIDER_DESCRIPTION;
- protected static final String JOINGROUP_FIELDNAME = "Group ID:";
+ protected static final String JOINGROUP_FIELDNAME = Messages.ConnectionDialog_JOIN_GROUP_FIELD_TEXT;
- protected static final String NICKNAME_FIELDNAME = "Nickname:";
+ protected static final String NICKNAME_FIELDNAME = Messages.ConnectionDialog_NICKNAME_TEXT;
- protected static final String ECF_DEFAULT_URL = "ecftcp://localhost:3282/server";
+ protected static final String ECF_DEFAULT_URL = "ecftcp://localhost:3282/server"; //$NON-NLS-1$
- protected static final String ECF_TEMPLATE_URL = "<protocol>://<machinename>:<port>/<servicename>";
+ protected static final String ECF_TEMPLATE_URL = Messages.ConnectionDialog_TEMPLATE_URL;
- protected static final String PAGE_TITLE = "Connect with ECF";
+ protected static final String PAGE_TITLE = Messages.ConnectionDialog_CONNECT_PAGE_TITLE;
- protected static final String DEFAULT_CLIENT = "ecf.generic.client";
+ protected static final String DEFAULT_CLIENT = "ecf.generic.client"; //$NON-NLS-1$
private static final String DIALOG_SETTINGS = CLASSNAME;
@@ -99,21 +100,21 @@ public class ConnectionDialog extends TitleAreaDialog {
private Text joingroup_text;
- private String joinGroup = "";
+ private String joinGroup = ""; //$NON-NLS-1$
private Text nickname_text;
- private String nickname = "";
+ private String nickname = ""; //$NON-NLS-1$
private Text password_text;
- private String password = "";
+ private String password = ""; //$NON-NLS-1$
private String urlPrefix;
private String namespace = null;
- private String containerType = "";
+ private String containerType = ""; //$NON-NLS-1$
private TableViewer viewer;
@@ -137,7 +138,7 @@ public class ConnectionDialog extends TitleAreaDialog {
main.setLayoutData(new GridData(GridData.FILL_BOTH));
Label providerLabel = new Label(main, SWT.NONE);
- providerLabel.setText("Connection Protocol");
+ providerLabel.setText(Messages.ConnectionDialog_PROTOCOL_TEXT);
Composite providerComp = new Composite(main, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
@@ -173,7 +174,7 @@ public class ConnectionDialog extends TitleAreaDialog {
paramComp.setLayoutData(new GridData(GridData.FILL_BOTH));
autoLogin = new Button(main, SWT.CHECK);
- autoLogin.setText("Login &automatically at startup");
+ autoLogin.setText(Messages.ConnectionDialog_AUTOLOGIN_TEXT);
autoLogin.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
autoLogin.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -185,11 +186,11 @@ public class ConnectionDialog extends TitleAreaDialog {
Label sep = new Label(main, SWT.SEPARATOR | SWT.HORIZONTAL);
sep.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- this.setTitle("ECF Connection");
+ this.setTitle(Messages.ConnectionDialog_CONNECTION_TITLE);
this
- .setMessage("Please choose a provider and supply connection parameters.");
+ .setMessage(Messages.ConnectionDialog_CHOOSE_PROVIDER_MESSAGE);
- this.getShell().setText("Connect");
+ this.getShell().setText(Messages.ConnectionDialog_CONNECT_TEXT);
return parent;
}
@@ -239,7 +240,7 @@ public class ConnectionDialog extends TitleAreaDialog {
if (namespace != null) {
return textValue;
} else {
- if (!urlPrefix.equals("") && !textValue.startsWith(urlPrefix)) {
+ if (!urlPrefix.equals("") && !textValue.startsWith(urlPrefix)) { //$NON-NLS-1$
textValue = urlPrefix + textValue;
}
return textValue;
@@ -273,21 +274,21 @@ public class ConnectionDialog extends TitleAreaDialog {
.getSection(DIALOG_SETTINGS);
if (pageSettings != null) {
- int intVal = pageSettings.getInt("provider");
+ int intVal = pageSettings.getInt("provider"); //$NON-NLS-1$
viewer.getTable().setSelection(intVal);
viewer.setSelection(viewer.getSelection());
- String strVal = pageSettings.get("url");
+ String strVal = pageSettings.get("url"); //$NON-NLS-1$
if (strVal != null && joingroup_text != null) {
joingroup_text.setText(strVal);
}
- strVal = pageSettings.get("nickname");
+ strVal = pageSettings.get("nickname"); //$NON-NLS-1$
if (strVal != null && nickname_text != null) {
nickname_text.setText(strVal);
}
if (savePassword()) {
- strVal = pageSettings.get("password");
+ strVal = pageSettings.get("password"); //$NON-NLS-1$
if (strVal != null && password_text != null) {
password_text.setText(strVal);
}
@@ -307,13 +308,13 @@ public class ConnectionDialog extends TitleAreaDialog {
if (pageSettings == null)
pageSettings = dialogSettings.addNewSection(DIALOG_SETTINGS);
- pageSettings.put("url", this.getJoinGroupText());
- pageSettings.put("nickname", this.getNicknameText());
- pageSettings.put("password", this.getPasswordText());
+ pageSettings.put("url", this.getJoinGroupText()); //$NON-NLS-1$
+ pageSettings.put("nickname", this.getNicknameText()); //$NON-NLS-1$
+ pageSettings.put("password", this.getPasswordText()); //$NON-NLS-1$
int i = viewer.getTable().getSelectionIndex();
if (i >= 0)
- pageSettings.put("provider", i);
+ pageSettings.put("provider", i); //$NON-NLS-1$
/*
* try { dialogSettings.save(this.getClass().toString()); } catch (IOException
@@ -361,7 +362,7 @@ public class ConnectionDialog extends TitleAreaDialog {
return desc.getName();
}
- return "";
+ return ""; //$NON-NLS-1$
}
public void addListener(ILabelProviderListener listener) {
@@ -406,7 +407,7 @@ public class ConnectionDialog extends TitleAreaDialog {
namespace = (String) properties.get(NAMESPACE_PROP_NAME);
if (urlPrefix == null) {
- urlPrefix = "";
+ urlPrefix = ""; //$NON-NLS-1$
}
removeChildren(parent);
@@ -432,7 +433,7 @@ public class ConnectionDialog extends TitleAreaDialog {
// set examplegroupid text
example_label
.setText((examplegroupid != null) ? examplegroupid
- : "");
+ : ""); //$NON-NLS-1$
example_label.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_END));
// joingroup_text.setText((defaultgroupid != null) ?
@@ -442,7 +443,7 @@ public class ConnectionDialog extends TitleAreaDialog {
// turn off password unless used
if (usePassword != null) {
Label password_label = new Label(parent, SWT.NONE);
- password_label.setText("Password:");
+ password_label.setText(Messages.ConnectionDialog_PASSWORD_TEXT);
password_text = new Text(parent, SWT.BORDER);
password_text.setLayoutData(new GridData(
GridData.FILL_HORIZONTAL));
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/EditorHelper.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/EditorHelper.java
index e6be29d28..a99170db5 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/EditorHelper.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/EditorHelper.java
@@ -39,8 +39,8 @@ public class EditorHelper {
}
public IEditorPart openEditorForFile(IFile file) throws PartInitException {
- IWorkbenchPage page = getWorkbenchWindow().getActivePage();
- IEditorInput input = new FileEditorInput(file);
+ final IWorkbenchPage page = getWorkbenchWindow().getActivePage();
+ final IEditorInput input = new FileEditorInput(file);
// try to find an open editor with this input
IEditorPart part = page.findEditor(input);
if (part != null) {
@@ -48,52 +48,42 @@ public class EditorHelper {
page.activate(part);
} else {
// no editor found, open a new one
- String editorId = getEditorIdForFile(file);
+ final String editorId = getEditorIdForFile(file);
part = page.openEditor(input, editorId);
}
return part;
}
- protected ITextEditor openTextEditorForFile(IFile file)
- throws PartInitException {
- IEditorPart editor = openEditorForFile(file);
+ protected ITextEditor openTextEditorForFile(IFile file) throws PartInitException {
+ final IEditorPart editor = openEditorForFile(file);
if (editor != null && (editor instanceof ITextEditor)) {
return (ITextEditor) editor;
} else
return null;
}
- public void openAndSelectForFile(IFile file, int offset, int length)
- throws PartInitException {
- ITextEditor textEditor = openTextEditorForFile(file);
+ public void openAndSelectForFile(IFile file, int offset, int length) throws PartInitException {
+ final ITextEditor textEditor = openTextEditorForFile(file);
if (textEditor == null)
return;
setTextEditorSelection(textEditor, offset, length);
}
- protected IMarker createMarkerForFile(IFile file,
- EclipseCollabSharedObject.SharedMarker marker) throws CoreException {
- IMarker m = file
- .createMarker(EclipseCollabSharedObject.SHARED_MARKER_TYPE);
- m.setAttribute(EclipseCollabSharedObject.SHARED_MARKER_KEY, "slewis");
- // m.setAttribute(IMarker.MESSAGE, marker.getMessage());
- m.setAttribute(IMarker.MESSAGE, "hello");
+ protected IMarker createMarkerForFile(IFile file, EclipseCollabSharedObject.SharedMarker marker) throws CoreException {
+ final IMarker m = file.createMarker(EclipseCollabSharedObject.SHARED_MARKER_TYPE);
m.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
- Integer offset = marker.getOffset();
- Integer length = marker.getLength();
- int start = ((offset == null) ? 0 : marker.getOffset().intValue());
+ final Integer offset = marker.getOffset();
+ final Integer length = marker.getLength();
+ final int start = ((offset == null) ? 0 : marker.getOffset().intValue());
m.setAttribute(IMarker.CHAR_START, start);
- int end = start
- + ((length == null) ? 0 : marker.getOffset().intValue());
+ final int end = start + ((length == null) ? 0 : marker.getOffset().intValue());
m.setAttribute(IMarker.CHAR_END, end);
return m;
}
- public void openAndAddMarkerForFile(IFile file,
- EclipseCollabSharedObject.SharedMarker marker)
- throws PartInitException, CoreException {
- IWorkbenchPage page = getWorkbenchWindow().getActivePage();
- IEditorInput input = new FileEditorInput(file);
+ public void openAndAddMarkerForFile(IFile file, EclipseCollabSharedObject.SharedMarker marker) throws PartInitException, CoreException {
+ final IWorkbenchPage page = getWorkbenchWindow().getActivePage();
+ final IEditorInput input = new FileEditorInput(file);
// try to find an open editor with this input
IEditorPart part = page.findEditor(input);
if (part != null) {
@@ -101,21 +91,20 @@ public class EditorHelper {
page.activate(part);
} else {
// no editor found, open a new one
- String editorId = getEditorIdForFile(file);
+ final String editorId = getEditorIdForFile(file);
part = page.openEditor(input, editorId);
}
createMarkerForFile(file, marker);
}
- protected void setTextEditorSelection(ITextEditor textEditor, int offset,
- int length) {
+ protected void setTextEditorSelection(ITextEditor textEditor, int offset, int length) {
textEditor.selectAndReveal(offset, length);
}
protected String getEditorIdForFile(IFile file) {
- IWorkbench wb = getWorkbenchWindow().getWorkbench();
- IEditorRegistry er = wb.getEditorRegistry();
- IEditorDescriptor desc = er.getDefaultEditor(file.getName());
+ final IWorkbench wb = getWorkbenchWindow().getWorkbench();
+ final IEditorRegistry er = wb.getEditorRegistry();
+ final IEditorDescriptor desc = er.getDefaultEditor(file.getName());
if (desc != null)
return desc.getId();
else
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizard.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizard.java
index c47a856c0..61f1739da 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizard.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizard.java
@@ -18,31 +18,30 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ecf.internal.example.collab.actions.URIClientConnectAction;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IWorkbench;
public class JoinGroupWizard extends Wizard {
- protected static final String PAGE_TITLE = "Collaboration Connect";
+ protected static final String PAGE_TITLE = Messages.JoinGroupWizard_CONNECT;
- private static final String DIALOG_SETTINGS = JoinGroupWizard.class
- .getName();
+ private static final String DIALOG_SETTINGS = JoinGroupWizard.class.getName();
JoinGroupWizardPage mainPage;
- private IResource resource;
-
+ private final IResource resource;
+
private String connectID;
public JoinGroupWizard(IResource resource, IWorkbench workbench) {
super();
this.resource = resource;
setWindowTitle(PAGE_TITLE);
- IDialogSettings dialogSettings = ClientPlugin.getDefault()
- .getDialogSettings();
- IDialogSettings wizardSettings = dialogSettings
- .getSection(DIALOG_SETTINGS);
+ final IDialogSettings dialogSettings = ClientPlugin.getDefault().getDialogSettings();
+ IDialogSettings wizardSettings = dialogSettings.getSection(DIALOG_SETTINGS);
if (wizardSettings == null)
wizardSettings = dialogSettings.addNewSection(DIALOG_SETTINGS);
@@ -50,10 +49,10 @@ public class JoinGroupWizard extends Wizard {
}
public JoinGroupWizard(IResource resource, IWorkbench workbench, String connectID) {
- this(resource,workbench);
+ this(resource, workbench);
this.connectID = connectID;
}
-
+
protected ISchedulingRule getSchedulingRule() {
return resource;
}
@@ -67,30 +66,27 @@ public class JoinGroupWizard extends Wizard {
public boolean performFinish() {
try {
finishPage(new NullProgressMonitor());
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
return false;
}
return true;
}
- protected void finishPage(final IProgressMonitor monitor)
- throws InterruptedException, CoreException {
+ protected void finishPage(final IProgressMonitor monitor) throws InterruptedException, CoreException {
mainPage.saveDialogSettings();
URIClientConnectAction client = null;
- String groupName = mainPage.getJoinGroupText();
- String nickName = mainPage.getNicknameText();
- String containerType = mainPage.getContainerType();
- boolean autoLogin = mainPage.getAutoLoginFlag();
+ final String groupName = mainPage.getJoinGroupText();
+ final String nickName = mainPage.getNicknameText();
+ final String containerType = mainPage.getContainerType();
+ final boolean autoLogin = mainPage.getAutoLoginFlag();
try {
- client = new URIClientConnectAction(containerType, groupName,
- nickName, "", resource, autoLogin);
+ client = new URIClientConnectAction(containerType, groupName, nickName, "", resource, autoLogin); //$NON-NLS-1$
client.run(null);
- } catch (Exception e) {
- String id = ClientPlugin.getDefault().getBundle().getSymbolicName();
- throw new CoreException(new Status(Status.ERROR, id, IStatus.ERROR,
- "Could not connect to " + groupName, e));
+ } catch (final Exception e) {
+ final String id = ClientPlugin.getDefault().getBundle().getSymbolicName();
+ throw new CoreException(new Status(Status.ERROR, id, IStatus.ERROR, NLS.bind(Messages.JoinGroupWizard_COULD_NOT_CONNECT, groupName), e));
}
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizardPage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizardPage.java
index de5714b4d..ea88f2f2f 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizardPage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/JoinGroupWizardPage.java
@@ -15,6 +15,7 @@ import java.util.List;
import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ecf.ui.SharedImages;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.WizardPage;
@@ -33,23 +34,23 @@ public class JoinGroupWizardPage extends WizardPage {
protected static final String CLASSNAME = JoinGroupWizardPage.class
.getName();
- protected static final String USER_NAME_SYSTEM_PROPERTY = "user.name";
+ protected static final String USER_NAME_SYSTEM_PROPERTY = "user.name"; //$NON-NLS-1$
- protected static final String PAGE_DESCRIPTION = "Complete account info and choose 'Finish' to login.";
- protected static final String JOINGROUP_FIELDNAME = "Group ID:";
- protected static final String NICKNAME_FIELDNAME = "Nickname:";
- protected static final String ECF_DEFAULT_URL = "ecftcp://ecf.eclipse.org:3282/server";
- protected static final String ECF_TEMPLATE_URL = "ecftcp://<server>:<port>/<groupname>";
- protected static final String PAGE_TITLE = "Connect Generic Client";
+ protected static final String PAGE_DESCRIPTION = Messages.JoinGroupWizardPage_COMPLETE_ACCOUNT_INFO;
+ protected static final String JOINGROUP_FIELDNAME = Messages.JoinGroupWizardPage_GROUPID;
+ protected static final String NICKNAME_FIELDNAME = Messages.JoinGroupWizardPage_NICKNAME;
+ protected static final String ECF_DEFAULT_URL = Messages.JoinGroupWizardPage_DEFAULT_SERVER;
+ protected static final String ECF_TEMPLATE_URL = Messages.JoinGroupWizardPage_TEMPLATE;
+ protected static final String PAGE_TITLE = Messages.JoinGroupWizardPage_CONNECT_GENERIC_TITLE;
- protected static final String DEFAULT_CLIENT = "ecf.generic.client";
+ protected static final String DEFAULT_CLIENT = "ecf.generic.client"; //$NON-NLS-1$
private static final String DIALOG_SETTINGS = CLASSNAME;
private String connectID = null;
public JoinGroupWizardPage() {
- super("wizardPage");
+ super("wizardPage"); //$NON-NLS-1$
setTitle(PAGE_TITLE);
setDescription(PAGE_DESCRIPTION);
setImageDescriptor(SharedImages
@@ -57,7 +58,7 @@ public class JoinGroupWizardPage extends WizardPage {
}
public JoinGroupWizardPage(String connectID) {
- super("wizardPage");
+ super("wizardPage"); //$NON-NLS-1$
setTitle(PAGE_TITLE);
setDescription(PAGE_DESCRIPTION);
setImageDescriptor(SharedImages
@@ -72,7 +73,7 @@ public class JoinGroupWizardPage extends WizardPage {
protected Text joinGroupText;
protected Combo combo;
protected List containerDescriptions = new ArrayList();
- protected String urlPrefix = "";
+ protected String urlPrefix = ""; //$NON-NLS-1$
// private Button autoLogin = null;
private boolean autoLoginFlag = false;
@@ -87,7 +88,7 @@ public class JoinGroupWizardPage extends WizardPage {
if (desc != null) {
String name = desc.getName();
String description = desc.getDescription();
- combo.add(description + " - " + name);
+ combo.add(description + " - " + name); //$NON-NLS-1$
containerDescriptions.add(desc);
combo.select(0);
}
@@ -100,7 +101,7 @@ public class JoinGroupWizardPage extends WizardPage {
setControl(container);
final Label label_4 = new Label(container, SWT.NONE);
- label_4.setText("Protocol:");
+ label_4.setText(Messages.JoinGroupWizardPage_PROTOCOL);
combo = new Combo(container, SWT.BORDER | SWT.READ_ONLY);
GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
@@ -150,7 +151,7 @@ public class JoinGroupWizardPage extends WizardPage {
IDialogSettings pageSettings = dialogSettings
.getSection(DIALOG_SETTINGS);
if (pageSettings != null) {
- String strVal = pageSettings.get("provider");
+ String strVal = pageSettings.get("provider"); //$NON-NLS-1$
if (strVal != null) {
String[] items = combo.getItems();
for (int i = 0; i < items.length; ++i)
@@ -159,11 +160,11 @@ public class JoinGroupWizardPage extends WizardPage {
}
}
- strVal = pageSettings.get("url");
+ strVal = pageSettings.get("url"); //$NON-NLS-1$
if (strVal != null)
joinGroupText.setText(strVal);
- strVal = pageSettings.get("nickname");
+ strVal = pageSettings.get("nickname"); //$NON-NLS-1$
if (strVal != null)
nicknameText.setText(strVal);
}
@@ -178,17 +179,17 @@ public class JoinGroupWizardPage extends WizardPage {
if (pageSettings == null)
pageSettings = dialogSettings.addNewSection(DIALOG_SETTINGS);
- pageSettings.put("url", joinGroupText.getText());
- pageSettings.put("nickname", nicknameText.getText());
+ pageSettings.put("url", joinGroupText.getText()); //$NON-NLS-1$
+ pageSettings.put("nickname", nicknameText.getText()); //$NON-NLS-1$
int i = combo.getSelectionIndex();
if (i >= 0)
- pageSettings.put("provider", combo.getItem(i));
+ pageSettings.put("provider", combo.getItem(i)); //$NON-NLS-1$
}
}
public String getJoinGroupText() {
String textValue = joinGroupText.getText().trim();
- if (!urlPrefix.equals("") && !textValue.startsWith(urlPrefix)) {
+ if (!urlPrefix.equals("") && !textValue.startsWith(urlPrefix)) { //$NON-NLS-1$
textValue = urlPrefix + textValue;
}
return textValue;
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LabelFieldEditor.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LabelFieldEditor.java
index 07ff8fcac..28793148f 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LabelFieldEditor.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LabelFieldEditor.java
@@ -25,7 +25,7 @@ class LabelFieldEditor extends FieldEditor {
// All labels can use the same preference name since they don't
// store any preference.
public LabelFieldEditor(String value, Composite parent) {
- super("label", value, parent);
+ super("label", value, parent); //$NON-NLS-1$
}
// Adjusts the field editor to be displayed correctly
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java
index 3d918aad5..946ef02d5 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatClientView.java
@@ -28,12 +28,14 @@ import org.eclipse.ecf.example.collab.share.User;
import org.eclipse.ecf.example.collab.share.url.ShowURLSharedObject;
import org.eclipse.ecf.example.collab.share.url.StartProgramSharedObject;
import org.eclipse.ecf.internal.example.collab.ClientPlugin;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.window.ToolTip;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
@@ -49,14 +51,14 @@ import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.part.ViewPart;
public class LineChatClientView implements FileSenderUI {
- public static final String DEFAULT_UNIX_BROWSER = "mozilla";
- public static final String ENTER_STRING = "ARRIVED";
- public static final String EXECPROGARGTYPES[] = {ID.class.getName(), "[Ljava.lang.String;", "[Ljava.lang.String;", Boolean.class.getName(), Boolean.class.getName()};
+ public static final String DEFAULT_UNIX_BROWSER = "mozilla"; //$NON-NLS-1$
+ public static final String ENTER_STRING = "ARRIVED"; //$NON-NLS-1$
+ public static final String EXECPROGARGTYPES[] = {ID.class.getName(), "[Ljava.lang.String;", "[Ljava.lang.String;", Boolean.class.getName(), Boolean.class.getName()}; //$NON-NLS-1$ //$NON-NLS-2$
public static final String EXECPROGCLASSNAME = StartProgramSharedObject.class.getName();
- public static final String LEFT_STRING = "LEFT";
+ public static final String LEFT_STRING = "LEFT"; //$NON-NLS-1$
public static final String MESSAGECLASSNAME = HelloMessageSharedObject.class.getName();
public static final String REMOTEFILEPATH = null;
- public static final String SHOWURLARGTYPES[] = {ID.class.getName(), "java.lang.String"};
+ public static final String SHOWURLARGTYPES[] = {ID.class.getName(), "java.lang.String"}; //$NON-NLS-1$
public static final String SHOWURLCLASSNAME = ShowURLSharedObject.class.getName();
private boolean showTimestamp = ClientPlugin.getDefault().getPreferenceStore().getBoolean(ClientPlugin.PREF_DISPLAY_TIMESTAMP);
@@ -123,14 +125,13 @@ public class LineChatClientView implements FileSenderUI {
final String existingName = (String) myNames.get(userID);
if (!existingName.equals(username)) {
myNames.put(userID, username);
- final String str = existingName + " changed name to " + username;
- showLine(new ChatLine(str));
+ showLine(new ChatLine(NLS.bind(Messages.LineChatClientView_CHANGED_NAME_TO, existingName, username)));
}
return false;
} else {
myNames.put(userID, username);
addUserToTree(ud);
- showLine(new ChatLine(username + " " + ENTER_STRING));
+ showLine(new ChatLine(username + " " + ENTER_STRING)); //$NON-NLS-1$
return true;
}
}
@@ -246,18 +247,18 @@ public class LineChatClientView implements FileSenderUI {
protected void createObject(ID target, final String className, String[] argTypes, Object[] args) {
if (lch != null) {
final HashMap map = new HashMap();
- map.put("args", args);
- map.put("types", argTypes);
+ map.put("args", args); //$NON-NLS-1$
+ map.put("types", argTypes); //$NON-NLS-1$
try {
lch.createObject(target, className, map);
} catch (final Exception e) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- MessageDialog.openInformation(null, "Make Object Exception", "Exception creating instance of '" + className + "'. \nException: " + e);
+ MessageDialog.openInformation(null, Messages.LineChatClientView_EXCEPTION_MSGBOX_TITLE, NLS.bind(Messages.LineChatClientView_EXCEPTION_MSGBOX_TEXT, className, e.getLocalizedMessage()));
}
});
e.printStackTrace();
- lch.chatException(e, "createObject(" + className + ")");
+ lch.chatException(e, "createObject(" + className + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -274,7 +275,7 @@ public class LineChatClientView implements FileSenderUI {
public void removeUser(ID id) {
final String name = getUserData(id);
if (name != null) {
- showLine(new ChatLine(name + " " + LEFT_STRING));
+ showLine(new ChatLine(name + " " + LEFT_STRING)); //$NON-NLS-1$
}
myNames.remove(id);
removeUserFromTree(id);
@@ -312,9 +313,9 @@ public class LineChatClientView implements FileSenderUI {
public void sendDone(File aFile, Exception e) {
if (e != null) {
- showLine(new ChatLine("Exception '" + e.getMessage() + "' sending file '" + aFile.getName()));
+ showLine(new ChatLine(NLS.bind(Messages.LineChatClientView_EXCEPTION_SENDING_FILE, e.getLocalizedMessage(), aFile.getName())));
} else {
- showLine(new ChatLine("\tSend of '" + aFile.getName() + "' completed"));
+ showLine(new ChatLine(NLS.bind(Messages.LineChatClientView_SEND_COMPLETED, aFile.getName())));
if (lch != null)
lch.refreshProject();
}
@@ -322,7 +323,7 @@ public class LineChatClientView implements FileSenderUI {
public void sendStart(File aFile, long length, float rate) {
// present user with notification that file is being transferred
- showLine(new ChatLine("\tSending '" + aFile.getName() + "'"));
+ showLine(new ChatLine(NLS.bind(Messages.LineChatClientView_SENDING_FILE, aFile.getName())));
}
public void setTitle(String title) {
@@ -340,7 +341,7 @@ public class LineChatClientView implements FileSenderUI {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
if (!teamChat.isDisposed())
- teamChat.setStatus(user.getNickname() + " is typing...");
+ teamChat.setStatus(NLS.bind(Messages.LineChatClientView_TYPING, user.getNickname()));
}
});
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatView.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatView.java
index 898b3f65c..d68a75103 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatView.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/LineChatView.java
@@ -15,6 +15,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.swt.SWT;
@@ -33,7 +34,7 @@ public class LineChatView extends ViewPart {
public static final String VIEW_ID = "org.eclipse.ecf.internal.example.collab.ui.LineChatView"; //$NON-NLS-1$
// The single view
- private static final String COLLABORATION_PROJECTS_ARE_NOT_AVAILABLE_ = "No collaboration sessions joined.\n\nTo join a project-specific collaboration session, select a project in either the Navigator or Package Explorer view,\nright-click to open context menu for project, and choose Communications->Connect Project to Collaboration Group...";
+ private static final String COLLABORATION_PROJECTS_ARE_NOT_AVAILABLE_ = Messages.LineChatView_NO_CONNECT_MESSAGE;
static protected LineChatView singleton = null;
static protected Hashtable clientViews = new Hashtable();
@@ -108,7 +109,7 @@ public class LineChatView extends ViewPart {
LineChatClientView newView = null;
synchronized (clientViews) {
if (singleton == null)
- throw new InstantiationException("View not initialized");
+ throw new InstantiationException(Messages.LineChatView_EXCEPTION_VIEW_NOT_INITIALIZED);
if (singleton.inactiveLabel != null) {
singleton.inactiveLabel.dispose();
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
index a3cf066db..09a41d26f 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
@@ -1,3 +1,47 @@
+ChatComposite.COBROWSE_TEXT=Co-Browse Web with {0}...
+ChatComposite.COBROWSE_TITLE=Co-Browse URL to {0}
+ChatComposite.COBROWSE_URL_TEXT=URL to Browse:
+ChatComposite.DIALOG_COBROWSE_HTTPPREFIX=http://
+ChatComposite.DIALOG_COBROWSE_TEXT=URL to Browse:
+ChatComposite.DIALOG_COBROWSE_TITLE=Co-Browse URL
+ChatComposite.DIALOG_CONFIRM_CLEAR_TEXT=Are you sure you want to clear output?
+ChatComposite.DIALOG_CONFIRM_CLEAR_TITLE=Confirm Clear Text Output
+ChatComposite.DIALOG_COPY_ERROR_TEXT=Exception copying file locally. Cancelling file transfer.\nException:
+ChatComposite.DIALOG_COPY_ERROR_TITLE=Local File Copy Error
+ChatComposite.DIALOG_FILE_OPEN_ERROR_TITLE=File Open Error
+ChatComposite.DIALOG_SCREEN_CAPTURE_TEXT=To initiate screen capture, click OK, wait 5 seconds,\nand then select capture region with arrow cursor.
+ChatComposite.DIALOG_SCREEN_CAPTURE_TITLE=Screen Capture
+ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT=File {0} not found\nException: {0}
+ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT1=File {0} not found.
+ChatComposite.MENU_SEND_MESSAGE_TO_YOURSELF_TEXT=Send Message to Yourself
+ChatComposite.MESSAGE_TO_GROUP_TEXT=Message For Group:
+ChatComposite.MESSAGE_TO_GROUP_TITLE=Send Message to Group
+ChatComposite.MESSAGE_TO_TEXT=Talking to yourself again aren't you\!\!\n\n\tUsername:
+ChatComposite.MESSAGE_TO_TITLE=Message to
+ChatComposite.NO_HYPERLINKING=Source viewer not available. Hyperlinking will be disabled.
+ChatComposite.PRIVATE_MESSAGE_TEXT=Message:
+ChatComposite.PRIVATE_MESSAGE_TITLE=Private Message for
+ChatComposite.RING_GROUP_TITLE=Ring Group
+ChatComposite.RING_MESSAGE_TEXT=Ring Message:
+ChatComposite.RING_OTHER_TEXT=Ring {0}...
+ChatComposite.RING_TITLE=Ring
+ChatComposite.SELECT_FILE_FOR_GROUP_TEXT=Select File for Group
+ChatComposite.SELECt_FILE_TITLE=Select File for {0}
+ChatComposite.SEND_FILE_AND_LAUNCH_TEXT=Send File to {0} and launch...
+ChatComposite.SEND_FILE_TEXT=Send File to {0}...
+ChatComposite.SEND_PRIVATE_MESSAGE_TEXT=Send Private Message to {0}...
+ChatComposite.SEND_REPLICATED_OBJECT_TEXT=Replicated Object Class and Args (separated by whitespace):
+ChatComposite.SEND_REPLICATED_OBJECT_TITLE=Send Replicated Object
+ChatComposite.SEND_SCREEN_CAPTURE_TEXT=Send Screen Capture to {0}
+ChatComposite.SEND_SHOW_VIEW_REQUEST_TEXT=Send Show View Request to {0}...
+ChatComposite.SHOW_CHAT_WINDOW_TEXT=Show chat window
+ChatComposite.START_PROGRAM_GROUP_TEXT=Program to Start:
+ChatComposite.START_PROGRAM_GROUP_TITLE=Start Program for Group
+ChatComposite.START_PROGRAM_TEXT=Program to Start for
+ChatComposite.START_PROGRAM_TITLE=Start Program for
+EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING=Exception launching
+EclipseFileTransferAndLaunch.PROGRAM_LAUNCH_MSGBOX_TEXT=Program launch failed for {0}\nException: {1}
+EclipseFileTransferAndLaunch.PROGRAM_LAUNCH_MSGBOX_TITLE=Program Launch Failed
LineChatClientView.contextmenu.send=Send EclipseProjectComponent...
LineChatClientView.contextmenu.message=Message to EclipseProjectComponent...
LineChatClientView.contextmenu.remove=Remove EclipseProjectComponent...
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SharedObjectContainerUI.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SharedObjectContainerUI.java
index b3969fc92..a213180d6 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SharedObjectContainerUI.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SharedObjectContainerUI.java
@@ -29,101 +29,86 @@ import org.eclipse.ecf.example.collab.share.SharedObjectEventListener;
import org.eclipse.ecf.example.collab.share.User;
import org.eclipse.ecf.internal.example.collab.ClientEntry;
import org.eclipse.ecf.internal.example.collab.CollabClient;
+import org.eclipse.ecf.internal.example.collab.Messages;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
public class SharedObjectContainerUI {
- public static final String JOIN_TIME_FORMAT = "hh:mm:ss a z";
- public static final String FILE_DIRECTORY = "received_files";
- public static final String ECFDIRECTORY = "ECF_" + FILE_DIRECTORY + "/";
- public static final String COLLAB_SHARED_OBJECT_ID = "chat";
+ public static final String JOIN_TIME_FORMAT = "hh:mm:ss a z"; //$NON-NLS-1$
+ public static final String FILE_DIRECTORY = "received_files"; //$NON-NLS-1$
+ public static final String ECFDIRECTORY = "ECF_" + FILE_DIRECTORY + "/"; //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String COLLAB_SHARED_OBJECT_ID = "chat"; //$NON-NLS-1$
ISharedObjectContainer soc = null;
CollabClient collabclient = null;
- public SharedObjectContainerUI(CollabClient client,
- ISharedObjectContainer soc) {
+ public SharedObjectContainerUI(CollabClient client, ISharedObjectContainer soc) {
this.collabclient = client;
this.soc = soc;
}
protected String getSharedFileDirectoryForProject(IResource proj) {
- String eclipseDir = Platform.getLocation().lastSegment();
+ final String eclipseDir = Platform.getLocation().lastSegment();
if (proj == null)
- return eclipseDir + "/" + ECFDIRECTORY;
+ return eclipseDir + "/" + ECFDIRECTORY; //$NON-NLS-1$
else
return FILE_DIRECTORY;
}
- protected User getUserData(String containerType, ID clientID,
- String usernick, IResource project) {
- Vector topElements = new Vector();
- topElements.add("Project: " + CollabClient.getNameForResource(project));
- SimpleDateFormat sdf = new SimpleDateFormat(JOIN_TIME_FORMAT);
- topElements.add("Time: " + sdf.format(new Date()));
+ protected User getUserData(String containerType, ID clientID, String usernick, IResource project) {
+ final Vector topElements = new Vector();
+ topElements.add(Messages.SharedObjectContainerUI_PROJECT_LABEL + CollabClient.getNameForResource(project));
+ final SimpleDateFormat sdf = new SimpleDateFormat(JOIN_TIME_FORMAT);
+ topElements.add(Messages.SharedObjectContainerUI_TIME_LABEL + sdf.format(new Date()));
try {
- topElements.add("Language: " + System.getProperty("user.language"));
- } catch (Exception e) {
+ topElements.add(Messages.SharedObjectContainerUI_LANGUAGE_LABEL + System.getProperty("user.language")); //$NON-NLS-1$
+ } catch (final Exception e) {
}
try {
- topElements
- .add("Time Zone: " + System.getProperty("user.timezone"));
- } catch (Exception e) {
+ topElements.add(Messages.SharedObjectContainerUI_TIME_ZONE_LABEL + System.getProperty("user.timezone")); //$NON-NLS-1$
+ } catch (final Exception e) {
}
try {
- topElements.add("OSGi Version: "
- + System.getProperty("org.osgi.framework.version"));
- } catch (Exception e) {
+ topElements.add(Messages.SharedObjectContainerUI_OSGI_VERSION_LABEL + System.getProperty("org.osgi.framework.version")); //$NON-NLS-1$
+ } catch (final Exception e) {
}
try {
- topElements.add("Java: " + System.getProperty("java.version"));
- } catch (Exception e) {
+ topElements.add(Messages.SharedObjectContainerUI_JAVA_VERSION_LABEL + System.getProperty("java.version")); //$NON-NLS-1$
+ } catch (final Exception e) {
}
try {
- topElements.add("OS: " + Platform.getOS());
- } catch (Exception e) {
+ topElements.add(Messages.SharedObjectContainerUI_OS_LABEL + Platform.getOS());
+ } catch (final Exception e) {
}
return new User(clientID, usernick, topElements);
}
- void addObjectToClient(ISharedObjectContainer soContainer,
- ClientEntry client, String username, IResource proj)
- throws Exception {
- IResource project = (proj == null) ? CollabClient.getWorkspace() : proj;
- User user = getUserData(client.getClass().getName(), client
- .getContainer().getID(), username, proj);
- createAndAddSharedObject(soContainer, client, project, user,
- getSharedFileDirectoryForProject(project));
+ void addObjectToClient(ISharedObjectContainer soContainer, ClientEntry client, String username, IResource proj) throws Exception {
+ final IResource project = (proj == null) ? CollabClient.getWorkspace() : proj;
+ final User user = getUserData(client.getClass().getName(), client.getContainer().getID(), username, proj);
+ createAndAddSharedObject(soContainer, client, project, user, getSharedFileDirectoryForProject(project));
}
- public void setup(final ISharedObjectContainer soContainer,
- final ClientEntry newClientEntry, final IResource resource,
- String username) throws Exception {
+ public void setup(final ISharedObjectContainer soContainer, final ClientEntry newClientEntry, final IResource resource, String username) throws Exception {
addObjectToClient(soContainer, newClientEntry, username, resource);
soc.addListener(new IContainerListener() {
public void handleEvent(IContainerEvent evt) {
if (evt instanceof IContainerDisconnectedEvent) {
- IContainerDisconnectedEvent cd = (IContainerDisconnectedEvent) evt;
+ final IContainerDisconnectedEvent cd = (IContainerDisconnectedEvent) evt;
final ID departedContainerID = cd.getTargetID();
- ID connectedID = newClientEntry.getContainer()
- .getConnectedID();
- if (connectedID == null
- || connectedID.equals(departedContainerID)) {
+ final ID connectedID = newClientEntry.getContainer().getConnectedID();
+ if (connectedID == null || connectedID.equals(departedContainerID)) {
// This container is done
if (!newClientEntry.isDisposed()) {
- collabclient
- .disposeClient(resource, newClientEntry);
+ collabclient.disposeClient(resource, newClientEntry);
}
}
} else if (evt instanceof IContainerEjectedEvent) {
- IContainerEjectedEvent ce = (IContainerEjectedEvent) evt;
+ final IContainerEjectedEvent ce = (IContainerEjectedEvent) evt;
final ID departedContainerID = ce.getTargetID();
- ID connectedID = newClientEntry.getContainer()
- .getConnectedID();
- if (connectedID == null
- || connectedID.equals(departedContainerID)) {
+ final ID connectedID = newClientEntry.getContainer().getConnectedID();
+ if (connectedID == null || connectedID.equals(departedContainerID)) {
if (!newClientEntry.isDisposed()) {
- collabclient
- .disposeClient(resource, newClientEntry);
+ collabclient.disposeClient(resource, newClientEntry);
}
}
}
@@ -131,16 +116,12 @@ public class SharedObjectContainerUI {
});
}
- protected void createAndAddSharedObject(
- final ISharedObjectContainer soContainer, final ClientEntry client,
- final IResource proj, User user, String fileDir) throws Exception {
- IWorkbenchWindow ww = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow();
- EclipseCollabSharedObject sharedObject = new EclipseCollabSharedObject(
- proj, ww, user, fileDir);
+ protected void createAndAddSharedObject(final ISharedObjectContainer soContainer, final ClientEntry client, final IResource proj, User user, String fileDir) throws Exception {
+ final IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ final EclipseCollabSharedObject sharedObject = new EclipseCollabSharedObject(proj, ww, user, fileDir);
sharedObject.setListener(new SharedObjectEventListener() {
public void memberRemoved(ID member) {
- ID groupID = client.getContainer().getConnectedID();
+ final ID groupID = client.getContainer().getConnectedID();
if (member.equals(groupID)) {
if (!client.isDisposed()) {
collabclient.disposeClient(proj, client);
@@ -158,14 +139,12 @@ public class SharedObjectContainerUI {
}
public void windowClosing() {
- ID groupID = client.getContainer().getConnectedID();
+ final ID groupID = client.getContainer().getConnectedID();
CollabClient.removeClientForResource(proj, groupID);
}
});
- ID newID = IDFactory.getDefault().createStringID(
- COLLAB_SHARED_OBJECT_ID);
- soContainer.getSharedObjectManager().addSharedObject(newID,
- sharedObject, new HashMap());
+ final ID newID = IDFactory.getDefault().createStringID(COLLAB_SHARED_OBJECT_ID);
+ soContainer.getSharedObjectManager().addSharedObject(newID, sharedObject, new HashMap());
client.setSharedObject(sharedObject);
}
}
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SpacerFieldEditor.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SpacerFieldEditor.java
index d5ddf6f86..26372bdca 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SpacerFieldEditor.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/SpacerFieldEditor.java
@@ -18,6 +18,6 @@ import org.eclipse.swt.widgets.Composite;
public class SpacerFieldEditor extends LabelFieldEditor {
// Implemented as an empty label field editor.
public SpacerFieldEditor(Composite parent) {
- super("", parent);
+ super("", parent); //$NON-NLS-1$
}
}

Back to the top