[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: About the IActionDelegate?

Title: Dollyn
Dollyn,

Here's an example where it's used in selectionChanged:
  public void selectionChanged(IAction action, ISelection selection)
  {
    if (selection instanceof IStructuredSelection)
    {
      Object object = ((IStructuredSelection)selection).getFirstElement();
      if (object instanceof GenModel)
      {
        genModel = (GenModel)object;

        action.setEnabled(true);
        return;
      }
    }
    genModel = null;
    action.setEnabled(false);
  }
Maybe in run you'd look astisChecked to behave one of two ways or you'd toggle that state...


Dollyn wrote:
There are two methods in this interface : SelectionChanged(IAction action, ISelection selection) and run(IAction action).
Who can tell me what is the "IAction action" used for? I've looked at some examples, but didn't find anyting about this parameter.
--

Dollyn