Examples of SafeRunnable


Examples of org.eclipse.jface.util.SafeRunnable

    }
    protected void fireSelectionChanged(){
        final SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
        for( ISelectionChangedListener listener : selectionChangeListeners ){
            final ISelectionChangedListener l = listener;
            SafeRunnable.run(new SafeRunnable() {
                public void run() {
                    l.selectionChanged(event);
                }
            });
        }
View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

    public void selectionChanged(final SelectionChangedEvent event) {
      // pass on the notification to listeners
      Object[] listeners = getListeners();
      for (int i = 0; i < listeners.length; ++i) {
        final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
        Platform.run(new SafeRunnable() {
          public void run() {
            l.selectionChanged(event);
          }
        });
      }
View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

     */
    protected void firePropertyChange(final int propertyId) {
        Object[] array = getListeners();
        for (int nX = 0; nX < array.length; nX++) {
            final IPropertyListener l = (IPropertyListener) array[nX];
            Platform.run(new SafeRunnable() {

                public void run() {
                    l.propertyChanged(this, propertyId);
                }
            });
View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

  }

  private void fireEventChange(final SelectionChangedEvent event, Object[] listeners) {
    for (int i = 0; i < listeners.length; ++i) {
            final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
            SafeRunner.run(new SafeRunnable() {
                public void run() {
                    l.selectionChanged(event);
                }
            });
        }
View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

        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.jface.util.SafeRunnable

        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.jface.util.SafeRunnable

   * @param listener The listener we are updating.
   * @param event
   *            the event with the update details
   */
  void fireListener(final LabelProviderChangedEvent event, final ILabelProviderListener listener) {
    Platform.run(new SafeRunnable() {
      public void run() {
        listener.labelProviderChanged(event);
      }
    });

View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

     */
    void fireListeners(final LabelProviderChangedEvent event) {
        Object[] array = listeners.getListeners();
        for (int i = 0; i < array.length; i++) {
            final ILabelProviderListener l = (ILabelProviderListener) array[i];
            Platform.run(new SafeRunnable() {
                public void run() {
                    l.labelProviderChanged(event);
                }
            });
        }
View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

        final SelectionChangedEvent e = new SelectionChangedEvent(this, selection);
        Object[] listenersArray = listeners.toArray();
       
        for (int i = 0; i < listenersArray.length; i++) {
            final ISelectionChangedListener l = (ISelectionChangedListener) listenersArray[i];
            Platform.run(new SafeRunnable() {
                public void run() {
                    l.selectionChanged(e);
                }
            });
    }
View Full Code Here

Examples of org.eclipse.jface.util.SafeRunnable

     */
    public void firePartActivated(final IWorkbenchPart part) {
        Object[] array = getListeners();
        for (int i = 0; i < array.length; i++) {
            final IPartListener l = (IPartListener) array[i];
            fireEvent(new SafeRunnable() {
                public void run() {
                    l.partActivated(part);
                }
            }, l, part, "activated::"); //$NON-NLS-1$
        }
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.