Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPage.openEditor()


          .getRoot()).getFile(StringUtil.formatPath(path));
      if (path != null) {
        IWorkbenchPage page = workbench.getActiveWorkbenchWindow()
            .getActivePage();
        try {
          page.openEditor(new AudioInput((AudioModel) audioFile),
              AudioTagEditor.ID);
        } catch (PartInitException e) {
          throw new RuntimeException(e);
        }
      }
View Full Code Here


    IWorkbenchPage page= window.getActivePage();

    IEditorPart editor;
    try {
      editor= page.openEditor(editPosition.getEditorInput(), editPosition.getEditorId());
    } catch (PartInitException ex) {
      return;
    }

    // Optimization - could also use else branch
View Full Code Here

    IFileStore fileStore= queryFileStore();
    IEditorInput input= createEditorInput(fileStore);
    String editorId= getEditorId(fileStore);
    IWorkbenchPage page= fWindow.getActivePage();
    try {
      page.openEditor(input, editorId);
    } catch (PartInitException e) {
      EditorsPlugin.log(e);
      return false;
    }
    return true;
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
    try {
      if (RenderingEditor.CURRENT_INPUT != null && ShapeGrammarModel.ACTIVE_SHAPE_GRAMMAR != null) {
        page.openEditor(RenderingEditor.CURRENT_INPUT, RenderingEditor.ID);
      }
    } catch (PartInitException e) {
      e.printStackTrace();
    }
    return null;
View Full Code Here

        try {
          // get Editor ID (it can be specific for different geometry)
          String editorID = model.getEditorId();
         
          // opens editor
          RuleEditor editor = (RuleEditor) page.openEditor(input, editorID == null ? RuleEditor.ID : editorID);
         
          // hook the listener
          model.addPropertyChangeListener(editor);
         
          // shows properties
View Full Code Here

        try {
          // get Editor ID (it can be specific for different geometry)
          String editorID = model.getEditorId();
         
          // open editor         
          ShapeEditor editor = (ShapeEditor) page.openEditor(input, editorID == null ? ShapeEditor.ID : editorID);
         
          // hook event listener on editor
          model.addPropertyChangeListener(editor);
         
          // open properties
View Full Code Here

                    editorRegistry.getDefaultEditor(newPolicy.getName()).getId();
            IWorkbenchPage activePage =
                    PlatformUI.getWorkbench().
                    getActiveWorkbenchWindow().
                    getActivePage();
            activePage.openEditor(new FileEditorInput(newPolicy),
                    editorId, true);
        } catch (PolicyFileAccessException pfae) {
            EclipseCommonPlugin.handleError(BuilderPlugin.getDefault(), pfae);
        } catch (PartInitException e) {
            EclipseCommonPlugin.handleError(BuilderPlugin.getDefault(), e);
View Full Code Here

        IFile file = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        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

            // IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);

            IWorkbenchPage page = Workbench.getInstance().getActiveWorkbenchWindow()
                    .getActivePage();
            try {
              page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
            } catch (PartInitException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            }
          }
View Full Code Here

      } catch (CoreException e) {
        RutaAddonsPlugin.error(e);
      }
    }
    try {
      page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
      page.showView(TruePositiveView.ID);
      page.showView(FalsePositiveView.ID);
      page.showView(FalseNegativeView.ID);
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(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.