1.1 --- a/openide.util/src/org/openide/util/actions/CallableSystemAction.java Sun Jun 28 03:42:53 2009 +0400
1.2 +++ b/openide.util/src/org/openide/util/actions/CallableSystemAction.java Thu Jul 02 03:57:56 2009 +0400
1.3 @@ -47,10 +47,19 @@
1.4 import java.util.logging.Logger;
1.5 import org.openide.util.WeakSet;
1.6
1.7 -/** An action which may be called programmatically.
1.8 -* Typically a presenter will call its {@link #performAction} method,
1.9 -* which must be implemented.
1.10 -* <p>Provides default presenters using the <a href="@org-openide-awt@/org/openide/awt/Actions.html">Actions</a> utility class.
1.11 +/** Not preferred anymore, use <a href="@org-openide-awt@/org/openide/awt/Actions.html#alwaysEnabled(java.awt.event.ActionListener,%20java.lang.String,%20java.lang.String,%20boolean)">Actions.alwaysEnabled</a>
1.12 +* instead. To migrate your
1.13 +* <a href="@org-openide-modules@/org/openide/modules/doc-files/api.html#how-layer">
1.14 +* layer definition</a> use:
1.15 +* <pre>
1.16 +* <file name="your-pkg-action-id.instance">
1.17 +* <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
1.18 +* <attr name="delegate" methodvalue="your.pkg.YourAction.factoryMethod"/>
1.19 +* <attr name="displayName" bundlevalue="your.pkg.Bundle#key"/>
1.20 +* <attr name="iconBase" stringvalue="your/pkg/YourImage.png"/>
1.21 +* <!-- if desired: <attr name="noIconInMenu" boolvalue="false"/> -->
1.22 +* </file>
1.23 +* </pre>
1.24 *
1.25 * @author Ian Formanek, Jaroslav Tulach, Jan Jancura, Petr Hamernik
1.26 */
2.1 --- a/openide.util/src/org/openide/util/actions/CallbackSystemAction.java Sun Jun 28 03:42:53 2009 +0400
2.2 +++ b/openide.util/src/org/openide/util/actions/CallbackSystemAction.java Thu Jul 02 03:57:56 2009 +0400
2.3 @@ -66,11 +66,24 @@
2.4 import org.openide.util.WeakListeners;
2.5 import org.openide.util.WeakSet;
2.6
2.7 -/** Action that can have a performer of the action attached to it at any time,
2.8 -* or changed.
2.9 -* The action will be automatically disabled
2.10 -* when it has no performer.
2.11 -* <p>Also may be made sensitive to changes in window focus.
2.12 +/** Not preferred anymore, the replacement is
2.13 +* <a href="@org-openide-awt@/org/openide/awt/Actions.html#callback(java.lang.String,%20javax.swing.Action,%20boolean,%20java.lang.String,%20java.lang.String,%20boolean)">Actions.callback</a> factory method.
2.14 +* To migrate to the new API just remove the definition of your action in
2.15 +* <a href="@org-openide-modules@/org/openide/modules/doc-files/api.html#how-layer">
2.16 +* layer file</a> and replace it with:
2.17 +* <pre>
2.18 +* <file name="action-pkg-ClassName.instance">
2.19 +* <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.callback"/>
2.20 +* <attr name="key" stringvalue="KeyInActionMap"/>
2.21 +* <attr name="surviveFocusChange" boolvalue="false"/> <!-- defaults to false -->
2.22 +* <attr name="fallback" newvalue="action.pkg.DefaultAction"/> <!-- may be missing -->
2.23 +* <attr name="displayName" bundlevalue="your.pkg.Bundle#key"/>
2.24 +* <attr name="iconBase" stringvalue="your/pkg/YourImage.png"/>
2.25 +* <!-- if desired: <attr name="noIconInMenu" boolvalue="false"/> -->
2.26 +* </file>
2.27 +* </pre>
2.28 +*
2.29 +*
2.30 * @author Ian Formanek, Jaroslav Tulach, Petr Hamernik
2.31 */
2.32 public abstract class CallbackSystemAction extends CallableSystemAction implements ContextAwareAction {