From: <yh...@us...> - 2010-08-28 10:35:02
|
Revision: 6 http://netbeansjavasql.svn.sourceforge.net/netbeansjavasql/?rev=6&view=rev Author: yhoppe Date: 2010-08-28 10:34:54 +0000 (Sat, 28 Aug 2010) Log Message: ----------- Bugfixes and various improvements Updated Gui Updated Icon Modified Paths: -------------- trunk/manifest.mf trunk/src/de/acyrance/nb/sqlgenerator/Bundle.properties trunk/src/de/acyrance/nb/sqlgenerator/Configuration/Bundle.properties trunk/src/de/acyrance/nb/sqlgenerator/Configuration/GeneratorConfiguration.java trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.form trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.java trunk/src/de/acyrance/nb/sqlgenerator/SqlGeneratorAction.java trunk/src/de/acyrance/nb/sqlgenerator/connect.png Modified: trunk/manifest.mf =================================================================== --- trunk/manifest.mf 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/manifest.mf 2010-08-28 10:34:54 UTC (rev 6) @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: de.acyrance.nb.sqlgenerator -OpenIDE-Module-Implementation-Version: 5 +OpenIDE-Module-Implementation-Version: 6 OpenIDE-Module-Layer: de/acyrance/nb/sqlgenerator/layer.xml OpenIDE-Module-Localizing-Bundle: de/acyrance/nb/sqlgenerator/Bundle.properties OpenIDE-Module-Requires: org.openide.windows.WindowManager Modified: trunk/src/de/acyrance/nb/sqlgenerator/Bundle.properties =================================================================== --- trunk/src/de/acyrance/nb/sqlgenerator/Bundle.properties 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/src/de/acyrance/nb/sqlgenerator/Bundle.properties 2010-08-28 10:34:54 UTC (rev 6) @@ -1,6 +1,6 @@ CTL_SqlGeneratorAction=SQL-Generator OpenIDE-Module-Display-Category=Tools OpenIDE-Module-Long-Description=\ - Automatically generates sql code and java database methods from a java class. + Automatically generates sql code and java database methods from the variables of a java class. OpenIDE-Module-Name=Java SQL Generator OpenIDE-Module-Short-Description=Generates SQL tables and java database methods from a java class Modified: trunk/src/de/acyrance/nb/sqlgenerator/Configuration/Bundle.properties =================================================================== --- trunk/src/de/acyrance/nb/sqlgenerator/Configuration/Bundle.properties 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/src/de/acyrance/nb/sqlgenerator/Configuration/Bundle.properties 2010-08-28 10:34:54 UTC (rev 6) @@ -4,7 +4,7 @@ SQLGeneratorOptionsPanel.panel_mysql.TabConstraints.tabTitle=MySQL SQLGeneratorOptionsPanel.panel_postgre.TabConstraints.tabTitle=PostgreSQL SQLGeneratorOptionsPanel.check_ifnotexists1.text=Add if not exists to Create table -SQLGeneratorOptionsPanel.check_varstolowercase.text=Complete to lower case +SQLGeneratorOptionsPanel.check_varstolowercase.text=Completely to lower case SQLGeneratorOptionsPanel.jLabel1.text=Default SQL Generation: SQLGeneratorOptionsPanel.jLabel2.text=String & char[]: SQLGeneratorOptionsPanel.field_mysqlstring.text=VARCHAR(255) Modified: trunk/src/de/acyrance/nb/sqlgenerator/Configuration/GeneratorConfiguration.java =================================================================== --- trunk/src/de/acyrance/nb/sqlgenerator/Configuration/GeneratorConfiguration.java 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/src/de/acyrance/nb/sqlgenerator/Configuration/GeneratorConfiguration.java 2010-08-28 10:34:54 UTC (rev 6) @@ -26,9 +26,10 @@ import org.openide.util.NbPreferences; /** - * + * deprecated Is replaced by NBPreferences in most parts.. * @author Yves Hoppe <info at yves-hoppe.de> */ + public class GeneratorConfiguration { public static final int MYSQL = 0; Modified: trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.form =================================================================== --- trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.form 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.form 2010-08-28 10:34:54 UTC (rev 6) @@ -16,12 +16,12 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="pane_options" alignment="0" pref="407" max="32767" attributes="0"/> + <Component id="pane_options" alignment="1" pref="407" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="pane_options" alignment="0" pref="631" max="32767" attributes="0"/> + <Component id="pane_options" alignment="0" pref="518" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> @@ -45,31 +45,18 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="jLabel1" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="114" max="32767" attributes="0"/> - <Component id="combo_defaultgeneration" min="-2" max="-2" attributes="0"/> - </Group> - <Component id="check_ifnotexists1" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="check_generatejavadoc" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - </Group> <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="check_addnotnull" min="-2" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="114" max="32767" attributes="0"/> + <Component id="combo_defaultgeneration" min="-2" max="-2" attributes="0"/> </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="panel_varoptions" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="panel_mysqlcode" max="32767" attributes="0"/> - </Group> + <Component id="check_ifnotexists1" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="check_generatejavadoc" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="check_addnotnull" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="panel_varoptions" alignment="0" max="32767" attributes="0"/> + <Component id="panel_mysqlcode" alignment="0" max="32767" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> @@ -93,7 +80,7 @@ <Component id="panel_varoptions" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="panel_mysqlcode" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="138" max="32767" attributes="0"/> + <EmptySpace pref="25" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -416,7 +403,6 @@ <EmptySpace pref="149" max="32767" attributes="0"/> <Component id="field_mysqltimestamp" min="-2" max="-2" attributes="0"/> </Group> - <Component id="jSeparator1" alignment="0" pref="371" max="32767" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> @@ -485,9 +471,7 @@ <Component id="field_mysqlboolean" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jSeparator1" min="-2" pref="15" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="185" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="212" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -680,8 +664,6 @@ </Property> </Properties> </Component> - <Component class="javax.swing.JSeparator" name="jSeparator1"> - </Component> <Component class="javax.swing.JLabel" name="jLabel14"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> @@ -778,7 +760,6 @@ <EmptySpace pref="149" max="32767" attributes="0"/> <Component id="field_derbytimestamp" min="-2" max="-2" attributes="0"/> </Group> - <Component id="jSeparator3" alignment="1" pref="371" max="32767" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> @@ -847,9 +828,7 @@ <Component id="field_derbyboolean" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jLabel32" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jSeparator3" min="-2" pref="20" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="180" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="212" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -1059,8 +1038,6 @@ </Property> </Properties> </Component> - <Component class="javax.swing.JSeparator" name="jSeparator3"> - </Component> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="panel_postgre"> @@ -1140,7 +1117,6 @@ <EmptySpace pref="149" max="32767" attributes="0"/> <Component id="field_postgresqltimestamp" min="-2" max="-2" attributes="0"/> </Group> - <Component id="jSeparator2" alignment="0" pref="371" max="32767" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> @@ -1209,9 +1185,7 @@ <Component id="field_postgresqlboolean" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jLabel26" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jSeparator2" min="-2" pref="15" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="185" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="212" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -1255,8 +1229,6 @@ </Property> </Properties> </Component> - <Component class="javax.swing.JSeparator" name="jSeparator2"> - </Component> <Component class="javax.swing.JLabel" name="jLabel19"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> Modified: trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.java =================================================================== --- trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.java 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/src/de/acyrance/nb/sqlgenerator/Configuration/SQLGeneratorOptionsPanel.java 2010-08-28 10:34:54 UTC (rev 6) @@ -84,7 +84,6 @@ field_mysqlyear = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); field_mysqlboolean = new javax.swing.JTextField(); - jSeparator1 = new javax.swing.JSeparator(); jLabel14 = new javax.swing.JLabel(); field_mysqltimestamp = new javax.swing.JTextField(); panel_derby = new javax.swing.JPanel(); @@ -112,14 +111,12 @@ jLabel36 = new javax.swing.JLabel(); jLabel37 = new javax.swing.JLabel(); jLabel38 = new javax.swing.JLabel(); - jSeparator3 = new javax.swing.JSeparator(); panel_postgre = new javax.swing.JPanel(); field_postgresqltimestamp = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); jLabel16 = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); jLabel18 = new javax.swing.JLabel(); - jSeparator2 = new javax.swing.JSeparator(); jLabel19 = new javax.swing.JLabel(); jLabel21 = new javax.swing.JLabel(); field_postgresqldouble = new javax.swing.JTextField(); @@ -294,25 +291,17 @@ panel_basicLayout.setHorizontalGroup( panel_basicLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panel_basicLayout.createSequentialGroup() + .addContainerGap() .addGroup(panel_basicLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panel_basicLayout.createSequentialGroup() - .addContainerGap() - .addGroup(panel_basicLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(panel_basicLayout.createSequentialGroup() - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 114, Short.MAX_VALUE) - .addComponent(combo_defaultgeneration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(check_ifnotexists1) - .addComponent(check_generatejavadoc))) - .addGroup(panel_basicLayout.createSequentialGroup() - .addContainerGap() - .addComponent(check_addnotnull)) - .addGroup(panel_basicLayout.createSequentialGroup() - .addContainerGap() - .addComponent(panel_varoptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(panel_basicLayout.createSequentialGroup() - .addContainerGap() - .addComponent(panel_mysqlcode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 114, Short.MAX_VALUE) + .addComponent(combo_defaultgeneration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(check_ifnotexists1) + .addComponent(check_generatejavadoc) + .addComponent(check_addnotnull) + .addComponent(panel_varoptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(panel_mysqlcode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); panel_basicLayout.setVerticalGroup( @@ -332,7 +321,7 @@ .addComponent(panel_varoptions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(panel_mysqlcode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(138, Short.MAX_VALUE)) + .addContainerGap(25, Short.MAX_VALUE)) ); pane_options.addTab(org.openide.util.NbBundle.getMessage(SQLGeneratorOptionsPanel.class, "SQLGeneratorOptionsPanel.panel_basic.TabConstraints.tabTitle"), panel_basic); // NOI18N @@ -451,8 +440,7 @@ .addGroup(panel_mysqlLayout.createSequentialGroup() .addComponent(jLabel14) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 149, Short.MAX_VALUE) - .addComponent(field_mysqltimestamp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)) + .addComponent(field_mysqltimestamp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); panel_mysqlLayout.setVerticalGroup( @@ -506,9 +494,7 @@ .addGroup(panel_mysqlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(field_mysqlboolean, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(185, 185, 185)) + .addGap(212, 212, 212)) ); pane_options.addTab(org.openide.util.NbBundle.getMessage(SQLGeneratorOptionsPanel.class, "SQLGeneratorOptionsPanel.panel_mysql.TabConstraints.tabTitle"), panel_mysql); // NOI18N @@ -627,8 +613,7 @@ .addGroup(panel_derbyLayout.createSequentialGroup() .addComponent(jLabel34) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 149, Short.MAX_VALUE) - .addComponent(field_derbytimestamp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)) + .addComponent(field_derbytimestamp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); panel_derbyLayout.setVerticalGroup( @@ -682,9 +667,7 @@ .addGroup(panel_derbyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(field_derbyboolean, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel32)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(180, 180, 180)) + .addGap(212, 212, 212)) ); pane_options.addTab(org.openide.util.NbBundle.getMessage(SQLGeneratorOptionsPanel.class, "SQLGeneratorOptionsPanel.panel_derby.TabConstraints.tabTitle"), panel_derby); // NOI18N @@ -803,8 +786,7 @@ .addGroup(panel_postgreLayout.createSequentialGroup() .addComponent(jLabel18) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 149, Short.MAX_VALUE) - .addComponent(field_postgresqltimestamp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)) + .addComponent(field_postgresqltimestamp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); panel_postgreLayout.setVerticalGroup( @@ -858,9 +840,7 @@ .addGroup(panel_postgreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(field_postgresqlboolean, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel26)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(185, 185, 185)) + .addGap(212, 212, 212)) ); pane_options.addTab(org.openide.util.NbBundle.getMessage(SQLGeneratorOptionsPanel.class, "SQLGeneratorOptionsPanel.panel_postgre.TabConstraints.tabTitle"), panel_postgre); // NOI18N @@ -869,11 +849,11 @@ this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pane_options, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE) + .addComponent(pane_options, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pane_options, javax.swing.GroupLayout.DEFAULT_SIZE, 631, Short.MAX_VALUE) + .addComponent(pane_options, javax.swing.GroupLayout.DEFAULT_SIZE, 518, Short.MAX_VALUE) ); }// </editor-fold>//GEN-END:initComponents @@ -966,8 +946,8 @@ this.field_postgresqlboolean.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("postgresqlBoolean", "boolean")); this.field_derbystring.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyString", "VARCHAR(255)")); - this.field_derbyint.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyInt", "CHAR")); - this.field_derbychar.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyChar", "INTEGER")); + this.field_derbyint.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyInt", "INTEGER")); + this.field_derbychar.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyChar", "CHAR")); this.field_derbyfloat.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyFloat", "FLOAT")); this.field_derbydouble.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyDouble", "DOUBLE")); this.field_derbylong.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyLong", "BIGINT")); @@ -979,35 +959,20 @@ this.field_derbyboolean.setText(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).get("derbyBoolean", "SMALLINT(1)")); } + /** + * TODO cleanup.. + */ + void store() { NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("defaultGeneration", this.combo_defaultgeneration.getSelectedItem().toString()); - if(check_varstolowercase.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicVarstolowercase", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicVarstolowercase", false); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicVarstolowercase", check_varstolowercase.isSelected()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicCleanvars", check_cleanvars.isSelected()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicStripbeginningunderscore", check_stripfirstunderscore.isSelected()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicFirstchartolowercase", check_firstchartolowercase.isSelected()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicGeneratejavadoc", check_generatejavadoc.isSelected()); - if(check_cleanvars.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicCleanvars", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicCleanvars", false); - - if(check_stripfirstunderscore.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicStripbeginningunderscore", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicStripbeginningunderscore", false); - - if(check_firstchartolowercase.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicFirstchartolowercase", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicFirstchartolowercase", false); - - if(check_generatejavadoc.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicGeneratejavadoc", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("basicGeneratejavadoc", false); - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("mysqlString", this.field_mysqlstring.getText()); NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("mysqlInt", this.field_mysqlint.getText()); NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("mysqlChar", this.field_mysqlchar.getText()); @@ -1020,31 +985,14 @@ NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("mysqlTimestamp", this.field_mysqltimestamp.getText()); NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("mysqlYear", this.field_mysqlyear.getText()); NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("mysqlBoolean", this.field_mysqlboolean.getText()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("Addnotnull", check_addnotnull.isSelected()); + + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("codeModifier", this.field_codemodifier.getText()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeStatic", check_codestatic.isSelected()); - if(check_addnotnull.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("Addnotnull", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("Addnotnull", false); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeCloseconnection", check_codecloseconnection.isSelected()); + NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeGeneratekeys", check_codegeneratekeys.isSelected()); - - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("codeModifier", this.field_codemodifier.getText()); - - if(check_codestatic.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeStatic", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeStatic", false); - - - if(check_codecloseconnection.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeCloseconnection", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeCloseconnection", false); - - if(check_codegeneratekeys.isSelected()) - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeGeneratekeys", true); - else - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).putBoolean("codeGeneratekeys", false); - NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("postgresqlString", this.field_postgresqlstring.getText()); NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("postgresqlInt", this.field_postgresqlint.getText()); NbPreferences.forModule(SQLGeneratorOptionsPanel.class).put("postgresqlChar", this.field_postgresqlchar.getText()); @@ -1165,9 +1113,6 @@ private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; - private javax.swing.JSeparator jSeparator1; - private javax.swing.JSeparator jSeparator2; - private javax.swing.JSeparator jSeparator3; private javax.swing.JTabbedPane pane_options; private javax.swing.JPanel panel_basic; private javax.swing.JPanel panel_derby; Modified: trunk/src/de/acyrance/nb/sqlgenerator/SqlGeneratorAction.java =================================================================== --- trunk/src/de/acyrance/nb/sqlgenerator/SqlGeneratorAction.java 2010-08-28 09:54:11 UTC (rev 5) +++ trunk/src/de/acyrance/nb/sqlgenerator/SqlGeneratorAction.java 2010-08-28 10:34:54 UTC (rev 6) @@ -26,6 +26,7 @@ import com.sun.source.tree.ClassTree; import com.sun.source.util.TreePathScanner; import de.acyrance.nb.sqlgenerator.Configuration.GeneratorConfiguration; +import de.acyrance.nb.sqlgenerator.Configuration.SQLGeneratorOptionsPanel; import de.acyrance.nb.sqlgenerator.Fields.CleanFields; import de.acyrance.nb.sqlgenerator.Fields.FieldObj; import de.acyrance.nb.sqlgenerator.Registry.SQLRegistry; @@ -47,6 +48,7 @@ import org.openide.filesystems.FileObject; import org.openide.loaders.DataObject; import org.openide.util.Exceptions; +import org.openide.util.NbPreferences; public final class SqlGeneratorAction implements ActionListener { @@ -143,7 +145,7 @@ SQLRegistry.uncleanedVars = vars; - if(GeneratorConfiguration.CLEAN_VARS) { + if(NbPreferences.forModule(SQLGeneratorOptionsPanel.class).getBoolean("basicCleanvars", true)) { // Should always be true vars = CleanFields.cleanFields(vars); } Modified: trunk/src/de/acyrance/nb/sqlgenerator/connect.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |