Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-06-06 15:17:09 -0400
committerJean Michel-Lemieux2002-06-06 15:17:09 -0400
commit0e0723b844a87bed3de322150f72afd4e4bdee44 (patch)
treeed3f8f0a0a0e617eec4fde357bac474d46e2ff73
parentfbe29f6177ef2f473593ba45a87b852f26706bec (diff)
downloadeclipse.platform.team-jlemieux_f3_fixes.tar.gz
eclipse.platform.team-jlemieux_f3_fixes.tar.xz
eclipse.platform.team-jlemieux_f3_fixes.zip
*** empty log message ***jlemieux_f3_fixes
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java2
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties1
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java10
-rw-r--r--bundles/org.eclipse.team.ui/plugin.properties2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java6
13 files changed, 34 insertions, 38 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java
index 96dc240cf..05b3375f9 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java
@@ -43,21 +43,19 @@ public abstract class TargetProvider {
* If the remote resource is a container (e.g. folder or project) this operation is equivalent
* to getting each member of the remote resource, thereby updating the
* content of existing local members, creating local members to receive new remote resources,
- * and optionally deleting local members that no longer have a corresponding remote resource.</p>
+ * deleting local members that no longer have a corresponding remote resource.</p>
* <p>
* Interrupting the method (via the progress monitor) may lead to partial, but consistent, results.</p>
*
* @param resources an array of local resources to update from the corresponding remote
* resources.
- * @param deleteLocalResources if <code>true</code> the operation will delete local resources that
- * aren't on the server and if <code>false</code> local resources won't be deleted.
* @param progress a progress monitor to indicate the duration of the operation, or
* <code>null</code> if progress reporting is not required.
* @throws TeamException if there is a problem getting one or more of the resources. The
* exception will contain multiple statuses, one for each resource in the <code>resources</code>
* array.
*/
- public abstract void get(IResource[] resources, boolean deleteLocalResources, IProgressMonitor progress) throws TeamException;
+ public abstract void get(IResource[] resources, IProgressMonitor progress) throws TeamException;
/**
* Updates the local resource to have the same content as the given remote
@@ -66,21 +64,19 @@ public abstract class TargetProvider {
* If the remote resource is a container (e.g. folder or project) this operation is equivalent
* to getting each non-container member of the remote resource, thereby updating the
* content of existing local members, creating local members to receive new remote resources,
- * and optionally deleting local members that no longer have a corresponding remote resource.</p>
+ * deleting local members that no longer have a corresponding remote resource.</p>
* <p>
* Interrupting the method (via the progress monitor) may lead to partial, but consistent, results.</p>
*
* @param resources an array of local resources to update from the corresponding remote
* resources.
- * @param deleteLocalResources if <code>true</code> the operation will delete local resources that
- * aren't on the server and if <code>false</code> local resources won't be deleted.
* @param progress a progress monitor to indicate the duration of the operation, or
* <code>null</code> if progress reporting is not required.
* @throws TeamException if there is a problem getting one or more of the resources. The
* exception will contain multiple statuses, one for each resource in the <code>resources</code>
* array.
*/
- public abstract void get(IResource resource, IRemoteTargetResource remote, boolean deleteLocalResources, IProgressMonitor progress) throws TeamException;
+ public abstract void get(IResource resource, IRemoteTargetResource remote, IProgressMonitor progress) throws TeamException;
/**
* Transfers the content of the local resource to the corresponding remote resource.
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
index 87be9d472..e09373605 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
@@ -76,7 +76,7 @@ public class InfiniteSubProgressMonitor extends SubProgressMonitor {
* @see IProgressMonitor#subTask(String)
*/
public void subTask(String name) {
- if(name != null && ! name.equals("")) {
+ if(name != null && ! name.equals("")) { //$NON-NLS-1$
super.subTask(name);
}
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
index cc3c08959..0e99a25a1 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
@@ -67,3 +67,4 @@ filetransfer.monitor={0} ({1}K of {2}K bytes)
OK_1=OK
SynchronizedTargetProvider.invalid_url_combination=Could not form a valid URL from {0} and {1}
+SynchronizedTargetProvider.invalidURLCombination=SynchronizedTargetProvider.invalid_url_combination
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java
index 14912f45e..71f79de39 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java
@@ -506,7 +506,7 @@ public abstract class ResourceState {
/**
* Get the resource corresponding to the receiver to the specified depth.
*/
- protected final void get(int depth, boolean deleteLocal, IProgressMonitor progress) throws TeamException {
+ protected final void get(int depth, IProgressMonitor progress) throws TeamException {
progress = Policy.monitorFor(progress);
@@ -520,7 +520,7 @@ public abstract class ResourceState {
Policy.checkCanceled(progress);
// If remote does not exist then simply ensure no local resource exists.
- if (deleteLocal && !hasRemote(noProgress)) {
+ if (!hasRemote(noProgress)) {
if (hasLocal())
deleteLocal(noProgress);
return;
@@ -556,11 +556,11 @@ public abstract class ResourceState {
return;
case IResource.DEPTH_ONE :
// If we are considering only the immediate members of the collection
- getFolderShallow(deleteLocal, Policy.subMonitorFor(progress, 100));
+ getFolderShallow(Policy.subMonitorFor(progress, 100));
return;
case IResource.DEPTH_INFINITE :
// We are going in deep.
- getFolderDeep(deleteLocal, Policy.subMonitorFor(progress, 100));
+ getFolderDeep(Policy.subMonitorFor(progress, 100));
return;
default :
// We have covered all the legal cases.
@@ -575,12 +575,12 @@ public abstract class ResourceState {
/**
* Get the folder resource represented by the receiver deeply.
*/
- protected final void getFolderDeep(boolean deleteLocal, IProgressMonitor progress) throws TeamException {
+ protected final void getFolderDeep(IProgressMonitor progress) throws TeamException {
progress = Policy.monitorFor(progress);
try {
progress.beginTask(null, 10);
// Could throw if problem getting the folder at this level.
- ResourceState[] childFolders = getFolderShallow(deleteLocal, Policy.subMonitorFor(progress, 7));
+ ResourceState[] childFolders = getFolderShallow(Policy.subMonitorFor(progress, 7));
// If there are no further children then we are done.
if (childFolders.length == 0)
@@ -591,7 +591,7 @@ public abstract class ResourceState {
try {
subProgress.beginTask(null, childFolders.length);
for (int i = 0; i < childFolders.length; i++) {
- childFolders[i].get(IResource.DEPTH_INFINITE, deleteLocal, Policy.subMonitorFor(subProgress, 1));
+ childFolders[i].get(IResource.DEPTH_INFINITE, Policy.subMonitorFor(subProgress, 1));
}
} finally {
subProgress.done();
@@ -611,7 +611,7 @@ public abstract class ResourceState {
* returns an array of children of the remote resource that are themselves
* collections.
*/
- protected final ResourceState[] getFolderShallow(boolean deleteLocal, IProgressMonitor progress) throws TeamException {
+ protected final ResourceState[] getFolderShallow(IProgressMonitor progress) throws TeamException {
progress = Policy.monitorFor(progress);
IProgressMonitor noProgress = new NullProgressMonitor();
try {
@@ -649,7 +649,7 @@ public abstract class ResourceState {
remoteChildFolders.add(remoteChildState);
// If the local child is not a container then it must be deleted.
IResource localChild = remoteChildState.getLocal();
- if (deleteLocal && localChild.exists() && (!(localChild instanceof IContainer)))
+ if (localChild.exists() && (!(localChild instanceof IContainer)))
remoteChildState.deleteLocal(noProgress);
} // end if
} // end for
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
index 9300f355f..a86e310a4 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
@@ -57,7 +57,7 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
try {
targetURL = UrlUtil.concat(root, intrasitePath);
} catch (MalformedURLException e) {
- throw new TeamException(Policy.bind("SynchronizedTargetProvider.invalid_url_combination", root, intrasitePath.toString()), e);
+ throw new TeamException(Policy.bind(Policy.bind("SynchronizedTargetProvider.invalidURLCombination"), root, intrasitePath.toString()), e); //$NON-NLS-1$
}
}
@@ -112,14 +112,14 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
*
* @see TargetProvider.get(IResource[], int, IProgressMonitor)
*/
- public void get(final IResource[] resources, final boolean deleteLocal, IProgressMonitor progress) throws TeamException {
+ public void get(final IResource[] resources, IProgressMonitor progress) throws TeamException {
run(new ITargetRunnable() {
public void run(IProgressMonitor monitor) throws TeamException {
monitor = Policy.monitorFor(monitor);
try {
monitor.beginTask(null, resources.length * 100);
for (int i = 0; i < resources.length; i++) {
- getState(resources[i]).get(IResource.DEPTH_INFINITE, deleteLocal, monitor);
+ getState(resources[i]).get(IResource.DEPTH_INFINITE, Policy.subMonitorFor(monitor, 100));
}
} finally {
monitor.done();
@@ -134,10 +134,10 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
*
* @see TargetProvider.get(IResource, IRemoteTargetResource, IProgressMonitor)
*/
- public void get(final IResource resource, final IRemoteTargetResource remote, final boolean deleteLocal, IProgressMonitor progress) throws TeamException {
+ public void get(final IResource resource, final IRemoteTargetResource remote, IProgressMonitor progress) throws TeamException {
run(new ITargetRunnable() {
public void run(IProgressMonitor monitor) throws TeamException {
- getState(resource, remote).get(IResource.DEPTH_INFINITE, deleteLocal, monitor);
+ getState(resource, remote).get(IResource.DEPTH_INFINITE, monitor);
}
}, Policy.monitorFor(progress));
}
diff --git a/bundles/org.eclipse.team.ui/plugin.properties b/bundles/org.eclipse.team.ui/plugin.properties
index dd440743a..d9d1b4626 100644
--- a/bundles/org.eclipse.team.ui/plugin.properties
+++ b/bundles/org.eclipse.team.ui/plugin.properties
@@ -33,5 +33,5 @@ SiteExplorerGetAs.label=Download &As...
SiteExplorerGetAs.tooltip=Download the selected remote folder with a user specified project type and name.
SiteExplorerGetAsProject.label=&Download As Project
SiteExplorerGetAsProject.tooltip=Download the selected remote folder and create a project with the same name.
-SiteExplorerDiscardSite.label=&Discard Site
+SiteExplorerDiscardSite.label=D&iscard Site
SiteExplorerDiscardSite.tooltip=Discard the site \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java
index 3a8b30d85..814b584e7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java
@@ -324,7 +324,7 @@ public abstract class CatchupReleaseViewer extends DiffTreeViewer implements ISe
refresh.setToolTipText(Policy.bind("CatchupReleaseViewer.refreshAction")); //$NON-NLS-1$
// Expand action
- expandAll = new ExpandAllAction(Policy.bind("CatchupReleaseViewer.expand"), null);
+ expandAll = new ExpandAllAction(Policy.bind("CatchupReleaseViewer.expand"), null); //$NON-NLS-1$
// Toggle granularity
image = TeamImages.getImageDescriptor(UIConstants.IMG_CONTENTS);
@@ -338,7 +338,7 @@ public abstract class CatchupReleaseViewer extends DiffTreeViewer implements ISe
compareFileContents = diffModel.getSyncGranularity() != IRemoteSyncElement.GRANULARITY_TIMESTAMP;
toggleGranularity.setChecked(compareFileContents);
- removeFromTree = new RemoveFromTreeAction(Policy.bind("CatchupReleaseViewer.removeFromView"), null);
+ removeFromTree = new RemoveFromTreeAction(Policy.bind("CatchupReleaseViewer.removeFromView"), null); //$NON-NLS-1$
copyAllRightToLeft = new Action(Policy.bind("CatchupReleaseViewer.copyAllRightToLeft"), null) { //$NON-NLS-1$
public void run() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java
index 08f7ef68f..80ce5e052 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java
@@ -126,17 +126,16 @@ public class GetAction extends TargetAction {
try {
Hashtable table = getTargetProviderMapping();
Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
+ monitor.beginTask(null, keySet.size() * 1000);
// perform the get on each provider
Iterator iterator = keySet.iterator();
while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new InfiniteSubProgressMonitor(monitor, 1000);
TargetProvider provider = (TargetProvider)iterator.next();
monitor.setTaskName(Policy.bind("GetAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
List list = (List)table.get(provider);
IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.get(providerResources, true /* delete local resources */, subMonitor);
+ provider.get(providerResources, Policy.subInfiniteMonitorFor(monitor, 1000));
}
} catch (TeamException e) {
throw new InvocationTargetException(e);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java
index 422345ed1..81b1de0a2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java
@@ -119,7 +119,7 @@ public class GetAsProjectAction extends TargetAction {
}
TargetManager.map(project, site, UrlUtil.getTrailingPath(remote.getURL(), site.getURL()));
provider = TargetManager.getProvider(project);
- provider.get(project, remote, true /* delete local resources */, Policy.subMonitorFor(monitor, 90));
+ provider.get(project, remote, Policy.subMonitorFor(monitor, 90));
} finally {
monitor.done();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java
index 2227a5e26..620ea3022 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java
@@ -100,7 +100,7 @@ public class GetSyncAction extends TargetSyncAction {
monitor.setTaskName(Policy.bind("GetAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
List list = (List)table.get(provider);
IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.get(providerResources, false /* don't delete local resources */, subMonitor);
+ provider.get(providerResources, subMonitor);
}
} finally {
monitor.done();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java
index b3bc86624..4f12420d3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java
@@ -241,8 +241,8 @@ public class SiteExplorerView extends ViewPart implements ISiteListener {
folderTree.setSorter(new ViewerSorter() {
public int compare(Viewer viewer, Object e1, Object e2) {
- String name1 = "";
- String name2 = "";
+ String name1 = ""; //$NON-NLS-1$
+ String name2 = ""; //$NON-NLS-1$
if(e1 instanceof RemoteResourceElement) {
name1 = ((RemoteResourceElement)e1).getRemoteResource().getName();
} else if(e1 instanceof SiteElement) {
@@ -408,7 +408,7 @@ public class SiteExplorerView extends ViewPart implements ISiteListener {
selectedFolder = (RemoteResourceElement)folderContentsTable.getInput();
}
- IRemoteTargetResource newFolder = CreateNewFolderAction.createDir(shell, selectedFolder.getRemoteResource(), Policy.bind("CreateNewFolderAction.newFolderName"));
+ IRemoteTargetResource newFolder = CreateNewFolderAction.createDir(shell, selectedFolder.getRemoteResource(), Policy.bind("CreateNewFolderAction.newFolderName")); //$NON-NLS-1$
if (newFolder == null)
return;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java
index 2e47fd2dd..54a8e01db 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java
@@ -32,7 +32,7 @@ public class SiteExplorerViewLabelProvider extends WorkbenchLabelProvider implem
if(element instanceof RemoteResourceElement) {
RemoteResourceElement remote = ((RemoteResourceElement)element);
if(remote.getRemoteResource().isContainer()) {
- return "";
+ return ""; //$NON-NLS-1$
}
int size = remote.getSize();
int sizeKb = size / 1000;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java
index 322dced0d..6e28cb595 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java
@@ -80,8 +80,8 @@ public class UploadAction extends TargetAction {
new Runnable() {
public void run() {
MessageDialog.openInformation(getShell(),
- Policy.bind("UploadAction.noDirtyTitle"),
- Policy.bind("UploadAction.noDirtyMessage"));
+ Policy.bind("UploadAction.noDirtyTitle"), //$NON-NLS-1$
+ Policy.bind("UploadAction.noDirtyMessage")); //$NON-NLS-1$
}
});
return;
@@ -96,7 +96,7 @@ public class UploadAction extends TargetAction {
return ! resource.exists();
}
public String promptMessage(IResource resource) {
- return Policy.bind("UploadAction.confirmFileDeletionMessage", resource.getFullPath().toString());
+ return Policy.bind("UploadAction.confirmFileDeletionMessage", resource.getFullPath().toString()); //$NON-NLS-1$
}
},
Policy.bind("UploadAction.confirmDeletionTitle"));//$NON-NLS-1$

Back to the top