diff options
9 files changed, 194 insertions, 162 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 2bce1a712..8ff199667 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 @@ -31,6 +31,7 @@ import org.eclipse.ecf.core.sharedobject.ReplicaSharedObjectDescription; import org.eclipse.ecf.example.collab.share.io.EclipseFileTransfer; import org.eclipse.ecf.example.collab.share.io.FileTransferParams; import org.eclipse.ecf.internal.example.collab.ClientPlugin; +import org.eclipse.ecf.internal.example.collab.Messages; import org.eclipse.ecf.internal.example.collab.ui.ChatLine; import org.eclipse.ecf.internal.example.collab.ui.EditorHelper; import org.eclipse.ecf.internal.example.collab.ui.FileReceiverUI; @@ -60,37 +61,37 @@ public class EclipseCollabSharedObject extends GenericSharedObject { * */ private static final int MAX_MESSAGE_SIZE = 8096; - private static final String HANDLE_SHOW_VIEW_MSG = "handleShowView"; - private static final String HANDLE_SHOW_VIEW_WITH_ID_MSG = "handleShowViewWithID"; - private static final String HANDLE_LAUNCH_EDITOR_FOR_FILE_MSG = "handleLaunchEditorForFile"; - private static final String HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG = "handleOpenAndSelectForFile"; - private static final String HANDLE_ADD_MARKER_FOR_FILE_MSG = "handleAddMarkerForFile"; - private static final String HANDLE_USER_UPDATE_MSG = "handleUserUpdate"; - private static final String HANDLE_UPDATE_TREE_DISPLAY_MSG = "handleUpdateTreeDisplay"; - private static final String HANDLE_UNREGISTER_PROXY_MSG = "handleUnregisterProxy"; - private static final String HANDLE_SHOW_TEXT_MSG = "handleShowTextMsg"; - private static final String HANDLE_USER_MSG = "handleUserMessage"; - private static final String HANDLE_CVS_PROJECT_UPDATE_REQUEST_MSG = "handleCVSProjectUpdateRequest"; - private static final String HANDLE_REQUEST_USER_UPDATE_MSG = "handleRequestUserUpdate"; - private static final String HANDLE_REGISTER_PROXY_MSG = "handleRegisterProxy"; - private static final String HANDLE_SHOW_PRIVATE_TEXT_MSG = "handleShowPrivateTextMsg"; - private static final String HANDLE_NOTIFY_USER_ADDED_MSG = "handleNotifyUserAdded"; - private static final String HANDLE_STARTED_TYPING_MSG = "handleStartedTyping"; + private static final String HANDLE_SHOW_VIEW_MSG = "handleShowView"; //$NON-NLS-1$ + private static final String HANDLE_SHOW_VIEW_WITH_ID_MSG = "handleShowViewWithID"; //$NON-NLS-1$ + private static final String HANDLE_LAUNCH_EDITOR_FOR_FILE_MSG = "handleLaunchEditorForFile"; //$NON-NLS-1$ + private static final String HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG = "handleOpenAndSelectForFile"; //$NON-NLS-1$ + private static final String HANDLE_ADD_MARKER_FOR_FILE_MSG = "handleAddMarkerForFile"; //$NON-NLS-1$ + private static final String HANDLE_USER_UPDATE_MSG = "handleUserUpdate"; //$NON-NLS-1$ + private static final String HANDLE_UPDATE_TREE_DISPLAY_MSG = "handleUpdateTreeDisplay"; //$NON-NLS-1$ + private static final String HANDLE_UNREGISTER_PROXY_MSG = "handleUnregisterProxy"; //$NON-NLS-1$ + private static final String HANDLE_SHOW_TEXT_MSG = "handleShowTextMsg"; //$NON-NLS-1$ + private static final String HANDLE_USER_MSG = "handleUserMessage"; //$NON-NLS-1$ + private static final String HANDLE_CVS_PROJECT_UPDATE_REQUEST_MSG = "handleCVSProjectUpdateRequest"; //$NON-NLS-1$ + private static final String HANDLE_REQUEST_USER_UPDATE_MSG = "handleRequestUserUpdate"; //$NON-NLS-1$ + private static final String HANDLE_REGISTER_PROXY_MSG = "handleRegisterProxy"; //$NON-NLS-1$ + private static final String HANDLE_SHOW_PRIVATE_TEXT_MSG = "handleShowPrivateTextMsg"; //$NON-NLS-1$ + private static final String HANDLE_NOTIFY_USER_ADDED_MSG = "handleNotifyUserAdded"; //$NON-NLS-1$ + 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"; + public static final String ID = "chat"; //$NON-NLS-1$ - private static final String DEFAULT_WINDOW_TITLE = "Chat"; - private static final String HANDLE_SHOW_IMAGE_START_MSG = "handleShowImageStart"; - private static final String HANDLE_SHOW_IMAGE_DATA_MSG = "handleShowImageData"; + private static final String DEFAULT_WINDOW_TITLE = Messages.EclipseCollabSharedObject_WINDOW_TITLE; + private static final String HANDLE_SHOW_IMAGE_START_MSG = "handleShowImageStart"; //$NON-NLS-1$ + private static final String HANDLE_SHOW_IMAGE_DATA_MSG = "handleShowImageData"; //$NON-NLS-1$ private String windowTitle = DEFAULT_WINDOW_TITLE; - private String downloadDirectory = ""; + private String downloadDirectory = ""; //$NON-NLS-1$ private LineChatClientView localGUI = null; private IResource localResource = null; private User localUser = null; - private String localVersion = ""; + private String localVersion = ""; //$NON-NLS-1$ private ID serverID = null; private SharedObjectEventListener sharedObjectEventListener = null; private IWorkbenchWindow workbenchWindow = null; @@ -104,7 +105,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { this.localUser = user; this.downloadDirectory = downloaddir; createOutputView(); - Assert.isNotNull(localGUI, "Local GUI cannot be created...exiting"); + Assert.isNotNull(localGUI, "Local GUI cannot be created...exiting"); //$NON-NLS-1$ } public void activated(ID[] others) { @@ -153,7 +154,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { if (isHost()) disconnect(); } catch (final Exception e) { - log("Exception in destroySelf", e); + log("Exception in destroySelf", e); //$NON-NLS-1$ } // Destroy self super.destroySelfLocal(); @@ -172,10 +173,10 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { eclipseDir = Platform.getLocation().toOSString(); } catch (final IllegalStateException e) { - log("Exception getting local resource path", e); + log("Exception getting local resource path", e); //$NON-NLS-1$ } if (eclipseDir == null) - eclipseDir = "."; + eclipseDir = "."; //$NON-NLS-1$ final String projectDir = (getResource() == null) ? downloadDirectory : getResource().getFullPath().toOSString(); return new File(eclipseDir, projectDir).getAbsolutePath(); } @@ -185,17 +186,17 @@ public class EclipseCollabSharedObject extends GenericSharedObject { } protected void createOutputView() { - final String projectName = (localResource == null || localResource.getName().trim().equals("")) ? "<workspace>" : localResource.getName(); + final String projectName = (localResource == null || localResource.getName().trim().equals("")) ? Messages.EclipseCollabSharedObject_WORKSPACE_RESOURCE_NAME : localResource.getName(); //$NON-NLS-1$ Display.getDefault().syncExec(new Runnable() { public void run() { try { final IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); final IWorkbenchPage wp = ww.getActivePage(); wp.showView(LineChatView.VIEW_ID); - LineChatView.setViewName(NLS.bind("Collaboration: {0}", localUser.getNickname())); - localGUI = LineChatView.createClientView(EclipseCollabSharedObject.this, projectName, NLS.bind("Collaboration for {0} \n\n", projectName), getLocalFullDownloadPath()); + LineChatView.setViewName(NLS.bind(Messages.EclipseCollabSharedObject_TITLE_BAR, localUser.getNickname())); + localGUI = LineChatView.createClientView(EclipseCollabSharedObject.this, projectName, NLS.bind(Messages.EclipseCollabSharedObject_PROJECT_NAME, projectName), getLocalFullDownloadPath()); } catch (final Exception e) { - log("Exception creating LineChatView", e); + log("Exception creating LineChatView", e); //$NON-NLS-1$ } } }); @@ -214,7 +215,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { } public String getTreeTopLabel() { - return "Presence"; + return Messages.EclipseCollabSharedObject_TREE_TOP_LABEL; } public User getUser() { @@ -246,7 +247,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { createObject(null, cons); } catch (final Exception e) { - log("Exception creating local object", e); + log("Exception creating local object", e); //$NON-NLS-1$ } } @@ -261,7 +262,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { } } } catch (final Exception e) { - log("Exception checking for membership", e); + log("Exception checking for membership", e); //$NON-NLS-1$ } if (add) { boolean addUserResult = false; @@ -292,7 +293,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { localGUI.toFront(); } } catch (final Exception e) { - log("Exception in showLineOnGUI", e); + log("Exception in showLineOnGUI", e); //$NON-NLS-1$ } } }); @@ -310,7 +311,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { if (localGUI != null) localGUI.updateTreeDisplay(fromID, item); } catch (final Exception e) { - log("Exception in showLineOnGUI", e); + log("Exception in showLineOnGUI", e); //$NON-NLS-1$ } } }); @@ -323,7 +324,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { if (localGUI != null) localGUI.changeUser(ud); } catch (final Exception e) { - log("Exception in showLineOnGUI", e); + log("Exception in showLineOnGUI", e); //$NON-NLS-1$ } } }); @@ -342,7 +343,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { if (shells != null && shells.length > 0) { shells[0].setActive(); } - MessageDialog.openInformation(null, NLS.bind("Private Message from {0}", sender.getNickname()), message); + MessageDialog.openInformation(null, NLS.bind(Messages.EclipseCollabSharedObject_PRIVATE_MESSAGE_TEXT, sender.getNickname()), message); } }); } @@ -357,7 +358,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(null, SharedObjectMsg.createMsg(null, HANDLE_STARTED_TYPING_MSG, localUser)); } catch (final Exception e) { - log("Exception on sendStartedTyping to remote clients", e); + log("Exception on sendStartedTyping to remote clients", e); //$NON-NLS-1$ } } @@ -397,7 +398,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { localGUI.removeUser(member); } } catch (final Exception e) { - log("Exception in showLineOnGUI", e); + log("Exception in showLineOnGUI", e); //$NON-NLS-1$ } } }); @@ -411,7 +412,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { sendSelf(m); } } catch (final Exception e) { - log("Exception sending message to proxy object", e); + log("Exception sending message to proxy object", e); //$NON-NLS-1$ } } @@ -434,7 +435,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { localResource.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); } catch (final Exception e) { - log("Exception refreshing resource " + localResource.getName(), e); + log("Exception refreshing resource " + localResource.getName(), e); //$NON-NLS-1$ } } } @@ -444,7 +445,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(null, SharedObjectMsg.createMsg(null, HANDLE_NOTIFY_USER_ADDED_MSG, localUser)); } catch (final Exception e) { - log("Exception on sendNotifyUserAdded to remote clients", e); + log("Exception on sendNotifyUserAdded to remote clients", e); //$NON-NLS-1$ } } @@ -452,7 +453,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(touser.getUserID(), SharedObjectMsg.createMsg(null, HANDLE_SHOW_PRIVATE_TEXT_MSG, localUser, msg)); } catch (final Exception e) { - log("Exception on sendShowPrivateTextMsg to remote clients", e); + log("Exception on sendShowPrivateTextMsg to remote clients", e); //$NON-NLS-1$ } } @@ -460,7 +461,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(toID, SharedObjectMsg.createMsg(null, HANDLE_REGISTER_PROXY_MSG, localUser, proxyClass, name)); } catch (final IOException e) { - log("Exception sendRegisterProxy", e); + log("Exception sendRegisterProxy", e); //$NON-NLS-1$ } } @@ -468,7 +469,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(requestTarget, SharedObjectMsg.createMsg(null, HANDLE_REQUEST_USER_UPDATE_MSG, localContainerID)); } catch (final Exception e) { - log("Exception on sendRequestUserUpdate to remote clients", e); + log("Exception on sendRequestUserUpdate to remote clients", e); //$NON-NLS-1$ } } @@ -484,7 +485,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { sendSelf(m); } } catch (final Exception e) { - log("Exception on sendCVSProjectUpdateRequest to " + touser, e); + log("Exception on sendCVSProjectUpdateRequest to " + touser, e); //$NON-NLS-1$ } } @@ -493,7 +494,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { // return CVSWorkspaceRoot.isSharedWithCVS(getProject()); return false; } catch (final Exception e) { - log("CVS Exception calling isSharedWithCVS in TeamUpdateAction", e); + log("CVS Exception calling isSharedWithCVS in TeamUpdateAction", e); //$NON-NLS-1$ return false; } } @@ -509,7 +510,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { if (receiver == null) sendSelf(m); } catch (final Exception e) { - log("Exception on sendMessageToUser to " + user, e); + log("Exception on sendMessageToUser to " + user, e); //$NON-NLS-1$ } } @@ -529,7 +530,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { forwardMsgTo(toID, SharedObjectMsg.createMsg(null, HANDLE_SHOW_IMAGE_DATA_MSG, localContainerID, bos.toByteArray(), done)); } } catch (final Exception e) { - log("Exception on sendImage", e); + log("Exception on sendImage", e); //$NON-NLS-1$ } } @@ -545,7 +546,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { showImageShell = null; } }); - showImageShell.setText("Screen capture from " + fromUser); + showImageShell.setText(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM + fromUser); showImageShell.open(); } } @@ -569,7 +570,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(null, SharedObjectMsg.createMsg(null, HANDLE_SHOW_TEXT_MSG, localContainerID, msg)); } catch (final Exception e) { - log("Exception on sendShowTextMsg to remote clients", e); + log("Exception on sendShowTextMsg to remote clients", e); //$NON-NLS-1$ } } @@ -577,7 +578,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(toID, SharedObjectMsg.createMsg(null, HANDLE_UNREGISTER_PROXY_MSG, localUser, proxyClass)); } catch (final IOException e) { - log("Exception sendRegisterProxy", e); + log("Exception sendRegisterProxy", e); //$NON-NLS-1$ } } @@ -585,7 +586,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(target, SharedObjectMsg.createMsg(null, HANDLE_UPDATE_TREE_DISPLAY_MSG, localContainerID, item)); } catch (final Exception e) { - log("Exception on sendUpdateTreeDisplay to remote clients", e); + log("Exception on sendUpdateTreeDisplay to remote clients", e); //$NON-NLS-1$ } } @@ -593,7 +594,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { forwardMsgTo(target, SharedObjectMsg.createMsg(null, HANDLE_USER_UPDATE_MSG, localUser)); } catch (final Exception e) { - log("Exception on sendUserUpdate to remote clients", e); + log("Exception on sendUserUpdate to remote clients", e); //$NON-NLS-1$ } } @@ -637,7 +638,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { if (localGUI != null) localGUI.showLine(new ChatLine(line, getUserForID(remote))); } catch (final Exception e) { - log("Exception in showLineOnGUI", e); + log("Exception in showLineOnGUI", e); //$NON-NLS-1$ } } }); @@ -653,7 +654,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { localGUI.showLine(rawLine); } } catch (final Exception e) { - log("Exception in showLineOnGUI", e); + log("Exception in showLineOnGUI", e); //$NON-NLS-1$ } } }); @@ -684,10 +685,10 @@ public class EclipseCollabSharedObject extends GenericSharedObject { } public String toString() { - final StringBuffer buf = new StringBuffer("SharedMarker["); - buf.append("message=").append(message).append(";"); - buf.append("offset=").append(offset).append(";"); - buf.append("length=").append(length).append("]"); + final StringBuffer buf = new StringBuffer("SharedMarker["); //$NON-NLS-1$ + buf.append("message=").append(message).append(";"); //$NON-NLS-1$ //$NON-NLS-2$ + buf.append("offset=").append(offset).append(";"); //$NON-NLS-1$ //$NON-NLS-2$ + buf.append("length=").append(length).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ return buf.toString(); } } @@ -698,13 +699,13 @@ public class EclipseCollabSharedObject extends GenericSharedObject { receiver = touser.getUserID(); } try { - final SharedObjectMsg m = SharedObjectMsg.createMsg(null, HANDLE_ADD_MARKER_FOR_FILE_MSG, getUser(), resourceName, new SharedMarker("ECF marker", new Integer(offset), new Integer(length))); + final SharedObjectMsg m = SharedObjectMsg.createMsg(null, HANDLE_ADD_MARKER_FOR_FILE_MSG, getUser(), resourceName, new SharedMarker(Messages.EclipseCollabSharedObject_MARKER_NAME, new Integer(offset), new Integer(length))); forwardMsgTo(receiver, m); if (receiver == null) { sendSelf(m); } } catch (final Exception e) { - log("Exception on sendAddMarkerForFile to " + touser, e); + log("Exception on sendAddMarkerForFile to " + touser, e); //$NON-NLS-1$ } } @@ -714,13 +715,13 @@ public class EclipseCollabSharedObject extends GenericSharedObject { receiver = touser.getUserID(); } try { - final SharedObjectMsg m = SharedObjectMsg.createMsg(null, HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG, getUser(), resourceName, new SharedMarker("ECF marker", new Integer(offset), new Integer(length))); + final SharedObjectMsg m = SharedObjectMsg.createMsg(null, HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG, getUser(), resourceName, new SharedMarker(Messages.EclipseCollabSharedObject_MARKER_NAME, new Integer(offset), new Integer(length))); forwardMsgTo(receiver, m); if (receiver == null) { sendSelf(m); } } catch (final Exception e) { - log("Exception on sendAddMarkerForFile to " + touser, e); + log("Exception on sendAddMarkerForFile to " + touser, e); //$NON-NLS-1$ } } @@ -736,7 +737,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { sendSelf(m); } } catch (final Exception e) { - log("Exception on sendLaunchEditorForFile to " + touser, e); + log("Exception on sendLaunchEditorForFile to " + touser, e); //$NON-NLS-1$ } } @@ -753,7 +754,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { eh.openAndSelectForFile(file, (offset == null) ? 0 : offset.intValue(), (length == null) ? 0 : length.intValue()); } catch (final Exception e) { - log("Exception in openEditorAndSelectForFile", e); + log("Exception in openEditorAndSelectForFile", e); //$NON-NLS-1$ } } } @@ -763,7 +764,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { protected IFile getIFileForResource(IWorkbenchWindow ww, String resourceName) { final IFile file = getLocalFileForRemote(resourceName); if (file == null || !file.exists()) { - MessageDialog.openInformation(ww.getShell(), "Cannot open editor", "'" + resourceName + "' was not found in your workspace."); + MessageDialog.openInformation(ww.getShell(), Messages.EclipseCollabSharedObject_CANNOT_OPEN_EDITOR_TITLE, NLS.bind(Messages.EclipseCollabSharedObject_CANNOT_OPEN_EDITOR_MESSAGE, resourceName)); return null; } return file; @@ -780,7 +781,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { eh.openEditorForFile(file); } catch (final Exception e) { - log("Exception in openEditorAndSelectForFile", e); + log("Exception in openEditorAndSelectForFile", e); //$NON-NLS-1$ } } } @@ -799,7 +800,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { eh.openAndAddMarkerForFile(file, marker); } catch (final Exception e) { - log("Exception in addMarkerForFile", e); + log("Exception in addMarkerForFile", e); //$NON-NLS-1$ } } }); @@ -831,7 +832,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { runnable.run(); } else { if (showSharedEditorEventsImmediately()) { - if (!askUserToDisplaySharedEditorEvents() || MessageDialog.openQuestion(null, "Open Shared Editor?", "Open shared editor for '" + resourceName + "' from " + fromuser.getNickname() + "?")) { + if (!askUserToDisplaySharedEditorEvents() || MessageDialog.openQuestion(null, Messages.EclipseCollabSharedObject_DIALOG_OPEN_SHARED_EDITOR_TEXT, NLS.bind(Messages.EclipseCollabSharedObject_OPEN_SHARED_EDITOR_QUESTION, resourceName, fromuser.getNickname()))) { runnable.run(); } } @@ -896,7 +897,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { sendSelf(m); } } catch (final Exception e) { - log("Exception on handleShowViewWithID to " + touser, e); + log("Exception on handleShowViewWithID to " + touser, e); //$NON-NLS-1$ } } @@ -912,7 +913,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { sendSelf(m); } } catch (final Exception e) { - log("Exception on sendCVSProjectUpdateRequest to " + touser, e); + log("Exception on sendCVSProjectUpdateRequest to " + touser, e); //$NON-NLS-1$ } } @@ -922,7 +923,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { showViewWithID(id, secID, mode.intValue()); } catch (final Exception e) { - log("Exception in showing view id=" + id + ";secID=" + secID + ";mode=" + mode, e); + log("Exception in showing view id=" + id + ";secID=" + secID + ";mode=" + mode, e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } } }); @@ -934,7 +935,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { try { showView(id); } catch (final Exception e) { - log("Exception in showing view id=" + id, e); + log("Exception in showing view id=" + id, e); //$NON-NLS-1$ } } }); @@ -944,7 +945,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { final IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); final IWorkbenchPage wp = ww.getActivePage(); if (wp == null) - throw new PartInitException("workbench page is null"); + throw new PartInitException("workbench page is null"); //$NON-NLS-1$ return wp.showView(id, secID, mode); } @@ -952,7 +953,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject { final IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); final IWorkbenchPage wp = ww.getActivePage(); if (wp == null) - throw new PartInitException("workbench page is null"); + throw new PartInitException("workbench page is null"); //$NON-NLS-1$ return wp.showView(id); } @@ -960,11 +961,11 @@ public class EclipseCollabSharedObject extends GenericSharedObject { return new FileReceiverUI() { public void receiveStart(ID from, File aFile, long length, float rate) { final User user = getUserForID(from); - String nick = "<unknown>"; + String nick = Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME; if (user != null) { nick = user.getNickname(); } - showRawLine(from, "\t" + nick + " is sending you " + aFile.getName() + "'", null); + showRawLine(from, NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING, nick, aFile.getName()), null); } public void receiveData(ID from, File aFile, int dataLength) { @@ -972,11 +973,11 @@ public class EclipseCollabSharedObject extends GenericSharedObject { public void receiveDone(ID from, File aFile, Exception e) { final User user = getUserForID(from); - String nick = "<unknown>"; + String nick = Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME; if (user != null) { nick = user.getNickname(); } - showRawLine(from, "\t'" + aFile.getName() + "' received from " + nick + ". Stored in: " + getLocalFullDownloadPath(), null); + showRawLine(from, NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED, new Object[] {aFile.getName(), nick, getLocalFullDownloadPath()}), null); refreshProject(); } }; diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java index e47a26d12..d1e141c52 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/GenericSharedObject.java @@ -38,7 +38,7 @@ import org.eclipse.ecf.core.util.Event; import org.eclipse.ecf.internal.example.collab.ClientPlugin; public class GenericSharedObject implements ISharedObject { - protected static final String ARGS_PROPERTY_NAME = "args"; + protected static final String ARGS_PROPERTY_NAME = "args"; //$NON-NLS-1$ protected static final class MsgMap { String meth; @@ -86,7 +86,7 @@ public class GenericSharedObject implements ISharedObject { // Send destroy message to all known remotes destroyRemote(null); } catch (IOException e) { - log("Exception sending destroy message to remotes", e); + log("Exception sending destroy message to remotes", e); //$NON-NLS-1$ } } destroySelfLocal(); @@ -350,8 +350,8 @@ public class GenericSharedObject implements ISharedObject { msgMap = new Hashtable(); else if (msgMap.containsKey(msg)) throw new IllegalArgumentException( - "registerProxy: proxy already registered for " - + method + " by " + target); + "registerProxy: proxy already registered for " //$NON-NLS-1$ + + method + " by " + target); //$NON-NLS-1$ // Then put entry into table with msg as key msgMap.put(msg, new MsgMap(target, method)); } @@ -371,7 +371,7 @@ public class GenericSharedObject implements ISharedObject { else return; } catch (IOException e) { - log("Exception in replicate", e); + log("Exception in replicate", e); //$NON-NLS-1$ } } @@ -381,7 +381,7 @@ public class GenericSharedObject implements ISharedObject { queue.enqueue(new RemoteSharedObjectMsgEvent(getID(), getContext() .getLocalContainerID(), msg)); } catch (QueueException e) { - log("QueueException enqueing message to self", e); + log("QueueException enqueing message to self", e); //$NON-NLS-1$ } } @@ -413,12 +413,12 @@ public class GenericSharedObject implements ISharedObject { return getContext().getSharedObjectManager() .createSharedObject(desc); } catch (Exception e) { - log("Exception creating replicated object", e); + log("Exception creating replicated object", e); //$NON-NLS-1$ throw e; } } else throw new Exception( - "Cannot send object creation request direct to target"); + "Cannot send object creation request direct to target"); //$NON-NLS-1$ } public String getUniqueString() { diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java index aeee3efa8..087e91907 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/HelloMessageSharedObject.java @@ -26,8 +26,8 @@ public class HelloMessageSharedObject extends GenericSharedObject { private String sender; public HelloMessageSharedObject() { - sender = "<unknown>"; - message = " says hello"; + sender = "<unknown>"; //$NON-NLS-1$ + message = " says hello"; //$NON-NLS-1$ } public HelloMessageSharedObject(String message, String sender) { @@ -68,13 +68,13 @@ public class HelloMessageSharedObject extends GenericSharedObject { public void run() { Display.getDefault().beep(); MessageDialog.openInformation(null, NLS.bind( - "Message from ", sender), NLS.bind( - "{0} says {1}", sender, message)); + "Message from ", sender), NLS.bind( //$NON-NLS-1$ + "{0} says {1}", sender, message)); //$NON-NLS-1$ } }); } } catch (Exception e) { - log("Exception showing message dialog ", e); + log("Exception showing message dialog ", e); //$NON-NLS-1$ } destroySelf(); } diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java index 14d86c8be..01377c342 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/RemoteSharedObjectMsgEvent.java @@ -32,10 +32,10 @@ public class RemoteSharedObjectMsgEvent extends RemoteSharedObjectEvent { } public String toString() { - StringBuffer buf = new StringBuffer("RemoteSharedObjectMsgEvent["); - buf.append(getSenderSharedObjectID()).append(";").append( - getRemoteContainerID()).append(";").append(getMsg()); - buf.append("]"); + StringBuffer buf = new StringBuffer("RemoteSharedObjectMsgEvent["); //$NON-NLS-1$ + buf.append(getSenderSharedObjectID()).append(";").append( //$NON-NLS-1$ + getRemoteContainerID()).append(";").append(getMsg()); //$NON-NLS-1$ + buf.append("]"); //$NON-NLS-1$ return buf.toString(); } } diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java index b81a892af..13c822f3b 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/SharedObjectMsg.java @@ -20,6 +20,8 @@ import java.security.PrivilegedExceptionAction; import org.eclipse.core.runtime.Assert; import org.eclipse.ecf.core.identity.ID; +import org.eclipse.ecf.internal.example.collab.Messages; +import org.eclipse.osgi.util.NLS; public class SharedObjectMsg implements Serializable { static final long serialVersionUID = 571132189626558278L; @@ -28,7 +30,7 @@ public class SharedObjectMsg implements Serializable { class SenderID { - private ID id; + private final ID id; // No instances other than ones created in SharedObjectMsg.invokeFrom/2 protected SenderID(ID theID) { @@ -39,9 +41,9 @@ public class SharedObjectMsg implements Serializable { return id; } } + // Static factory methods for creating SharedObjectMsg instances - public static SharedObjectMsg createMsg(String className, - String methodName, Object[] param) { + public static SharedObjectMsg createMsg(String className, String methodName, Object[] param) { Assert.isNotNull(methodName); Assert.isNotNull(param); return new SharedObjectMsg(className, methodName, param); @@ -59,9 +61,8 @@ public class SharedObjectMsg implements Serializable { return createMsg(className, methodName, nullArgs); } - public static SharedObjectMsg createMsg(String className, - String methodName, Object arg) { - Object args[] = { arg }; + public static SharedObjectMsg createMsg(String className, String methodName, Object arg) { + final Object args[] = {arg}; return createMsg(className, methodName, args); } @@ -69,29 +70,23 @@ public class SharedObjectMsg implements Serializable { return createMsg((String) null, methodName, arg); } - public static SharedObjectMsg createMsg(String className, - String methodName, Object arg1, Object arg2) { - Object args[] = { arg1, arg2 }; + public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2) { + final Object args[] = {arg1, arg2}; return createMsg(className, methodName, args); } - public static SharedObjectMsg createMsg(String className, - String methodName, Object arg1, Object arg2, Object arg3) { - Object args[] = { arg1, arg2, arg3 }; + public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2, Object arg3) { + final Object args[] = {arg1, arg2, arg3}; return createMsg(className, methodName, args); } - public static SharedObjectMsg createMsg(String className, - String methodName, Object arg1, Object arg2, Object arg3, - Object arg4) { - Object args[] = { arg1, arg2, arg3, arg4 }; + public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2, Object arg3, Object arg4) { + final Object args[] = {arg1, arg2, arg3, arg4}; return createMsg(className, methodName, args); } - public static SharedObjectMsg createMsg(String className, - String methodName, Object arg1, Object arg2, Object arg3, - Object arg4, Object arg5) { - Object args[] = { arg1, arg2, arg3, arg4, arg5 }; + public static SharedObjectMsg createMsg(String className, String methodName, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) { + final Object args[] = {arg1, arg2, arg3, arg4, arg5}; return createMsg(className, methodName, args); } @@ -108,8 +103,7 @@ public class SharedObjectMsg implements Serializable { * @exception ClassNotFoundException * thrown if specified class is not found */ - public static Class getClass(ClassLoader loader, String name) - throws ClassNotFoundException { + public static Class getClass(ClassLoader loader, String name) throws ClassNotFoundException { if (name == null) return null; return Class.forName(name, true, loader); @@ -167,23 +161,21 @@ public class SharedObjectMsg implements Serializable { static Method findMethod(final Class clazz, String meth, Class args[]) { Method methods[] = null; try { - methods = (Method[]) AccessController - .doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - return clazz.getDeclaredMethods(); - } - }); - } catch (PrivilegedActionException e) { + methods = (Method[]) AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + return clazz.getDeclaredMethods(); + } + }); + } catch (final PrivilegedActionException e) { return null; } return searchForMethod(methods, meth, args); } - public static Method searchForMethod(Method meths[], String meth, - Class args[]) { + public static Method searchForMethod(Method meths[], String meth, Class args[]) { // Find it from among the given set of Method objects for (int i = 0; i < meths.length; i++) { - Method test = meths[i]; + final Method test = meths[i]; if (test.getName().equals(meth)) { if (test.getParameterTypes().length == args.length) return test; @@ -205,11 +197,10 @@ public class SharedObjectMsg implements Serializable { * method for execution * @return Method instance if found, null if not found */ - public static Method findMethodRecursive(Class clazz, String meth, - Class args[]) { - Method aMethod = findMethod(clazz, meth, args); + public static Method findMethodRecursive(Class clazz, String meth, Class args[]) { + final Method aMethod = findMethod(clazz, meth, args); if (aMethod == null) { - Class superclazz = clazz.getSuperclass(); + final Class superclazz = clazz.getSuperclass(); if (superclazz != null) return findMethodRecursive(superclazz, meth, args); else @@ -229,13 +220,11 @@ public class SharedObjectMsg implements Serializable { * thrown if any objects in args array do not implement the * Serializable interface */ - public static void checkForSerializable(SharedObjectMsg aMsg) - throws NotSerializableException { - Object args[] = aMsg.getArgs(); + public static void checkForSerializable(SharedObjectMsg aMsg) throws NotSerializableException { + final Object args[] = aMsg.getArgs(); for (int i = 0; i < args.length; i++) { if (args[i] != null && !(args[i] instanceof Serializable)) - throw new NotSerializableException("Parameter " + i - + " not Serializable"); + throw new NotSerializableException(NLS.bind(Messages.SharedObjectMsg_EXCEPTION_NOT_SERIALIZABLE, new Integer(i))); } } @@ -274,7 +263,7 @@ public class SharedObjectMsg implements Serializable { public final void setMethodName(String name) { checkAlterMsg(); if (name == null) - throw new NullPointerException("methodname cannot be null"); + throw new NullPointerException(Messages.SharedObjectMsg_EXCEPTION_METHOD_NOT_NULL); myMethodName = name; } @@ -325,7 +314,7 @@ public class SharedObjectMsg implements Serializable { Object doInvoke(final Object target) // package scope for security throws Exception { if (target == null) - throw new NoSuchMethodException("Null target"); + throw new NoSuchMethodException(Messages.SharedObjectMsg_EXCEPTION_NULL_TARGET); Method meth = null; if (myClassName == null) { // If not specific class is specified by SharedObjectMsg instance, @@ -334,8 +323,7 @@ public class SharedObjectMsg implements Serializable { } else { // If it is specified, then load the specified class, using the // target object's classloader - meth = findMethod(getClass(target.getClass().getClassLoader(), - myClassName)); + meth = findMethod(getClass(target.getClass().getClassLoader(), myClassName)); } // If no method was found, then throw if (meth == null) @@ -353,12 +341,11 @@ public class SharedObjectMsg implements Serializable { return toCall.invoke(target, getArgs()); } - public final Object invokeFrom(ID fromID, final Object target) - throws Exception { + public final Object invokeFrom(ID fromID, final Object target) throws Exception { // Setup new array of arguments with the fromID on the front Object[] newParams = null; - SenderID sender = new SenderID(fromID); - Object args[] = getArgs(); + final SenderID sender = new SenderID(fromID); + final Object args[] = getArgs(); if (args == null) { newParams = new Object[1]; newParams[0] = sender; @@ -374,19 +361,18 @@ public class SharedObjectMsg implements Serializable { } public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append("SharedObjectMsg[").append(myClassName).append(":").append( - myMethodName).append("("); + final StringBuffer sb = new StringBuffer(); + sb.append("SharedObjectMsg[").append(myClassName).append(":").append(myMethodName).append("("); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (myArgs == null) { sb.append(myArgs); } else { for (int i = 0; i < myArgs.length; i++) { if (i > 0) - sb.append(","); + sb.append(","); //$NON-NLS-1$ sb.append(myArgs[i]); } } - sb.append(")]"); + sb.append(")]"); //$NON-NLS-1$ return sb.toString(); } } diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java index ad4059e7e..176f9e6de 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TransactionSharedObject.java @@ -17,11 +17,12 @@ import java.util.Vector; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerTransaction; import org.eclipse.ecf.core.sharedobject.SharedObjectAddAbortException; +import org.eclipse.ecf.internal.example.collab.Messages; public class TransactionSharedObject extends GenericSharedObject implements ISharedObjectContainerTransaction { - public static final String REPLICA_COMMIT_MSG = "replicaCommit"; + public static final String REPLICA_COMMIT_MSG = "replicaCommit"; //$NON-NLS-1$ public static int DEFAULT_TIMEOUT = 30000; @@ -72,7 +73,7 @@ public class TransactionSharedObject extends GenericSharedObject implements } catch (Exception e) { // If throws exception, we're doomed state = ISharedObjectContainerTransaction.ABORTED; - log("unable to send create response to " + log("unable to send create response to " //$NON-NLS-1$ + getHomeContainerID(), e); } } @@ -145,7 +146,7 @@ public class TransactionSharedObject extends GenericSharedObject implements forwardMsgTo(fromID, SharedObjectMsg.createMsg((String) null, REPLICA_COMMIT_MSG)); } catch (Exception except) { - log("Exception sending commit message to " + fromID, except); + log("Exception sending commit message to " + fromID, except); //$NON-NLS-1$ } } } @@ -155,8 +156,8 @@ public class TransactionSharedObject extends GenericSharedObject implements if (isHost()) { synchronized (lock) { if (state == ISharedObjectContainerTransaction.VOTING) { - addRemoteParticipantFailed(member, new Exception("Member " - + member + " left")); + addRemoteParticipantFailed(member, new Exception("Member " //$NON-NLS-1$ + + member + " left")); //$NON-NLS-1$ } lock.notifyAll(); } @@ -171,12 +172,12 @@ public class TransactionSharedObject extends GenericSharedObject implements long wait = end - System.currentTimeMillis(); if (wait <= 0L) throw new SharedObjectAddAbortException( - "Timeout waiting for create responses"); + Messages.TransactionSharedObject_EXCEPTION_TIMEOUT); // Actually wait right here lock.wait(wait); } } catch (InterruptedException e) { - throw new SharedObjectAddAbortException("Wait interrupted"); + throw new SharedObjectAddAbortException(Messages.TransactionSharedObject_EXCEPTION_INTERUPTED); } catch (SharedObjectAddAbortException e1) { // Aborted for some reason. Clean up. doAbort(e1); @@ -217,7 +218,7 @@ public class TransactionSharedObject extends GenericSharedObject implements REPLICA_COMMIT_MSG)); } catch (Exception e2) { doAbort(new SharedObjectAddAbortException( - "Exception sending commit message", e2)); + Messages.TransactionSharedObject_EXCEPTION_ON_COMMIT_MESSAGE, e2)); } } // Set state variable to committed. @@ -264,7 +265,7 @@ public class TransactionSharedObject extends GenericSharedObject implements ID remoteID = (ID) failedParticipants.keys().nextElement(); Exception e = (Exception) failedParticipants.get(remoteID); // Abort! - throw new SharedObjectAddAbortException("Abort received", e); + throw new SharedObjectAddAbortException(Messages.TransactionSharedObject_EXCEPTION_FROM_ABORT, e); // If no problems, and the number of participants to here from is 0, // then we're done } else if (state == ISharedObjectContainerTransaction.VOTING diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java index 11813c1ef..57a53e0ed 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/TreeItem.java @@ -16,7 +16,7 @@ import java.io.Serializable; public class TreeItem implements Serializable { private static final long serialVersionUID = -1223990714505395727L; - public static final String DEFAULT_SEPARATOR = ": "; + public static final String DEFAULT_SEPARATOR = ": "; //$NON-NLS-1$ protected String label; protected String labelValue; protected String name; @@ -83,7 +83,7 @@ public class TreeItem implements Serializable { public String toString() { String lv = getLabelValue(); - if (lv == null || lv.equals("")) { + if (lv == null || lv.equals("")) { //$NON-NLS-1$ return getLabel(); } else return getLabel() + getSeparator() + getLabelValue(); 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 7c20820e4..2ffcd224b 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 @@ -21,9 +21,31 @@ public class Messages extends NLS { public static String EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR; public static String EclipseCollabHyperlink_EXCEPTION_OPEN_EDITOR_TITLE; public static String EclipseCollabHyperlink_MESSAGE_EXCEPTION_OPEN_EDITOR; + public static String EclipseCollabSharedObject_CANNOT_OPEN_EDITOR_MESSAGE; + public static String EclipseCollabSharedObject_CANNOT_OPEN_EDITOR_TITLE; + public static String EclipseCollabSharedObject_DIALOG_OPEN_SHARED_EDITOR_TEXT; + public static String EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED; + public static String EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING; + public static String EclipseCollabSharedObject_MARKER_NAME; + public static String EclipseCollabSharedObject_OPEN_SHARED_EDITOR_QUESTION; + public static String EclipseCollabSharedObject_PRIVATE_MESSAGE_TEXT; + public static String EclipseCollabSharedObject_PROJECT_NAME; + public static String EclipseCollabSharedObject_SCREEN_CAPTURE_FROM; + public static String EclipseCollabSharedObject_TITLE_BAR; + public static String EclipseCollabSharedObject_TREE_TOP_LABEL; + public static String EclipseCollabSharedObject_UNKNOWN_USERNAME; + public static String EclipseCollabSharedObject_WINDOW_TITLE; + public static String EclipseCollabSharedObject_WORKSPACE_RESOURCE_NAME; 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 SharedObjectMsg_EXCEPTION_METHOD_NOT_NULL; + public static String SharedObjectMsg_EXCEPTION_NOT_SERIALIZABLE; + public static String SharedObjectMsg_EXCEPTION_NULL_TARGET; + 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; 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/messages.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/messages.properties index ffeaaa52a..1e5073141 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,6 +1,28 @@ 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. +EclipseCollabSharedObject_CANNOT_OPEN_EDITOR_MESSAGE={0} was not found in your workspace. +EclipseCollabSharedObject_CANNOT_OPEN_EDITOR_TITLE=Cannot open editor +EclipseCollabSharedObject_DIALOG_OPEN_SHARED_EDITOR_TEXT=Open Shared Editor? +EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED=\t{0} received from {1}. Stored in: {2} +EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING=\t{0} is sending you {1} +EclipseCollabSharedObject_MARKER_NAME=ECF marker +EclipseCollabSharedObject_OPEN_SHARED_EDITOR_QUESTION=Open shared editor for {0} from {1}? +EclipseCollabSharedObject_PRIVATE_MESSAGE_TEXT=Private Message from {0} +EclipseCollabSharedObject_PROJECT_NAME=Collaboration for {0} \n\n +EclipseCollabSharedObject_SCREEN_CAPTURE_FROM=Screen capture from +EclipseCollabSharedObject_TITLE_BAR=Collaboration: {0} +EclipseCollabSharedObject_TREE_TOP_LABEL=Presence +EclipseCollabSharedObject_UNKNOWN_USERNAME=<unknown> +EclipseCollabSharedObject_WINDOW_TITLE=Chat +EclipseCollabSharedObject_WORKSPACE_RESOURCE_NAME=<workspace> 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 +SharedObjectMsg_EXCEPTION_METHOD_NOT_NULL=methodname cannot be null +SharedObjectMsg_EXCEPTION_NOT_SERIALIZABLE=Parameter {0} not Serializable +SharedObjectMsg_EXCEPTION_NULL_TARGET=Null target +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 |