Examples of IPerspectiveDescriptor


Examples of org.eclipse.ui.IPerspectiveDescriptor

        // Get persp name.
        SavePerspectiveDialog dlg = new SavePerspectiveDialog(page.getWorkbenchWindow()
                .getShell(), reg);
        // Look up the descriptor by id again to ensure it is still valid.
        IPerspectiveDescriptor description = reg.findPerspectiveWithId(oldDesc.getId());
        dlg.setInitialSelection(description);
        if (dlg.open() != IDialogConstants.OK_ID) {
            return;
        }
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

        final IWorkbenchPage partPage = viewFactory.getWorkbenchPage();
        if (partPage == null) {
      return;
    }

        final IPerspectiveDescriptor partPerspective = pageLayout
                .getDescriptor();

        IWorkbenchActivitySupport support = PlatformUI.getWorkbench()
                .getActivitySupport();
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

  /**
   * @return the active perspective in the active workbench page
   */
  public SWTBotPerspective activePerspective() {
    IPerspectiveDescriptor perspective = workbenchContentsFinder.findActivePerspective();
    if (perspective == null)
      throw new WidgetNotFoundException("There is no active perspective"); //$NON-NLS-1$
    return new SWTBotPerspective(perspective, this);
  }
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

  /**
   * @return the active perspective in the active workbench page
   */
  public SWTBotPerspective activePerspective() {
    IPerspectiveDescriptor perspective = workbenchContentsFinder.findActivePerspective();
    if (perspective == null)
      throw new WidgetNotFoundException("There is no active perspective"); //$NON-NLS-1$
    return new SWTBotPerspective(perspective, this);
  }
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

  }

  @Override
  public boolean doMatch(Object item) {
    if (item instanceof IPerspectiveDescriptor) {
      IPerspectiveDescriptor perspective = (IPerspectiveDescriptor) item;
      return idMatcher.matches(perspective.getId());
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

  }

  @Override
  public boolean doMatch(Object item) {
    if (item instanceof IPerspectiveDescriptor) {
      IPerspectiveDescriptor perspective = (IPerspectiveDescriptor) item;
      return labelMatcher.matches(perspective.getLabel());
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

        ConnectionCorePlugin.getDefault().getConnectionFolderManager().getRootConnectionFolder().addConnectionId(
            connection.getId() );

        // Getting the window, LDAP perspective and current perspective
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        IPerspectiveDescriptor ldapPerspective = getLdapPerspective();
        IPerspectiveDescriptor currentPerspective = window.getActivePage().getPerspective();

        // Checking if we are already in the LDAP perspective
        if ( ( ldapPerspective != null ) && ( ldapPerspective.equals( currentPerspective ) ) )
        {
            // As we're already in the LDAP perspective, we only indicate to the user
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

     * Test method for 'org.locationtech.udig.project.ui.internal.view.issues.IssueHandler.restorePerspective()'
     */
    @Test
    public void testRestorePerspective() throws WorkbenchException {
        int windows=PlatformUI.getWorkbench().getWorkbenchWindowCount();
        IPerspectiveDescriptor p = PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.locationtech.udig.project.tests.ui.perspective.test"); //$NON-NLS-1$
        getActiveWindow().getActivePage().setPerspective(p);
        assertEquals("org.locationtech.udig.project.tests.ui.perspective.test", getActiveWindow().getActivePage().getPerspective().getId()); //$NON-NLS-1$
        TestIssue issue = new TestIssue(){
            @Override
            public String getPerspectiveID() {
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

                if (targetP.equals(currentP)) {
                    activeWorkbenchWindow.setActivePage(page);
                    return;
                }
            }
            IPerspectiveDescriptor p = PlatformUI.getWorkbench().getPerspectiveRegistry()
                    .findPerspectiveWithId(targetP);
            activeWorkbenchWindow.getActivePage().setPerspective(p);
            activeWorkbenchWindow.getActivePage().showView(IssueConstants.VIEW_ID);

        } catch (WorkbenchException e) {
View Full Code Here

Examples of org.eclipse.ui.IPerspectiveDescriptor

        manager.add(new Separator());
       
        IAction perspectiveAction;
        final IPerspectiveDescriptor[] perspectiveArray = PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives();
        for (int i = 0; i < perspectiveArray.length; i++) {
          final IPerspectiveDescriptor perspectiveDesc = perspectiveArray[i];
          perspectiveAction = new Action(perspectiveDesc.getLabel()) {
            public void run() {
              try {               
                PlatformUI.getWorkbench().showPerspective(perspectiveDesc.getId(), _window);
              } catch (WorkbenchException e) {
                Log.getInstance(MenuController.class).warn("Error while load perspective: " + e.getMessage());
              }
            }
          };
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.