Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java')
-rw-r--r--plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java23
1 files changed, 4 insertions, 19 deletions
diff --git a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java
index 2e3966745e1..ee73a06fedc 100644
--- a/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java
+++ b/plugins/team/org.eclipse.papyrus.team.svn/src/org/eclipse/papyrus/team/svn/SVNLockHandler.java
@@ -9,7 +9,6 @@
*
* Contributors:
* Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Made the dependency to SVN optional
*
*****************************************************************************/
package org.eclipse.papyrus.team.svn;
@@ -18,6 +17,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.team.FileModificationValidationContext;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.papyrus.infra.emf.readonly.IReadOnlyHandler;
import org.eclipse.team.svn.core.IStateFilter;
import org.eclipse.team.svn.core.svnstorage.SVNRemoteStorage;
@@ -26,21 +26,9 @@ import org.eclipse.team.svn.ui.SVNTeamModificationValidator;
public class SVNLockHandler implements IReadOnlyHandler {
- SVNTeamModificationValidator validator;
+ SVNTeamModificationValidator validator = new SVNTeamModificationValidator();
- public SVNLockHandler() {
- try {
- validator = new SVNTeamModificationValidator();
- } catch (NoClassDefFoundError ex) {
- //If SVN is not installed, then the file is not locked, and can be written.
- }
-
- }
-
- public boolean isReadOnly(IFile[] files) {
- if(validator == null) {
- return false; //SVN is not installed
- }
+ public boolean isReadOnly(IFile[] files, EditingDomain editingDomain) {
IResource[] needsLockResources = FileUtility.filterResources(files, IStateFilter.SF_NEEDS_LOCK, IResource.DEPTH_ZERO);
for(IResource needsLockResource : needsLockResources) {
@@ -52,10 +40,7 @@ public class SVNLockHandler implements IReadOnlyHandler {
return false;
}
- public boolean enableWrite(IFile[] files) {
- if(validator == null) {
- return true; //SVN is not installed
- }
+ public boolean enableWrite(IFile[] files, EditingDomain editingDomain) {
IStatus result = validator.validateEdit(files, FileModificationValidationContext.VALIDATE_PROMPT);

Back to the top