if (context != null) { ISVNFileModificationValidatorPrompt svnFileModificationValidatorPrompt = SVNProviderPlugin.getPlugin().getSvnFileModificationValidatorPrompt(); if (svnFileModificationValidatorPrompt != null) { if (!svnFileModificationValidatorPrompt.prompt(files, context)) return SVNStatus.CANCEL_STATUS; comment = svnFileModificationValidatorPrompt.getComment(); stealLock = svnFileModificationValidatorPrompt.isStealLock(); } } svnTeamProvider = (SVNTeamProvider)provider; LockResourcesCommand command = new LockResourcesCommand(svnTeamProvider.getSVNWorkspaceRoot(), files, stealLock, comment); try { command.run(new NullProgressMonitor()); } catch (SVNException e) { e.printStackTrace(); return SVNStatus.CANCEL_STATUS;
IFile[] readOnly = checkReadOnly(files); if (readOnly.length > 0) { if (context != null) { ISVNFileModificationValidatorPrompt svnFileModificationValidatorPrompt = SVNProviderPlugin.getPlugin().getSvnFileModificationValidatorPrompt(); if (svnFileModificationValidatorPrompt != null) { if (!svnFileModificationValidatorPrompt.prompt(readOnly, context)) return SVNStatus.CANCEL_STATUS; comment = svnFileModificationValidatorPrompt.getComment(); stealLock = svnFileModificationValidatorPrompt.isStealLock(); } } svnTeamProvider = (SVNTeamProvider) provider; LockResourcesCommand command = new LockResourcesCommand(svnTeamProvider.getSVNWorkspaceRoot(), readOnly, stealLock, comment); try { command.run(new NullProgressMonitor()); } catch (SVNException e) { e.printStackTrace(); return SVNStatus.CANCEL_STATUS; }
    public IStatus validateEdit(IFile[] files, Object context) {        String comment = "";        boolean stealLock = false;	    SVNTeamProvider svnTeamProvider = null;	    RepositoryProvider provider = RepositoryProvider.getProvider(files[0].getProject());	    if ((provider != null) && (provider instanceof SVNTeamProvider)) {	       if (context != null) {		       ISVNFileModificationValidatorPrompt svnFileModificationValidatorPrompt = 		           SVNProviderPlugin.getPlugin().getSvnFileModificationValidatorPrompt();		       if (svnFileModificationValidatorPrompt != null) {		           if (!svnFileModificationValidatorPrompt.prompt(files, context))		               return SVNStatus.CANCEL_STATUS;		           comment = svnFileModificationValidatorPrompt.getComment();		           stealLock = svnFileModificationValidatorPrompt.isStealLock();		       }	       }           svnTeamProvider = (SVNTeamProvider)provider;           LockResourcesCommand command = new LockResourcesCommand(svnTeamProvider.getSVNWorkspaceRoot(), files, stealLock, comment);           try {                command.run(new NullProgressMonitor());            } catch (SVNException e) {                e.printStackTrace();                return SVNStatus.CANCEL_STATUS;            }       }	    return SVNStatus.OK_STATUS;    }