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

(-)a/openide.dialogs/src/org/openide/WizardDescriptor.java (-3 / +6 lines)
Lines 1766-1774 Link Here
1766
     * (This interface can replace
1766
     * (This interface can replace
1767
     * <a href="@OPENIDE/LOADERS@/org/openide/loaders/TemplateWizard.Iterator.html"><code>TemplateWizard.Iterator</code></a>
1767
     * <a href="@OPENIDE/LOADERS@/org/openide/loaders/TemplateWizard.Iterator.html"><code>TemplateWizard.Iterator</code></a>
1768
     * in a template's declaration.)
1768
     * in a template's declaration.)
1769
     * @param <Ignored> irrelevant; the data type is always {@link WizardDescriptor}
1769
     * @since org.openide/1 4.33
1770
     * @since org.openide/1 4.33
1770
     */
1771
     */
1771
    public interface InstantiatingIterator<Data> extends Iterator<Data> {
1772
    public interface InstantiatingIterator<Ignored> extends Iterator<WizardDescriptor> {
1772
        /** Returns set of instantiated objects. If instantiation fails then wizard remains open to enable correct values.
1773
        /** Returns set of instantiated objects. If instantiation fails then wizard remains open to enable correct values.
1773
         *
1774
         *
1774
         * @throws IOException
1775
         * @throws IOException
Lines 1795-1803 Link Here
1795
     * (This interface can replace
1796
     * (This interface can replace
1796
     * <a href="@OPENIDE/LOADERS@/org/openide/loaders/TemplateWizard.Iterator.html"><code>TemplateWizard.Iterator</code></a>
1797
     * <a href="@OPENIDE/LOADERS@/org/openide/loaders/TemplateWizard.Iterator.html"><code>TemplateWizard.Iterator</code></a>
1797
     * in a template's declaration.)
1798
     * in a template's declaration.)
1799
     * @param <Ignored> irrelevant; the data type is always {@link WizardDescriptor}
1798
     * @since org.openide/1 6.5
1800
     * @since org.openide/1 6.5
1799
     */
1801
     */
1800
    public interface AsynchronousInstantiatingIterator<Data> extends InstantiatingIterator<Data> {
1802
    public interface AsynchronousInstantiatingIterator<Ignored> extends InstantiatingIterator<Ignored> {
1801
1803
1802
        /**
1804
        /**
1803
         * Is called in separate thread when the Finish button
1805
         * Is called in separate thread when the Finish button
Lines 1817-1825 Link Here
1817
     * (This interface can replace
1819
     * (This interface can replace
1818
     * <a href="@OPENIDE/LOADERS@/org/openide/loaders/TemplateWizard.Iterator.html"><code>TemplateWizard.Iterator</code></a>
1820
     * <a href="@OPENIDE/LOADERS@/org/openide/loaders/TemplateWizard.Iterator.html"><code>TemplateWizard.Iterator</code></a>
1819
     * in a template's declaration.)
1821
     * in a template's declaration.)
1822
     * @param <Ignored> irrelevant; the data type is always {@link WizardDescriptor}
1820
     * @since org.openide.dialogs 7.1
1823
     * @since org.openide.dialogs 7.1
1821
     */
1824
     */
1822
    public interface ProgressInstantiatingIterator<Data> extends AsynchronousInstantiatingIterator<Data> {
1825
    public interface ProgressInstantiatingIterator<Ignored> extends AsynchronousInstantiatingIterator<Ignored> {
1823
1826
1824
        /**
1827
        /**
1825
         * Is called in separate thread when the Finish button
1828
         * Is called in separate thread when the Finish button
(-)a/openide.loaders/src/org/openide/loaders/TemplateWizard.java (-4 / +3 lines)
Lines 681-687 Link Here
681
    * @param obj the data object
681
    * @param obj the data object
682
    * @return custom iterator or null
682
    * @return custom iterator or null
683
    */
683
    */
684
    @SuppressWarnings("unchecked")
685
    public static Iterator getIterator (DataObject obj) {
684
    public static Iterator getIterator (DataObject obj) {
686
        Object unknownIterator = obj.getPrimaryFile ().getAttribute(CUSTOM_ITERATOR);
685
        Object unknownIterator = obj.getPrimaryFile ().getAttribute(CUSTOM_ITERATOR);
687
        if (unknownIterator == null) {
686
        if (unknownIterator == null) {
Lines 693-699 Link Here
693
            it = (Iterator)unknownIterator;
692
            it = (Iterator)unknownIterator;
694
        // own brigde for each one iterator type
693
        // own brigde for each one iterator type
695
        } if (unknownIterator instanceof WizardDescriptor.InstantiatingIterator) {
694
        } if (unknownIterator instanceof WizardDescriptor.InstantiatingIterator) {
696
            it = new InstantiatingIteratorBridge((WizardDescriptor.InstantiatingIterator<WizardDescriptor>) unknownIterator);
695
            it = new InstantiatingIteratorBridge((WizardDescriptor.InstantiatingIterator) unknownIterator);
697
        }
696
        }
698
        if (it != null) {
697
        if (it != null) {
699
            return it;
698
            return it;
Lines 963-970 Link Here
963
    }
962
    }
964
    
963
    
965
    private static class InstantiatingIteratorBridge implements TemplateWizard.Iterator {
964
    private static class InstantiatingIteratorBridge implements TemplateWizard.Iterator {
966
        private WizardDescriptor.InstantiatingIterator<WizardDescriptor> instantiatingIterator;
965
        private WizardDescriptor.InstantiatingIterator<?> instantiatingIterator;
967
        public InstantiatingIteratorBridge (WizardDescriptor.InstantiatingIterator<WizardDescriptor> it) {
966
        public InstantiatingIteratorBridge(WizardDescriptor.InstantiatingIterator<?> it) {
968
            instantiatingIterator = it;
967
            instantiatingIterator = it;
969
        }
968
        }
970
        
969
        

Return to bug 154776