Examples of ISelectionListener


Examples of org.eclipse.ui.ISelectionListener

  }

  private void registerListener() {

    /* Listen on selection-changes */
    fSelectionListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part, ISelection sel) {

        /* Only Track selections from the HeadlineControl */
        if (!part.equals(fEditorSite.getPart()))
          return;
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

  /**
   * The constructor.
   */
  public MediaViewPart() {
    listener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part, ISelection sel) {
        if (!(sel instanceof IStructuredSelection))
          return;
        IStructuredSelection ss = (IStructuredSelection) sel;
        Object o = ss.getFirstElement();
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

          update(CoolBarItem.STOP, null, null, true);
      }
    });

    /* Selection Listener across the Workbench */
    final ISelectionListener selectionListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part, ISelection selection) {
        update(CoolBarItem.MARK_READ, selection, part, false);
        update(CoolBarItem.MOVE, selection, part, false);
        update(CoolBarItem.COPY, selection, part, false);
        update(CoolBarItem.STICKY, selection, part, false);
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

  }

  private void registerListener() {

    /* Listen on selection-changes */
    fSelectionListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part, ISelection sel) {

        /* Only Track selections from the HeadlineControl */
        if (!part.equals(fEditorSite.getPart()))
          return;
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

  }

  private void registerListener() {

    /* Listen on selection-changes */
    fSelectionListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part, ISelection sel) {

        /* Only Track selections from the HeadlineControl */
        if (!part.equals(fEditorSite.getPart()))
          return;
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

    makeActions();
    hookContextMenu();
    hookDoubleClickAction();
    contributeToActionBars();
   
    listener = new ISelectionListener() {
           
            @Override
            public void selectionChanged(IWorkbenchPart part, ISelection selection) {
                if (selection instanceof IStructuredSelection) {
                    IStructuredSelection iss = (IStructuredSelection)selection;
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

            fireSelectionChanged((ITextSelection) selection);
          }
        }
      };
     
      fPostSelectionListener= new ISelectionListener()
      {
        public void selectionChanged(IWorkbenchPart part, ISelection selection) {
          if (part instanceof WicketFunEditor && selection instanceof ITextSelection)
            firePostSelectionChanged((ITextSelection) selection);
        }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

     * @param listeners the list of listeners to notify
     */
    protected void fireSelection(final IWorkbenchPart part, final ISelection sel) {
        Object[] array = fListeners.getListeners();
        for (int i = 0; i < array.length; i++) {
            final ISelectionListener l = (ISelectionListener) array[i];
            if ((part != null && sel != null)
                    || l instanceof INullSelectionListener) {
                Platform.run(new SafeRunnable() {
                    public void run() {
                        l.selectionChanged(part, sel);
                    }
                });
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

     */
    protected void firePostSelection(final IWorkbenchPart part,
            final ISelection sel) {
        Object[] array = postListeners.getListeners();
        for (int i = 0; i < array.length; i++) {
            final ISelectionListener l = (ISelectionListener) array[i];
            if ((part != null && sel != null)
                    || l instanceof INullSelectionListener) {
                Platform.run(new SafeRunnable() {
                    public void run() {
                        l.selectionChanged(part, sel);
                    }
                });
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

        final IWorkbenchPartSite partSite = getSite();
        final ISelectionService selectionService = partSite.getWorkbenchWindow()
                .getSelectionService();
       
        // Add workbench selection listener
        workbenchSelectionListener = new ISelectionListener() {
            @Override
            public void selectionChanged(IWorkbenchPart part, ISelection selection) {               
                if (!(part instanceof DocumentView)) {
                    handleWorkbenchSelection(selection);   
                }
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.