Automated merge with http://hg.netbeans.org/netigso
authorffjre@netbeans.org
Thu, 02 Jul 2009 03:57:56 +0400
changeset 924fe3d6e386634
parent 923 15ebda6eb52b
parent 798 d56dd5ce6893
child 925 a290747c7208
Automated merge with http://hg.netbeans.org/netigso
     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 +* &lt;file name="your-pkg-action-id.instance"&gt;
    1.17 +*   &lt;attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/&gt;
    1.18 +*   &lt;attr name="delegate" methodvalue="your.pkg.YourAction.factoryMethod"/&gt;
    1.19 +*   &lt;attr name="displayName" bundlevalue="your.pkg.Bundle#key"/&gt;
    1.20 +*   &lt;attr name="iconBase" stringvalue="your/pkg/YourImage.png"/&gt;
    1.21 +*   &lt;!-- if desired: &lt;attr name="noIconInMenu" boolvalue="false"/&gt; --&gt;
    1.22 +* &lt;/file&gt;
    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 +* &lt;file name="action-pkg-ClassName.instance"&gt;
    2.19 +*   &lt;attr name="instanceCreate" methodvalue="org.openide.awt.Actions.callback"/&gt;
    2.20 +*   &lt;attr name="key" stringvalue="KeyInActionMap"/&gt;
    2.21 +*   &lt;attr name="surviveFocusChange" boolvalue="false"/&gt; &lt;!-- defaults to false --&gt;
    2.22 +*   &lt;attr name="fallback" newvalue="action.pkg.DefaultAction"/&gt; &lt;!-- may be missing --&gt;
    2.23 +*   &lt;attr name="displayName" bundlevalue="your.pkg.Bundle#key"/&gt;
    2.24 +*   &lt;attr name="iconBase" stringvalue="your/pkg/YourImage.png"/&gt;
    2.25 +*   &lt;!-- if desired: &lt;attr name="noIconInMenu" boolvalue="false"/&gt; --&gt;
    2.26 +* &lt;/file&gt;
    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 {