Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Macguire2002-04-05 01:01:22 -0500
committerKevin Macguire2002-04-05 01:01:22 -0500
commitd62a68978473637b3890bb6fadc318da887b41da (patch)
tree0daed0d46f95a92afaef34c00e7df4974b019f14
parentb2dd63cd5b1940f6641f393e26ee8854a4f23bf7 (diff)
downloadeclipse.platform.team-d62a68978473637b3890bb6fadc318da887b41da.tar.gz
eclipse.platform.team-d62a68978473637b3890bb6fadc318da887b41da.tar.xz
eclipse.platform.team-d62a68978473637b3890bb6fadc318da887b41da.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/FileModificationValidatorManager.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/messages.properties1
2 files changed, 13 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/FileModificationValidatorManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/FileModificationValidatorManager.java
index 13ec6971c..4ea81c123 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/FileModificationValidatorManager.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/FileModificationValidatorManager.java
@@ -48,6 +48,8 @@ public class FileModificationValidatorManager implements IFileModificationValida
Iterator providersIterator = providersToFiles.keySet().iterator();
+ boolean allOK = true;
+
//for each provider, validate its files
while(providersIterator.hasNext()) {
RepositoryProvider provider = (RepositoryProvider)providersIterator.next();
@@ -61,16 +63,24 @@ public class FileModificationValidatorManager implements IFileModificationValida
if (v != null) validator = v;
}
- returnStati.add(validator.validateEdit(filesArray, context));
+ IStatus status = validator.validateEdit(filesArray, context);
+ if(!status.isOK())
+ allOK = false;
+
+ returnStati.add(status);
}
if (returnStati.size() == 1) {
return (IStatus)returnStati.get(0);
}
+
return new MultiStatus(TeamPlugin.ID,
0,
(IStatus[])returnStati.toArray(new IStatus[returnStati.size()]),
- Policy.bind("FileModificationValidator.validateEdit"),
+ Policy.bind(
+ allOK
+ ? "FileModificationValidator.ok"
+ : "FileModificationValidator.editFailed"),
null); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/messages.properties b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/messages.properties
index adad17eed..d14c44b45 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/messages.properties
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/internal/messages.properties
@@ -18,6 +18,7 @@ manager.coreException=Error creating validator decorator: core exception
FileModificationValidator.someReadOnly=Some files are read-only.
FileModificationValidator.fileIsReadOnly=File {0} is read-only.
+FileModificationValidator.editFailed=Files are read-only.
FileModificationValidator.ok=OK
RepositoryProvider_Error_removing_nature_from_project___1=Error removing nature from project:

Back to the top