Package org.eclipse.ui

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


    componentHyperlink.open();
    activeEditor = activePage.getActiveEditor();
    assertTrue(activeEditor.getEditorInput() instanceof FileEditorInput);
    input = (FileEditorInput) activeEditor.getEditorInput();
    assertEquals("/testproject/src/main/java/org/qwickie/test/project/refactor/ModalPanel2.html", input.getFile().getFullPath().toPortableString());
    activePage.closeAllEditors(false);

    System.out.println("testQWickieJavaWicketComponent:\t" + (System.nanoTime() - start));
  }

  @Test
View Full Code Here


    assertEquals("Open html file and jump to wicket:id \"input1\"", detector.detectHyperlinks(textViewer, new Region(678, 1), false)[0].getHyperlinkText());
    assertEquals("Open html file and jump to wicket:id \"input2\"", detector.detectHyperlinks(textViewer, new Region(746, 1), false)[0].getHyperlinkText());
    assertEquals("Open html file and jump to wicket:id \"input3\"", detector.detectHyperlinks(textViewer, new Region(814, 1), false)[0].getHyperlinkText());

    try {
      activePage.closeAllEditors(false);
      IDE.openEditor(activePage, file);
    } catch (PartInitException e) {
    }
    activePage.closeAllEditors(false);
    System.out.println("testQWickieJWComptWithBlanks:\t" + (System.nanoTime() - start));
View Full Code Here

    try {
      activePage.closeAllEditors(false);
      IDE.openEditor(activePage, file);
    } catch (PartInitException e) {
    }
    activePage.closeAllEditors(false);
    System.out.println("testQWickieJWComptWithBlanks:\t" + (System.nanoTime() - start));
  }

}
View Full Code Here

    assertEquals(7, selection.getStartLine());
    assertEquals(7, selection.getEndLine());
    final IResource resource = ResourceUtil.getResource(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput());
    assertEquals("RegistrationPage.html", resource.getName());

    activePage.closeAllEditors(false);

    System.out.println("testWicketHyperlinkOpenHTML:\t" + (System.nanoTime() - start));
  }

  @Test
View Full Code Here

    assertEquals(21, selection.getStartLine());
    assertEquals(21, selection.getEndLine());
    final IResource resource = ResourceUtil.getResource(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput());
    assertEquals("RegistrationPage.java", resource.getName());

    activePage.closeAllEditors(false);

    System.out.println("testWicketHyperlinkOpenJava:\t" + (System.nanoTime() - start));
  }

  @Test
View Full Code Here

    assertEquals(0, selection.getStartLine());
    assertEquals(0, selection.getEndLine());
    final IResource resource = ResourceUtil.getResource(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput());
    assertEquals("wicket-package.properties", resource.getName());

    activePage.closeAllEditors(false);

    System.out.println("testWicketHyperlinkCreateProps:\t" + (System.nanoTime() - start));
  }

  @Test
View Full Code Here

   */
  protected JavaEditor closeAndOpenEditor(ICompilationUnit unit)
      throws PartInitException {
    IWorkbench workbench = PlatformUI.getWorkbench();
    IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
    page.closeAllEditors(false);

    IFile file = (IFile) unit.getResource();
    IEditorDescriptor editor = workbench.getEditorRegistry().getDefaultEditor(
        file.getName());
    IEditorInput input = new FileEditorInput(file);
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.