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 217321
Collapse All | Expand All

(-)a/project.libraries/apichanges.xml (-1 / +14 lines)
Lines 107-113 Link Here
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
108
    <changes>
108
    <changes>
109
109
110
        <change id="create-library-with-properties">
110
    <change id="LibrariesSupport.createLibraryImplementation3">
111
        <api name="general"/>
112
        <summary>Added a new factory method to create default implementation of <code>LibraryImplementation3</code></summary>
113
        <version major="1" minor="39"/>
114
        <date day="30" month="8" year="2011"/>
115
        <author login="tzezula"/>
116
        <compatibility addition="yes"/>
117
        <description>
118
            Added a new factory method to create default implementation of <code>LibraryImplementation3</code>.
119
        </description>
120
        <class package="org.netbeans.spi.project.libraries.support" name="LibrariesSupport"/>
121
        <issue number="217321"/>
122
    </change>
123
    <change id="create-library-with-properties">
111
        <api name="general"/>
124
        <api name="general"/>
112
        <summary>Added methods to create a new <code>Library</code> with properties</summary>
125
        <summary>Added methods to create a new <code>Library</code> with properties</summary>
113
        <version major="1" minor="38"/>
126
        <version major="1" minor="38"/>
(-)a/project.libraries/manifest.mf (-1 / +1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.project.libraries/1
2
OpenIDE-Module: org.netbeans.modules.project.libraries/1
3
OpenIDE-Module-Layer: org/netbeans/modules/project/libraries/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/project/libraries/resources/mf-layer.xml
4
OpenIDE-Module-Specification-Version: 1.38
4
OpenIDE-Module-Specification-Version: 1.39
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/libraries/resources/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/libraries/resources/Bundle.properties
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
7
7
(-)a/project.libraries/src/org/netbeans/modules/project/libraries/DefaultLibraryImplementation.java (-2 / +6 lines)
Lines 77-87 Link Here
77
    /**
77
    /**
78
     * Create new LibraryImplementation supporting given <tt>library</tt>.
78
     * Create new LibraryImplementation supporting given <tt>library</tt>.
79
     */
79
     */
80
    public DefaultLibraryImplementation (String libraryType, String[] volumeTypes) {
80
    public DefaultLibraryImplementation (
81
        assert libraryType != null && volumeTypes != null;
81
            @NonNull final String libraryType,
82
            @NonNull final String[] volumeTypes) {
83
        Parameters.notNull("libraryType", libraryType); //NOI18N
84
        Parameters.notNull("volumeTypes", volumeTypes); //NOI18N
82
        this.libraryType = libraryType;
85
        this.libraryType = libraryType;
83
        this.contents = new HashMap<String,List<URL>>();
86
        this.contents = new HashMap<String,List<URL>>();
84
        for (String vtype : volumeTypes) {
87
        for (String vtype : volumeTypes) {
88
            Parameters.notNull("volumeTypes", vtype);   //NOI18N
85
            this.contents.put(vtype, Collections.<URL>emptyList());
89
            this.contents.put(vtype, Collections.<URL>emptyList());
86
        }
90
        }
87
    }
91
    }
(-)a/project.libraries/src/org/netbeans/spi/project/libraries/support/LibrariesSupport.java (-1 / +15 lines)
Lines 52-57 Link Here
52
import org.netbeans.modules.project.libraries.LibraryTypeRegistry;
52
import org.netbeans.modules.project.libraries.LibraryTypeRegistry;
53
import org.netbeans.spi.project.libraries.LibraryImplementation;
53
import org.netbeans.spi.project.libraries.LibraryImplementation;
54
import org.netbeans.modules.project.libraries.DefaultLibraryImplementation;
54
import org.netbeans.modules.project.libraries.DefaultLibraryImplementation;
55
import org.netbeans.spi.project.libraries.LibraryImplementation3;
55
import org.netbeans.spi.project.libraries.LibraryTypeProvider;
56
import org.netbeans.spi.project.libraries.LibraryTypeProvider;
56
import org.openide.filesystems.FileObject;
57
import org.openide.filesystems.FileObject;
57
import org.openide.filesystems.URLMapper;
58
import org.openide.filesystems.URLMapper;
Lines 68-73 Link Here
68
    private LibrariesSupport () {
69
    private LibrariesSupport () {
69
    }
70
    }
70
71
72
    /**
73
     * Creates default {@link LibraryImplementation3}
74
     * @param libraryType type of library
75
     * @param volumeTypes types of supported volumes
76
     * @return LibraryImplementation3
77
     * @since 1.39
78
     */
79
    @NonNull
80
    public static LibraryImplementation3 createLibraryImplementation3 (
81
            @NonNull final String libraryType,
82
            @NonNull final String[] volumeTypes) {
83
        return new DefaultLibraryImplementation (libraryType, volumeTypes);
84
    }
71
85
72
    /**
86
    /**
73
     * Creates default LibraryImplementation
87
     * Creates default LibraryImplementation
Lines 76-82 Link Here
76
     * @return LibraryImplementation, never return null
90
     * @return LibraryImplementation, never return null
77
     */
91
     */
78
    public static LibraryImplementation createLibraryImplementation (String libraryType, String[] volumeTypes) {
92
    public static LibraryImplementation createLibraryImplementation (String libraryType, String[] volumeTypes) {
79
        return new DefaultLibraryImplementation (libraryType, volumeTypes);
93
        return createLibraryImplementation3(libraryType, volumeTypes);
80
    }
94
    }
81
    
95
    
82
    /**
96
    /**

Return to bug 217321