Examples of IEditorInput


Examples of org.eclipse.ui.IEditorInput

    protected void loadContent() {
        if (displayJob != null && displayJob.getState() != Job.NONE)
            displayJob.cancel();

        if (zipEntry != null && !zipEntry.isDirectory()) {
            IEditorInput input = editor.getEditorInput();
            final Display display = text.getDisplay();
            final URI uri;

            if (input instanceof IFileEditorInput) {
                uri = ((IFileEditorInput) input).getFile().getLocationURI();
View Full Code Here

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

Examples of org.eclipse.ui.IEditorInput

                }

                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

Examples of org.eclipse.ui.IEditorInput

    /**
     * {@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

Examples of org.eclipse.ui.IEditorInput

            //

            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

Examples of org.eclipse.ui.IEditorInput

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

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

Examples of org.eclipse.ui.IEditorInput

            }
        }
    }

    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

Examples of org.eclipse.ui.IEditorInput

            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

Examples of org.eclipse.ui.IEditorInput

        }
    }

    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

Examples of org.eclipse.ui.IEditorInput

        }
    }

    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
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.