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

(-)a/api.web.webmodule/apichanges.xml (+15 lines)
Lines 106-111 Link Here
106
    <!-- ACTUAL CHANGES BEGIN HERE: -->
106
    <!-- ACTUAL CHANGES BEGIN HERE: -->
107
107
108
    <changes>
108
    <changes>
109
        <change id="Adding_WebModuleExtender_Savable">
110
            <api name="WebModuleAPI"/>
111
            <summary>Adding <code>WebModuleExtender.Savable</code> interface</summary>
112
            <version major="1" minor="26"/>
113
            <date day="26" month="9" year="2011"/>
114
            <author login="marfous@netbeans.org"/>
115
            <compatibility addition="yes"/>
116
            <description>
117
                <p>
118
                    Added interface <code>WebModuleExtender.Savable</code> for ability to 
119
                    save framework settings of already included extender after confirming
120
                    project customizer.
121
                </p>
122
            </description>
123
        </change>
109
        <change id="ListenableWebModuleImplementation2">
124
        <change id="ListenableWebModuleImplementation2">
110
            <api name="WebModuleAPI"/>
125
            <api name="WebModuleAPI"/>
111
            <summary>Adding ability to listen on WebModuleImplementation2 changes</summary>
126
            <summary>Adding ability to listen on WebModuleImplementation2 changes</summary>
(-)a/api.web.webmodule/manifest.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.api.web.webmodule
2
OpenIDE-Module: org.netbeans.api.web.webmodule
3
OpenIDE-Module-Specification-Version: 1.25
3
OpenIDE-Module-Specification-Version: 1.26
4
OpenIDE-Module-Layer: org/netbeans/modules/web/webmodule/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/web/webmodule/resources/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/webmodule/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/webmodule/Bundle.properties
(-)a/api.web.webmodule/nbproject/project.xml (+9 lines)
Lines 50-55 Link Here
50
            <code-name-base>org.netbeans.api.web.webmodule</code-name-base>
50
            <code-name-base>org.netbeans.api.web.webmodule</code-name-base>
51
            <module-dependencies>
51
            <module-dependencies>
52
                <dependency>
52
                <dependency>
53
                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
54
                    <build-prerequisite/>
55
                    <compile-dependency/>
56
                    <run-dependency>
57
                        <release-version>1</release-version>
58
                        <specification-version>1.11</specification-version>
59
                    </run-dependency>
60
                </dependency>
61
                <dependency>
53
                    <code-name-base>org.netbeans.api.java</code-name-base>
62
                    <code-name-base>org.netbeans.api.java</code-name-base>
54
                    <build-prerequisite/>
63
                    <build-prerequisite/>
55
                    <compile-dependency/>
64
                    <compile-dependency/>
(-)a/api.web.webmodule/src/org/netbeans/modules/web/spi/webmodule/WebModuleExtender.java (-1 / +21 lines)
Lines 33-38 Link Here
33
import java.util.Set;
33
import java.util.Set;
34
import javax.swing.JComponent;
34
import javax.swing.JComponent;
35
import javax.swing.event.ChangeListener;
35
import javax.swing.event.ChangeListener;
36
import org.netbeans.api.annotations.common.NonNull;
36
import org.netbeans.modules.web.api.webmodule.WebModule;
37
import org.netbeans.modules.web.api.webmodule.WebModule;
37
import org.openide.filesystems.FileObject;
38
import org.openide.filesystems.FileObject;
38
import org.openide.util.HelpCtx;
39
import org.openide.util.HelpCtx;
Lines 97-104 Link Here
97
     * Called to extend the given web module with the web framework
98
     * Called to extend the given web module with the web framework
98
     * corresponding to this extender.
99
     * corresponding to this extender.
99
     *
100
     *
100
     * @param  webModule the web module to be extender; never null.
101
     * @param  webModule the web module to be extended; never null.
101
     * @return the set of newly created files in the web module.
102
     * @return the set of newly created files in the web module.
102
     */
103
     */
103
    public abstract Set<FileObject> extend(WebModule webModule);
104
    public abstract Set<FileObject> extend(WebModule webModule);
105
106
    /**
107
     * Interface that represents ability to save {@code WebModuleExtender}
108
     * properties for a {@link WebModule}.
109
     *
110
     * @since 1.26
111
     */
112
    public interface Savable {
113
114
        /**
115
         * Called to save extender configuration for given web module in cases that
116
         * the web module was already extended by the {@code WebModuleExtender}.
117
         *
118
         * @param webModule the web module to store extender settings; never null.
119
         */
120
        void save(@NonNull WebModule webModule);
121
122
    }
123
104
}
124
}
(-)a/web.jsf/nbproject/project.xml (-2 / +2 lines)
Lines 81-87 Link Here
81
                    <build-prerequisite/>
81
                    <build-prerequisite/>
82
                    <compile-dependency/>
82
                    <compile-dependency/>
83
                    <run-dependency>
83
                    <run-dependency>
84
                        <specification-version>1.0</specification-version>
84
                        <specification-version>1.26</specification-version>
85
                    </run-dependency>
85
                    </run-dependency>
86
                </dependency>
86
                </dependency>
87
                <dependency>
87
                <dependency>
Lines 415-421 Link Here
415
                    <build-prerequisite/>
415
                    <build-prerequisite/>
416
                    <compile-dependency/>
416
                    <compile-dependency/>
417
                    <run-dependency>
417
                    <run-dependency>
418
                        <specification-version>1.6</specification-version>
418
                        <specification-version>1.36</specification-version>
419
                    </run-dependency>
419
                    </run-dependency>
420
                </dependency>
420
                </dependency>
421
                <dependency>
421
                <dependency>
(-)a/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanel.java (-1 / +30 lines)
Lines 45-50 Link Here
45
package org.netbeans.modules.web.jsf.wizards;
45
package org.netbeans.modules.web.jsf.wizards;
46
46
47
import java.io.File;
47
import java.io.File;
48
import java.util.ArrayList;
48
import java.util.HashSet;
49
import java.util.HashSet;
49
import java.util.Iterator;
50
import java.util.Iterator;
50
import java.util.List;
51
import java.util.List;
Lines 68-74 Link Here
68
 *
69
 *
69
 * @author petr, alexeybutenko
70
 * @author petr, alexeybutenko
70
 */
71
 */
71
public class JSFConfigurationPanel extends WebModuleExtender {
72
public class JSFConfigurationPanel extends WebModuleExtender implements WebModuleExtender.Savable {
72
73
73
    private final JSFFrameworkProvider framework;
74
    private final JSFFrameworkProvider framework;
74
    private final ExtenderController controller;
75
    private final ExtenderController controller;
Lines 365-368 Link Here
365
        static final PreferredLanguage JSP = new PreferredLanguage("JSP"); //NOI18N
366
        static final PreferredLanguage JSP = new PreferredLanguage("JSP"); //NOI18N
366
        static final PreferredLanguage Facelets = new PreferredLanguage("Facelets"); //NOI18N
367
        static final PreferredLanguage Facelets = new PreferredLanguage("Facelets"); //NOI18N
367
    }
368
    }
369
370
    @Override
371
    public void save(WebModule webModule) {
372
        List<? extends JsfComponentImplementation> activedImplementations = getComponent().getActivedJsfDescriptors();
373
        List<JsfComponentImplementation> usedImplementations = new ArrayList<JsfComponentImplementation>();
374
        for (JsfComponentImplementation jsfImplementation : getComponent().getAllJsfDescriptors()) {
375
            if (jsfImplementation.isInWebModule(webModule)) {
376
                usedImplementations.add(jsfImplementation);
377
            }
378
        }
379
380
        // get list of newly added JSF suite implementations
381
        List<? extends JsfComponentImplementation> addedImplementations = 
382
                new ArrayList<JsfComponentImplementation>(activedImplementations);
383
        addedImplementations.removeAll(usedImplementations);
384
        for (JsfComponentImplementation jsfComponentImplementation : addedImplementations) {
385
            jsfComponentImplementation.extend(webModule, jsfComponentImplementation.createJsfComponentCustomizer(null));
386
        }
387
388
        // get list of removed JSF suite implementations
389
        List<? extends JsfComponentImplementation> removedImplementations =
390
                new ArrayList<JsfComponentImplementation>(usedImplementations);
391
        removedImplementations.removeAll(activedImplementations);
392
        for (JsfComponentImplementation jsfComponentImplementation : removedImplementations) {
393
            jsfComponentImplementation.remove(webModule);
394
        }
395
    }
396
368
}
397
}
(-)a/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.form (-10 / +10 lines)
Lines 61-67 Link Here
61
                  <Group type="102" attributes="0">
61
                  <Group type="102" attributes="0">
62
                      <EmptySpace max="-2" attributes="0"/>
62
                      <EmptySpace max="-2" attributes="0"/>
63
                      <Group type="103" groupAlignment="0" attributes="0">
63
                      <Group type="103" groupAlignment="0" attributes="0">
64
                          <Component id="rbNewLibrary" alignment="1" pref="485" max="32767" attributes="0"/>
64
                          <Component id="rbNewLibrary" alignment="1" pref="471" max="32767" attributes="0"/>
65
                          <Group type="102" alignment="0" attributes="0">
65
                          <Group type="102" alignment="0" attributes="0">
66
                              <EmptySpace min="22" pref="22" max="22" attributes="0"/>
66
                              <EmptySpace min="22" pref="22" max="22" attributes="0"/>
67
                              <Group type="103" groupAlignment="0" attributes="0">
67
                              <Group type="103" groupAlignment="0" attributes="0">
Lines 69-75 Link Here
69
                                  <Component id="lVersion" alignment="0" min="-2" max="-2" attributes="1"/>
69
                                  <Component id="lVersion" alignment="0" min="-2" max="-2" attributes="1"/>
70
                                  <Component id="lDirectory" alignment="0" min="-2" max="-2" attributes="1"/>
70
                                  <Component id="lDirectory" alignment="0" min="-2" max="-2" attributes="1"/>
71
                              </Group>
71
                              </Group>
72
                              <EmptySpace pref="245" max="32767" attributes="0"/>
72
                              <EmptySpace pref="211" max="32767" attributes="0"/>
73
                          </Group>
73
                          </Group>
74
                          <Group type="102" alignment="0" attributes="0">
74
                          <Group type="102" alignment="0" attributes="0">
75
                              <Group type="103" groupAlignment="1" max="-2" attributes="0">
75
                              <Group type="103" groupAlignment="1" max="-2" attributes="0">
Lines 78-93 Link Here
78
                              </Group>
78
                              </Group>
79
                              <EmptySpace type="unrelated" max="-2" attributes="0"/>
79
                              <EmptySpace type="unrelated" max="-2" attributes="0"/>
80
                              <Group type="103" groupAlignment="0" attributes="0">
80
                              <Group type="103" groupAlignment="0" attributes="0">
81
                                  <Component id="cbLibraries" pref="322" max="32767" attributes="0"/>
81
                                  <Component id="cbLibraries" pref="297" max="32767" attributes="0"/>
82
                                  <Group type="102" alignment="1" attributes="0">
82
                                  <Group type="102" alignment="1" attributes="0">
83
                                      <Group type="103" groupAlignment="1" attributes="0">
83
                                      <Group type="103" groupAlignment="1" attributes="0">
84
                                          <Component id="jtNewLibraryName" alignment="1" pref="245" max="32767" attributes="1"/>
84
                                          <Component id="jtNewLibraryName" alignment="1" pref="234" max="32767" attributes="1"/>
85
                                          <Component id="jtFolder" alignment="1" pref="245" max="32767" attributes="1"/>
85
                                          <Component id="jtFolder" alignment="1" pref="234" max="32767" attributes="1"/>
86
                                      </Group>
86
                                      </Group>
87
                                      <EmptySpace max="-2" attributes="0"/>
87
                                      <EmptySpace max="-2" attributes="0"/>
88
                                      <Component id="jbBrowse" min="-2" max="-2" attributes="0"/>
88
                                      <Component id="jbBrowse" min="-2" max="-2" attributes="0"/>
89
                                  </Group>
89
                                  </Group>
90
                                  <Component id="serverLibraries" alignment="0" pref="322" max="32767" attributes="0"/>
90
                                  <Component id="serverLibraries" alignment="0" pref="297" max="32767" attributes="0"/>
91
                              </Group>
91
                              </Group>
92
                          </Group>
92
                          </Group>
93
                      </Group>
93
                      </Group>
Lines 121-127 Link Here
121
                      </Group>
121
                      </Group>
122
                      <EmptySpace max="-2" attributes="0"/>
122
                      <EmptySpace max="-2" attributes="0"/>
123
                      <Component id="cbPackageJars" min="-2" max="-2" attributes="0"/>
123
                      <Component id="cbPackageJars" min="-2" max="-2" attributes="0"/>
124
                      <EmptySpace pref="22" max="32767" attributes="0"/>
124
                      <EmptySpace max="32767" attributes="0"/>
125
                  </Group>
125
                  </Group>
126
              </Group>
126
              </Group>
127
            </DimensionLayout>
127
            </DimensionLayout>
Lines 299-305 Link Here
299
                          <Group type="102" alignment="0" attributes="0">
299
                          <Group type="102" alignment="0" attributes="0">
300
                              <Component id="lURLPattern" min="-2" max="-2" attributes="0"/>
300
                              <Component id="lURLPattern" min="-2" max="-2" attributes="0"/>
301
                              <EmptySpace max="-2" attributes="0"/>
301
                              <EmptySpace max="-2" attributes="0"/>
302
                              <Component id="tURLPattern" pref="326" max="32767" attributes="0"/>
302
                              <Component id="tURLPattern" pref="282" max="32767" attributes="0"/>
303
                          </Group>
303
                          </Group>
304
                          <Group type="102" alignment="0" attributes="0">
304
                          <Group type="102" alignment="0" attributes="0">
305
                              <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
305
                              <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
Lines 399-405 Link Here
399
                  <Group type="102" alignment="0" attributes="0">
399
                  <Group type="102" alignment="0" attributes="0">
400
                      <EmptySpace max="-2" attributes="0"/>
400
                      <EmptySpace max="-2" attributes="0"/>
401
                      <Group type="103" groupAlignment="0" attributes="0">
401
                      <Group type="103" groupAlignment="0" attributes="0">
402
                          <Component id="jsfComponentsScrollPane" alignment="0" pref="479" max="32767" attributes="0"/>
402
                          <Component id="jsfComponentsScrollPane" alignment="0" pref="459" max="32767" attributes="0"/>
403
                          <Component id="jsfComponentsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
403
                          <Component id="jsfComponentsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
404
                      </Group>
404
                      </Group>
405
                      <EmptySpace max="-2" attributes="0"/>
405
                      <EmptySpace max="-2" attributes="0"/>
Lines 412-418 Link Here
412
                      <EmptySpace max="-2" attributes="0"/>
412
                      <EmptySpace max="-2" attributes="0"/>
413
                      <Component id="jsfComponentsLabel" min="-2" max="-2" attributes="0"/>
413
                      <Component id="jsfComponentsLabel" min="-2" max="-2" attributes="0"/>
414
                      <EmptySpace max="-2" attributes="0"/>
414
                      <EmptySpace max="-2" attributes="0"/>
415
                      <Component id="jsfComponentsScrollPane" pref="153" max="32767" attributes="0"/>
415
                      <Component id="jsfComponentsScrollPane" pref="129" max="32767" attributes="0"/>
416
                      <EmptySpace max="-2" attributes="0"/>
416
                      <EmptySpace max="-2" attributes="0"/>
417
                  </Group>
417
                  </Group>
418
              </Group>
418
              </Group>
(-)a/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java (-12 / +15 lines)
Lines 874-883 Link Here
874
            return false;
874
            return false;
875
        }
875
        }
876
876
877
        if (customizer) {
878
             return true;
879
        }
880
881
        if (controller.getProperties().getProperty("NoDocBase") != null) {  //NOI18N
877
        if (controller.getProperties().getProperty("NoDocBase") != null) {  //NOI18N
882
            controller.setErrorMessage(NbBundle.getMessage(JSFConfigurationPanelVisual.class, "MSG_MissingDocBase"));
878
            controller.setErrorMessage(NbBundle.getMessage(JSFConfigurationPanelVisual.class, "MSG_MissingDocBase"));
883
            return false;
879
            return false;
Lines 938-945 Link Here
938
        for (JsfComponentImplementation jsfComponentDescriptor : getActivedJsfDescriptors()) {
934
        for (JsfComponentImplementation jsfComponentDescriptor : getActivedJsfDescriptors()) {
939
            if (jsfComponentDescriptor.createJsfComponentCustomizer(null) != null &&
935
            if (jsfComponentDescriptor.createJsfComponentCustomizer(null) != null &&
940
                    !jsfComponentDescriptor.createJsfComponentCustomizer(null).isValid()) {
936
                    !jsfComponentDescriptor.createJsfComponentCustomizer(null).isValid()) {
941
                controller.getProperties().setProperty(WizardDescriptor.PROP_INFO_MESSAGE,
937
                String error = NbBundle.getMessage(JSFConfigurationPanelVisual.class, "LBL_JsfComponentNotValid", jsfComponentDescriptor.getName());
942
                        NbBundle.getMessage(JSFConfigurationPanelVisual.class, "LBL_JsfComponentNotValid", jsfComponentDescriptor.getName())); // NOI18N
938
                if (customizer) {
939
                    panel.getController().setErrorMessage(error);
940
                } else {
941
                    controller.getProperties().setProperty(WizardDescriptor.PROP_INFO_MESSAGE, error); // NOI18N
942
                }
943
                return false;
943
                return false;
944
            }
944
            }
945
        }
945
        }
Lines 1147-1152 Link Here
1147
        return activatedDescriptors;
1147
        return activatedDescriptors;
1148
    }
1148
    }
1149
1149
1150
    public List<? extends JsfComponentImplementation> getAllJsfDescriptors() {
1151
        List<JsfComponentImplementation> allDescriptors =  new ArrayList<JsfComponentImplementation>();
1152
        for (int i = 0; i < jsfComponentsTableModel.getRowCount(); i++) {
1153
            allDescriptors.add(jsfComponentsTableModel.getItem(i).getJsfComponent());
1154
        }
1155
        return allDescriptors;
1156
    }
1157
1150
    public boolean packageJars(){
1158
    public boolean packageJars(){
1151
        return cbPackageJars.isSelected();
1159
        return cbPackageJars.isSelected();
1152
    }
1160
    }
Lines 1409-1417 Link Here
1409
        table.getColumnModel().getColumn(0).setMaxWidth(30);
1417
        table.getColumnModel().getColumn(0).setMaxWidth(30);
1410
        table.getColumnModel().getColumn(2).setMaxWidth(100);
1418
        table.getColumnModel().getColumn(2).setMaxWidth(100);
1411
1419
1412
        if (customizer) {
1413
            table.setEnabled(false);
1414
        }
1415
    }
1420
    }
1416
1421
1417
    private void addFrameworkToModel(JsfComponentImplementation component) {
1422
    private void addFrameworkToModel(JsfComponentImplementation component) {
Lines 1542-1550 Link Here
1542
                    if (item.isClickable()) {
1547
                    if (item.isClickable()) {
1543
                        JButton button = new JButton(
1548
                        JButton button = new JButton(
1544
                                NbBundle.getMessage(JSFConfigurationWizardPanelVisual.class, "LBL_MoreButton")); //NOI18N
1549
                                NbBundle.getMessage(JSFConfigurationWizardPanelVisual.class, "LBL_MoreButton")); //NOI18N
1545
                        if (!inCustomizer) {
1550
                        button.addActionListener(new JSFComponentModelActionListener(item.getJsfComponent()));
1546
                            button.addActionListener(new JSFComponentModelActionListener(item.getJsfComponent()));
1547
                        }
1548
                        return button;
1551
                        return button;
1549
                    } else {
1552
                    } else {
1550
                        return null;
1553
                        return null;
(-)a/web.project/nbproject/project.properties (-1 / +1 lines)
Lines 56-62 Link Here
56
javac.compilerargs=-Xlint:unchecked
56
javac.compilerargs=-Xlint:unchecked
57
javadoc.arch=${basedir}/arch.xml
57
javadoc.arch=${basedir}/arch.xml
58
58
59
spec.version.base=1.35.0
59
spec.version.base=1.36.0
60
60
61
# needed for the TestUtil class
61
# needed for the TestUtil class
62
test.unit.cp.extra=
62
test.unit.cp.extra=
(-)a/web.project/nbproject/project.xml (-1 / +3 lines)
Lines 105-111 Link Here
105
                    <code-name-base>org.netbeans.api.web.webmodule</code-name-base>
105
                    <code-name-base>org.netbeans.api.web.webmodule</code-name-base>
106
                    <build-prerequisite/>
106
                    <build-prerequisite/>
107
                    <compile-dependency/>
107
                    <compile-dependency/>
108
                    <run-dependency/>
108
                    <run-dependency>
109
                        <specification-version>1.26</specification-version>
110
                    </run-dependency>
109
                </dependency>
111
                </dependency>
110
                <dependency>
112
                <dependency>
111
                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
113
                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
(-)a/web.project/src/org/netbeans/modules/web/project/ui/customizer/CustomizerFrameworks.java (+4 lines)
Lines 127-137 Link Here
127
        properties.setProperty("serverInstanceID", serverInstanceID); // NOI18N
127
        properties.setProperty("serverInstanceID", serverInstanceID); // NOI18N
128
        
128
        
129
        jListFrameworks.setModel(new DefaultListModel());
129
        jListFrameworks.setModel(new DefaultListModel());
130
        List<WebModuleExtender> usedExtenders = new LinkedList<WebModuleExtender>();
130
        for (WebFrameworkProvider framework : uiProperties.getCurrentFrameworks()) {
131
        for (WebFrameworkProvider framework : uiProperties.getCurrentFrameworks()) {
131
                usedFrameworks.add(framework);
132
                usedFrameworks.add(framework);
132
                ((DefaultListModel) jListFrameworks.getModel()).addElement(framework.getName());
133
                ((DefaultListModel) jListFrameworks.getModel()).addElement(framework.getName());
133
                WebModuleExtender extender = framework.createWebModuleExtender(webModule, controller);
134
                WebModuleExtender extender = framework.createWebModuleExtender(webModule, controller);
134
                extenders.put(framework, extender);
135
                extenders.put(framework, extender);
136
                usedExtenders.add(extender);
135
                extender.addChangeListener(new ExtenderListener(extender));
137
                extender.addChangeListener(new ExtenderListener(extender));
136
        }
138
        }
137
        jListFrameworks.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
139
        jListFrameworks.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
Lines 141-146 Link Here
141
        
143
        
142
        if (WebFrameworks.getFrameworks().size() == jListFrameworks.getModel().getSize())
144
        if (WebFrameworks.getFrameworks().size() == jListFrameworks.getModel().getSize())
143
            jButtonAdd.setEnabled(false);
145
            jButtonAdd.setEnabled(false);
146
147
        uiProperties.setExistingExtenders(usedExtenders);
144
    }
148
    }
145
    
149
    
146
    /** This method is called from within the constructor to
150
    /** This method is called from within the constructor to
(-)a/web.project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java (-1 / +25 lines)
Lines 215-220 Link Here
215
    //list of frameworks to add to the application
215
    //list of frameworks to add to the application
216
    private List newExtenders;
216
    private List newExtenders;
217
    
217
    
218
    //list of changed frameworks
219
    private List<WebModuleExtender> existingExtenders;
220
218
    // MODELS FOR VISUAL CONTROLS
221
    // MODELS FOR VISUAL CONTROLS
219
    
222
    
220
    // CustomizerSources
223
    // CustomizerSources
Lines 536-542 Link Here
536
                    }
539
                    }
537
                });
540
                });
538
            }
541
            }
539
            
542
543
             // try to save already included extenders
544
            if (existingExtenders != null) {
545
                SwingUtilities.invokeLater(new Runnable() {
546
547
                    @Override
548
                    public void run() {
549
                        for (WebModuleExtender webModuleExtender : existingExtenders) {
550
                            if (webModuleExtender instanceof WebModuleExtender.Savable) {
551
                                ((WebModuleExtender.Savable) webModuleExtender).save(project.getAPIWebModule());
552
                            }
553
                        }
554
                        existingExtenders.clear();
555
                        project.resetTemplates();
556
                    }
557
                });
558
            }
559
540
            // ui logging of the added frameworks
560
            // ui logging of the added frameworks
541
            if ((addedFrameworkNames != null) && (addedFrameworkNames.size() > 0)) {
561
            if ((addedFrameworkNames != null) && (addedFrameworkNames.size() > 0)) {
542
                Utils.logUI(NbBundle.getBundle(WebProjectProperties.class),"UI_WEB_PROJECT_FRAMEWORK_ADDED", // NOI18N
562
                Utils.logUI(NbBundle.getBundle(WebProjectProperties.class),"UI_WEB_PROJECT_FRAMEWORK_ADDED", // NOI18N
Lines 963-968 Link Here
963
    public void setNewExtenders(List extenders) {
983
    public void setNewExtenders(List extenders) {
964
        newExtenders = extenders;
984
        newExtenders = extenders;
965
    }
985
    }
986
987
    public void setExistingExtenders(List<WebModuleExtender> extenders) {
988
        existingExtenders = extenders;
989
    }
966
    
990
    
967
    public void setNewFrameworksNames(List<String> names) {
991
    public void setNewFrameworksNames(List<String> names) {
968
        addedFrameworkNames = names;
992
        addedFrameworkNames = names;

Return to bug 202818