Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-06-06 19:53:41 +0000
committerJean Michel-Lemieux2002-06-06 19:53:41 +0000
commitf8a5f33211f281d2e06f29ef8417d999e314a043 (patch)
tree90701cb0c07d3b352c497dbd82656889e7888360 /bundles
parentda4e1343b01e9f4997a3b567d227d1cd7a072b49 (diff)
downloadeclipse.platform.team-f8a5f33211f281d2e06f29ef8417d999e314a043.tar.gz
eclipse.platform.team-f8a5f33211f281d2e06f29ef8417d999e314a043.tar.xz
eclipse.platform.team-f8a5f33211f281d2e06f29ef8417d999e314a043.zip
2.0 Fix Pass 3: NLS and progress monitoring
Reviewed by Mike Valenta
Diffstat (limited to 'bundles')
-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/SynchronizedTargetProvider.java22
3 files changed, 19 insertions, 6 deletions
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/SynchronizedTargetProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
index fd9bfc59a..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$
}
}
@@ -115,8 +115,14 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
public void get(final IResource[] resources, IProgressMonitor progress) throws TeamException {
run(new ITargetRunnable() {
public void run(IProgressMonitor monitor) throws TeamException {
- for (int i = 0; i < resources.length; i++) {
- getState(resources[i]).get(IResource.DEPTH_INFINITE, monitor);
+ 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, Policy.subMonitorFor(monitor, 100));
+ }
+ } finally {
+ monitor.done();
}
}
}, Policy.monitorFor(progress));
@@ -145,8 +151,14 @@ public abstract class SynchronizedTargetProvider extends TargetProvider {
public void put(final IResource[] resources, IProgressMonitor progress) throws TeamException {
run(new ITargetRunnable() {
public void run(IProgressMonitor monitor) throws TeamException {
- for (int i = 0; i < resources.length; i++) {
- getState(resources[i]).put(monitor);
+ monitor = Policy.monitorFor(monitor);
+ try {
+ monitor.beginTask(null, resources.length * 100);
+ for (int i = 0; i < resources.length; i++) {
+ getState(resources[i]).put(Policy.subMonitorFor(monitor, 100));
+ }
+ } finally {
+ monitor.done();
}
}
}, Policy.monitorFor(progress));

Back to the top