Package org.eclipse.ui

Examples of org.eclipse.ui.IFileEditorInput


        /*
         * @see org.eclipse.ui.editors.text.TextFileDocumentProvider.DocumentProviderOperation#getSchedulingRule()
         */
        public ISchedulingRule getSchedulingRule() {
          if (info.fElement instanceof IFileEditorInput) {
            IFileEditorInput input= (IFileEditorInput) info.fElement;
            return fResourceRuleFactory.refreshRule((input).getFile());
          }
          return null;
        }
      };
View Full Code Here


        /*
         * @see org.eclipse.ui.editors.text.TextFileDocumentProvider.DocumentProviderOperation#getSchedulingRule()
         */
        public ISchedulingRule getSchedulingRule() {
          if (info.fElement instanceof IFileEditorInput) {
            IFileEditorInput input= (IFileEditorInput) info.fElement;
            return computeSchedulingRule(input.getFile());
          }
          return null;
        }
      };

View Full Code Here

    Assert.isNotNull(info);
   
    /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=98327
     * Make sure file gets save in commit() if the underlying file has been deleted */
    if (info.fElement instanceof IFileEditorInput) {
      IFileEditorInput input= (IFileEditorInput) info.fElement;
      IResource resource= input.getFile();
      if (!resource.isSynchronized(IResource.DEPTH_ZERO) && isDeleted(input))
        info.fTextFileBuffer.setDirty(true);
    }
   
    info.fTextFileBuffer.commit(monitor, overwrite);
View Full Code Here

        /*
         * @see org.eclipse.ui.editors.text.TextFileDocumentProvider.DocumentProviderOperation#getSchedulingRule()
         */
        public ISchedulingRule getSchedulingRule() {
          if (info.fElement instanceof IFileEditorInput) {
            IFileEditorInput input= (IFileEditorInput) info.fElement;
            return fResourceRuleFactory.validateEditRule(new IResource[] { input.getFile() });
          }
          return null;
        }
      };
      executeOperation(operation, getProgressMonitor());
View Full Code Here

        /*
         * @see org.eclipse.ui.editors.text.TextFileDocumentProvider.DocumentProviderOperation#getSchedulingRule()
         */
        public ISchedulingRule getSchedulingRule() {
          if (info.fElement instanceof IFileEditorInput) {
            IFileEditorInput input= (IFileEditorInput) info.fElement;
            return fResourceRuleFactory.refreshRule(input.getFile());
          }
          return null;
        }
      };
      executeOperation(operation, getProgressMonitor());
View Full Code Here

    /*
     * @see org.eclipse.ui.editors.text.ILocationProvider#getLocation(java.lang.Object)
     */
    public IPath getPath(Object element) {
      if (element instanceof IFileEditorInput) {
        IFileEditorInput input= (IFileEditorInput) element;
        return input.getFile().getFullPath();
      }
      return null;
    }
View Full Code Here

                    // map is maintained using within a document provider (which
                    // we don't have). Adopting a similar approach is better
                    // but not feasible within the current time frame.
                    // @todo later evaluate/resolve this comment's issue.
                    if (filename.equals(editorReference.getName())) {
                        IFileEditorInput fileEditorInput = ((IFileEditorInput)
                                editorReference.getEditor(true).getEditorInput());
                        // If the full path matches, then this editor is exists
                        // and is open, so we cannot save over it.
                        if (fileEditorInput.getFile().getFullPath().
                                equals(filePath)) {
                            alreadyOpen = true;
                        }
                    }
                }
View Full Code Here

            public void mouseDown(MouseEvent event) {
            }

            public void mouseUp(MouseEvent event) {
                int line = rule.getLineOfLastMouseButtonActivity();
                IFileEditorInput input = (IFileEditorInput) getEditorInput();
                IResource resource = input.getFile();
                try {
                    final IMarker markers [] =
                            PolicyUtils.findProblemMarkers(resource, line + 1);

                    // Find the TaskList view. Show it (which automatically
View Full Code Here

  protected void doValidate(){
    try {
      ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
        public void run(IProgressMonitor monitor) throws CoreException {
          try {
            IFileEditorInput input = (IFileEditorInput)getEditorInput();
            IFile file = input.getFile();
            file.deleteMarkers(IMarker.PROBLEM,false,0);
           
            HTMLProjectParams params = new HTMLProjectParams(file.getProject());
            if(params.getValidateHTML()){
              new HTMLValidator(input.getFile()).doValidate();
            }
          } catch(Exception ex){
            //HTMLPlugin.logException(ex);
          }
        }
View Full Code Here

    if(isFileEditorInput() && validation){
      try {
        ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
          public void run(IProgressMonitor monitor) throws CoreException {
            try {
              IFileEditorInput input = (IFileEditorInput)getEditorInput();
              HTMLProjectParams params = new HTMLProjectParams(input.getFile().getProject());
              if(params.getRemoveMarkers()){
                input.getFile().deleteMarkers(IMarker.PROBLEM,false,0);
              }
            } catch(Exception ex){
            }
          }
        },null);
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IFileEditorInput

Copyright © 2018 www.massapicom. 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.