Skip to content

Commit

Permalink
Java file wizards with extension and implementation panels
Browse files Browse the repository at this point in the history
This PR provides the ability to select the superclass and interfaces 
in all relevant wizards from the Java category.
  • Loading branch information
arsadykov authored and lkishalmi committed Nov 4, 2020
1 parent 896c26d commit aaae1fa
Show file tree
Hide file tree
Showing 18 changed files with 702 additions and 376 deletions.
13 changes: 13 additions & 0 deletions java/java.project.ui/apichanges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ is the proper place.
<!-- ACTUAL CHANGES BEGIN HERE: -->

<changes>
<change id="Superclass-Interfaces-FreeMarker-Variables">
<api name="JavaProjectUI"/>
<summary>Added the <code>superclass</code> and <code>interfaces</code> variables for FreeMarker file templates</summary>
<version major="1" minor="1.86"/>
<date day="8" month="10" year="2020"/>
<author login="isarthur"/>
<compatibility addition="yes"/>
<description>
Added the <code>superclass</code> and <code>interfaces</code> variables for use in FreeMarker
templates used by the New Java File Wizard.
</description>
<class name="NewJavaFileWizardIterator" package="org.netbeans.modules.java.project.ui"/>
</change>
<change id="BrokenReferencesSupport.createPlatformVersionProblemProvider">
<api name="JavaProjectUI"/>
<summary>Extended the <code>BrokenReferencesSupport.createPlatformVersionProblemProvider</code> by the mininal source level supported by the project</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,3 @@ LBL_MissingPlatform=<html>The Java Platform called "<font color="{0}">{1}</font>
LBL_CreateNewPlatform=Either create a new Java Platform
LBL_UseExistingPlatform=or use an &existing Java Platform:
LBL_PlatformHint=<html>Hint: For version controlled projects it''s recommended to create a new Java Platform "{0}".
ExtensionAndImplementationVisualPanel.superclassLabel.text=&Superclass:
ExtensionAndImplementationVisualPanel.superclassTextField.text=
ExtensionAndImplementationVisualPanel.browseSuperclassButton.text=Browse...
ExtensionAndImplementationVisualPanel.interfacesLabel.text=&Interfaces:
ExtensionAndImplementationVisualPanel.browseInterfacesButton.text=Browse...
Original file line number Diff line number Diff line change
Expand Up @@ -32,118 +32,10 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="superclassLabel" min="-2" max="-2" attributes="0"/>
<Component id="interfacesLabel" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="interfacesScrollPane" max="32767" attributes="0"/>
<Component id="superclassTextField" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="browseSuperclassButton" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="browseInterfacesButton" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="superclassTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="browseSuperclassButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="superclassLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="interfacesScrollPane" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="interfacesLabel" min="-2" max="-2" attributes="0"/>
<Component id="browseInterfacesButton" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
<Property name="axis" type="int" value="1"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="superclassLabel">
<Properties>
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
<ComponentRef name="superclassTextField"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/netbeans/modules/java/project/ui/Bundle.properties" key="ExtensionAndImplementationVisualPanel.superclassLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="interfacesLabel">
<Properties>
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
<ComponentRef name="interfacesTextArea"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/netbeans/modules/java/project/ui/Bundle.properties" key="ExtensionAndImplementationVisualPanel.interfacesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="superclassTextField">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/netbeans/modules/java/project/ui/Bundle.properties" key="ExtensionAndImplementationVisualPanel.superclassTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="browseSuperclassButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/netbeans/modules/java/project/ui/Bundle.properties" key="ExtensionAndImplementationVisualPanel.browseSuperclassButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseSuperclassButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="browseInterfacesButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/netbeans/modules/java/project/ui/Bundle.properties" key="ExtensionAndImplementationVisualPanel.browseInterfacesButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseInterfacesButtonActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JScrollPane" name="interfacesScrollPane">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="interfacesTextArea">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="columns" type="int" value="20"/>
<Property name="rows" type="int" value="5"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>
Loading

0 comments on commit aaae1fa

Please sign in to comment.