Examples of FileEditorInput


Examples of org.eclipse.ui.part.FileEditorInput

            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                    .getActivePage();
            if (file != null) {
                try {
                    String editorId = "org.apache.ivyde.editors.IvyEditor";
                    page.openEditor(new FileEditorInput(file), editorId, true);
                    // only remember the default editor if the open succeeds
                    IDE.setDefaultEditor(file, editorId);
                } catch (PartInitException e) {
                    Shell parent = page.getWorkbenchWindow().getShell();
                    String title = "Problems Opening Editor";
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    }

    protected void setInput(IEditorInput input) {
        IvyFileEditorInput ivyFileEditorInput = null;
        if (input instanceof FileEditorInput) {
            FileEditorInput fei = (FileEditorInput) input;
            IFile file = ((FileEditorInput) input).getFile();
            ivyFileEditorInput = new IvyFileEditorInput(file);
        } else if (input instanceof IvyFileEditorInput) {
            ivyFileEditorInput = (IvyFileEditorInput) input;
        }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    if (m_nSaveAsStatus == SAVE_AS_CANCELLED) {
      m_nSaveAsStatus = SAVE_AS_NOT_IN_PROGRESS;
      return;
    }
    // should only do if editorInput is new
    FileEditorInput newEditorInput = (FileEditorInput) sourceTextEditor.getEditorInput();

    // if(old)
    setInput(newEditorInput);
    firePropertyChange(PROP_INPUT);
    // setTitle(newEditorInput.getFile().getName());
    setPartName(newEditorInput.getFile().getName());
    // this next does NOT seem to change the overall page title

    firePropertyChange(PROP_TITLE);
    finishSave(null, modelOK);
  }
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    Shell shell = new Shell();
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page.openEditor(new FileEditorInput(ffile), "taeconfigurator.editors.MultiPageEditor"); //$NON-NLS-1$
        } catch (PartInitException e) {
          throw new InternalErrorCDE("unexpected exception");
        }
      }
    });
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    Shell shell = new Shell();
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page.openEditor(new FileEditorInput(ffile), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
        } catch (PartInitException e) {
          throw new InternalErrorCDE("unexpected exception");
        }
      }
    });
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

                null);

        icu2.createPackageDeclaration(pkg.getElementName(), null);

        IFile input = (IFile) icu2.getResource();
        final IEditorInput editorInput = new FileEditorInput(input);
        final IEditorDescriptor desc = PlatformUI.getWorkbench()
            .getEditorRegistry().getDefaultEditor(input.getName());

        PlatformUI.getWorkbench().getDisplay()
            .asyncExec(new Runnable() {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

    icu2.createPackageDeclaration(pkg.getElementName(), monitor);

    if (openInEditor) {
      IFile input = (IFile) icu2.getResource();
      final IEditorInput editorInput = new FileEditorInput(input);
      final IEditorDescriptor desc = PlatformUI.getWorkbench()
          .getEditorRegistry().getDefaultEditor(input.getName());

      PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
        @Override
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

                null);

        icu2.createPackageDeclaration(pkg.getElementName(), null);

        IFile input = (IFile) icu2.getResource();
        final IEditorInput editorInput = new FileEditorInput(input);
        final IEditorDescriptor desc = PlatformUI.getWorkbench()
            .getEditorRegistry().getDefaultEditor(input.getName());

        PlatformUI.getWorkbench().getDisplay()
            .asyncExec(new Runnable() {
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

                if (extFile.getType() == IResource.FILE && "bnd".equalsIgnoreCase(extFile.getFileExtension())) {
                    Action action = new Action() {
                        @Override
                        public void run() {
                            try {
                                FileEditorInput input = new FileEditorInput((IFile) extFile);

                                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                                page.openEditor(input, "bndtools.bndWorkspaceConfigEditor", true);
                            } catch (PartInitException e) {
                                ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", "Unable to open editor", e.getStatus());
View Full Code Here

Examples of org.eclipse.ui.part.FileEditorInput

        try {
            IFile buildFile = Central.getWorkspaceBuildFile();
            if (buildFile == null)
                return null;

            FileEditorInput input = new FileEditorInput(buildFile);
            IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindowChecked(event).getActivePage();
            page.openEditor(input, "bndtools.bndWorkspaceConfigEditor", true);
        } catch (PartInitException e) {
            ErrorDialog.openError(HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell(), "Error", "Unable to open editor", e.getStatus());
        } catch (Exception e) {
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.