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

(-)apichanges.xml (+17 lines)
Lines 80-85 Link Here
80
    
80
    
81
        <change>
81
        <change>
82
            <api name="ui"/>
82
            <api name="ui"/>
83
            <summary>Added a new factory method for creating the name/package chooser wizard panel into the templates SPI.</summary>
84
            <version major="1" minor="3"/>
85
            <date day="21" month="3" year="2005"/>
86
            <author login="pjiricka"/>
87
            <compatibility addition="yes"/>
88
            <description>
89
                <p>
90
                A new factory method for creating the name and package chooser panel in the Java file wizard.
91
                This method is similar to the methods that already exist in this class; it has an extra boolean 
92
                parameter that allows to specify whether the entered package name is required to be valid (non-empty).
93
                </p>
94
            </description>
95
            <class package="org.netbeans.spi.java.project.support.ui.templates" name="JavaTemplates"/>
96
            <issue number="56730"/>
97
        </change>
98
        <change>
99
            <api name="ui"/>
83
            <summary>The functionality of PackageListView was moved into PackageView support SPI.</summary>
100
            <summary>The functionality of PackageListView was moved into PackageView support SPI.</summary>
84
            <version major="1" minor="3"/>
101
            <version major="1" minor="3"/>
85
            <date day="10" month="1" year="2005"/>
102
            <date day="10" month="1" year="2005"/>
(-)src/org/netbeans/spi/java/project/support/ui/templates/JavaTemplates.java (-2 / +21 lines)
Lines 55-65 Link Here
55
     * @throws IllegalArgumentException if folders is empty
55
     * @throws IllegalArgumentException if folders is empty
56
     */
56
     */
57
    public static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, WizardDescriptor.Panel bottomPanel) throws IllegalArgumentException {
57
    public static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, WizardDescriptor.Panel bottomPanel) throws IllegalArgumentException {
58
        return createPackageChooser(project, folders, bottomPanel, false);
59
    }
60
    
61
    /**
62
     * Create a Java-oriented target chooser suitable for templates which are Java
63
     * sources or otherwise intended to reside in a Java package.
64
     * The user is prompted to choose a package location for the new file and a (base) name;
65
     * this method allows to specify whether a valid (non-empty) package is required.
66
     * Resulting panel can be decorated with additional panel. Which will
67
     * be placed below the standard package chooser.
68
     * @param project the project which the template will be created in
69
     * @param folders a list of possible Java package roots to create the new file in (must be nonempty)
70
     * @param bottomPanel panel which should be placed underneth the default chooser
71
     * @param validPackageRequired indicates whether a only a valid (non-empty) package is accepted
72
     * @return a wizard panel prompting the user to choose a name and package
73
     * @throws IllegalArgumentException if folders is empty
74
     */
75
    public static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, 
76
        WizardDescriptor.Panel bottomPanel, boolean validPackageRequired) throws IllegalArgumentException {
58
        if (folders.length == 0) {
77
        if (folders.length == 0) {
59
            throw new IllegalArgumentException("No folders selected"); // NOI18N
78
            throw new IllegalArgumentException("No folders selected"); // NOI18N
60
        }
79
        }
61
        return new JavaTargetChooserPanel(project, folders, bottomPanel, false );
80
        return new JavaTargetChooserPanel(project, folders, bottomPanel, false, validPackageRequired);
62
    }
81
    } 
63
    
82
    
64
    /** Creates new WizardIterator containing standard Package chooser
83
    /** Creates new WizardIterator containing standard Package chooser
65
     * @return WizardIterator consisting of one panel containing package chooser
84
     * @return WizardIterator consisting of one panel containing package chooser

Return to bug 56730