Examples of closeAllEditors()


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

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

    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

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

    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

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

    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

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

    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

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

    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

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

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

Examples of org.jitterbit.application.ui.window.editor.EditorService.closeAllEditors()

        // We close all editors first. This is to prevent any open transformations from being
        // opened automatically when the project is re-opened. This is turn is because we may
        // delete JTR files, which would automatically cause the user to be prompted to login
        // to a server when the project is re-opened, which may be distracting.
        EditorService editors = view.getWindow().getEditorService();
        if (editors.closeAllEditors()) {
            try {
                view.getProjectManager().closeCurrentProject();
                return true;
            } catch (CloseProjectVetoException ex) {
                // Shouldn't happen since we have closed all pages, but even if it does happen
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.