Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorInput


  private void setTitlePath() {

    String titlePath = null;
    if (lastActiveEditor != null) {
      IEditorInput editorInput = lastActiveEditor.getEditorInput();
      if (editorInput instanceof IFileEditorInput) {
        titlePath = computeTitlePath((IFileEditorInput) editorInput);
      } else if (editorInput instanceof FileStoreEditorInput) {
        titlePath = computeTitlePath((FileStoreEditorInput) editorInput);
      }
View Full Code Here


                }

                if ( finishPage.getExecutionMethod() == BatchOperationFinishWizardPage.EXECUTION_METHOD_LDIF )
                {

                    IEditorInput input = new NonExistingLdifEditorInput();
                    String editorId = LdifEditor.getId();

                    try
                    {
                        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void run()
    {
        IEditorInput input = new NonExistingLdifEditorInput();
        String editorId = LdifEditor.getId();
        try
        {
            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            page.openEditor( input, editorId );
View Full Code Here

            //

            if (editor instanceof JavaEditor) {
                IJavaElement element = getSelectedJavaElement((JavaEditor) editor);
                if (element == null) {
                    IEditorInput input = editor.getEditorInput();
                    element = (IJavaElement) input.getAdapter(IJavaElement.class);
                }

                if (element != null) {
                    launchJavaElement(element, mode);
                    return;
View Full Code Here

        formEditor.getEditModel().saveChangesTo(document);
    }

    private IDocument getDocument() {
        IDocumentProvider docProvider = getDocumentProvider();
        IEditorInput input = getEditorInput();
        return new IDocumentWrapper(docProvider.getDocument(input));
    }
View Full Code Here

            }
        }
    }

    public void launch(IEditorPart editor, String mode) {
        IEditorInput input = editor.getEditorInput();
        IJavaElement element = (IJavaElement) input.getAdapter(IJavaElement.class);
        if (element != null) {
            IJavaProject jproject = element.getJavaProject();
            if (jproject != null) {
                launch(jproject.getProject().getFullPath(), mode);
            }
View Full Code Here

            if (part.isDirty())
                part.commit(false);
        }

        IFormPage page = (IFormPage) getManagedForm().getContainer();
        IEditorInput input = page.getEditorInput();
        final IFile file = ResourceUtil.getFile(input);

        final Shell parentShell = page.getEditor().getSite().getShell();

        // Create the wizard and pre-validate
View Full Code Here

        }
    }

    IJavaProject getJavaProject() {
        IFormPage page = (IFormPage) getManagedForm().getContainer();
        IEditorInput input = page.getEditorInput();

        IFile file = ResourceUtil.getFile(input);
        if (file != null) {
            return JavaCore.create(file.getProject());
        }
View Full Code Here

        }
    }

    private IJavaProject getJavaProject() {
        IFormPage page = (IFormPage) getManagedForm().getContainer();
        IEditorInput input = page.getEditorInput();
        if (!IFileEditorInput.class.isInstance(input)) {
            return null;
        }
        IProject project = ((IFileEditorInput) input).getFile().getProject();
        return JavaCore.create(project);
View Full Code Here

  }
 
  @SuppressWarnings("deprecation")
  private IFile[] getFiles(IWorkbenchPart part) {
    if (!(part instanceof IEditorPart)) return new IFile[] {};
    IEditorInput input = ((IEditorPart) part).getEditorInput();
    if (!(input instanceof IPathEditorInput)) return new IFile[] {};
    IPathEditorInput pathInput = (IPathEditorInput) input;
//    System.out.println(pathInput.getPath());
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    return workspace.getRoot().findFilesForLocation(pathInput.getPath());
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.