Package org.eclipse.ui

Examples of org.eclipse.ui.IViewSite


   * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
   */
  public Object execute(ExecutionEvent event) {
    BookMarkExplorer bookMarkExplorer = OwlUI.getOpenedBookMarkExplorer();
    if (bookMarkExplorer != null) {
      IViewSite site = (IViewSite) bookMarkExplorer.getSite();
      ActionContributionItem item = (ActionContributionItem) site.getActionBars().getToolBarManager().find(BookMarkExplorer.PREVIOUS_SET_ACTION);
      if (item != null && item.getAction().isEnabled())
        item.getAction().run();
    }

    return null; //As per JavaDoc
View Full Code Here


                IWorkbenchPage page = win.getActivePage();

                IWorkbenchPart part = page.getActivePart();
                IWorkbenchPartSite site = part.getSite();

                IViewSite vSite = (IViewSite) site;

                IActionBars actionBars = vSite.getActionBars();
                if ( actionBars == null )
                {
                    return;
                }
View Full Code Here

  }

  private IStatusLineManager getStatusLine() {
    // we want to show messages globally hence we
    // have to go through the active part
    IViewSite      site = getViewSite();
    IWorkbenchPage page = site.getPage();
    IWorkbenchPart activePart = page.getActivePart();

    if(activePart instanceof IViewPart) {

      IViewPart activeViewPart = (IViewPart) activePart;
      IViewSite activeViewSite = activeViewPart.getViewSite();

      return activeViewSite.getActionBars().getStatusLineManager();
    }

    if(activePart instanceof IEditorPart) {
      IEditorPart activeEditorPart = (IEditorPart) activePart;
      IEditorActionBarContributor contributor = activeEditorPart.getEditorSite()
View Full Code Here

  private void appendEventText(String msg, int category) {
    if (text.isDisposed()) {
      return;
    }
   
    IViewSite site = getViewSite();
    if (site == null) {
      return;
    }
    Shell shell = site.getShell();
    if (shell == null) {
      return;
    }
    Display display = shell.getDisplay();
    if (display == null) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IViewSite

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.