congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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