StaticSuggestions BLD200504241800
authorlebedkov@netbeans.org
Thu, 21 Apr 2005 19:16:12 +0000
changeset 611553d86f0d3ae2
parent 6114 bb2bf07adef7
child 6116 d9078cf623cb
StaticSuggestions
o.n.tasklistapi/manifest.mf
o.n.tasklistapi/module-updates.xml
o.n.tasklistapi/src/org/netbeans/modules/tasklist/client/StaticSuggestions.java
     1.1 --- a/o.n.tasklistapi/manifest.mf	Thu Apr 21 19:15:53 2005 +0000
     1.2 +++ b/o.n.tasklistapi/manifest.mf	Thu Apr 21 19:16:12 2005 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4  Manifest-Version: 1.0
     1.5  OpenIDE-Module: org.netbeans.tasklistapi/1
     1.6 -OpenIDE-Module-Implementation-Version: 6
     1.7 +OpenIDE-Module-Implementation-Version: 7
     1.8  OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tasklist/client/Bundle.properties
     1.9  OpenIDE-Module-Layer: org/netbeans/apihole/tasklist/mf-layer.xml
    1.10  
     2.1 --- a/o.n.tasklistapi/module-updates.xml	Thu Apr 21 19:15:53 2005 +0000
     2.2 +++ b/o.n.tasklistapi/module-updates.xml	Thu Apr 21 19:16:12 2005 +0000
     2.3 @@ -1,6 +1,9 @@
     2.4  <updates>
     2.5 -  <update version="1.1">
     2.6 -    <change>API marked as private</change>
     2.7 -  </update>
     2.8 +    <update version="7">
     2.9 +        <change>StaticSuggestions</change>
    2.10 +    </update>
    2.11 +    <update version="1.1">
    2.12 +        <change>API marked as private</change>
    2.13 +    </update>
    2.14  </updates>
    2.15  
     3.1 --- a/o.n.tasklistapi/src/org/netbeans/modules/tasklist/client/StaticSuggestions.java	Thu Apr 21 19:15:53 2005 +0000
     3.2 +++ b/o.n.tasklistapi/src/org/netbeans/modules/tasklist/client/StaticSuggestions.java	Thu Apr 21 19:16:12 2005 +0000
     3.3 @@ -55,6 +55,7 @@
     3.4       */
     3.5      public synchronized void add(Suggestion s) {
     3.6          all.add(s);
     3.7 +        fireChange();
     3.8      }
     3.9      
    3.10      /**
    3.11 @@ -66,10 +67,20 @@
    3.12          int index = all.indexOf(s);
    3.13          if (index >= 0) {
    3.14              all.remove(s);
    3.15 +            fireChange();
    3.16          }
    3.17      }
    3.18      
    3.19      /**
    3.20 +     * Returns all registered suggestions.
    3.21 +     *
    3.22 +     * @return all registered suggestions.
    3.23 +     */
    3.24 +    public synchronized Suggestion[] getAll() {
    3.25 +        return (Suggestion[]) all.toArray(new Suggestion[all.size()]);
    3.26 +    }
    3.27 +    
    3.28 +    /**
    3.29       * Fires a ChangeEvent
    3.30       */
    3.31      private void fireChange() {