Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsuen2009-04-23 13:11:55 -0400
committerrsuen2009-04-23 13:11:55 -0400
commitb4f793db6149526da75878a936d7dcf25d897c10 (patch)
tree5b03b6223dd91ceb62dfe92f2ed6a62afceefc05
parent009503f4f839046be5a0b8474a2469c438f69e04 (diff)
downloadorg.eclipse.ecf-b4f793db6149526da75878a936d7dcf25d897c10.tar.gz
org.eclipse.ecf-b4f793db6149526da75878a936d7dcf25d897c10.tar.xz
org.eclipse.ecf-b4f793db6149526da75878a936d7dcf25d897c10.zip
Bug 264887 correct/remove warnings on ECF projects
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/Messages.java59
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteAction.java7
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteOperation.java10
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithHandler.java10
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithMenuContributionItem.java3
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithHandler.java22
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithMenuContributionItem.java3
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/messages.properties42
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/subscriber/RemoteSubscriberParticipant.java17
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizard.java10
-rw-r--r--framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizardPage.java7
11 files changed, 154 insertions, 36 deletions
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/Messages.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/Messages.java
new file mode 100644
index 000000000..a5c132e08
--- /dev/null
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/Messages.java
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * Copyright (c) 2009 Remy Chi Jian Suen and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remy Chi Jian Suen - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.team.internal.ecf.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.team.internal.ecf.ui.messages"; //$NON-NLS-1$
+
+ public static String OverrideWithRemoteAction_ActionLabel;
+ public static String OverrideWithRemoteOperation_SubTaskName;
+ public static String OverrideWithRemoteOperation_CreatingResource;
+ public static String OverrideWithRemoteOperation_ReplacingResource;
+ public static String OverrideWithRemoteOperation_DeletingResource;
+
+ public static String CompareWithHandler_FileNotSelectedError;
+ public static String CompareWithHandler_ResourceComparisonJobTitle;
+ public static String CompareWithHandler_CompareInputDescription;
+ public static String CompareWithHandler_CompareEditorWorkbenchJobTitle;
+
+ public static String CompareWithMenuContributionItem_MenuTitle;
+
+ public static String SynchronizeWithHandler_SynchronizeResourceTaskName;
+ public static String SynchronizeWithHandler_SynchronizeResourcesTaskName;
+ public static String SynchronizeWithHandler_SynchronizeRequestDenial;
+ public static String SynchronizeWithHandler_SynchronizeRequestError;
+ public static String SynchronizeWithHandler_SynchronizeRequestInterrupted;
+ public static String SynchronizeWithHandler_RemoteSynchronizationTaskName;
+ public static String SynchronizeWithHandler_RemoteSynchronizationResourceDescription;
+ public static String SynchronizeWithHandler_RemoteSynchronizationResourcesDescription;
+
+ public static String SynchronizeWithMenuContributionItem_MenuTitle;
+
+ public static String RemoteSubscriberParticipant_PageDescription;
+
+ public static String RemotePeerSynchronizeWizard_WindowTitle;
+
+ public static String RemotePeerSynchronizeWizardPage_Title;
+ public static String RemotePeerSynchronizeWizardPage_Description;
+ public static String RemotePeerSynchronizeWizardPage_NoRemotePeerSelectedError;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ // private constructor to prevent instantiation
+ }
+
+}
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteAction.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteAction.java
index 2623bf4e9..f650f0a6a 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteAction.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteAction.java
@@ -11,14 +11,13 @@
package org.eclipse.team.internal.ecf.ui.actions;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
+import org.eclipse.team.internal.ecf.ui.Messages;
+import org.eclipse.team.ui.synchronize.*;
public class OverrideWithRemoteAction extends SynchronizeModelAction {
public OverrideWithRemoteAction(ISynchronizePageConfiguration configuration) {
- super("Override with Remote", configuration);
+ super(Messages.OverrideWithRemoteAction_ActionLabel, configuration);
}
// protected boolean updateSelection(IStructuredSelection selection) {
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteOperation.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteOperation.java
index 3824043bc..23a357f46 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteOperation.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/actions/OverrideWithRemoteOperation.java
@@ -17,9 +17,11 @@ import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
@@ -62,7 +64,7 @@ class OverrideWithRemoteOperation extends SynchronizeModelOperation {
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask("", syncInfos.length); //$NON-NLS-1$
- monitor.subTask("Overriding resources with remote copy...");
+ monitor.subTask(Messages.OverrideWithRemoteOperation_SubTaskName);
for (int i = 0; i < syncInfos.length; i++) {
if (monitor.isCanceled()) {
@@ -74,7 +76,7 @@ class OverrideWithRemoteOperation extends SynchronizeModelOperation {
switch (syncInfos[i].getKind() & SyncInfo.CHANGE_MASK) {
case SyncInfo.ADDITION :
- monitor.subTask("Creating " + resource.getName() + "...");
+ monitor.subTask(NLS.bind(Messages.OverrideWithRemoteOperation_CreatingResource, resource.getName()));
switch (resource.getType()) {
case IResource.FILE :
IStorage storage = remoteVariant.getStorage(null);
@@ -101,7 +103,7 @@ class OverrideWithRemoteOperation extends SynchronizeModelOperation {
case SyncInfo.CHANGE :
switch (resource.getType()) {
case IResource.FILE :
- monitor.subTask("Replacing " + resource.getName() + " with remote content...");
+ monitor.subTask(NLS.bind(Messages.OverrideWithRemoteOperation_ReplacingResource, resource.getName()));
IStorage storage = remoteVariant.getStorage(null);
((IFile) resource).setContents(storage.getContents(), true, true, new SubProgressMonitor(monitor, 1));
break;
@@ -112,7 +114,7 @@ class OverrideWithRemoteOperation extends SynchronizeModelOperation {
break;
case SyncInfo.DELETION :
if (resource.exists()) {
- monitor.subTask("Deleting " + resource.getName() + "...");
+ monitor.subTask(NLS.bind(Messages.OverrideWithRemoteOperation_DeletingResource, resource.getName()));
}
resource.delete(true, new SubProgressMonitor(monitor, 1));
break;
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithHandler.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithHandler.java
index 7b4a12b5b..6f92c6697 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithHandler.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithHandler.java
@@ -26,11 +26,13 @@ import org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuHandler;
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.team.core.TeamException;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.internal.ecf.core.RemoteShare;
import org.eclipse.team.internal.ecf.core.TeamSynchronization;
import org.eclipse.team.internal.ecf.core.variants.RemoteResourceVariantTreeSubscriber;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.team.ui.synchronize.SyncInfoCompareInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -52,14 +54,14 @@ class CompareWithHandler extends AbstractRosterMenuHandler {
final IResource resource = getResource(event);
if (resource == null) {
- MessageDialog.openInformation(HandlerUtil.getActiveShell(event), null, "A file must be selected for comparison.");
+ MessageDialog.openInformation(HandlerUtil.getActiveShell(event), null, Messages.CompareWithHandler_FileNotSelectedError);
return null;
}
RemoteShare share = TeamSynchronization.getShare(container.getID());
final RemoteResourceVariantTreeSubscriber subscriber = new RemoteResourceVariantTreeSubscriber(share, localId, remoteId);
- Job job = new Job("Resource Compare with Remote Peer") {
+ Job job = new Job(Messages.CompareWithHandler_ResourceComparisonJobTitle) {
protected IStatus run(IProgressMonitor monitor) {
try {
openCompareEditor(subscriber.getSyncInfo(resource, monitor), remoteUser);
@@ -75,8 +77,8 @@ class CompareWithHandler extends AbstractRosterMenuHandler {
}
void openCompareEditor(SyncInfo syncInfo, IUser user) {
- final SyncInfoCompareInput input = new SyncInfoCompareInput("Remote Peer (" + user.getNickname() + ")", syncInfo);
- WorkbenchJob job = new WorkbenchJob("Compare Editor Renderer") {
+ final SyncInfoCompareInput input = new SyncInfoCompareInput(NLS.bind(Messages.CompareWithHandler_CompareInputDescription, user.getNickname()), syncInfo);
+ WorkbenchJob job = new WorkbenchJob(Messages.CompareWithHandler_CompareEditorWorkbenchJobTitle) {
public IStatus runInUIThread(IProgressMonitor monitor) {
CompareUI.openCompareEditor(input, true);
return Status.OK_STATUS;
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithMenuContributionItem.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithMenuContributionItem.java
index 29bbc327b..e51a3a250 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithMenuContributionItem.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/CompareWithMenuContributionItem.java
@@ -16,6 +16,7 @@ import org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuHandler;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.menus.IWorkbenchContribution;
import org.eclipse.ui.services.IServiceLocator;
@@ -25,7 +26,7 @@ public class CompareWithMenuContributionItem extends AbstractRosterMenuContribut
private ISelectionService selectionService;
public CompareWithMenuContributionItem() {
- setTopMenuName("Compare With");
+ setTopMenuName(Messages.CompareWithMenuContributionItem_MenuTitle);
}
public void initialize(IServiceLocator serviceLocator) {
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithHandler.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithHandler.java
index 67b40e80d..61c49aa6d 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithHandler.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithHandler.java
@@ -30,9 +30,11 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.internal.ecf.core.RemoteShare;
import org.eclipse.team.internal.ecf.core.TeamSynchronization;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant;
import org.eclipse.team.internal.ecf.ui.wizards.RemotePeerSynchronizeWizard;
import org.eclipse.team.ui.TeamUI;
@@ -68,9 +70,9 @@ class SynchronizeWithHandler extends AbstractRosterMenuHandler {
IRunnableWithProgress runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (resources.length == 1) {
- monitor.beginTask("Contacting remote peer to synchronize " + resources[0].getName() + "...", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(NLS.bind(Messages.SynchronizeWithHandler_SynchronizeResourceTaskName, resources[0].getName()), IProgressMonitor.UNKNOWN);
} else {
- monitor.beginTask("Contacting remote peer to synchronize resources...", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.SynchronizeWithHandler_SynchronizeResourcesTaskName, IProgressMonitor.UNKNOWN);
}
try {
@@ -95,18 +97,18 @@ class SynchronizeWithHandler extends AbstractRosterMenuHandler {
dialog.run(true, true, runnable);
if (!response[0]) {
- MessageDialog.openInformation(shell, null, "Synchronization request has been denied.");
+ MessageDialog.openInformation(shell, null, Messages.SynchronizeWithHandler_SynchronizeRequestDenial);
}
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause instanceof ECFException) {
- MessageDialog.openError(shell, null, "An error has occurred while sending the synchronization request to the remote peer");
+ MessageDialog.openError(shell, null, Messages.SynchronizeWithHandler_SynchronizeRequestError);
}
- TeamSynchronization.log("Failed to contact remote peer", cause);
+ TeamSynchronization.log("Failed to contact remote peer", cause); //$NON-NLS-1$
} catch (InterruptedException e) {
Thread.interrupted();
- MessageDialog.openError(shell, null, "Synchronization request operation was interrupted");
- TeamSynchronization.log("Synchronization request operation was interrupted", e);
+ MessageDialog.openError(shell, null, Messages.SynchronizeWithHandler_SynchronizeRequestInterrupted);
+ TeamSynchronization.log("Synchronization request operation was interrupted", e); //$NON-NLS-1$
}
return null;
@@ -118,7 +120,11 @@ class SynchronizeWithHandler extends AbstractRosterMenuHandler {
TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- participant.refresh(resources, "Remote synchronization with " + remoteUser.getNickname(), "Remote synchronization of " + " with " + remoteUser.getNickname(), site);
+ if (resources.length == 1) {
+ participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourceDescription, resources[0].getName(), remoteUser.getNickname()), site);
+ } else {
+ participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourcesDescription, remoteUser.getNickname()), site);
+ }
}
public IResource[] getResources(ExecutionEvent event) throws ExecutionException {
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithMenuContributionItem.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithMenuContributionItem.java
index 7f06c7e89..7e61da8ab 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithMenuContributionItem.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/handlers/SynchronizeWithMenuContributionItem.java
@@ -13,11 +13,12 @@ package org.eclipse.team.internal.ecf.ui.handlers;
import org.eclipse.ecf.presence.roster.IRosterEntry;
import org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuContributionItem;
import org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuHandler;
+import org.eclipse.team.internal.ecf.ui.Messages;
public class SynchronizeWithMenuContributionItem extends AbstractRosterMenuContributionItem {
public SynchronizeWithMenuContributionItem() {
- setTopMenuName("Synchronize With");
+ setTopMenuName(Messages.SynchronizeWithMenuContributionItem_MenuTitle);
}
protected AbstractRosterMenuHandler createRosterEntryHandler(IRosterEntry rosterEntry) {
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/messages.properties b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/messages.properties
new file mode 100644
index 000000000..a78729eb4
--- /dev/null
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/messages.properties
@@ -0,0 +1,42 @@
+################################################################################
+# Copyright (c) 2009 Remy Chi Jian Suen and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Remy Chi Jian Suen - initial API and implementation
+################################################################################
+
+OverrideWithRemoteAction_ActionLabel = Override with Remote
+OverrideWithRemoteOperation_SubTaskName = Overriding resources with remote copy...
+OverrideWithRemoteOperation_CreatingResource = Creating {0}...
+OverrideWithRemoteOperation_ReplacingResource = Replacing {0} with remote content...
+OverrideWithRemoteOperation_DeletingResource = Deleting {0}...
+
+CompareWithHandler_FileNotSelectedError = A file must be selected for comparison.
+CompareWithHandler_ResourceComparisonJobTitle = Resource Compare with Remote Peer
+CompareWithHandler_CompareInputDescription = Remote Peer ({0})
+CompareWithHandler_CompareEditorWorkbenchJobTitle = Compare Editor Renderer
+
+CompareWithMenuContributionItem_MenuTitle = Compare With
+
+SynchronizeWithHandler_SynchronizeResourceTaskName = Contacting remote peer to synchronize {0}...
+SynchronizeWithHandler_SynchronizeResourcesTaskName = Contacting remote peer to synchronize resources...
+SynchronizeWithHandler_SynchronizeRequestDenial = Synchronization request has been denied.
+SynchronizeWithHandler_SynchronizeRequestError = An error has occurred while sending the synchronization request to the remote peer.
+SynchronizeWithHandler_SynchronizeRequestInterrupted = Synchronization request operation was interrupted.
+SynchronizeWithHandler_RemoteSynchronizationTaskName = Remote synchronization with {0}
+SynchronizeWithHandler_RemoteSynchronizationResourceDescription = Remote synchronization of {0} with {1}
+SynchronizeWithHandler_RemoteSynchronizationResourcesDescription = Remote synchronization of resources with {0}
+
+SynchronizeWithMenuContributionItem_MenuTitle = Synchronize With
+
+RemoteSubscriberParticipant_PageDescription = Remote Peer
+
+RemotePeerSynchronizeWizard_WindowTitle = Synchronize
+
+RemotePeerSynchronizeWizardPage_Title = Synchronize with Remote Peer
+RemotePeerSynchronizeWizardPage_Description = Select the resources to be synchronized.
+RemotePeerSynchronizeWizardPage_NoRemotePeerSelectedError = A remote peer must be selected to synchronize with.
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/subscriber/RemoteSubscriberParticipant.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/subscriber/RemoteSubscriberParticipant.java
index 14f605f2d..a4559c4c3 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/subscriber/RemoteSubscriberParticipant.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/subscriber/RemoteSubscriberParticipant.java
@@ -14,10 +14,9 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.team.internal.ecf.core.RemoteShare;
import org.eclipse.team.internal.ecf.core.variants.RemoteResourceVariantTreeSubscriber;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.team.internal.ecf.ui.actions.OverrideWithRemoteAction;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
+import org.eclipse.team.ui.synchronize.*;
public class RemoteSubscriberParticipant extends SubscriberParticipant {
@@ -32,12 +31,12 @@ public class RemoteSubscriberParticipant extends SubscriberParticipant {
protected void initializeConfiguration(final ISynchronizePageConfiguration configuration) {
super.initializeConfiguration(configuration);
- configuration.setProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION, "Remote Peer");
+ configuration.setProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION, Messages.RemoteSubscriberParticipant_PageDescription);
configuration.addActionContribution(new SynchronizePageActionGroup() {
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- appendToGroup(ISynchronizePageConfiguration.P_CONTEXT_MENU, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, new OverrideWithRemoteAction(configuration));
+ public void initialize(ISynchronizePageConfiguration pageConfiguration) {
+ super.initialize(pageConfiguration);
+ appendToGroup(ISynchronizePageConfiguration.P_CONTEXT_MENU, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, new OverrideWithRemoteAction(pageConfiguration));
}
});
@@ -46,12 +45,12 @@ public class RemoteSubscriberParticipant extends SubscriberParticipant {
}
public String getName() {
- return "Remote Peer";
+ return Messages.RemoteSubscriberParticipant_PageDescription;
}
public String getId() {
// note, this value needs to match the value in the plugin.xml
- return "org.eclipse.ecf.sync.team.participant";
+ return "org.eclipse.ecf.sync.team.participant"; //$NON-NLS-1$
}
public String getSecondaryId() {
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizard.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizard.java
index 1ee146b85..f016aec46 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizard.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizard.java
@@ -15,8 +15,10 @@ import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.user.IUser;
import org.eclipse.ecf.presence.roster.IRosterEntry;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.team.internal.ecf.core.RemoteShare;
import org.eclipse.team.internal.ecf.core.TeamSynchronization;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.team.internal.ecf.ui.subscriber.RemoteSubscriberParticipant;
import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
@@ -26,7 +28,7 @@ public class RemotePeerSynchronizeWizard extends Wizard {
private RemotePeerSynchronizeWizardPage page;
public RemotePeerSynchronizeWizard() {
- setWindowTitle("Synchronize");
+ setWindowTitle(Messages.RemotePeerSynchronizeWizard_WindowTitle);
}
public void addPages() {
@@ -47,7 +49,11 @@ public class RemotePeerSynchronizeWizard extends Wizard {
TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- participant.refresh(resources, "Remote synchronization with " + remoteUser.getNickname(), "Remote synchronization of " + " with " + remoteUser.getNickname(), null);
+ if (resources.length == 1) {
+ participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourceDescription, resources[0].getName(), remoteUser.getNickname()), null);
+ } else {
+ participant.refresh(resources, NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationTaskName, remoteUser.getNickname()), NLS.bind(Messages.SynchronizeWithHandler_RemoteSynchronizationResourcesDescription, remoteUser.getNickname()), null);
+ }
return true;
}
diff --git a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizardPage.java b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizardPage.java
index 90d7d37fa..25e3dd183 100644
--- a/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizardPage.java
+++ b/framework/bundles/org.eclipse.team.ecf.ui/src/org/eclipse/team/internal/ecf/ui/wizards/RemotePeerSynchronizeWizardPage.java
@@ -25,6 +25,7 @@ import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.team.internal.ecf.ui.Messages;
import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
@@ -37,8 +38,8 @@ class RemotePeerSynchronizeWizardPage extends WizardPage {
RemotePeerSynchronizeWizardPage() {
super(RemotePeerSynchronizeWizardPage.class.getName());
- setTitle("Synchronize with Remote Peer");
- setDescription("Select the resources to be synchronized.");
+ setTitle(Messages.RemotePeerSynchronizeWizardPage_Title);
+ setDescription(Messages.RemotePeerSynchronizeWizardPage_Description);
}
public void createControl(Composite parent) {
@@ -188,7 +189,7 @@ class RemotePeerSynchronizeWizardPage extends WizardPage {
IStructuredSelection selection = (IStructuredSelection) peersViewer.getSelection();
if (!(selection.getFirstElement() instanceof IRosterEntry)) {
- setErrorMessage("A remote peer must be selected to synchronize with.");
+ setErrorMessage(Messages.RemotePeerSynchronizeWizardPage_NoRemotePeerSelectedError);
setPageComplete(false);
return;
}

Back to the top