Class AbstractAction

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
All Implemented Interfaces:
IAction
Direct Known Subclasses:
Action

public abstract class AbstractAction extends EventManager implements IAction

Some common functionality to share between implementations of IAction. This functionality deals with the property change event mechanism.

Clients may neither instantiate nor extend this class.

Since:
3.2
  • Constructor Details

    • AbstractAction

      public AbstractAction()
  • Method Details

    • addPropertyChangeListener

      public void addPropertyChangeListener(IPropertyChangeListener listener)
      Description copied from interface: IAction
      Adds a property change listener to this action. Has no effect if an identical listener is already registered.
      Specified by:
      addPropertyChangeListener in interface IAction
      Parameters:
      listener - a property change listener
    • firePropertyChange

      protected final void firePropertyChange(PropertyChangeEvent event)
      Notifies any property change listeners that a property has changed. Only listeners registered at the time this method is called are notified.
      Parameters:
      event - the property change event
      See Also:
    • firePropertyChange

      protected final void firePropertyChange(String propertyName, Object oldValue, Object newValue)
      Notifies any property change listeners that a property has changed. Only listeners registered at the time this method is called are notified. This method avoids creating an event object if there are no listeners registered, but calls firePropertyChange(PropertyChangeEvent) if there are.
      Parameters:
      propertyName - the name of the property that has changed
      oldValue - the old value of the property, or null if none
      newValue - the new value of the property, or null if none
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(IPropertyChangeListener listener)
      Description copied from interface: IAction
      Removes the given listener from this action. Has no effect if an identical listener is not registered.
      Specified by:
      removePropertyChangeListener in interface IAction
      Parameters:
      listener - a property change listener