Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IWorkspace.validateEdit()


      FileInfo info= (FileInfo) getElementInfo(input);
      if (info != null) {
        IFile file= input.getFile();
        if (file.isReadOnly()) { // do not use cached state here
          IWorkspace workspace= file.getWorkspace();
          info.fStatus= workspace.validateEdit(new IFile[] { file }, computationContext);
        }
        if (isDerived(file)) {
          IStatus status= new Status(IStatus.WARNING, EditorsUI.PLUGIN_ID, EditorsUI.DERIVED_FILE, TextEditorMessages.FileDocumentProvider_warning_fileIsDerived, null);
          if (info.fStatus == null || info.fStatus.isOK())
            info.fStatus= status;
View Full Code Here


    @Override
    public void validateSave()
    {
        final IWorkspace ws = ResourcesPlugin.getWorkspace();

        if( ! ws.validateEdit( new IFile[] { this.file }, IWorkspace.VALIDATE_PROMPT ).isOK() )
        {
            throw new ValidateEditException();
        }
    }
View Full Code Here

        collectExistingReadonlyFiles(destination.getFullPath(), sourceResources, copyFiles);
        if (copyFiles.size() > 0) {
            IFile[] files = (IFile[]) copyFiles.toArray(new IFile[copyFiles.size()]);
            IWorkspace workspace = ResourcesPlugin.getWorkspace();
            IStatus status = workspace.validateEdit(files, messageShell);

            canceled = status.isOK() == false;
            return status.isOK();
        }
        return true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.