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

(-)a/j2ee.api.ejbmodule/nbproject/project.xml (+1 lines)
Lines 207-212 Link Here
207
                <friend>org.netbeans.modules.maven.jaxws</friend>
207
                <friend>org.netbeans.modules.maven.jaxws</friend>
208
                <friend>org.netbeans.modules.profiler.j2ee</friend>
208
                <friend>org.netbeans.modules.profiler.j2ee</friend>
209
                <friend>org.netbeans.modules.web.project</friend>
209
                <friend>org.netbeans.modules.web.project</friend>
210
                <friend>org.netbeans.modules.web.beans</friend>
210
                <friend>org.netbeans.modules.websvc.core</friend>
211
                <friend>org.netbeans.modules.websvc.core</friend>
211
                <friend>org.netbeans.modules.websvc.dev</friend>
212
                <friend>org.netbeans.modules.websvc.dev</friend>
212
                <friend>org.netbeans.modules.websvc.jaxrpc</friend>
213
                <friend>org.netbeans.modules.websvc.jaxrpc</friend>
(-)a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectCreateData.java (+10 lines)
Lines 70-75 Link Here
70
70
71
    private File libFolder;
71
    private File libFolder;
72
72
73
    private boolean cdiEnabled;
74
    
73
    public AppClientProjectCreateData() {
75
    public AppClientProjectCreateData() {
74
    }
76
    }
75
77
Lines 161-164 Link Here
161
        this.testFolders = testFolders;
163
        this.testFolders = testFolders;
162
    }
164
    }
163
165
166
    public boolean isCDIEnabled() {
167
        return cdiEnabled;
168
    }
169
170
    public void setCDIEnabled(boolean cdiEnabled) {
171
        this.cdiEnabled = cdiEnabled;
172
    }
173
164
}
174
}
(-)a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java (+4 lines)
Lines 70-75 Link Here
70
import org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform;
70
import org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform;
71
import org.netbeans.api.j2ee.core.Profile;
71
import org.netbeans.api.j2ee.core.Profile;
72
import org.netbeans.modules.j2ee.common.Util;
72
import org.netbeans.modules.j2ee.common.Util;
73
import org.netbeans.modules.j2ee.common.dd.DDHelper;
73
import org.netbeans.modules.java.api.common.ant.UpdateHelper;
74
import org.netbeans.modules.java.api.common.ant.UpdateHelper;
74
import org.netbeans.modules.java.api.common.project.ProjectProperties;
75
import org.netbeans.modules.java.api.common.project.ProjectProperties;
75
import org.netbeans.modules.java.api.common.ui.PlatformUiSupport;
76
import org.netbeans.modules.java.api.common.ui.PlatformUiSupport;
Lines 191-196 Link Here
191
        AppClient appClient = DDProvider.getDefault().getDDRoot(ddFile);
192
        AppClient appClient = DDProvider.getDefault().getDDRoot(ddFile);
192
        appClient.setDisplayName(name);
193
        appClient.setDisplayName(name);
193
        appClient.write(ddFile);
194
        appClient.write(ddFile);
195
        if (createData.isCDIEnabled()) {
196
            DDHelper.createBeansXml(j2eeProfile, confRoot);
197
        }
194
        
198
        
195
        final String realServerLibraryName = configureServerLibrary(createData.getLibrariesDefinition(),
199
        final String realServerLibraryName = configureServerLibrary(createData.getLibrariesDefinition(),
196
                serverInstanceID, projectDir, createData.getServerLibraryName() != null);
200
                serverInstanceID, projectDir, createData.getServerLibraryName() != null);
(-)a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/wizards/NewAppClientProjectWizardIterator.java (+1 lines)
Lines 129-134 Link Here
129
        createData.setLibrariesDefinition(
129
        createData.setLibrariesDefinition(
130
                SharabilityUtility.getLibraryLocation((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SHARED_LIBRARIES)));
130
                SharabilityUtility.getLibraryLocation((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SHARED_LIBRARIES)));
131
        createData.setServerLibraryName((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY));
131
        createData.setServerLibraryName((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY));
132
        createData.setCDIEnabled((Boolean)wiz.getProperty(ProjectServerWizardPanel.CDI));
132
        
133
        
133
        AntProjectHelper h = AppClientProjectGenerator.createProject(createData);
134
        AntProjectHelper h = AppClientProjectGenerator.createProject(createData);
134
        
135
        
(-)a/j2ee.common/apichanges.xml (+15 lines)
Lines 103-108 Link Here
103
    <!-- ACTUAL CHANGES BEGIN HERE: -->
103
    <!-- ACTUAL CHANGES BEGIN HERE: -->
104
    <changes>
104
    <changes>
105
    
105
    
106
        <change id="beans-xml">
107
            <api name="j2ee-utilities"/>
108
            <summary>Helper method DDHelper.createBeansXml was added.</summary>
109
            <version major="1" minor="49"/>
110
            <date day="13" month="1" year="2010"/>
111
            <author login="dkonecny"/>
112
            <compatibility addition="yes"/>
113
            <description>
114
                <p>
115
                    Helper method DDHelper.createBeansXml was added.
116
                </p>
117
            </description>
118
            <class package="org.netbeans.modules.j2ee.common.dd" name="DDHelper"/>
119
        </change>
120
106
        <change id="migrate-code-to-java-api-common">
121
        <change id="migrate-code-to-java-api-common">
107
            <api name="j2ee-utilities"/>
122
            <api name="j2ee-utilities"/>
108
            <summary>Migrate all Java related code to java.api.common module.</summary>
123
            <summary>Migrate all Java related code to java.api.common module.</summary>
(-)a/j2ee.common/nbproject/project.xml (+1 lines)
Lines 423-428 Link Here
423
                <friend>org.netbeans.modules.web.jsf</friend>
423
                <friend>org.netbeans.modules.web.jsf</friend>
424
                <friend>org.netbeans.modules.web.project</friend>
424
                <friend>org.netbeans.modules.web.project</friend>
425
                <friend>org.netbeans.modules.web.struts</friend>
425
                <friend>org.netbeans.modules.web.struts</friend>
426
                <friend>org.netbeans.modules.web.beans</friend>
426
                <friend>org.netbeans.modules.websvc.core</friend>
427
                <friend>org.netbeans.modules.websvc.core</friend>
427
                <friend>org.netbeans.modules.websvc.jaxrpc</friend>
428
                <friend>org.netbeans.modules.websvc.jaxrpc</friend>
428
                <friend>org.netbeans.modules.websvc.restapi</friend>
429
                <friend>org.netbeans.modules.websvc.restapi</friend>
(-)a/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-1.0.xml (+5 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://java.sun.com/xml/ns/javaee"
3
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
5
</beans>
(-)a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/Bundle.properties (+1 lines)
Lines 61-66 Link Here
61
PanelSharabilityVisual.librariesLabel.text=&Sharable Libraries Location:
61
PanelSharabilityVisual.librariesLabel.text=&Sharable Libraries Location:
62
PanelSharabilityVisual.sharableCheckBox.text=Check Whether This Project Should be Sharable.
62
PanelSharabilityVisual.sharableCheckBox.text=Check Whether This Project Should be Sharable.
63
PanelSharabilityVisual.serverLibraryCheckbox.text=&Use dedicated library folder for server JAR files
63
PanelSharabilityVisual.serverLibraryCheckbox.text=&Use dedicated library folder for server JAR files
64
PanelSharabilityVisual.cdiCheckbox.text=&Enable Context and Dependency Injection
64
65
65
# ProjectLocationPanel
66
# ProjectLocationPanel
66
LBL_NWP1_ProjectTitleName=Name and Location
67
LBL_NWP1_ProjectTitleName=Name and Location
(-)a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/ProjectServerPanel.form (-40 / +56 lines)
Lines 24-63 Link Here
24
  <Layout>
24
  <Layout>
25
    <DimensionLayout dim="0">
25
    <DimensionLayout dim="0">
26
      <Group type="103" groupAlignment="0" attributes="0">
26
      <Group type="103" groupAlignment="0" attributes="0">
27
          <Group type="102" attributes="0">
28
              <Group type="103" groupAlignment="0" attributes="0">
29
                  <Component id="jLabelContextPath" alignment="0" min="-2" max="-2" attributes="0"/>
30
                  <Component id="serverInstanceLabel" alignment="0" min="-2" max="-2" attributes="0"/>
31
                  <Component id="j2eeSpecLabel" alignment="0" min="-2" max="-2" attributes="0"/>
32
              </Group>
33
              <EmptySpace min="-2" max="-2" attributes="0"/>
34
              <Group type="103" groupAlignment="0" attributes="0">
35
                  <Group type="102" alignment="0" attributes="0">
36
                      <Component id="mainClassTextField" pref="367" max="32767" attributes="2"/>
37
                      <EmptySpace min="74" pref="74" max="74" attributes="0"/>
38
                  </Group>
39
                  <Group type="102" alignment="0" attributes="0">
40
                      <Component id="jTextFieldContextPath" pref="367" max="32767" attributes="2"/>
41
                      <EmptySpace min="74" pref="74" max="74" attributes="0"/>
42
                  </Group>
43
                  <Group type="102" alignment="0" attributes="0">
44
                      <Component id="serverInstanceComboBox" pref="367" max="32767" attributes="0"/>
45
                      <EmptySpace min="-2" max="-2" attributes="0"/>
46
                      <Component id="addServerButton" min="-2" max="-2" attributes="0"/>
47
                  </Group>
48
                  <Group type="102" alignment="1" attributes="0">
49
                      <Component id="serverLibraryCheckbox" pref="367" max="32767" attributes="2"/>
50
                      <EmptySpace min="74" pref="74" max="74" attributes="0"/>
51
                  </Group>
52
                  <Group type="102" alignment="0" attributes="0">
53
                      <Component id="j2eeSpecComboBox" min="-2" max="-2" attributes="2"/>
54
                      <EmptySpace max="-2" attributes="0"/>
55
                  </Group>
56
              </Group>
57
          </Group>
58
          <Group type="102" alignment="0" attributes="0">
27
          <Group type="102" alignment="0" attributes="0">
59
              <Component id="mainClassLabel" min="-2" max="-2" attributes="0"/>
28
              <Component id="mainClassLabel" min="-2" max="-2" attributes="0"/>
60
              <EmptySpace pref="475" max="32767" attributes="0"/>
29
              <EmptySpace pref="495" max="32767" attributes="0"/>
61
          </Group>
30
          </Group>
62
          <Group type="102" alignment="0" attributes="0">
31
          <Group type="102" alignment="0" attributes="0">
63
              <Group type="103" groupAlignment="1" attributes="0">
32
              <Group type="103" groupAlignment="1" attributes="0">
Lines 70-88 Link Here
70
              </Group>
39
              </Group>
71
              <EmptySpace min="-2" max="-2" attributes="0"/>
40
              <EmptySpace min="-2" max="-2" attributes="0"/>
72
              <Group type="103" groupAlignment="0" attributes="0">
41
              <Group type="103" groupAlignment="0" attributes="0">
73
                  <Component id="jTextFieldEjbModuleName" alignment="0" pref="243" max="32767" attributes="2"/>
42
                  <Component id="jTextFieldEjbModuleName" alignment="0" pref="246" max="32767" attributes="2"/>
74
                  <Component id="jTextFieldWebAppName" alignment="0" pref="243" max="32767" attributes="2"/>
43
                  <Component id="jTextFieldWebAppName" alignment="0" pref="246" max="32767" attributes="2"/>
75
                  <Component id="jTextFieldCarName" alignment="0" pref="243" max="32767" attributes="2"/>
44
                  <Component id="jTextFieldCarName" alignment="0" pref="246" max="32767" attributes="2"/>
76
                  <Component id="mainClassTextFieldWithinEar" alignment="0" pref="243" max="32767" attributes="0"/>
45
                  <Component id="mainClassTextFieldWithinEar" alignment="0" pref="246" max="32767" attributes="0"/>
77
              </Group>
46
              </Group>
78
              <EmptySpace min="-2" pref="74" max="-2" attributes="0"/>
47
              <EmptySpace min="-2" pref="74" max="-2" attributes="0"/>
79
          </Group>
48
          </Group>
80
          <Component id="warningPlaceHolderPanel" alignment="0" pref="541" max="32767" attributes="0"/>
49
          <Component id="warningPlaceHolderPanel" alignment="0" pref="567" max="32767" attributes="0"/>
81
          <Group type="102" alignment="0" attributes="0">
50
          <Group type="102" alignment="0" attributes="0">
82
              <Component id="jLabelEnterprise" min="-2" max="-2" attributes="0"/>
51
              <Component id="jLabelEnterprise" min="-2" max="-2" attributes="0"/>
83
              <EmptySpace min="-2" max="-2" attributes="0"/>
52
              <EmptySpace min="-2" max="-2" attributes="0"/>
84
              <Component id="jComboBoxEnterprise" pref="366" max="32767" attributes="0"/>
53
              <Component id="jComboBoxEnterprise" pref="366" max="32767" attributes="0"/>
85
          </Group>
54
          </Group>
55
          <Group type="102" alignment="0" attributes="0">
56
              <Group type="103" groupAlignment="0" attributes="0">
57
                  <Component id="jLabelContextPath" alignment="0" min="-2" max="-2" attributes="0"/>
58
                  <Component id="serverInstanceLabel" alignment="0" min="-2" max="-2" attributes="0"/>
59
                  <Component id="j2eeSpecLabel" alignment="0" min="-2" max="-2" attributes="0"/>
60
              </Group>
61
              <EmptySpace min="-2" max="-2" attributes="0"/>
62
              <Group type="103" groupAlignment="0" attributes="0">
63
                  <Group type="102" alignment="0" attributes="0">
64
                      <Component id="cdiCheckbox" pref="441" max="32767" attributes="2"/>
65
                      <EmptySpace max="-2" attributes="0"/>
66
                  </Group>
67
                  <Group type="102" alignment="0" attributes="0">
68
                      <Component id="mainClassTextField" pref="379" max="32767" attributes="2"/>
69
                      <EmptySpace min="74" pref="74" max="74" attributes="0"/>
70
                  </Group>
71
                  <Group type="102" alignment="0" attributes="0">
72
                      <Component id="jTextFieldContextPath" pref="379" max="32767" attributes="2"/>
73
                      <EmptySpace min="-2" pref="74" max="-2" attributes="0"/>
74
                  </Group>
75
                  <Group type="102" alignment="0" attributes="0">
76
                      <Component id="serverInstanceComboBox" pref="398" max="32767" attributes="0"/>
77
                      <EmptySpace min="-2" max="-2" attributes="0"/>
78
                      <Component id="addServerButton" min="-2" max="-2" attributes="0"/>
79
                  </Group>
80
                  <Group type="102" alignment="1" attributes="0">
81
                      <Component id="serverLibraryCheckbox" pref="379" max="32767" attributes="2"/>
82
                      <EmptySpace min="74" pref="74" max="74" attributes="0"/>
83
                  </Group>
84
                  <Component id="j2eeSpecComboBox" alignment="0" min="-2" max="-2" attributes="2"/>
85
              </Group>
86
          </Group>
86
      </Group>
87
      </Group>
87
    </DimensionLayout>
88
    </DimensionLayout>
88
    <DimensionLayout dim="1">
89
    <DimensionLayout dim="1">
Lines 106-119 Link Here
106
                  <Component id="j2eeSpecLabel" alignment="3" min="-2" max="-2" attributes="0"/>
107
                  <Component id="j2eeSpecLabel" alignment="3" min="-2" max="-2" attributes="0"/>
107
                  <Component id="j2eeSpecComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
108
                  <Component id="j2eeSpecComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
108
              </Group>
109
              </Group>
109
              <EmptySpace min="-2" max="-2" attributes="0"/>
110
              <EmptySpace max="-2" attributes="0"/>
111
              <Component id="cdiCheckbox" min="-2" max="-2" attributes="0"/>
112
              <EmptySpace max="-2" attributes="0"/>
110
              <Component id="warningPlaceHolderPanel" min="-2" max="-2" attributes="0"/>
113
              <Component id="warningPlaceHolderPanel" min="-2" max="-2" attributes="0"/>
111
              <EmptySpace min="-2" max="-2" attributes="0"/>
114
              <EmptySpace min="-2" max="-2" attributes="0"/>
112
              <Group type="103" groupAlignment="3" attributes="0">
115
              <Group type="103" groupAlignment="3" attributes="0">
113
                  <Component id="jLabelContextPath" alignment="3" min="-2" max="-2" attributes="0"/>
116
                  <Component id="jLabelContextPath" alignment="3" min="-2" max="-2" attributes="0"/>
114
                  <Component id="jTextFieldContextPath" alignment="3" min="-2" max="-2" attributes="0"/>
117
                  <Component id="jTextFieldContextPath" alignment="3" min="-2" max="-2" attributes="0"/>
115
              </Group>
118
              </Group>
116
              <EmptySpace max="-2" attributes="0"/>
119
              <EmptySpace min="-2" max="-2" attributes="0"/>
117
              <Group type="103" groupAlignment="3" attributes="0">
120
              <Group type="103" groupAlignment="3" attributes="0">
118
                  <Component id="mainClassLabel" alignment="3" min="-2" max="-2" attributes="0"/>
121
                  <Component id="mainClassLabel" alignment="3" min="-2" max="-2" attributes="0"/>
119
                  <Component id="mainClassTextField" alignment="3" min="-2" max="-2" attributes="0"/>
122
                  <Component id="mainClassTextField" alignment="3" min="-2" max="-2" attributes="0"/>
Lines 138-144 Link Here
138
                  <Component id="mainClassLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
141
                  <Component id="mainClassLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
139
                  <Component id="mainClassTextFieldWithinEar" alignment="3" min="-2" max="-2" attributes="0"/>
142
                  <Component id="mainClassTextFieldWithinEar" alignment="3" min="-2" max="-2" attributes="0"/>
140
              </Group>
143
              </Group>
141
              <EmptySpace min="-2" pref="67" max="-2" attributes="0"/>
144
              <EmptySpace min="-2" pref="174" max="-2" attributes="0"/>
142
          </Group>
145
          </Group>
143
      </Group>
146
      </Group>
144
    </DimensionLayout>
147
    </DimensionLayout>
Lines 454-458 Link Here
454
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="serverLibraryCheckboxActionPerformed"/>
457
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="serverLibraryCheckboxActionPerformed"/>
455
      </Events>
458
      </Events>
456
    </Component>
459
    </Component>
460
    <Component class="javax.swing.JCheckBox" name="cdiCheckbox">
461
      <Properties>
462
        <Property name="selected" type="boolean" value="true"/>
463
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
464
          <ResourceString bundle="org/netbeans/modules/j2ee/common/project/ui/Bundle.properties" key="PanelSharabilityVisual.cdiCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
465
        </Property>
466
      </Properties>
467
      <AccessibilityProperties>
468
        <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
469
          <ResourceString bundle="org/netbeans/modules/j2ee/common/project/ui/Bundle.properties" key="ACSD_ProjectServerPanel_NA" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
470
        </Property>
471
      </AccessibilityProperties>
472
    </Component>
457
  </SubComponents>
473
  </SubComponents>
458
</Form>
474
</Form>
(-)a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/ProjectServerPanel.java (-31 / +43 lines)
Lines 169-174 Link Here
169
        mainClassLabel1 = new javax.swing.JLabel();
169
        mainClassLabel1 = new javax.swing.JLabel();
170
        mainClassTextFieldWithinEar = new javax.swing.JTextField();
170
        mainClassTextFieldWithinEar = new javax.swing.JTextField();
171
        serverLibraryCheckbox = new javax.swing.JCheckBox();
171
        serverLibraryCheckbox = new javax.swing.JCheckBox();
172
        cdiCheckbox = new javax.swing.JCheckBox();
172
173
173
        jLabelEnterprise.setLabelFor(jComboBoxEnterprise);
174
        jLabelEnterprise.setLabelFor(jComboBoxEnterprise);
174
        org.openide.awt.Mnemonics.setLocalizedText(jLabelEnterprise, NbBundle.getMessage(ProjectServerPanel.class, "LBL_NWP1_AddToEnterprise_Label")); // NOI18N
175
        org.openide.awt.Mnemonics.setLocalizedText(jLabelEnterprise, NbBundle.getMessage(ProjectServerPanel.class, "LBL_NWP1_AddToEnterprise_Label")); // NOI18N
Lines 256-291 Link Here
256
            }
257
            }
257
        });
258
        });
258
259
260
        cdiCheckbox.setSelected(true);
261
        org.openide.awt.Mnemonics.setLocalizedText(cdiCheckbox, org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "PanelSharabilityVisual.cdiCheckbox.text")); // NOI18N
262
259
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
263
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
260
        this.setLayout(layout);
264
        this.setLayout(layout);
261
        layout.setHorizontalGroup(
265
        layout.setHorizontalGroup(
262
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
266
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
263
            .add(layout.createSequentialGroup()
267
            .add(layout.createSequentialGroup()
264
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
265
                    .add(jLabelContextPath)
266
                    .add(serverInstanceLabel)
267
                    .add(j2eeSpecLabel))
268
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
269
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
270
                    .add(layout.createSequentialGroup()
271
                        .add(mainClassTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
272
                        .add(74, 74, 74))
273
                    .add(layout.createSequentialGroup()
274
                        .add(jTextFieldContextPath, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
275
                        .add(74, 74, 74))
276
                    .add(layout.createSequentialGroup()
277
                        .add(serverInstanceComboBox, 0, 350, Short.MAX_VALUE)
278
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
279
                        .add(addServerButton))
280
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
281
                        .add(serverLibraryCheckbox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
282
                        .add(74, 74, 74))
283
                    .add(layout.createSequentialGroup()
284
                        .add(j2eeSpecComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
285
                        .addContainerGap())))
286
            .add(layout.createSequentialGroup()
287
                .add(mainClassLabel)
268
                .add(mainClassLabel)
288
                .addContainerGap(463, Short.MAX_VALUE))
269
                .addContainerGap(495, Short.MAX_VALUE))
289
            .add(layout.createSequentialGroup()
270
            .add(layout.createSequentialGroup()
290
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
271
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
291
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
272
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
Lines 295-310 Link Here
295
                    .add(mainClassLabel1))
276
                    .add(mainClassLabel1))
296
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
277
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
297
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
278
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
298
                    .add(jTextFieldEjbModuleName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
279
                    .add(jTextFieldEjbModuleName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
299
                    .add(jTextFieldWebAppName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
280
                    .add(jTextFieldWebAppName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
300
                    .add(jTextFieldCarName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
281
                    .add(jTextFieldCarName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
301
                    .add(mainClassTextFieldWithinEar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE))
282
                    .add(mainClassTextFieldWithinEar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE))
302
                .add(74, 74, 74))
283
                .add(74, 74, 74))
303
            .add(warningPlaceHolderPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 541, Short.MAX_VALUE)
284
            .add(warningPlaceHolderPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 567, Short.MAX_VALUE)
304
            .add(layout.createSequentialGroup()
285
            .add(layout.createSequentialGroup()
305
                .add(jLabelEnterprise)
286
                .add(jLabelEnterprise)
306
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
287
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
307
                .add(jComboBoxEnterprise, 0, 342, Short.MAX_VALUE))
288
                .add(jComboBoxEnterprise, 0, 366, Short.MAX_VALUE))
289
            .add(layout.createSequentialGroup()
290
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
291
                    .add(jLabelContextPath)
292
                    .add(serverInstanceLabel)
293
                    .add(j2eeSpecLabel))
294
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
295
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
296
                    .add(layout.createSequentialGroup()
297
                        .add(cdiCheckbox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 441, Short.MAX_VALUE)
298
                        .addContainerGap())
299
                    .add(layout.createSequentialGroup()
300
                        .add(mainClassTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
301
                        .add(74, 74, 74))
302
                    .add(layout.createSequentialGroup()
303
                        .add(jTextFieldContextPath, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
304
                        .add(74, 74, 74))
305
                    .add(layout.createSequentialGroup()
306
                        .add(serverInstanceComboBox, 0, 398, Short.MAX_VALUE)
307
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
308
                        .add(addServerButton))
309
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
310
                        .add(serverLibraryCheckbox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
311
                        .add(74, 74, 74))
312
                    .add(j2eeSpecComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
308
        );
313
        );
309
        layout.setVerticalGroup(
314
        layout.setVerticalGroup(
310
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
315
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
Lines 325-330 Link Here
325
                    .add(j2eeSpecLabel)
330
                    .add(j2eeSpecLabel)
326
                    .add(j2eeSpecComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
331
                    .add(j2eeSpecComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
327
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
332
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
333
                .add(cdiCheckbox)
334
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
328
                .add(warningPlaceHolderPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
335
                .add(warningPlaceHolderPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
329
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
336
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
330
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
337
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
Lines 350-356 Link Here
350
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
357
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
351
                    .add(mainClassLabel1)
358
                    .add(mainClassLabel1)
352
                    .add(mainClassTextFieldWithinEar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
359
                    .add(mainClassTextFieldWithinEar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
353
                .add(67, 67, 67))
360
                .add(174, 174, 174))
354
        );
361
        );
355
362
356
        jLabelEnterprise.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
363
        jLabelEnterprise.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
Lines 379-384 Link Here
379
        mainClassLabel1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
386
        mainClassLabel1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
380
        mainClassTextFieldWithinEar.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
387
        mainClassTextFieldWithinEar.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
381
        serverLibraryCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
388
        serverLibraryCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
389
        cdiCheckbox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
382
390
383
        getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
391
        getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
384
        getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
392
        getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectServerPanel.class, "ACSD_ProjectServerPanel_NA")); // NOI18N
Lines 572-577 Link Here
572
        d.putProperty(ProjectServerWizardPanel.CREATE_WAR, Boolean.valueOf(createWARCheckBox.isVisible() ? createWARCheckBox.isSelected() : false));
580
        d.putProperty(ProjectServerWizardPanel.CREATE_WAR, Boolean.valueOf(createWARCheckBox.isVisible() ? createWARCheckBox.isSelected() : false));
573
        d.putProperty(ProjectServerWizardPanel.CREATE_JAR, Boolean.valueOf(createEjbCheckBox.isVisible() ? createEjbCheckBox.isSelected() : false));
581
        d.putProperty(ProjectServerWizardPanel.CREATE_JAR, Boolean.valueOf(createEjbCheckBox.isVisible() ? createEjbCheckBox.isSelected() : false));
574
        d.putProperty(ProjectServerWizardPanel.CREATE_CAR, Boolean.valueOf(createCarCheckBox.isVisible() ? createCarCheckBox.isSelected() : false));
582
        d.putProperty(ProjectServerWizardPanel.CREATE_CAR, Boolean.valueOf(createCarCheckBox.isVisible() ? createCarCheckBox.isSelected() : false));
583
        d.putProperty(ProjectServerWizardPanel.CDI, Boolean.valueOf(cdiCheckbox.isVisible() ? cdiCheckbox.isSelected() : false));
575
    
584
    
576
        // #119052
585
        // #119052
577
        String sourceLevel = "1.5"; // NOI18N
586
        String sourceLevel = "1.5"; // NOI18N
Lines 642-647 Link Here
642
    
651
    
643
    // Variables declaration - do not modify//GEN-BEGIN:variables
652
    // Variables declaration - do not modify//GEN-BEGIN:variables
644
    private javax.swing.JButton addServerButton;
653
    private javax.swing.JButton addServerButton;
654
    private javax.swing.JCheckBox cdiCheckbox;
645
    private javax.swing.JCheckBox createCarCheckBox;
655
    private javax.swing.JCheckBox createCarCheckBox;
646
    private javax.swing.JCheckBox createEjbCheckBox;
656
    private javax.swing.JCheckBox createEjbCheckBox;
647
    private javax.swing.JCheckBox createWARCheckBox;
657
    private javax.swing.JCheckBox createWARCheckBox;
Lines 769-776 Link Here
769
        Profile j2ee = getSelectedJ2eeProfile();
779
        Profile j2ee = getSelectedJ2eeProfile();
770
        if (j2ee == null) {
780
        if (j2ee == null) {
771
            warningPlaceHolderPanel.setVisible(false);
781
            warningPlaceHolderPanel.setVisible(false);
782
            cdiCheckbox.setVisible(false);
772
            return;
783
            return;
773
        }
784
        }
785
        cdiCheckbox.setVisible(j2ee.equals(Profile.JAVA_EE_6_FULL) || j2ee.equals(Profile.JAVA_EE_6_WEB));
774
        String warningType = J2eeVersionWarningPanel.findWarningType(j2ee);
786
        String warningType = J2eeVersionWarningPanel.findWarningType(j2ee);
775
        if (warningType == null && warningPanel == null) {
787
        if (warningType == null && warningPanel == null) {
776
            warningPlaceHolderPanel.setVisible(false);
788
            warningPlaceHolderPanel.setVisible(false);
(-)a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/ProjectServerWizardPanel.java (+1 lines)
Lines 70-75 Link Here
70
    public static final String CREATE_WAR = "createWAR"; // NOI18N
70
    public static final String CREATE_WAR = "createWAR"; // NOI18N
71
    public static final String CREATE_JAR = "createJAR"; // NOI18N
71
    public static final String CREATE_JAR = "createJAR"; // NOI18N
72
    public static final String CREATE_CAR = "createCAR"; // NOI18N
72
    public static final String CREATE_CAR = "createCAR"; // NOI18N
73
    public static final String CDI = "cdi"; // NOI18N
73
    
74
    
74
    private WizardDescriptor wizardDescriptor;
75
    private WizardDescriptor wizardDescriptor;
75
    private ProjectServerPanel component;
76
    private ProjectServerPanel component;
(-)a/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/Bundle.properties (-1 / +1 lines)
Lines 39-42 Link Here
39
39
40
LBL_EnterpriseCatalog=Enterprise Deployment Descriptors Catalog
40
LBL_EnterpriseCatalog=Enterprise Deployment Descriptors Catalog
41
41
42
DESC_EnterpriseCatalog=XML Catalog for web, ejb-jar, application and application-client XML schema files.
42
DESC_EnterpriseCatalog=XML Catalog for web, ejb-jar, cdi, application and application-client XML schema files.
(-)a/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java (+2 lines)
Lines 108-113 Link Here
108
        // web 2.2 and 2.3 dtds
108
        // web 2.2 and 2.3 dtds
109
        schemas.add(new SchemaInfo("web-app_2_2.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", true)); //NO18N
109
        schemas.add(new SchemaInfo("web-app_2_2.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", true)); //NO18N
110
        schemas.add(new SchemaInfo("web-app_2_3.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", true)); //NO18N
110
        schemas.add(new SchemaInfo("web-app_2_3.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", true)); //NO18N
111
        // cdi
112
        schemas.add(new SchemaInfo("beans_1_0.xsd", JAVAEE_NS));
111
       
113
       
112
    }
114
    }
113
    
115
    
(-)a/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/resources/beans_1_0.xsd (+180 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
   <!--
4
      JBoss, Home of Professional Open Source Copyright 2008, Red Hat
5
      Middleware LLC, and individual contributors by the @authors tag.
6
      See the copyright.txt in the distribution for a full listing of
7
      individual contributors. Licensed under the Apache License,
8
      Version 2.0 (the "License"); you may not use this file except in
9
      compliance with the License. You may obtain a copy of the License
10
      at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
11
      applicable law or agreed to in writing, software distributed under
12
      the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
13
      OR CONDITIONS OF ANY KIND, either express or implied. See the
14
      License for the specific language governing permissions and
15
      limitations under the License.
16
   -->
17
18
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
19
   elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/javaee"
20
   xmlns:javaee="http://java.sun.com/xml/ns/javaee" version="1.0">
21
22
   <xs:annotation>
23
      <xs:documentation>
24
         Contexts and Dependency Injection (CDI) defines
25
         a set of complementary services that help improve the structure
26
         of application code. beans.xml is used to enable CDI services
27
         for the current bean archive as well as to enable named
28
         interceptors, decorators and alternatives for the current bean
29
         archive.
30
      </xs:documentation>
31
   </xs:annotation>
32
33
   <xs:element name="beans">
34
      <xs:annotation>
35
         <xs:documentation>
36
            Bean classes of enabled beans must be
37
            deployed in bean archives. A library jar, EJB jar,
38
            application client jar or rar archive is a bean archive if
39
            it has a file named beans.xml in the META-INF directory. The
40
            WEB-INF/classes directory of a war is a bean archive if
41
            there is a file named beans.xml in the WEB-INF directory of
42
            the war. A directory in the JVM classpath is a bean archive
43
            if it has a file named beans.xml in the META-INF directory.
44
         </xs:documentation>
45
      </xs:annotation>
46
      <xs:complexType>
47
         <xs:all>
48
            <xs:element ref="javaee:interceptors" minOccurs="0" />
49
            <xs:element ref="javaee:decorators" minOccurs="0" />
50
            <xs:element ref="javaee:alternatives" minOccurs="0" />
51
         </xs:all>
52
      </xs:complexType>
53
   </xs:element>
54
55
   <xs:element name="interceptors">
56
      <xs:annotation>
57
         <xs:documentation>
58
            By default, a bean archive has no enabled
59
            interceptors bound via interceptor bindings. An interceptor
60
            must be explicitly enabled by listing its class under the
61
            &lt;interceptors&gt; element of the beans.xml file of the
62
            bean archive. The order of the interceptor declarations
63
            determines the interceptor ordering. Interceptors which
64
            occur earlier in the list are called first. If the same
65
            class is listed twice under the &lt;interceptors&gt;
66
            element, the container automatically detects the problem and
67
            treats it as a deployment problem.
68
        </xs:documentation>
69
      </xs:annotation>
70
      <xs:complexType>
71
         <xs:choice minOccurs="0" maxOccurs="unbounded">
72
            <xs:element name="class" type="xs:string">
73
               <xs:annotation>
74
                  <xs:documentation>
75
                     Each child &lt;class&gt; element
76
                     must specify the name of an interceptor class. If
77
                     there is no class with the specified name, or if
78
                     the class with the specified name is not an
79
                     interceptor class, the container automatically
80
                     detects the problem and treats it as a deployment
81
                     problem.
82
                  </xs:documentation>
83
               </xs:annotation>
84
            </xs:element>
85
         </xs:choice>
86
      </xs:complexType>
87
   </xs:element>
88
89
   <xs:element name="decorators">
90
      <xs:annotation>
91
         <xs:documentation>
92
            By default, a bean archive has no enabled
93
            decorators. A decorator must be explicitly enabled by
94
            listing its bean class under the &lt;decorators&gt; element
95
            of the beans.xml file of the bean archive. The order of the
96
            decorator declarations determines the decorator ordering.
97
            Decorators which occur earlier in the list are called first.
98
            If the same class is listed twice under the
99
            &lt;decorators&gt; element, the container automatically
100
            detects the problem and treats it as a deployment problem.
101
         </xs:documentation>
102
      </xs:annotation>
103
      <xs:complexType>
104
         <xs:choice minOccurs="0" maxOccurs="unbounded">
105
            <xs:element name="class" type="xs:string">
106
               <xs:annotation>
107
                  <xs:documentation>
108
                     Each child &lt;class&gt; element
109
                     must specify the name of a decorator class. If
110
                     there is no class with the specified name, or if
111
                     the class with the specified name is not a
112
                     decorator class, the container automatically
113
                     detects the problem and treats it as a deployment
114
                     problem.
115
                  </xs:documentation>
116
               </xs:annotation>
117
            </xs:element>
118
         </xs:choice>
119
      </xs:complexType>
120
   </xs:element>
121
122
   <xs:element name="alternatives">
123
      <xs:annotation>
124
         <xs:documentation>
125
            An alternative is a bean that must be
126
            explicitly declared in the beans.xml file if it should be
127
            available for lookup, injection or EL resolution. By
128
            default, a bean archive has no selected alternatives. An
129
            alternative must be explicitly declared using the
130
            &lt;alternatives&gt; element of the beans.xml file of the
131
            bean archive. The &lt;alternatives&gt; element contains a
132
            list of bean classes and stereotypes. An alternative is
133
            selected for the bean archive if either: the alternative is
134
            a managed bean or session bean and the bean class of the
135
            bean is listed, or the alternative is a producer method,
136
            field or resource, and the bean class that declares the
137
            method or field is listed, or any @Alternative stereotype of
138
            the alternative is listed.
139
        </xs:documentation>
140
      </xs:annotation>
141
      <xs:complexType>
142
         <xs:choice minOccurs="0" maxOccurs="unbounded">
143
            <xs:element name="class" type="xs:string">
144
               <xs:annotation>
145
                  <xs:documentation>
146
                     Each child &lt;class&gt; element
147
                     must specify the name of an alternative bean class.
148
                     If there is no class with the specified name, or if
149
                     the class with the specified name is not an
150
                     alternative bean class, the container automatically
151
                     detects the problem and treats it as a deployment
152
                     problem. If the same class is listed twice under
153
                     the &lt;alternatives&gt; element, the container
154
                     automatically detects the problem and treats it as
155
                     a deployment problem.
156
                  </xs:documentation>
157
               </xs:annotation>
158
            </xs:element>
159
160
            <xs:element name="stereotype" type="xs:string">
161
               <xs:annotation>
162
                  <xs:documentation>
163
                     Each child &lt;stereotype&gt;
164
                     element must specify the name of an @Alternative
165
                     stereotype annotation. If there is no annotation
166
                     with the specified name, or the annotation is not
167
                     an @Alternative stereotype, the container
168
                     automatically detects the problem and treats it as
169
                     a deployment problem. If the same stereotype is
170
                     listed twice under the &lt;alternatives&gt;
171
                     element, the container automatically detects the
172
                     problem and treats it as a deployment problem.
173
                  </xs:documentation>
174
               </xs:annotation>
175
            </xs:element>
176
         </xs:choice>
177
      </xs:complexType>
178
   </xs:element>
179
180
</xs:schema>
(-)a/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/NewEarProjectWizardIterator.java (-2 / +6 lines)
Lines 151-156 Link Here
151
        }
151
        }
152
        String platformName = (String)wiz.getProperty(ProjectServerWizardPanel.JAVA_PLATFORM);
152
        String platformName = (String)wiz.getProperty(ProjectServerWizardPanel.JAVA_PLATFORM);
153
        String sourceLevel = (String)wiz.getProperty(ProjectServerWizardPanel.SOURCE_LEVEL);
153
        String sourceLevel = (String)wiz.getProperty(ProjectServerWizardPanel.SOURCE_LEVEL);
154
        Boolean cdi = (Boolean)wiz.getProperty(ProjectServerWizardPanel.CDI);
154
        // remember last used server
155
        // remember last used server
155
        UserProjectSettings.getDefault().setLastUsedServer(serverInstanceID);
156
        UserProjectSettings.getDefault().setLastUsedServer(serverInstanceID);
156
        
157
        
Lines 160-173 Link Here
160
        String serverLibraryName = (String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY);
161
        String serverLibraryName = (String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY);
161
        return testableInstantiate(dirF,name,j2eeLevel, serverInstanceID, warName,
162
        return testableInstantiate(dirF,name,j2eeLevel, serverInstanceID, warName,
162
                ejbJarName, carName, mainClass, platformName, sourceLevel, handle, 
163
                ejbJarName, carName, mainClass, platformName, sourceLevel, handle, 
163
                librariesDefinition, serverLibraryName);
164
                librariesDefinition, serverLibraryName, cdi);
164
    }
165
    }
165
    
166
    
166
    /** <strong>Package private for unit test only</strong>. */
167
    /** <strong>Package private for unit test only</strong>. */
167
    static Set<FileObject> testableInstantiate(File dirF, String name, Profile j2eeProfile,
168
    static Set<FileObject> testableInstantiate(File dirF, String name, Profile j2eeProfile,
168
            String serverInstanceID, String warName, String ejbJarName, String carName,
169
            String serverInstanceID, String warName, String ejbJarName, String carName,
169
            String mainClass, String platformName, String sourceLevel, ProgressHandle handle,
170
            String mainClass, String platformName, String sourceLevel, ProgressHandle handle,
170
            String librariesDefinition, String serverLibraryName) throws IOException {
171
            String librariesDefinition, String serverLibraryName, Boolean cdi) throws IOException {
171
        Set<FileObject> resultSet = new LinkedHashSet<FileObject>();
172
        Set<FileObject> resultSet = new LinkedHashSet<FileObject>();
172
        AntProjectHelper h = EarProjectGenerator.createProject(dirF, name, j2eeProfile,
173
        AntProjectHelper h = EarProjectGenerator.createProject(dirF, name, j2eeProfile,
173
                serverInstanceID, sourceLevel, librariesDefinition, serverLibraryName);
174
                serverInstanceID, sourceLevel, librariesDefinition, serverLibraryName);
Lines 215-220 Link Here
215
            createData.setSourceLevel(sourceLevel);
216
            createData.setSourceLevel(sourceLevel);
216
            createData.setLibrariesDefinition(librariesDefinition);
217
            createData.setLibrariesDefinition(librariesDefinition);
217
            createData.setServerLibraryName(serverLibraryName);
218
            createData.setServerLibraryName(serverLibraryName);
219
            createData.setCDIEnabled(cdi);
218
220
219
            if (handle != null)
221
            if (handle != null)
220
                handle.progress(NbBundle.getMessage(NewEarProjectWizardIterator.class, "LBL_NewEarProjectWizardIterator_WizardProgress_WAR"), 3);
222
                handle.progress(NbBundle.getMessage(NewEarProjectWizardIterator.class, "LBL_NewEarProjectWizardIterator_WizardProgress_WAR"), 3);
Lines 242-247 Link Here
242
            createData.setServerInstanceID(serverInstanceID);
244
            createData.setServerInstanceID(serverInstanceID);
243
            createData.setLibrariesDefinition(librariesDefinition);
245
            createData.setLibrariesDefinition(librariesDefinition);
244
            createData.setServerLibraryName(serverLibraryName);
246
            createData.setServerLibraryName(serverLibraryName);
247
            createData.setCDIEnabled(cdi);
245
248
246
            if (handle != null)
249
            if (handle != null)
247
                handle.progress(NbBundle.getMessage(NewEarProjectWizardIterator.class, "LBL_NewEarProjectWizardIterator_WizardProgress_AppClient"), 5);
250
                handle.progress(NbBundle.getMessage(NewEarProjectWizardIterator.class, "LBL_NewEarProjectWizardIterator_WizardProgress_AppClient"), 5);
Lines 268-273 Link Here
268
            createData.setServerInstanceID(serverInstanceID);
271
            createData.setServerInstanceID(serverInstanceID);
269
            createData.setLibrariesDefinition(librariesDefinition);
272
            createData.setLibrariesDefinition(librariesDefinition);
270
            createData.setServerLibraryName(serverLibraryName);
273
            createData.setServerLibraryName(serverLibraryName);
274
            createData.setCDIEnabled(cdi);
271
275
272
            if (handle != null)
276
            if (handle != null)
273
                handle.progress(NbBundle.getMessage(NewEarProjectWizardIterator.class, "LBL_NewEarProjectWizardIterator_WizardProgress_EJB"), 7);
277
                handle.progress(NbBundle.getMessage(NewEarProjectWizardIterator.class, "LBL_NewEarProjectWizardIterator_WizardProgress_EJB"), 7);
(-)a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectCreateData.java (+10 lines)
Lines 68-73 Link Here
68
68
69
    private File libFolder;
69
    private File libFolder;
70
70
71
    private boolean cdiEnabled;
72
    
71
    public EjbJarProjectCreateData() {
73
    public EjbJarProjectCreateData() {
72
    }
74
    }
73
75
Lines 151-154 Link Here
151
        this.testFolders = testFolders;
153
        this.testFolders = testFolders;
152
    }
154
    }
153
155
156
    public boolean isCDIEnabled() {
157
        return cdiEnabled;
158
    }
159
160
    public void setCDIEnabled(boolean cdiEnabled) {
161
        this.cdiEnabled = cdiEnabled;
162
    }
163
154
}
164
}
(-)a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectGenerator.java (+4 lines)
Lines 71-76 Link Here
71
import org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform;
71
import org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform;
72
import org.netbeans.api.j2ee.core.Profile;
72
import org.netbeans.api.j2ee.core.Profile;
73
import org.netbeans.modules.j2ee.common.Util;
73
import org.netbeans.modules.j2ee.common.Util;
74
import org.netbeans.modules.j2ee.common.dd.DDHelper;
74
import org.netbeans.modules.j2ee.ejbjarproject.EjbJarProject;
75
import org.netbeans.modules.j2ee.ejbjarproject.EjbJarProject;
75
import org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectType;
76
import org.netbeans.modules.j2ee.ejbjarproject.EjbJarProjectType;
76
import org.netbeans.modules.j2ee.ejbjarproject.Utils;
77
import org.netbeans.modules.j2ee.ejbjarproject.Utils;
Lines 210-215 Link Here
210
            ejbJar.setDisplayName(name);
211
            ejbJar.setDisplayName(name);
211
            ejbJar.write(ddFile);
212
            ejbJar.write(ddFile);
212
        }
213
        }
214
        if (createData.isCDIEnabled()) {
215
            DDHelper.createBeansXml(profile, confRoot);
216
        }
213
        
217
        
214
        return h;
218
        return h;
215
    }
219
    }
(-)a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/NewEjbJarProjectWizardIterator.java (+1 lines)
Lines 124-129 Link Here
124
        createData.setLibrariesDefinition(
124
        createData.setLibrariesDefinition(
125
                SharabilityUtility.getLibraryLocation((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SHARED_LIBRARIES)));
125
                SharabilityUtility.getLibraryLocation((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SHARED_LIBRARIES)));
126
        createData.setServerLibraryName((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY));
126
        createData.setServerLibraryName((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY));
127
        createData.setCDIEnabled((Boolean)wiz.getProperty(ProjectServerWizardPanel.CDI));
127
        
128
        
128
        AntProjectHelper h = EjbJarProjectGenerator.createProject(createData);
129
        AntProjectHelper h = EjbJarProjectGenerator.createProject(createData);
129
        
130
        
(-)a/web.beans/src/org/netbeans/modules/web/beans/resources/Bundle.properties (+3 lines)
Lines 2-7 Link Here
2
2
3
Templates/CDI=Context and Dependency Injection
3
Templates/CDI=Context and Dependency Injection
4
Templates/CDI/beans.xml=beans.xml (CDI Configuration File)
4
Templates/CDI/beans.xml=beans.xml (CDI Configuration File)
5
6
Templates/CDI=Context and Dependency Injection
7
Templates/CDI/beans.xml=beans.xml (CDI Configuration File)
5
Templates/CDI/Interceptor.java=Interceptor Binding Type
8
Templates/CDI/Interceptor.java=Interceptor Binding Type
6
Templates/CDI/Qualifier.java=Qualifier Type
9
Templates/CDI/Qualifier.java=Qualifier Type
7
Templates/CDI/Scope.java=Scope Type
10
Templates/CDI/Scope.java=Scope Type
(-)a/web.project/src/org/netbeans/modules/web/project/api/WebProjectCreateData.java (+10 lines)
Lines 81-86 Link Here
81
    private String librariesDefinition;
81
    private String librariesDefinition;
82
82
83
    private boolean webXmlRequired;
83
    private boolean webXmlRequired;
84
85
    private boolean cdiEnabled;
84
    
86
    
85
    /**
87
    /**
86
     * Creates a new instance of WebProjectCreateData
88
     * Creates a new instance of WebProjectCreateData
Lines 413-416 Link Here
413
        this.webXmlRequired = webXmlRequired;
415
        this.webXmlRequired = webXmlRequired;
414
    }
416
    }
415
417
418
    public boolean isCDIEnabled() {
419
        return cdiEnabled;
420
    }
421
422
    public void setCDIEnabled(boolean cdiEnabled) {
423
        this.cdiEnabled = cdiEnabled;
424
    }
425
416
}
426
}
(-)a/web.project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java (+3 lines)
Lines 249-254 Link Here
249
        final FileObject webInfFO = webFO.createFolder(WEB_INF);
249
        final FileObject webInfFO = webFO.createFolder(WEB_INF);
250
250
251
        DDHelper.createWebXml(j2eeProfile, createData.isWebXmlRequired(), webInfFO);
251
        DDHelper.createWebXml(j2eeProfile, createData.isWebXmlRequired(), webInfFO);
252
        if (createData.isCDIEnabled()) {
253
            DDHelper.createBeansXml(j2eeProfile, webInfFO);
254
        }
252
        
255
        
253
        EditableProperties ep = h.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
256
        EditableProperties ep = h.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
254
        Element data = h.getPrimaryConfigurationData(true);
257
        Element data = h.getPrimaryConfigurationData(true);
(-)a/web.project/src/org/netbeans/modules/web/project/ui/wizards/NewWebProjectWizardIterator.java (+1 lines)
Lines 148-153 Link Here
148
                SharabilityUtility.getLibraryLocation((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SHARED_LIBRARIES)));
148
                SharabilityUtility.getLibraryLocation((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SHARED_LIBRARIES)));
149
        createData.setServerLibraryName((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY));
149
        createData.setServerLibraryName((String) wiz.getProperty(ProjectServerWizardPanel.WIZARD_SERVER_LIBRARY));
150
        createData.setWebXmlRequired(checkFrameworksForWebXml());
150
        createData.setWebXmlRequired(checkFrameworksForWebXml());
151
        createData.setCDIEnabled((Boolean)wiz.getProperty(ProjectServerWizardPanel.CDI));
151
        
152
        
152
        AntProjectHelper h = WebProjectUtilities.createProject(createData);
153
        AntProjectHelper h = WebProjectUtilities.createProject(createData);
153
        handle.progress(2);
154
        handle.progress(2);

Return to bug 179911