Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPart


 
  private StyledText retrieveConsoleTextWidget() {   
    IViewReference[] references = WGADesignerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
    for (IViewReference ref : references) {   
      if (ref.getId().equals(IConsoleConstants.ID_CONSOLE_VIEW)) {
        IWorkbenchPart part = ref.getPart(false);
        if (part != null && part instanceof PageBookView) {
          PageBookView view = (PageBookView) part;
          IPage page = view.getCurrentPage();
          if (page instanceof TextConsolePage) {
            TextConsolePage textConsolePage = (TextConsolePage) page;
View Full Code Here


    fResultViewer.getControl().setMenu(menu);

    /* Register with Part Site */
    IWorkbenchWindow window = OwlUI.getWindow();
    if (window != null) {
      IWorkbenchPart activePart = window.getPartService().getActivePart();
      if (activePart != null && activePart.getSite() != null)
        activePart.getSite().registerContextMenu(manager, fResultViewer);
    }
  }
View Full Code Here

      }
    });

    /* Link if enabled */
    if (fLinkingEnabled) {
      IWorkbenchPart activePart = fViewSite.getPage().getActivePart();
      if (activePart instanceof IEditorPart)
        editorActivated((IEditorPart) activePart);
    }
  }
View Full Code Here

    fWindow.addPageListener(new IPageListener() {
      public void pageOpened(IWorkbenchPage page) {
        page.addSelectionListener(selectionListener);
        page.addPartListener(partListener);

        IWorkbenchPart activePart = page.getActivePart();
        updateActions(activePart);

        /* Delay Update to Next/Previous as the Keybinding Service needs longer */
        JobRunner.runDelayedInUIThread(fWindow.getShell(), new Runnable() {
          public void run() {
View Full Code Here

   * PlatformUI facade or <code>StructuredSelection.EMPTY</code> if none.
   */
  public static IStructuredSelection getActiveSelection() {
    IWorkbenchPage page = getPage();
    if (page != null) {
      IWorkbenchPart part = page.getActivePart();
      if (part != null && part.getSite() != null) {
        ISelectionProvider selectionProvider = part.getSite().getSelectionProvider();
        if (selectionProvider != null) {
          ISelection selection = selectionProvider.getSelection();
          if (!selection.isEmpty() && selection instanceof IStructuredSelection)
            return (IStructuredSelection) selection;
        }
View Full Code Here

    fViewer.getControl().setMenu(menu);

    /* Register with Part Site */
    IWorkbenchWindow window = OwlUI.getWindow();
    if (window != null) {
      IWorkbenchPart activePart = window.getPartService().getActivePart();
      if (activePart != null && activePart.getSite() != null)
        activePart.getSite().registerContextMenu(manager, fViewer);
    }
  }
View Full Code Here

      }
    });

    /* Link if enabled */
    if (fLinkingEnabled) {
      IWorkbenchPart activePart = fViewSite.getPage().getActivePart();
      if (activePart instanceof IEditorPart)
        editorActivated((IEditorPart) activePart);
    }
  }
View Full Code Here

      }
    });

    /* Link if enabled */
    if (fLinkingEnabled) {
      IWorkbenchPart activePart = fViewSite.getPage().getActivePart();
      if (activePart instanceof IEditorPart)
        editorActivated((IEditorPart) activePart);
    }
  }
View Full Code Here

    fResultViewer.getControl().setMenu(menu);

    /* Register with Part Site */
    IWorkbenchWindow window = OwlUI.getWindow();
    if (window != null) {
      IWorkbenchPart activePart = window.getPartService().getActivePart();
      if (activePart != null && activePart.getSite() != null)
        activePart.getSite().registerContextMenu(manager, fResultViewer);
    }
  }
View Full Code Here

    private boolean isOneOrMoreOpenSingleTabEntryEditors()
    {
        IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        for ( IEditorReference ref : activePage.getEditorReferences() )
        {
            IWorkbenchPart part = ref.getPart( false );
            if ( part != null && part instanceof IEntryEditor )
            {
                IEntryEditor editor = ( IEntryEditor ) part;
                if ( ( editor != null ) && ( editor.getEntryEditorInput() != null )
                    && ( editor.getEntryEditorInput().getExtension() != null )
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchPart

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.