This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 243265
Collapse All | Expand All

(-)a/masterfs/src/org/netbeans/modules/masterfs/providers/AnnotationProvider.java (-1 / +5 lines)
Lines 110-117 Link Here
110
    /** Provides actions that should be added to given set of files.
110
    /** Provides actions that should be added to given set of files.
111
     * @param files an immutable set of {@link FileObject}s belonging to this filesystem
111
     * @param files an immutable set of {@link FileObject}s belonging to this filesystem
112
     * @return null or array of actions for these files.
112
     * @return null or array of actions for these files.
113
     * @deprecated no longer useful when {@link FileSystem#
113
     */
114
     */
114
    public abstract javax.swing.Action[] actions(Set<? extends FileObject> files);
115
    @Deprecated
116
    public javax.swing.Action[] actions(Set<? extends FileObject> files) {
117
        return null;
118
    }
115
    
119
    
116
    //
120
    //
117
    // Listener support
121
    // Listener support
(-)a/masterfs/src/org/netbeans/modules/masterfs/watcher/Watcher.java (-3 lines)
Lines 148-156 Link Here
148
    public @Override String annotateNameHtml(String name, Set<? extends FileObject> files) {
148
    public @Override String annotateNameHtml(String name, Set<? extends FileObject> files) {
149
        return null;
149
        return null;
150
    }
150
    }
151
    public @Override Action[] actions(Set<? extends FileObject> files) {
152
        return null;
153
    }
154
151
155
    public @Override InterceptionListener getInterceptionListener() {
152
    public @Override InterceptionListener getInterceptionListener() {
156
        return ext;
153
        return ext;
(-)a/openide.filesystems/apichanges.xml (+20 lines)
Lines 49-54 Link Here
49
        <apidef name="filesystems">Filesystems API</apidef>
49
        <apidef name="filesystems">Filesystems API</apidef>
50
    </apidefs>
50
    </apidefs>
51
    <changes>
51
    <changes>
52
        <change id="getActionsDeprecated">
53
            <api name="filesystems"/>
54
            <summary>Deprecating FileSystem.getActions</summary>
55
            <version major="8" minor="12"/>
56
            <date year="2014" month="4" day="25"/>
57
            <author login="jtulach"/>
58
            <compatibility addition="yes"/>
59
            <description>
60
                <p>
61
                    Deprecating <code>getActions</code> method in preparation
62
                    of splitting filesystems API into UI (e.g. depending
63
                    on Swing) and non-UI part (that can run on JDK8 compact
64
                    profile).
65
                </p>
66
            </description>
67
            <class package="org.openide.filesystems" name="FileSystem"/>
68
            <class package="org.openide.filesystems" name="AbstractFileSystem"/>
69
            <class package="org.openide.filesystems" name="MultiFileSystem"/>
70
            <issue number="243265"/>
71
        </change>
52
        <change id="MultiFileObject.revealEntriesAttribute">
72
        <change id="MultiFileObject.revealEntriesAttribute">
53
            <api name="filesystems"/>
73
            <api name="filesystems"/>
54
            <summary>Allowed to reveal deleted files, or original files overriden by writable layer</summary>
74
            <summary>Allowed to reveal deleted files, or original files overriden by writable layer</summary>
(-)a/openide.filesystems/manifest.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: org.openide.filesystems
2
OpenIDE-Module: org.openide.filesystems
3
OpenIDE-Module-Localizing-Bundle: org/openide/filesystems/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/openide/filesystems/Bundle.properties
4
OpenIDE-Module-Layer: org/openide/filesystems/resources/layer.xml
4
OpenIDE-Module-Layer: org/openide/filesystems/resources/layer.xml
5
OpenIDE-Module-Specification-Version: 8.11
5
OpenIDE-Module-Specification-Version: 8.12
6
6
(-)a/openide.filesystems/src/org/openide/filesystems/AbstractFileSystem.java (-1 / +3 lines)
Lines 273-280 Link Here
273
    /* Action for this filesystem.
273
    /* Action for this filesystem.
274
    *
274
    *
275
    * @return refresh action
275
    * @return refresh action
276
    * @deprecated actions should be provided by higher level parts of the
277
    *   system, not something as low level as filesystems
276
    */
278
    */
277
    public SystemAction[] getActions() {
279
    @Deprecated public SystemAction[] getActions() {
278
        if (!isEnabledRefreshFolder()) {
280
        if (!isEnabledRefreshFolder()) {
279
            return NO_SYSTEM_ACTIONS;
281
            return NO_SYSTEM_ACTIONS;
280
        } else {
282
        } else {
(-)a/openide.filesystems/src/org/openide/filesystems/FileSystem.java (-1 / +9 lines)
Lines 476-490 Link Here
476
    * and {@link org.openide.util.actions.Presenter.Toolbar Toolbar} presenters.
476
    * and {@link org.openide.util.actions.Presenter.Toolbar Toolbar} presenters.
477
    *
477
    *
478
    * @return array of available actions
478
    * @return array of available actions
479
    * @deprecated actions should be provided by higher level parts of the
480
    *   system, not something as low level as filesystems
479
    */
481
    */
480
    public abstract SystemAction[] getActions();
482
    @Deprecated
483
    public SystemAction[] getActions() {
484
        return new SystemAction[0];
485
    }
481
486
482
    /**
487
    /**
483
     * Get actions appropriate to a certain file selection.
488
     * Get actions appropriate to a certain file selection.
484
     * By default, returns the same list as {@link #getActions()}.
489
     * By default, returns the same list as {@link #getActions()}.
485
     * @param foSet one or more files which may be selected
490
     * @param foSet one or more files which may be selected
486
     * @return zero or more actions appropriate to those files
491
     * @return zero or more actions appropriate to those files
492
     * @deprecated actions should be provided by higher level parts of the
493
     *   system, not something as low level as filesystems
487
     */
494
     */
495
    @Deprecated
488
    public SystemAction[] getActions(Set<FileObject> foSet) {
496
    public SystemAction[] getActions(Set<FileObject> foSet) {
489
        return this.getActions();
497
        return this.getActions();
490
    }
498
    }
(-)a/openide.filesystems/src/org/openide/filesystems/MultiFileSystem.java (-1 / +11 lines)
Lines 288-294 Link Here
288
    }
288
    }
289
289
290
    /** Merge actions from all delegates.
290
    /** Merge actions from all delegates.
291
    */
291
     * @deprecated actions should be provided by higher level parts of the
292
     * system, not something as low level as filesystems
293
     */
294
    @Deprecated
292
    public @Override SystemAction[] getActions() {
295
    public @Override SystemAction[] getActions() {
293
        List<SystemAction> al = new ArrayList<SystemAction>(101); // randomly choosen constant
296
        List<SystemAction> al = new ArrayList<SystemAction>(101); // randomly choosen constant
294
        Set<SystemAction> uniq = new HashSet<SystemAction>(101); // not that randommly choosen
297
        Set<SystemAction> uniq = new HashSet<SystemAction>(101); // not that randommly choosen
Lines 312-317 Link Here
312
        return al.toArray(new SystemAction[al.size()]);
315
        return al.toArray(new SystemAction[al.size()]);
313
    }
316
    }
314
317
318
    /**
319
     * Merge actions from all delegates.
320
     *
321
     * @deprecated actions should be provided by higher level parts of the
322
     * system, not something as low level as filesystems
323
     */
324
    @Deprecated
315
    public @Override SystemAction[] getActions(final Set<FileObject> foSet) {
325
    public @Override SystemAction[] getActions(final Set<FileObject> foSet) {
316
        List<SystemAction> al = new ArrayList<SystemAction>(101); // randomly choosen constant
326
        List<SystemAction> al = new ArrayList<SystemAction>(101); // randomly choosen constant
317
        Set<SystemAction> uniq = new HashSet<SystemAction>(101); // not that randommly choosen
327
        Set<SystemAction> uniq = new HashSet<SystemAction>(101); // not that randommly choosen
(-)a/openide.loaders/src/org/openide/actions/FileSystemAction.java (+3 lines)
Lines 65-71 Link Here
65
* {@link FileSystem}.
65
* {@link FileSystem}.
66
*
66
*
67
* @author  Jaroslav Tulach
67
* @author  Jaroslav Tulach
68
* @deprecated uses {@link FileSystem#getActions(java.util.Set)} which is
69
*   now deprecated
68
*/
70
*/
71
@Deprecated
69
public class FileSystemAction extends SystemAction
72
public class FileSystemAction extends SystemAction
70
implements ContextAwareAction, Presenter.Menu, Presenter.Popup {
73
implements ContextAwareAction, Presenter.Menu, Presenter.Popup {
71
    /** empty array of menu items */
74
    /** empty array of menu items */
(-)a/subversion/test/unit/src/org/netbeans/modules/subversion/TestAnnotationProvider.java (-5 lines)
Lines 112-122 Link Here
112
    }
112
    }
113
113
114
    @Override
114
    @Override
115
    public Action[] actions(Set files) {
116
        return new Action[]{};
117
    }
118
    
119
    @Override
120
    public InterceptionListener getInterceptionListener() {
115
    public InterceptionListener getInterceptionListener() {
121
        return interceptor;
116
        return interceptor;
122
    }
117
    }
(-)a/versioning.core/src/org/netbeans/modules/versioning/core/VersioningAnnotationProvider.java (+4 lines)
Lines 118-123 Link Here
118
    }
118
    }
119
119
120
    public Action[] actions(Set files) {
120
    public Action[] actions(Set files) {
121
        //
122
        // XXX: And now what!? This code is really used in the IDE!
123
        //
124
        
121
        if (files.isEmpty()) return new Action[0];
125
        if (files.isEmpty()) return new Action[0];
122
126
123
        if(!VersioningManager.isInitialized()) {
127
        if(!VersioningManager.isInitialized()) {
(-)a/versioning.core/test/unit/src/org/netbeans/modules/versioning/DeleteCreateTestAnnotationProvider.java (-5 lines)
Lines 111-121 Link Here
111
    }
111
    }
112
112
113
    @Override
113
    @Override
114
    public Action[] actions(Set files) {
115
        return new Action[]{};
116
    }
117
    
118
    @Override
119
    public InterceptionListener getInterceptionListener() {
114
    public InterceptionListener getInterceptionListener() {
120
        return interceptor;
115
        return interceptor;
121
    }
116
    }

Return to bug 243265