Package org.eclipse.ui

Examples of org.eclipse.ui.ISelectionService.addPostSelectionListener()


        if (partRef.getId().equals(getSite().getId())) {
            IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow();
            ISelectionService selectionService = workbenchWindow
                .getSelectionService();
            String partId = BytecodeOutlineView.class.getName();
            selectionService.addPostSelectionListener(this);


            // perform initialization with already existing selection (if any)
            ISelection selection = selectionService.getSelection(partId);
            if(selection != null) {
View Full Code Here


     * Adds a post selection listener that listens to the workbench's selection for maps, layers or MapEditor.
     */
    private void addWorkbenchSelectionListener() {
        // page.addPostSelectionListener(workbenchSelectionListener);       
        ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
        selectionService.addPostSelectionListener(workbenchSelectionListener);
    }

    /**
     * Adds a listener to {@link #page} that deactivates the view when part is hidden and reactivates it when it is made
     * visible.  This is to prevent a bunch of featurestore accesses when view is not visible.
View Full Code Here

        // Listen to part activation events.
        getSite().getPage().addPartListener(partListener);
        ISelectionService workbenchSelection = (ISelectionService) getSite().getService(
                ISelectionService.class);
        workbenchSelection.addPostSelectionListener(selectionListener);
        showBootstrapPart();

        getSite().getPage().getWorkbenchWindow().addPerspectiveListener(perspectiveListener);
    }
View Full Code Here

        // stop listening to part activation
        getSite().getPage().removePartListener(partListener);
        ISelectionService workbenchSelection = (ISelectionService) getSite().getService(
                ISelectionService.class);
        workbenchSelection.addPostSelectionListener(selectionListener);

        // Deref all of the pages.
        activeRec = null;
        if (defaultPageRec != null) {
            // check for null since the default page may not have
View Full Code Here

                if (!(part instanceof DocumentView)) {
                    handleWorkbenchSelection(selection);   
                }
            }
        };
        selectionService.addPostSelectionListener(workbenchSelectionListener);
       
        // Add workbench part listener
        workbenchPartListener = new IPartListener() {
            @Override
            public void partOpened(IWorkbenchPart part) {
View Full Code Here

        gridData.heightHint = 200;
        description.setLayoutData( gridData );
       
        selectionListener = new WorkbenchSelectionListener();
        ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
        selectionService.addPostSelectionListener(selectionListener);
    }

    @Override
    public void setFocus() {
        // STEP FOUR
View Full Code Here

     
      //To track if the plugin is selected
      ISelectionService service = site.getWorkbenchWindow().getSelectionService();
     
      //We add a listener to notify if the selection has changed
      service.addPostSelectionListener(fSuperListener);
     
      //A file that can be edited by more than one client
      FileBuffers.getTextFileBufferManager().addFileBufferListener(fSuperListener);
     
    }
View Full Code Here

      }
    };

    IWorkbenchPartSite site = getSite();
    ISelectionService service = CommonUtils.getService(site, ISelectionService.class);
    service.addPostSelectionListener(selectionChangedListener);

    // Use current selection to populate reflog view
    UIUtils.notifySelectionChangedWithCurrentSelection(
        selectionChangedListener, site);
View Full Code Here

          setInput(selection);
      }
    };

    ISelectionService srv = CommonUtils.getService(getSite(), ISelectionService.class);
    srv.addPostSelectionListener(selectionChangedListener);
  }

  private class RebaseCommandItemSelectionListener extends SelectionAdapter {

    private final AbstractRebaseCommandHandler command;
View Full Code Here

    });

    // react on selection changes
    IWorkbenchPartSite site = getSite();
    ISelectionService srv = CommonUtils.getService(site, ISelectionService.class);
    srv.addPostSelectionListener(selectionChangedListener);

    // Use current selection to populate staging view
    UIUtils.notifySelectionChangedWithCurrentSelection(
        selectionChangedListener, site);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.