Tabnine Logo
IWorkbenchSite.getWorkbenchWindow
Code IndexAdd Tabnine to your IDE (free)

How to use
getWorkbenchWindow
method
in
org.eclipse.ui.IWorkbenchSite

Best Java code snippets using org.eclipse.ui.IWorkbenchSite.getWorkbenchWindow (Showing top 20 results out of 315)

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private NewWizardMenu getNewWizardMenu() {
  if (fNewWizardMenu == null) {
    fNewWizardMenu= new NewWizardMenu(fSite.getWorkbenchWindow());
  }
  return fNewWizardMenu;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private NewWizardMenu getNewWizardMenu() {
  if (fNewWizardMenu == null) {
    fNewWizardMenu= new NewWizardMenu(fSite.getWorkbenchWindow());
  }
  return fNewWizardMenu;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public void run(IJavaElement[] elements) {
  if (elements.length == 0) {
    getShell().getDisplay().beep();
    return;
  }
  OpenTypeHierarchyUtil.open(elements, getSite().getWorkbenchWindow());
}
origin: org.eclipse/org.eclipse.jdt.ui

public void run(IJavaElement[] elements) {
  if (elements.length == 0) {
    getShell().getDisplay().beep();
    return;
  }
  OpenTypeHierarchyUtil.open(elements, getSite().getWorkbenchWindow());
}

origin: org.eclipse/org.eclipse.jdt.ui

public void run(IJavaElement[] elements) {
  if (elements.length == 0) {
    getShell().getDisplay().beep();
    return;
  }
  CallHierarchyUI.open(elements, getSite().getWorkbenchWindow());
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public void run(IJavaElement[] elements) {
  if (elements.length == 0) {
    getShell().getDisplay().beep();
    return;
  }
  OpenTypeHierarchyUtil.open(elements, getSite().getWorkbenchWindow());
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void run(IStructuredSelection selection) {
  List<?> elements= selection.toList();
  if (!CallHierarchy.arePossibleInputElements(elements)) {
    elements= Collections.EMPTY_LIST;
  }
  IMember[] members= elements.toArray(new IMember[elements.size()]);
  if (!ActionUtil.areProcessable(getShell(), members))
    return;
  CallHierarchyUI.openView(members, getSite().getWorkbenchWindow());
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void run(IStructuredSelection selection) {
  List<?> elements= selection.toList();
  if (!CallHierarchy.arePossibleInputElements(elements)) {
    elements= Collections.EMPTY_LIST;
  }
  IMember[] members= elements.toArray(new IMember[elements.size()]);
  if (!ActionUtil.areProcessable(getShell(), members))
    return;
  CallHierarchyUI.openView(members, getSite().getWorkbenchWindow());
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

CallHierarchyUI.openSelectionDialog(candidates.toArray(new IMember[candidates.size()]), getSite().getWorkbenchWindow());
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

CallHierarchyUI.openSelectionDialog(candidates.toArray(new IMember[candidates.size()]), getSite().getWorkbenchWindow());
origin: org.eclipse/org.eclipse.jdt.ui

public void fillContextMenu(IMenuManager menu) {
  super.fillContextMenu(menu);
  
  ISelection selection= getContext().getSelection();
  if (selection instanceof IStructuredSelection) {
    if (canEnable((IStructuredSelection)selection)) {
      MenuManager newMenu = new MenuManager(ActionMessages.NewWizardsActionGroup_new);
      menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu);
      newMenu.add(new NewWizardMenu(fSite.getWorkbenchWindow()));
    }
  }        
  
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public void run(IResource resource) {
  if (resource == null)
    return;
  try {
    IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage();
    IViewPart view= page.showView(JavaPlugin.ID_RES_NAV);
    if (view instanceof ISetSelectionTarget) {
      ISelection selection= new StructuredSelection(resource);
      ((ISetSelectionTarget)view).selectReveal(selection);
    }
  } catch(PartInitException e) {
    ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_error_activation_failed);
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public void run(IResource resource) {
  if (resource == null)
    return;
  try {
    IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage();
    IViewPart view= page.showView(JavaPlugin.ID_RES_NAV);
    if (view instanceof ISetSelectionTarget) {
      ISelection selection= new StructuredSelection(resource);
      ((ISetSelectionTarget)view).selectReveal(selection);
    }
  } catch(PartInitException e) {
    ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_error_activation_failed);
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

public void run(IResource resource) {
  if (resource == null)
    return;
  try {
    IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage();	
    IViewPart view= page.showView(IPageLayout.ID_RES_NAV);
    if (view instanceof ISetSelectionTarget) {
      ISelection selection= new StructuredSelection(resource);
      ((ISetSelectionTarget)view).selectReveal(selection);
    }
  } catch(PartInitException e) {
    ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_error_activation_failed); 
  }
}

origin: org.eclipse.egit/ui

void showWorkingDirectoryFileDiff(final FileDiff d) {
  final String p = d.getNewPath();
  final RevCommit commit = d.getCommit();
  if (commit == null) {
    Activator.showError(UIText.GitHistoryPage_openFailed, null);
    return;
  }
  IWorkbenchPage activePage = site.getWorkbenchWindow().getActivePage();
  IFile file = ResourceUtil.getFileForLocation(getRepository(), p);
  try {
    if (file != null) {
      if (!CompareUtils.canDirectlyOpenInCompare(file))
        GitModelSynchronize.synchronizeModelWithWorkspace(file,
            getRepository(), commit.getName());
      else
        CompareUtils.compareWorkspaceWithRef(getRepository(), file,
            commit.getName(), null);
    } else {
      IPath path = new Path(getRepository().getWorkTree()
          .getAbsolutePath()).append(p);
      File ioFile = path.toFile();
      if (ioFile.exists())
        CompareUtils.compareLocalWithRef(getRepository(), ioFile,
            commit.getName(), activePage);
    }
  } catch (IOException e) {
    Activator.logError(UIText.GitHistoryPage_openFailed, e);
    Activator.showError(UIText.GitHistoryPage_openFailed, null);
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

public void fillContextMenu(IMenuManager menu) {
  super.fillContextMenu(menu);
  if (!fIsTypeHiararchyViewerOwner)
    appendToGroup(menu, fOpenTypeHierarchy);
  if (!fIsCallHiararchyViewerOwner)
    appendToGroup(menu, fOpenCallHierarchy);
  
  if (fShowShowInMenu) {
    MenuManager showInSubMenu= new MenuManager(getShowInMenuLabel());
    IWorkbenchWindow workbenchWindow= fOpenSuperImplementation.getSite().getWorkbenchWindow();
    showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN.create(workbenchWindow));
    menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, showInSubMenu);
  }
  IStructuredSelection selection= getStructuredSelection();
  if (fShowOpenPropertiesAction && selection != null)
    menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fOpenPropertiesDialog);
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void fillContextMenu(IMenuManager menu) {
  super.fillContextMenu(menu);
  if (!fIsTypeHiararchyViewerOwner)
    appendToGroup(menu, fOpenTypeHierarchy);
  if (!fIsCallHiararchyViewerOwner)
    appendToGroup(menu, fOpenCallHierarchy);
  if (fShowShowInMenu) {
    MenuManager showInSubMenu= new MenuManager(getShowInMenuLabel());
    IWorkbenchWindow workbenchWindow= fOpenSuperImplementation.getSite().getWorkbenchWindow();
    showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN.create(workbenchWindow));
    menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, showInSubMenu);
  }
  IStructuredSelection selection= getStructuredSelection();
  if (fShowOpenPropertiesAction && selection != null && fOpenPropertiesDialog.isApplicableForSelection())
    menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fOpenPropertiesDialog);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void fillContextMenu(IMenuManager menu) {
  super.fillContextMenu(menu);
  if (!fIsTypeHiararchyViewerOwner)
    appendToGroup(menu, fOpenTypeHierarchy);
  if (!fIsCallHiararchyViewerOwner)
    appendToGroup(menu, fOpenCallHierarchy);
  if (fShowShowInMenu) {
    MenuManager showInSubMenu= new MenuManager(getShowInMenuLabel());
    IWorkbenchWindow workbenchWindow= fOpenSuperImplementation.getSite().getWorkbenchWindow();
    showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN.create(workbenchWindow));
    menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, showInSubMenu);
  }
  IStructuredSelection selection= getStructuredSelection();
  if (fShowOpenPropertiesAction && selection != null && fOpenPropertiesDialog.isApplicableForSelection())
    menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fOpenPropertiesDialog);
}
origin: org.eclipse.egit/ui

openWorkingFileAction = new OpenWorkingFileAction(ws.getWorkbenchWindow()
  .getActivePage());
origin: org.eclipse/org.eclipse.team.ui

IContributionItem showInMenu = ContributionItemFactory.VIEWS_SHOW_IN.create(ws.getWorkbenchWindow());
submenu1.add(showInMenu);
manager.insertAfter("file", submenu1); //$NON-NLS-1$
org.eclipse.uiIWorkbenchSitegetWorkbenchWindow

Javadoc

Returns the workbench window containing this workbench site.

Popular methods of IWorkbenchSite

  • getSelectionProvider
    Returns the selection provider for this workbench site.
  • getShell
    Returns the shell for this workbench site. Not intended to be called from outside the UI thread. Cli
  • getPage
    Returns the page containing this workbench site.
  • getAdapter
  • getService

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now