Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-11-22 20:32:23 +0000
committerMichael Valenta2004-11-22 20:32:23 +0000
commit1be84a147e8955b25e362cf68e4c627b2e24a54c (patch)
tree9bfedd4ba944fcdf4c8ff3e952d399e21eb61c8e
parent303f0866e7468ed55865d59718aa2da5e9452bca (diff)
downloadeclipse.platform.team-1be84a147e8955b25e362cf68e4c627b2e24a54c.tar.gz
eclipse.platform.team-1be84a147e8955b25e362cf68e4c627b2e24a54c.tar.xz
eclipse.platform.team-1be84a147e8955b25e362cf68e4c627b2e24a54c.zip
Bug 78734 Removes deprecation warning from FileModificationValidator
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java
index f75bb34a3..8df514e5a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java
@@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourceAttributes;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -153,7 +154,15 @@ public class FileModificationValidator implements ICVSFileModificationValidator
// Allow the files to be edited without notifying the server
for (int i = 0; i < files.length; i++) {
IFile file = files[i];
- file.setReadOnly(false);
+ ResourceAttributes attributes = file.getResourceAttributes();
+ if (attributes != null) {
+ attributes.setReadOnly(false);
+ }
+ try {
+ file.setResourceAttributes(attributes);
+ } catch (CoreException e) {
+ CVSUIPlugin.log(e);
+ }
}
}

Back to the top