Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPartSite


   */
  public boolean matchesEditor(ITextEditor editor) {
    Assert.isLegal(editor != null);
    RulerColumnTarget target= getTarget();

    IWorkbenchPartSite site= editor.getSite();
    if (site != null && target.matchesEditorId(site.getId()))
      return true;
   
    if (target.matchesClass(editor.getClass()))
      return true;

View Full Code Here


      ITextEditor editor= getTextEditor();
      if (editor != null && validateEditorInputState()) {

        Display display= null;

        IWorkbenchPartSite site= editor.getSite();
        Shell shell= site.getShell();
        if (shell != null && !shell.isDisposed())
          display= shell.getDisplay();

        BusyIndicator.showWhile(display, new Runnable() {
          public void run() {
View Full Code Here

     * @param part the IViewPart within which the DeviceSearchActionGroup
     * performs.
     */
    public DeviceSearchActionGroup(IViewPart part) {
        assert(part != null);
        IWorkbenchPartSite site = part.getSite();
        selectionProvider = site.getSelectionProvider();
        workbenchPage = site.getPage();
        propertiesAction = new PropertyDialogAction(site.getShell(),
                selectionProvider);
        openAction = new OpenDeviceRepositoryAction();

        ISelection selection = selectionProvider.getSelection();

View Full Code Here

     * Expected to only be run by Display queue in the UI Thread
     *
     * @see java.lang.Runnable#run()
     */
    public void run() {
      IWorkbenchPartSite site = editor.getEditorPart().getSite();
      final IWorkbenchWindow workbenchWindow = (site == null) ? null : site.getWorkbenchWindow();
      final IWorkbenchSiteProgressService jobService = (IWorkbenchSiteProgressService) ((site == null) ? null : site.getAdapter(IWorkbenchSiteProgressService.class));
      /*
       * Try to use the progress service so the workbench can give more
       * feedback to the user (although editors seem to make less use of
       * the service than views -
       * https://bugs.eclipse.org/bugs/show_bug.cgi?id=86221 .
View Full Code Here

  }

  public String[] getConfigurationPoints() {
    List points = new ArrayList(2);

    IWorkbenchPartSite site = null;
    if (fPart != null) {
      site = fPart.getSite();
      if (site != null) {
        String id = site.getId();
        if (id != null && id.length() > 0 && !id.equals(fRootClass.getName()))
          points.add(id);
      }
      if (site instanceof MultiPageEditorSite) {
        String multipageID = ((MultiPageEditorSite) site).getMultiPageEditor().getSite().getId();
View Full Code Here

    if (htmlEditor == null)
      return;

    SimpleGraphicalEditor graphicalEditor = (SimpleGraphicalEditor) htmlEditor
        .getDesignViewer();
    IWorkbenchPartSite site = htmlEditor.getSite();
    if (site instanceof IEditorSite) {
      IActionBars actionBars = ((IEditorSite) site).getActionBars();

      if (enabled) {
        // // we always let the text editor to handle UNDO and REDO
View Full Code Here

  }

  public String[] getConfigurationPoints() {
    List points = new ArrayList(2);

    IWorkbenchPartSite site = null;
    if (fPart != null) {
      site = fPart.getSite();
      String id = site.getId();
      if (id != null && id.length() > 0 && !id.equals(fRootClass.getName()))
        points.add(id);
      if (site instanceof MultiPageEditorSite) {
        String multipageID = ((MultiPageEditorSite) site).getMultiPageEditor().getSite().getId();
        if (!points.contains(multipageID))
View Full Code Here

      xmlMenuExpandAction.setViewer(tableTreeViewer);
      xmlMenuCollapseAction.setViewer(tableTreeViewer);
    }
*/
    if (editorPart instanceof XMLMultiPageEditorPart) {
      IWorkbenchPartSite site = editorPart.getSite();
      if (site instanceof IEditorSite) {
        ITextEditor textEditor = ((XMLMultiPageEditorPart) editorPart).getTextEditor();
        IActionBars actionBars = ((IEditorSite) site).getActionBars();
        actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO, getAction(textEditor, ITextEditorActionConstants.UNDO));
        actionBars.setGlobalActionHandler(ITextEditorActionConstants.REDO, getAction(textEditor, ITextEditorActionConstants.REDO));
View Full Code Here

        if (editor == null) {
            return;
        }

        IWorkbenchPartSite site = editor.getSite();

        if (site == null) {
            return;
        }

        Shell shell = site.getShell();

        if ((shell == null) || shell.isDisposed()) {
            return;
        }
View Full Code Here

    if (runnable == null || fEditor == null) {
      return;
    }

    IWorkbenchPartSite site = fEditor.getSite();
    if (site == null) {
      return;
    }

    Shell shell = site.getShell();
    if (shell == null || shell.isDisposed()) {
      return;
    }

    Display display = shell.getDisplay();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchPartSite

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.