Package org.eclipse.ui

Examples of org.eclipse.ui.IFileEditorInput


        marker.setAttribute(IMarker.SEVERITY, severity);
    }

    protected void clearMarkers() throws CoreException
    {
        IFileEditorInput file = (IFileEditorInput) getPage().getEditor().getEditorInput();
        file.getFile().deleteMarkers(null, true, IResource.DEPTH_INFINITE);
    }
View Full Code Here


    }
    return helper;
  }

  protected IPath getPath() {
    IFileEditorInput input = (IFileEditorInput)getEditorInput();
    return input.getFile().getFullPath();
  }
View Full Code Here

    IFileEditorInput input = (IFileEditorInput)getEditorInput();
    return input.getFile().getFullPath();
  }

  protected IPath getRelativePath() {
    IFileEditorInput input = (IFileEditorInput)getEditorInput();
    return input.getFile().getProjectRelativePath();
  }
View Full Code Here

        if (editor != null)
        {
            IEditorInput input = editor.getEditorInput();
            if (input instanceof IFileEditorInput)
            {
                IFileEditorInput f = (IFileEditorInput) input;
                IProject project = f.getFile().getProject();
                if ( SigilCore.isSigilProject(project)) {
                    try
                    {
                        ISigilProjectModel model = SigilCore.create(project);
                        if (model != null)
View Full Code Here

    try {
      ITextEditor editor = getEditor();
      IEditorInput editorInput = editor.getEditorInput();
            IDocument document = editor.getDocumentProvider().getDocument(editorInput);
           
            IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
            IFile file = fileEditorInput.getFile();
           
            createRunScript(window).withContents(document.get(), file, editor.getTitle());
     
      return null;
    } catch (Throwable t) {
View Full Code Here

  runs_script_from_current_editor() throws ExecutionException {
    final RunScript runScript = context.mock(RunScript.class);
    final IFile file = context.mock(IFile.class);
    final IWorkbenchWindow window = context.mock(IWorkbenchWindow.class);
    final ITextEditor editor = context.mock(ITextEditor.class);
    final IFileEditorInput editorInput = context.mock(IFileEditorInput.class);
    final IDocumentProvider documentProvider = context.mock(IDocumentProvider.class);
    final IDocument document = context.mock(IDocument.class);
   
    ExecutionEvent event = new ExecutionEvent();
    final String contents = "contents";
View Full Code Here

    }

    public static IErlModule getModule(final IEditorInput editorInput)
            throws CoreException {
        if (editorInput instanceof IFileEditorInput) {
            final IFileEditorInput input = (IFileEditorInput) editorInput;
            final IFile file = input.getFile();
            final IErlModel model = ErlangEngine.getInstance().getModel();
            IErlModule module = model.findModule(file);
            if (module != null) {
                return module;
            }
View Full Code Here

    @Override
    public Match[] computeContainedMatches(final AbstractTextSearchResult aResult,
            final IEditorPart editor) {
        final IEditorInput editorInput = editor.getEditorInput();
        if (editorInput instanceof IFileEditorInput) {
            final IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
            return computeContainedMatches(aResult, fileEditorInput.getFile());
        }
        return NO_MATCHES;
    }
View Full Code Here

        final TextEditor editor = getEditor();
        if (editor != null) {
            final IEditorInput editorInput = editor.getEditorInput();
            if (editorInput instanceof IFileEditorInput) {
                final IFileEditorInput input = (IFileEditorInput) editorInput;
                final IFile file = input.getFile();
                final IProject project = file.getProject();
                return Lists.newArrayList(project);
            }
        } else {
            final IWorkbenchSite site = getSite();
View Full Code Here

    }

    private IFile getFile() {
        final IEditorInput editorInput = getEditorInput();
        if (editorInput instanceof IFileEditorInput) {
            final IFileEditorInput input = (IFileEditorInput) editorInput;
            return input.getFile();
        }
        return 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.