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

(-)java.j2seproject/nbproject/project.xml (-3 / +9 lines)
Lines 329-341 Link Here
329
                    <code-name-base>org.openide.loaders</code-name-base>
329
                    <code-name-base>org.openide.loaders</code-name-base>
330
                    <build-prerequisite/>
330
                    <build-prerequisite/>
331
                    <compile-dependency/>
331
                    <compile-dependency/>
332
                    <run-dependency><specification-version>7.61</specification-version></run-dependency>
332
                    <run-dependency>
333
                        <specification-version>7.61</specification-version>
334
                    </run-dependency>
333
                </dependency>
335
                </dependency>
334
                <dependency>
336
                <dependency>
335
                    <code-name-base>org.netbeans.api.templates</code-name-base>
337
                    <code-name-base>org.netbeans.api.templates</code-name-base>
336
                    <build-prerequisite/>
338
                    <build-prerequisite/>
337
                    <compile-dependency/>
339
                    <compile-dependency/>
338
                    <run-dependency><specification-version>1.0</specification-version></run-dependency>
340
                    <run-dependency>
341
                        <specification-version>1.0</specification-version>
342
                    </run-dependency>
339
                </dependency>
343
                </dependency>
340
                <dependency>
344
                <dependency>
341
                    <code-name-base>org.openide.modules</code-name-base>
345
                    <code-name-base>org.openide.modules</code-name-base>
Lines 528-541 Link Here
528
            </test-dependencies>
532
            </test-dependencies>
529
            <friend-packages>
533
            <friend-packages>
530
                <friend>com.sun.tools.java.analysis.parfait</friend>
534
                <friend>com.sun.tools.java.analysis.parfait</friend>
535
                <friend>org.netbeans.modules.cnd.mixeddev</friend>
531
                <friend>org.netbeans.modules.hudsonfindbugs</friend>
536
                <friend>org.netbeans.modules.hudsonfindbugs</friend>
532
                <friend>org.netbeans.modules.java.j2sedeploy</friend>
537
                <friend>org.netbeans.modules.java.j2sedeploy</friend>
533
                <friend>org.netbeans.modules.java.j2seembedded</friend>
538
                <friend>org.netbeans.modules.java.j2seembedded</friend>
534
                <friend>org.netbeans.modules.javafx2.project</friend>
539
                <friend>org.netbeans.modules.javafx2.project</friend>
535
                <friend>org.netbeans.modules.javawebstart</friend>
540
                <friend>org.netbeans.modules.javawebstart</friend>
536
                <friend>org.netbeans.modules.cnd.mixeddev</friend>
541
                <friend>org.netbeans.modules.maven</friend>
537
                <friend>org.netbeans.modules.swingapp</friend>
542
                <friend>org.netbeans.modules.swingapp</friend>
538
                <package>org.netbeans.modules.java.j2seproject.api</package>
543
                <package>org.netbeans.modules.java.j2seproject.api</package>
544
                <package>org.netbeans.modules.java.j2seproject.ui.customizer.vmo</package>
539
            </friend-packages>
545
            </friend-packages>
540
        </data>
546
        </data>
541
    </configuration>
547
    </configuration>
(-)java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties (-1 / +1 lines)
Lines 183-189 Link Here
183
LBL_CustomizeRun_Run_Working_Directory_Browse_Title=Browse Working Directory
183
LBL_CustomizeRun_Run_Working_Directory_Browse_Title=Browse Working Directory
184
LBL_CustomizeRun_Run_VM_Options=&VM Options:
184
LBL_CustomizeRun_Run_VM_Options=&VM Options:
185
LBL_CustomizeRun_Run_VM_Options_Example=(e.g. -Xms10m)
185
LBL_CustomizeRun_Run_VM_Options_Example=(e.g. -Xms10m)
186
LBL_CustomizeRun_Run_VM_Options_JButton=C&ustomize
186
LBL_CustomizeRun_Run_VM_Options_JButton=C&ustomize...
187
LBL_ChooseMainClass_OK=Select Main Class
187
LBL_ChooseMainClass_OK=Select Main Class
188
LBL_ChooseMainClass_Title=Browse Main Classes
188
LBL_ChooseMainClass_Title=Browse Main Classes
189
189
(-)maven/nbproject/project.xml (-24 / +28 lines)
Lines 125-130 Link Here
125
                    </run-dependency>
125
                    </run-dependency>
126
                </dependency>
126
                </dependency>
127
                <dependency>
127
                <dependency>
128
                    <code-name-base>org.netbeans.api.templates</code-name-base>
129
                    <build-prerequisite/>
130
                    <compile-dependency/>
131
                    <run-dependency>
132
                        <specification-version>1.0</specification-version>
133
                    </run-dependency>
134
                </dependency>
135
                <dependency>
128
                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
136
                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
129
                    <build-prerequisite/>
137
                    <build-prerequisite/>
130
                    <compile-dependency/>
138
                    <compile-dependency/>
Lines 186-191 Link Here
186
                    </run-dependency>
194
                    </run-dependency>
187
                </dependency>
195
                </dependency>
188
                <dependency>
196
                <dependency>
197
                    <code-name-base>org.netbeans.modules.java.j2seproject</code-name-base>
198
                    <build-prerequisite/>
199
                    <compile-dependency/>
200
                    <run-dependency>
201
                        <release-version>1</release-version>
202
                        <specification-version>1.78</specification-version>
203
                    </run-dependency>
204
                </dependency>
205
                <dependency>
189
                    <code-name-base>org.netbeans.modules.java.platform</code-name-base>
206
                    <code-name-base>org.netbeans.modules.java.platform</code-name-base>
190
                    <build-prerequisite/>
207
                    <build-prerequisite/>
191
                    <compile-dependency/>
208
                    <compile-dependency/>
Lines 479-492 Link Here
479
                    </run-dependency>
496
                    </run-dependency>
480
                </dependency>
497
                </dependency>
481
                <dependency>
498
                <dependency>
482
                    <code-name-base>org.netbeans.api.templates</code-name-base>
483
                    <build-prerequisite/>
484
                    <compile-dependency/>
485
                    <run-dependency>
486
                        <specification-version>1.0</specification-version>
487
                    </run-dependency>
488
                </dependency>
489
                <dependency>
490
                    <code-name-base>org.openide.modules</code-name-base>
499
                    <code-name-base>org.openide.modules</code-name-base>
491
                    <build-prerequisite/>
500
                    <build-prerequisite/>
492
                    <compile-dependency/>
501
                    <compile-dependency/>
Lines 511-517 Link Here
511
                    </run-dependency>
520
                    </run-dependency>
512
                </dependency>
521
                </dependency>
513
                <dependency>
522
                <dependency>
514
                    <code-name-base>org.openide.util.ui</code-name-base>
523
                    <code-name-base>org.openide.util</code-name-base>
515
                    <build-prerequisite/>
524
                    <build-prerequisite/>
516
                    <compile-dependency/>
525
                    <compile-dependency/>
517
                    <run-dependency>
526
                    <run-dependency>
Lines 519-537 Link Here
519
                    </run-dependency>
528
                    </run-dependency>
520
                </dependency>
529
                </dependency>
521
                <dependency>
530
                <dependency>
522
                    <code-name-base>org.openide.util</code-name-base>
531
                    <code-name-base>org.openide.util.lookup</code-name-base>
523
                    <build-prerequisite/>
532
                    <build-prerequisite/>
524
                    <compile-dependency/>
533
                    <compile-dependency/>
525
                    <run-dependency>
534
                    <run-dependency>
526
                        <specification-version>9.3</specification-version>
535
                        <specification-version>8.0</specification-version>
527
                    </run-dependency>
536
                    </run-dependency>
528
                </dependency>
537
                </dependency>
529
                <dependency>
538
                <dependency>
530
                    <code-name-base>org.openide.util.lookup</code-name-base>
539
                    <code-name-base>org.openide.util.ui</code-name-base>
531
                    <build-prerequisite/>
540
                    <build-prerequisite/>
532
                    <compile-dependency/>
541
                    <compile-dependency/>
533
                    <run-dependency>
542
                    <run-dependency>
534
                        <specification-version>8.0</specification-version>
543
                        <specification-version>9.3</specification-version>
535
                    </run-dependency>
544
                    </run-dependency>
536
                </dependency>
545
                </dependency>
537
                <dependency>
546
                <dependency>
Lines 586-600 Link Here
586
            </test-dependencies>
595
            </test-dependencies>
587
            <friend-packages>
596
            <friend-packages>
588
                <friend>org.javeleon.netbeans</friend>
597
                <friend>org.javeleon.netbeans</friend>
589
                <!-- sven reimers -->
590
                <friend>org.nbheaven.sqe.core.maven</friend>
598
                <friend>org.nbheaven.sqe.core.maven</friend>
591
                <friend>org.nbheaven.sqe.core.maven3</friend>
599
                <friend>org.nbheaven.sqe.core.maven3</friend>
600
                <friend>org.netbeans.api.maven</friend>
601
                <friend>org.netbeans.modules.android.maven</friend>
592
                <friend>org.netbeans.modules.apisupport.installer.maven</friend>
602
                <friend>org.netbeans.modules.apisupport.installer.maven</friend>
593
                <friend>org.netbeans.modules.groovy.support</friend>
603
                <friend>org.netbeans.modules.groovy.support</friend>
594
                <friend>org.netbeans.modules.hudson.maven</friend>
604
                <friend>org.netbeans.modules.hudson.maven</friend>
605
                <friend>org.netbeans.modules.j2ee.appengine</friend>
595
                <friend>org.netbeans.modules.jbi.fuji.support</friend>
606
                <friend>org.netbeans.modules.jbi.fuji.support</friend>
596
                <friend>org.netbeans.modules.kenai.maven</friend>
607
                <friend>org.netbeans.modules.kenai.maven</friend>
597
                <friend>org.netbeans.api.maven</friend>
608
                <friend>org.netbeans.modules.ko4j.debugging</friend>
598
                <friend>org.netbeans.modules.maven.apisupport</friend>
609
                <friend>org.netbeans.modules.maven.apisupport</friend>
599
                <friend>org.netbeans.modules.maven.checkstyle</friend>
610
                <friend>org.netbeans.modules.maven.checkstyle</friend>
600
                <friend>org.netbeans.modules.maven.coverage</friend>
611
                <friend>org.netbeans.modules.maven.coverage</friend>
Lines 612-630 Link Here
612
                <friend>org.netbeans.modules.maven.repository</friend>
623
                <friend>org.netbeans.modules.maven.repository</friend>
613
                <friend>org.netbeans.modules.maven.samples</friend>
624
                <friend>org.netbeans.modules.maven.samples</friend>
614
                <friend>org.netbeans.modules.maven.spring</friend>
625
                <friend>org.netbeans.modules.maven.spring</friend>
626
                <friend>org.netbeans.modules.maven.util</friend>
627
                <friend>org.netbeans.modules.scala.maven</friend>
615
                <friend>org.netbeans.modules.selenium.maven</friend>
628
                <friend>org.netbeans.modules.selenium.maven</friend>
616
                <friend>org.netbeans.modules.selenium2.maven</friend>
629
                <friend>org.netbeans.modules.selenium2.maven</friend>
617
                <friend>org.netbeans.modules.ko4j.debugging</friend>
618
                <friend>org.netbeans.modules.testng.maven</friend>
630
                <friend>org.netbeans.modules.testng.maven</friend>
619
                <!-- radim kubacki -->
620
                <friend>org.netbeans.modules.android.maven</friend>
621
                <!-- dcaoyuan@gmail.com -->
622
                <friend>org.netbeans.modules.scala.maven</friend>
623
                <!-- danis@netbeans.org -->
624
                <friend>org.vaadin.netbeans.maven</friend>
631
                <friend>org.vaadin.netbeans.maven</friend>
625
                <!-- NetBeans support for Google App Engine -->
626
                <friend>org.netbeans.modules.j2ee.appengine</friend>
627
                <friend>org.netbeans.modules.maven.util</friend>
628
                <package>org.netbeans.modules.maven.api</package>
632
                <package>org.netbeans.modules.maven.api</package>
629
                <package>org.netbeans.modules.maven.api.archetype</package>
633
                <package>org.netbeans.modules.maven.api.archetype</package>
630
                <package>org.netbeans.modules.maven.api.classpath</package>
634
                <package>org.netbeans.modules.maven.api.classpath</package>
(-)maven/src/org/netbeans/modules/maven/customizer/Bundle.properties (+2 lines)
Lines 166-168 Link Here
166
CompilePanel.cbCompileOnSave.text=Compile On &Save
166
CompilePanel.cbCompileOnSave.text=Compile On &Save
167
CompilePanel.btnLearnMore.text=<html><a href="">Learn More about Compile On Save feature in Maven projects</a></html>
167
CompilePanel.btnLearnMore.text=<html><a href="">Learn More about Compile On Save feature in Maven projects</a></html>
168
ActionMappings.jButton1.text=Show in Toolbar
168
ActionMappings.jButton1.text=Show in Toolbar
169
RunJarPanel.txtVMOptions.AccessibleContext.accessibleDescription=VM options
170
RunJarPanel.customizeOptionsButton.text=C&utomize...
(-)maven/src/org/netbeans/modules/maven/customizer/RunJarPanel.form (-22 / +53 lines)
Lines 16-22 Link Here
16
  <Layout>
16
  <Layout>
17
    <DimensionLayout dim="0">
17
    <DimensionLayout dim="0">
18
      <Group type="103" groupAlignment="0" attributes="0">
18
      <Group type="103" groupAlignment="0" attributes="0">
19
          <Group type="102" alignment="1" attributes="0">
19
          <Group type="102" alignment="0" attributes="0">
20
              <Group type="103" groupAlignment="0" attributes="0">
20
              <Group type="103" groupAlignment="0" attributes="0">
21
                  <Component id="lblWorkDir" alignment="0" min="-2" max="-2" attributes="0"/>
21
                  <Component id="lblWorkDir" alignment="0" min="-2" max="-2" attributes="0"/>
22
                  <Component id="lblVMOptions" alignment="0" min="-2" max="-2" attributes="0"/>
22
                  <Component id="lblVMOptions" alignment="0" min="-2" max="-2" attributes="0"/>
Lines 26-49 Link Here
26
              </Group>
26
              </Group>
27
              <EmptySpace max="-2" attributes="0"/>
27
              <EmptySpace max="-2" attributes="0"/>
28
              <Group type="103" groupAlignment="0" attributes="0">
28
              <Group type="103" groupAlignment="0" attributes="0">
29
                  <Component id="txtVMOptions" alignment="0" pref="225" max="32767" attributes="0"/>
29
                  <Group type="102" attributes="0">
30
                  <Component id="txtWorkDir" alignment="0" pref="225" max="32767" attributes="2"/>
30
                      <Component id="lblHint" min="-2" max="-2" attributes="0"/>
31
                  <Component id="txtArguments" alignment="0" pref="225" max="32767" attributes="2"/>
31
                      <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
32
                  <Component id="txtMainClass" alignment="0" pref="225" max="32767" attributes="2"/>
33
                  <Component id="comConfiguration" alignment="0" pref="225" max="32767" attributes="0"/>
34
              </Group>
32
              </Group>
33
                  <Group type="102" alignment="1" attributes="0">
34
                      <Group type="103" groupAlignment="1" attributes="0">
35
                          <Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
36
                          <Component id="txtWorkDir" alignment="0" max="32767" attributes="2"/>
37
                          <Component id="txtArguments" alignment="0" max="32767" attributes="2"/>
38
                          <Component id="txtMainClass" alignment="0" max="32767" attributes="2"/>
39
                          <Component id="comConfiguration" alignment="0" pref="230" max="32767" attributes="0"/>
40
                      </Group>
35
              <EmptySpace max="-2" attributes="0"/>
41
              <EmptySpace max="-2" attributes="0"/>
36
              <Group type="103" groupAlignment="0" attributes="0">
42
                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
37
                  <Component id="btnWorkDir" min="-2" max="-2" attributes="0"/>
43
                          <Component id="btnWorkDir" max="32767" attributes="0"/>
38
                  <Component id="btnMainClass" alignment="0" min="-2" max="-2" attributes="0"/>
44
                          <Component id="btnMainClass" alignment="0" max="32767" attributes="0"/>
45
                          <Component id="customizeOptionsButton" alignment="0" max="32767" attributes="0"/>
39
              </Group>
46
              </Group>
40
          </Group>
47
          </Group>
41
          <Group type="102" alignment="0" attributes="0">
42
              <EmptySpace min="128" pref="128" max="128" attributes="0"/>
43
              <Component id="lblHint" min="-2" max="-2" attributes="0"/>
44
              <EmptySpace pref="246" max="32767" attributes="0"/>
45
          </Group>
48
          </Group>
46
      </Group>
49
      </Group>
50
      </Group>
47
    </DimensionLayout>
51
    </DimensionLayout>
48
    <DimensionLayout dim="1">
52
    <DimensionLayout dim="1">
49
      <Group type="103" groupAlignment="0" attributes="0">
53
      <Group type="103" groupAlignment="0" attributes="0">
Lines 70-82 Link Here
70
                  <Component id="btnWorkDir" alignment="3" min="-2" max="-2" attributes="0"/>
74
                  <Component id="btnWorkDir" alignment="3" min="-2" max="-2" attributes="0"/>
71
              </Group>
75
              </Group>
72
              <EmptySpace max="-2" attributes="0"/>
76
              <EmptySpace max="-2" attributes="0"/>
73
              <Group type="103" groupAlignment="3" attributes="0">
77
              <Group type="103" groupAlignment="0" attributes="0">
74
                  <Component id="lblVMOptions" alignment="3" min="-2" max="-2" attributes="0"/>
78
                  <Component id="lblVMOptions" min="-2" max="-2" attributes="0"/>
75
                  <Component id="txtVMOptions" alignment="3" min="-2" max="-2" attributes="0"/>
79
                  <Component id="jScrollPane1" min="-2" pref="67" max="-2" attributes="0"/>
80
                  <Component id="customizeOptionsButton" min="-2" max="-2" attributes="0"/>
76
              </Group>
81
              </Group>
77
              <EmptySpace max="-2" attributes="0"/>
82
              <EmptySpace max="-2" attributes="0"/>
78
              <Component id="lblHint" min="-2" max="-2" attributes="0"/>
83
              <Component id="lblHint" min="-2" max="-2" attributes="0"/>
79
              <EmptySpace pref="139" max="32767" attributes="0"/>
84
              <EmptySpace pref="91" max="32767" attributes="0"/>
80
          </Group>
85
          </Group>
81
      </Group>
86
      </Group>
82
    </DimensionLayout>
87
    </DimensionLayout>
Lines 160-170 Link Here
160
        </Property>
165
        </Property>
161
      </Properties>
166
      </Properties>
162
    </Component>
167
    </Component>
163
    <Component class="javax.swing.JTextField" name="txtVMOptions">
164
      <AccessibilityProperties>
165
        <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="VM options"/>
166
      </AccessibilityProperties>
167
    </Component>
168
    <Component class="javax.swing.JLabel" name="lblHint">
168
    <Component class="javax.swing.JLabel" name="lblHint">
169
      <Properties>
169
      <Properties>
170
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
170
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
Lines 197-201 Link Here
197
        <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Configuration"/>
197
        <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Configuration"/>
198
      </AccessibilityProperties>
198
      </AccessibilityProperties>
199
    </Component>
199
    </Component>
200
    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
201
      <AuxValues>
202
        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
203
      </AuxValues>
204
205
      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
206
      <SubComponents>
207
        <Component class="javax.swing.JTextArea" name="txtVMOptions">
208
          <Properties>
209
            <Property name="columns" type="int" value="20"/>
210
            <Property name="lineWrap" type="boolean" value="true"/>
211
            <Property name="rows" type="int" value="5"/>
212
          </Properties>
213
          <AccessibilityProperties>
214
            <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
215
              <ResourceString bundle="org/netbeans/modules/maven/customizer/Bundle.properties" key="RunJarPanel.txtVMOptions.AccessibleContext.accessibleDescription" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
216
            </Property>
217
          </AccessibilityProperties>
218
        </Component>
200
  </SubComponents>
219
  </SubComponents>
220
    </Container>
221
    <Component class="javax.swing.JButton" name="customizeOptionsButton">
222
      <Properties>
223
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
224
          <ResourceString bundle="org/netbeans/modules/maven/customizer/Bundle.properties" key="RunJarPanel.customizeOptionsButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
225
        </Property>
226
      </Properties>
227
      <Events>
228
        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="customizeOptionsButtonActionPerformed"/>
229
      </Events>
230
    </Component>
231
  </SubComponents>
201
</Form>
232
</Form>
(-)maven/src/org/netbeans/modules/maven/customizer/RunJarPanel.java (-27 / +60 lines)
Lines 52-57 Link Here
52
import java.util.ArrayList;
52
import java.util.ArrayList;
53
import java.util.Iterator;
53
import java.util.Iterator;
54
import java.util.List;
54
import java.util.List;
55
import java.util.logging.Level;
55
import java.util.logging.Logger;
56
import java.util.logging.Logger;
56
import javax.swing.DefaultComboBoxModel;
57
import javax.swing.DefaultComboBoxModel;
57
import javax.swing.DefaultListCellRenderer;
58
import javax.swing.DefaultListCellRenderer;
Lines 60-65 Link Here
60
import javax.swing.JLabel;
61
import javax.swing.JLabel;
61
import javax.swing.JList;
62
import javax.swing.JList;
62
import javax.swing.JTextField;
63
import javax.swing.JTextField;
64
import javax.swing.SwingUtilities;
63
import javax.swing.event.ChangeEvent;
65
import javax.swing.event.ChangeEvent;
64
import javax.swing.event.ChangeListener;
66
import javax.swing.event.ChangeListener;
65
import javax.swing.event.DocumentEvent;
67
import javax.swing.event.DocumentEvent;
Lines 68-73 Link Here
68
import org.netbeans.api.project.ProjectUtils;
70
import org.netbeans.api.project.ProjectUtils;
69
import org.netbeans.api.project.SourceGroup;
71
import org.netbeans.api.project.SourceGroup;
70
import org.netbeans.api.project.Sources;
72
import org.netbeans.api.project.Sources;
73
import org.netbeans.modules.java.j2seproject.ui.customizer.vmo.OptionsDialog;
71
import org.netbeans.modules.maven.NbMavenProjectImpl;
74
import org.netbeans.modules.maven.NbMavenProjectImpl;
72
import org.netbeans.modules.maven.api.customizer.ModelHandle2;
75
import org.netbeans.modules.maven.api.customizer.ModelHandle2;
73
import org.netbeans.modules.maven.classpath.MavenSourcesImpl;
76
import org.netbeans.modules.maven.classpath.MavenSourcesImpl;
Lines 90-95 Link Here
90
 * @author Milos Kleint 
93
 * @author Milos Kleint 
91
 */
94
 */
92
public class RunJarPanel extends javax.swing.JPanel implements HelpCtx.Provider {
95
public class RunJarPanel extends javax.swing.JPanel implements HelpCtx.Provider {
96
    public static final Logger log = Logger.getLogger(RunJarPanel.class.getName());
93
    
97
    
94
    private boolean isCurrentRun = true;
98
    private boolean isCurrentRun = true;
95
    private boolean isCurrentDebug = true;
99
    private boolean isCurrentDebug = true;
Lines 109-116 Link Here
109
    private String oldVMParams;
113
    private String oldVMParams;
110
    private String oldWorkDir;
114
    private String oldWorkDir;
111
    private String oldAllParams;
115
    private String oldAllParams;
112
    private DocumentListener docListener;
116
    private final DocumentListener docListener;
113
    private ActionListener comboListener;
117
    private final ActionListener comboListener;
114
    private ProjectCustomizer.Category category;
118
    private ProjectCustomizer.Category category;
115
    
119
    
116
    public RunJarPanel(ModelHandle2 handle, NbMavenProjectImpl project, ProjectCustomizer.Category category) {
120
    public RunJarPanel(ModelHandle2 handle, NbMavenProjectImpl project, ProjectCustomizer.Category category) {
Lines 135-141 Link Here
135
        
139
        
136
        initValues();
140
        initValues();
137
        lblMainClass.setFont(lblMainClass.getFont().deriveFont(Font.BOLD));
141
        lblMainClass.setFont(lblMainClass.getFont().deriveFont(Font.BOLD));
138
        List<FileObject> roots = new ArrayList<FileObject>();
142
        List<FileObject> roots = new ArrayList<>();
139
        Sources srcs =  ProjectUtils.getSources(project);
143
        Sources srcs =  ProjectUtils.getSources(project);
140
        SourceGroup[] grps = srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
144
        SourceGroup[] grps = srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
141
        for (int i = 0; i < grps.length; i++) {
145
        for (int i = 0; i < grps.length; i++) {
Lines 319-328 Link Here
319
        txtWorkDir = new javax.swing.JTextField();
323
        txtWorkDir = new javax.swing.JTextField();
320
        btnWorkDir = new javax.swing.JButton();
324
        btnWorkDir = new javax.swing.JButton();
321
        lblVMOptions = new javax.swing.JLabel();
325
        lblVMOptions = new javax.swing.JLabel();
322
        txtVMOptions = new javax.swing.JTextField();
323
        lblHint = new javax.swing.JLabel();
326
        lblHint = new javax.swing.JLabel();
324
        lblConfiguration = new javax.swing.JLabel();
327
        lblConfiguration = new javax.swing.JLabel();
325
        comConfiguration = new javax.swing.JComboBox();
328
        comConfiguration = new javax.swing.JComboBox();
329
        jScrollPane1 = new javax.swing.JScrollPane();
330
        txtVMOptions = new javax.swing.JTextArea();
331
        customizeOptionsButton = new javax.swing.JButton();
326
332
327
        lblMainClass.setLabelFor(txtMainClass);
333
        lblMainClass.setLabelFor(txtMainClass);
328
        org.openide.awt.Mnemonics.setLocalizedText(lblMainClass, org.openide.util.NbBundle.getMessage(RunJarPanel.class, "LBL_MainClass")); // NOI18N
334
        org.openide.awt.Mnemonics.setLocalizedText(lblMainClass, org.openide.util.NbBundle.getMessage(RunJarPanel.class, "LBL_MainClass")); // NOI18N
Lines 352-362 Link Here
352
358
353
        comConfiguration.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
359
        comConfiguration.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
354
360
361
        txtVMOptions.setColumns(20);
362
        txtVMOptions.setLineWrap(true);
363
        txtVMOptions.setRows(5);
364
        jScrollPane1.setViewportView(txtVMOptions);
365
        txtVMOptions.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(RunJarPanel.class, "RunJarPanel.txtVMOptions.AccessibleContext.accessibleDescription")); // NOI18N
366
367
        org.openide.awt.Mnemonics.setLocalizedText(customizeOptionsButton, org.openide.util.NbBundle.getMessage(RunJarPanel.class, "RunJarPanel.customizeOptionsButton.text")); // NOI18N
368
        customizeOptionsButton.addActionListener(new java.awt.event.ActionListener() {
369
            public void actionPerformed(java.awt.event.ActionEvent evt) {
370
                customizeOptionsButtonActionPerformed(evt);
371
            }
372
        });
373
355
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
374
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
356
        this.setLayout(layout);
375
        this.setLayout(layout);
357
        layout.setHorizontalGroup(
376
        layout.setHorizontalGroup(
358
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
377
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
359
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
378
            .addGroup(layout.createSequentialGroup()
360
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
379
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
361
                    .addComponent(lblWorkDir)
380
                    .addComponent(lblWorkDir)
362
                    .addComponent(lblVMOptions)
381
                    .addComponent(lblVMOptions)
Lines 365-383 Link Here
365
                    .addComponent(lblMainClass))
384
                    .addComponent(lblMainClass))
366
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
385
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
367
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
386
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
368
                    .addComponent(txtVMOptions, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
369
                    .addComponent(txtWorkDir, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
370
                    .addComponent(txtArguments, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
371
                    .addComponent(txtMainClass, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
372
                    .addComponent(comConfiguration, 0, 225, Short.MAX_VALUE))
373
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
374
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
375
                    .addComponent(btnWorkDir)
376
                    .addComponent(btnMainClass)))
377
            .addGroup(layout.createSequentialGroup()
387
            .addGroup(layout.createSequentialGroup()
378
                .addGap(128, 128, 128)
379
                .addComponent(lblHint)
388
                .addComponent(lblHint)
380
                .addContainerGap(246, Short.MAX_VALUE))
389
                        .addGap(0, 0, Short.MAX_VALUE))
390
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
391
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
392
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
393
                            .addComponent(txtWorkDir, javax.swing.GroupLayout.Alignment.LEADING)
394
                            .addComponent(txtArguments, javax.swing.GroupLayout.Alignment.LEADING)
395
                            .addComponent(txtMainClass, javax.swing.GroupLayout.Alignment.LEADING)
396
                            .addComponent(comConfiguration, javax.swing.GroupLayout.Alignment.LEADING, 0, 230, Short.MAX_VALUE))
397
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
398
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
399
                            .addComponent(btnWorkDir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
400
                            .addComponent(btnMainClass, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
401
                            .addComponent(customizeOptionsButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
381
        );
402
        );
382
        layout.setVerticalGroup(
403
        layout.setVerticalGroup(
383
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
404
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Lines 400-411 Link Here
400
                    .addComponent(txtWorkDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
421
                    .addComponent(txtWorkDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
401
                    .addComponent(btnWorkDir))
422
                    .addComponent(btnWorkDir))
402
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
423
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
403
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
424
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
404
                    .addComponent(lblVMOptions)
425
                    .addComponent(lblVMOptions)
405
                    .addComponent(txtVMOptions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
426
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
427
                    .addComponent(customizeOptionsButton))
406
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
428
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
407
                .addComponent(lblHint)
429
                .addComponent(lblHint)
408
                .addContainerGap(139, Short.MAX_VALUE))
430
                .addContainerGap(91, Short.MAX_VALUE))
409
        );
431
        );
410
432
411
        txtMainClass.getAccessibleContext().setAccessibleDescription("Main class");
433
        txtMainClass.getAccessibleContext().setAccessibleDescription("Main class");
Lines 413-419 Link Here
413
        txtArguments.getAccessibleContext().setAccessibleDescription("Arguments");
435
        txtArguments.getAccessibleContext().setAccessibleDescription("Arguments");
414
        txtWorkDir.getAccessibleContext().setAccessibleDescription("Working directory");
436
        txtWorkDir.getAccessibleContext().setAccessibleDescription("Working directory");
415
        btnWorkDir.getAccessibleContext().setAccessibleDescription("Browse working directory");
437
        btnWorkDir.getAccessibleContext().setAccessibleDescription("Browse working directory");
416
        txtVMOptions.getAccessibleContext().setAccessibleDescription("VM options");
417
        comConfiguration.getAccessibleContext().setAccessibleDescription("Configuration");
438
        comConfiguration.getAccessibleContext().setAccessibleDescription("Configuration");
418
    }// </editor-fold>//GEN-END:initComponents
439
    }// </editor-fold>//GEN-END:initComponents
419
440
Lines 435-440 Link Here
435
        }
456
        }
436
    }//GEN-LAST:event_btnWorkDirActionPerformed
457
    }//GEN-LAST:event_btnWorkDirActionPerformed
437
458
459
    private void customizeOptionsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customizeOptionsButtonActionPerformed
460
        String origin = txtVMOptions.getText();
461
        try {
462
            String result = OptionsDialog.showCustomizer(SwingUtilities.getWindowAncestor(this), origin);
463
            txtVMOptions.setText(result);
464
        } catch (Exception e) {
465
            log.log(Level.WARNING, "Cannot parse vm options.", e); // NOI18N
466
        }
467
    }//GEN-LAST:event_customizeOptionsButtonActionPerformed
468
438
    void applyChanges() {
469
    void applyChanges() {
439
        String newMainClass = txtMainClass.getText().trim();
470
        String newMainClass = txtMainClass.getText().trim();
440
        String newParams = txtArguments.getText().trim();
471
        String newParams = txtArguments.getText().trim();
Lines 446-454 Link Here
446
            if (newMainClass.trim().length() > 0) {
477
            if (newMainClass.trim().length() > 0) {
447
                newAllParams = newAllParams + newMainClass + " "; //NOI18N
478
                newAllParams = newAllParams + newMainClass + " "; //NOI18N
448
            } else {
479
            } else {
449
                newAllParams = newAllParams + "${packageClassName} "; //NOI18N
480
                newAllParams += "${packageClassName} "; //NOI18N
450
            }
481
            }
451
            newAllParams = newAllParams + newParams;
482
            newAllParams += newParams;
452
            newAllParams = newAllParams.trim();
483
            newAllParams = newAllParams.trim();
453
            if (isCurrentRun) {
484
            if (isCurrentRun) {
454
                boolean changed = false;
485
                boolean changed = false;
Lines 506-512 Link Here
506
        while (it.hasNext()) {
537
        while (it.hasNext()) {
507
            String goal = (String) it.next();
538
            String goal = (String) it.next();
508
            if (goal.matches("org\\.codehaus\\.mojo\\:exec-maven-plugin\\:(.)+\\:exec") //NOI18N
539
            if (goal.matches("org\\.codehaus\\.mojo\\:exec-maven-plugin\\:(.)+\\:exec") //NOI18N
509
                    || goal.indexOf("exec:exec") > -1) { //NOI18N
540
                    || goal.contains("exec:exec")) { //NOI18N
510
                if (map.getProperties() != null && map.getProperties().containsKey("exec.args")) {
541
                if (map.getProperties() != null && map.getProperties().containsKey("exec.args")) {
511
                    String execArgs = map.getProperties().get("exec.args");
542
                    String execArgs = map.getProperties().get("exec.args");
512
                    if (execArgs.contains("-classpath")) {
543
                    if (execArgs.contains("-classpath")) {
Lines 567-573 Link Here
567
            } else if (s.equals("${packageClassName}") || s.matches("[\\w]+[\\.]{0,1}[\\w\\.]*")) { //NOI18N
598
            } else if (s.equals("${packageClassName}") || s.matches("[\\w]+[\\.]{0,1}[\\w\\.]*")) { //NOI18N
568
                return s;
599
                return s;
569
            } else {
600
            } else {
570
                Logger.getLogger(RunJarPanel.class.getName()).fine("failed splitting main class from=" + line); //NOI18N
601
                log.log(Level.WARNING, "failed splitting main class from={0}", line); //NOI18N
571
            }
602
            }
572
            s = ps.nextPair();
603
            s = ps.nextPair();
573
        }
604
        }
Lines 587-592 Link Here
587
    private javax.swing.JButton btnMainClass;
618
    private javax.swing.JButton btnMainClass;
588
    private javax.swing.JButton btnWorkDir;
619
    private javax.swing.JButton btnWorkDir;
589
    private javax.swing.JComboBox comConfiguration;
620
    private javax.swing.JComboBox comConfiguration;
621
    private javax.swing.JButton customizeOptionsButton;
622
    private javax.swing.JScrollPane jScrollPane1;
590
    private javax.swing.JLabel lblArguments;
623
    private javax.swing.JLabel lblArguments;
591
    private javax.swing.JLabel lblConfiguration;
624
    private javax.swing.JLabel lblConfiguration;
592
    private javax.swing.JLabel lblHint;
625
    private javax.swing.JLabel lblHint;
Lines 595-601 Link Here
595
    private javax.swing.JLabel lblWorkDir;
628
    private javax.swing.JLabel lblWorkDir;
596
    private javax.swing.JTextField txtArguments;
629
    private javax.swing.JTextField txtArguments;
597
    private javax.swing.JTextField txtMainClass;
630
    private javax.swing.JTextField txtMainClass;
598
    private javax.swing.JTextField txtVMOptions;
631
    private javax.swing.JTextArea txtVMOptions;
599
    private javax.swing.JTextField txtWorkDir;
632
    private javax.swing.JTextField txtWorkDir;
600
    // End of variables declaration//GEN-END:variables
633
    // End of variables declaration//GEN-END:variables
601
634
Lines 621-628 Link Here
621
    private class MainClassListener implements ActionListener /*, DocumentListener */ {
654
    private class MainClassListener implements ActionListener /*, DocumentListener */ {
622
        
655
        
623
        private final JButton okButton;
656
        private final JButton okButton;
624
        private FileObject[] sourceRoots;
657
        private final FileObject[] sourceRoots;
625
        private JTextField mainClassTextField;
658
        private final JTextField mainClassTextField;
626
        
659
        
627
        MainClassListener( FileObject[] sourceRoots, JTextField mainClassTextField ) {            
660
        MainClassListener( FileObject[] sourceRoots, JTextField mainClassTextField ) {            
628
            this.sourceRoots = sourceRoots;
661
            this.sourceRoots = sourceRoots;

Return to bug 251934