# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /space/repos/web-main # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: project.libraries/manifest.mf --- project.libraries/manifest.mf Base (BASE) +++ project.libraries/manifest.mf Locally Modified (Based On LOCAL) @@ -2,7 +2,7 @@ OpenIDE-Module: org.netbeans.modules.project.libraries/1 OpenIDE-Module-Install: org/netbeans/modules/project/libraries/LibrariesModule.class OpenIDE-Module-Layer: org/netbeans/modules/project/libraries/resources/mf-layer.xml -OpenIDE-Module-Specification-Version: 1.31 +OpenIDE-Module-Specification-Version: 1.32 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/libraries/resources/Bundle.properties AutoUpdate-Show-In-Client: false Index: project.libraries/src/org/netbeans/api/project/libraries/LibrariesCustomizer.java --- project.libraries/src/org/netbeans/api/project/libraries/LibrariesCustomizer.java Base (BASE) +++ project.libraries/src/org/netbeans/api/project/libraries/LibrariesCustomizer.java Locally Modified (Based On LOCAL) @@ -108,6 +108,18 @@ * @since org.netbeans.modules.project.libraries/1 1.16 */ public static Library showCreateNewLibraryCustomizer(LibraryManager manager) { + return showCreateNewLibraryCustomizer(manager, null); //NOI18N + } + + /** + * Show customizer for creating new library with pre-filled library name + * in the given library manager. + * @param manager manager + * @param libraryName pre-filled library name + * @return created persisted library or null if user cancelled operation + * @since org.netbeans.modules.project.libraries/1 1.32 + */ + public static Library showCreateNewLibraryCustomizer(LibraryManager manager, String libraryName) { if (manager == null) { manager = LibraryManager.getDefault(); } @@ -117,7 +129,7 @@ } org.netbeans.modules.project.libraries.ui.LibrariesCustomizer customizer = new org.netbeans.modules.project.libraries.ui.LibrariesCustomizer (area); - NewLibraryPanel p = new NewLibraryPanel(customizer.getModel(), null, area); + NewLibraryPanel p = new NewLibraryPanel(customizer.getModel(), null, area, libraryName); DialogDescriptor dd = new DialogDescriptor (p, NbBundle.getMessage(LibrariesCustomizer.class,"LibrariesCustomizer.createLibrary.title"), true, DialogDescriptor.OK_CANCEL_OPTION, null, null); Index: project.libraries/src/org/netbeans/modules/project/libraries/ui/LibrariesCustomizer.java --- project.libraries/src/org/netbeans/modules/project/libraries/ui/LibrariesCustomizer.java Base (BASE) +++ project.libraries/src/org/netbeans/modules/project/libraries/ui/LibrariesCustomizer.java Locally Modified (Based On LOCAL) @@ -522,7 +522,7 @@ if (area == null) { area = LibrariesModel.GLOBAL_AREA; } - NewLibraryPanel p = new NewLibraryPanel(model, preselectedLibraryType, area); + NewLibraryPanel p = new NewLibraryPanel(model, preselectedLibraryType, area, null); DialogDescriptor dd = new DialogDescriptor (p, NbBundle.getMessage(LibrariesCustomizer.class,"CTL_CreateLibrary"), true, DialogDescriptor.OK_CANCEL_OPTION, null, null); p.setDialogDescriptor(dd); Index: project.libraries/src/org/netbeans/modules/project/libraries/ui/NewLibraryPanel.java --- project.libraries/src/org/netbeans/modules/project/libraries/ui/NewLibraryPanel.java Base (BASE) +++ project.libraries/src/org/netbeans/modules/project/libraries/ui/NewLibraryPanel.java Locally Modified (Based On LOCAL) @@ -61,8 +61,7 @@ private DialogDescriptor dd; - - public NewLibraryPanel (LibrariesModel model, String preselectedLibraryType, LibraryStorageArea area) { + public NewLibraryPanel (LibrariesModel model, String preselectedLibraryType, LibraryStorageArea area, String libraryName) { this.model = model; this.area = area; initComponents(); @@ -81,7 +80,7 @@ } }); - initModel(preselectedLibraryType); + initModel(preselectedLibraryType, libraryName); Color c = javax.swing.UIManager.getColor("nb.errorForeground"); //NOI18N if (c == null) { c = new Color(89,79,191); // RGB suggested by Bruce in #28466 @@ -109,9 +108,13 @@ } - private void initModel(String preselectedLibraryType) { + private void initModel(String preselectedLibraryType, String libraryName) { this.typeMap = new HashMap(); - this.name.setText (NbBundle.getMessage (NewLibraryPanel.class,"TXT_NewLibrary")); + if (libraryName != null) { + this.name.setText(libraryName); + } else { + this.name.setText(NbBundle.getMessage (NewLibraryPanel.class,"TXT_NewLibrary")); + } LibraryTypeRegistry regs = LibraryTypeRegistry.getDefault(); LibraryTypeProvider[] providers = regs.getLibraryTypeProviders(); int index = 0;