Package org.eclipse.ui

Examples of org.eclipse.ui.IPerspectiveDescriptor


        lastEditorTitle = activeEditor.getTitleToolTip();
        title = NLS.bind(
            IDEWorkbenchMessages.WorkbenchWindow_shellTitle,
            lastEditorTitle, title);
      }
      IPerspectiveDescriptor persp = currentPage.getPerspective();
      String label = ""; //$NON-NLS-1$
      if (persp != null) {
        label = persp.getLabel();
      }
      IAdaptable input = currentPage.getInput();
      if (input != null && !input.equals(wbAdvisor.getDefaultPageInput())) {
        label = currentPage.getLabel();
      }
View Full Code Here


  private void updateTitle(boolean editorHidden) {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    IWorkbenchWindow window = configurer.getWindow();
    IEditorPart activeEditor = null;
    IWorkbenchPage currentPage = window.getActivePage();
    IPerspectiveDescriptor persp = null;
    IAdaptable input = null;

    if (currentPage != null) {
      activeEditor = currentPage.getActiveEditor();
      persp = currentPage.getPerspective();
View Full Code Here

        IAdaptable root = wbAdvisor.getDefaultPageInput();
        page = window.openPage(perspectiveId, root);
      } else {
        IPerspectiveRegistry reg = getWorkbench()
            .getPerspectiveRegistry();
        IPerspectiveDescriptor desc = reg
            .findPerspectiveWithId(perspectiveId);
        if (desc != null) {
          page.setPerspective(desc);
        }
      }
View Full Code Here

  IPerspectiveDescriptor perspective;

  @Test
  public void getForegroundShouldReturnDarkGrayForAnUndefinedPerspective() {
    IPerspectiveDescriptor undefined = new UndefinedPerspectiveDescriptor("abc");
    assertThat(provider.getForeground(undefined), equalTo(PlatformUI
        .getWorkbench().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY)));
  }
View Full Code Here

  }

  @Test
  public void testChangePerspective() throws InterruptedException {
    IWorkbenchWindow win = getActiveWindow();
    IPerspectiveDescriptor oldPers = win.getActivePage().getPerspective();
    IPerspectiveDescriptor newPers = null;

    for (IPerspectiveDescriptor p : PlatformUI.getWorkbench()
        .getPerspectiveRegistry().getPerspectives()) {
      if (!p.equals(oldPers)) {
        newPers = p;
View Full Code Here

  }

  @Test
  public void testClosePerspectives() throws InterruptedException {
    IWorkbenchPage page = getActiveWindow().getActivePage();
    IPerspectiveDescriptor perspective = page.getPerspective();

    long preStart = System.currentTimeMillis();
    tracker.setEnabled(true);
    long postStart = System.currentTimeMillis();
View Full Code Here

  }

  @Test
  public void testCloseWindow() throws Exception {
    IWorkbenchWindow win = openWindow();
    IPerspectiveDescriptor perspective = win.getActivePage().getPerspective();

    long preStart = System.currentTimeMillis();
    tracker.setEnabled(true);
    long postStart = System.currentTimeMillis();
    Thread.sleep(20);
View Full Code Here

    checkTime(preStart, start, postStart, preEnd, end, postEnd);
  }

  @Test
  public void testIdleDetector() throws Exception {
    IPerspectiveDescriptor perspective = getActiveWindow().getActivePage()
        .getPerspective();

    long preStart = System.currentTimeMillis();
    tracker.setEnabled(true);
    long postStart = System.currentTimeMillis();
View Full Code Here

    long preStart = System.currentTimeMillis();
    IWorkbenchWindow window = openWindow(); // Opens a second window
    long postStart = System.currentTimeMillis();

    IPerspectiveDescriptor persp = window.getActivePage().getPerspective();
    tracker.flushData(); // Removes data from the first window

    Thread.sleep(100);

    long preEnd = System.currentTimeMillis();
View Full Code Here

    extends
    AbstractStorerTest<PerspectiveEvent, PerspectiveEventType, PerspectiveEventListType> {

  @Override
  protected PerspectiveEvent createEvent(DateTime dateTime) {
    IPerspectiveDescriptor p = PlatformUI.getWorkbench()
        .getPerspectiveRegistry().getPerspectives()[0];
    return new PerspectiveEvent(new Interval(dateTime, dateTime.plus(1)), p);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IPerspectiveDescriptor

Copyright © 2018 www.massapicom. 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.