Sample Custom Save Action. See the chapter called "Nodes, Explorer Views, Actions and Presenters" in the book "Rich Client Programming: Plugging into the NetBeans Platform" for details.

This sample illustrates a context aware action.