Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorInput


    }

    protected List<String> getAllClassesInPackage(String packageName) {
        List<String> list = new ArrayList<String>();
        if (packageName != null) {
            IEditorInput input = getEditorInput();
            if (input instanceof IFileEditorInput) {
                IProject project = ((IFileEditorInput) input).getFile().getProject();
                IJavaProject javaProject = JavaCore.create(project);
                list = getAllClassesInPackage(packageName, javaProject);
            }
View Full Code Here


    }

    protected List<String> getAllStaticMethodsInClass(String className) {
        final List<String> list = new ArrayList<String>();
        if (className != null) {
            IEditorInput input = getEditorInput();
            if (input instanceof IFileEditorInput) {
                IProject project = ((IFileEditorInput) input).getFile().getProject();
                IJavaProject javaProject = JavaCore.create(project);

                CompletionRequestor requestor = new CompletionRequestor() {
View Full Code Here

    /*
     * create and returns a java project based on the current editor input or returns null
     */
    private IJavaProject getCurrentJavaProject() {
        IEditorInput input = getEditor().getEditorInput();
        if ( !(input instanceof IFileEditorInput) ) {
            return null;
        }
        IProject project = ((IFileEditorInput) input).getFile().getProject();
        IJavaProject javaProject = JavaCore.create( project );
View Full Code Here

            initializeGraphicalViewer();
        }
    }

    public IFile getFile() {
        IEditorInput input = getEditorInput();
        if (!(input instanceof IFileEditorInput)) {
            return null;
        }
        return ((IFileEditorInput) getEditorInput()).getFile();
    }
View Full Code Here

    }
    return editorId;
  }

  private IEditorPart getAndOpenEditor(IFile file, IWorkbenchPage page) throws PartInitException {
    IEditorInput input = new FileEditorInput(file);
    IEditorPart editor = page.findEditor(input);
    if (editor != null) {
      page.bringToTop(editor);
      page.activate(editor);
      return editor;
View Full Code Here

    /*
     * create and returns a java project based on the current editor input or returns null
     */
    private IJavaProject getCurrentJavaProject() {
        IEditorInput input = getEditor().getEditorInput();
        if ( !(input instanceof IFileEditorInput) ) {
            return null;
        }
        IProject project = ((IFileEditorInput) input).getFile().getProject();
        IJavaProject javaProject = JavaCore.create( project );
View Full Code Here

            Class resourceClass = LegacyResourceSupport.getResourceClass();
            if (resourceClass != null) {
                IWorkbenchPart part = workbenchWindow.getPartService()
                        .getActivePart();
                if (part instanceof IEditorPart) {
                    IEditorInput input = ((IEditorPart) part).getEditorInput();
                    Object resource = Util.getAdapter(input, resourceClass);
                    if (resource != null) {
                        selectionToPass = new StructuredSelection(resource);
                    }
                }
View Full Code Here

    public void refresh() {
        Iterator iter = fifoList.iterator();
        while (iter.hasNext()) {
            EditorHistoryItem item = (EditorHistoryItem) iter.next();
            if (item.isRestored()) {
                IEditorInput input = item.getInput();
                if (input != null && !input.exists()) {
          iter.remove();
        }
            }
        }
    }
View Full Code Here

            StatusManager.getManager().handle(displayStatus,
            StatusManager.SHOW);
           
            ErrorEditorPart part = new ErrorEditorPart(displayStatus);
           
            IEditorInput input;
            try {
                input = getEditorInput();
            } catch (PartInitException e1) {
                input = new NullEditorInput();
            }
View Full Code Here

        IEditorPart part = null;
        EditorActionBars actionBars = null;
        EditorSite site = null;
       
        try {
            IEditorInput editorInput = getEditorInput();
           
            // Get the editor descriptor.
            String editorID = getId();
            EditorDescriptor desc = getDescriptor();
           
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IEditorInput

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.