[jaxx] branch develop updated (0dcfa4e -> c7b32ea)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git from 0dcfa4e fixes #3470: Improve the I18n detection new c7b32ea fixes #3471: Use nuiton-utils 3.0-rc-6 and replace old version API clean code The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit c7b32eac6d568d4bc7437022df28dec1aae1471e Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Aug 24 15:16:38 2014 +0200 fixes #3471: Use nuiton-utils 3.0-rc-6 and replace old version API clean code Summary of changes: .../src/main/java/jaxx/compiler/JAXXCompiler.java | 2 - .../swing/config/ConfigCategoryUIHandler.java | 1 - .../swing/config/model/ConfigTableModel.java | 6 +- .../swing/config/model/MyDelegateConfigTest.java | 142 +++++++++++---------- .../swing/config/model/MyInheritedConfigTest.java | 136 +++++++++++--------- jaxx-demo/src/main/java/jaxx/demo/DemoConfig.java | 10 +- .../src/main/java/jaxx/demo/DemoUIHandler.java | 2 + jaxx-demo/src/main/java/jaxx/demo/RunDemo.java | 2 +- .../jaxx/runtime/swing/editor/ClassCellEditor.java | 2 +- .../java/jaxx/runtime/swing/wizard/WizardUI.java | 2 +- jaxx-widgets-extra/pom.xml | 2 +- .../jaxx/widgets/extra/editor/JEditEditor.java | 3 +- pom.xml | 2 +- 13 files changed, 164 insertions(+), 148 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git commit c7b32eac6d568d4bc7437022df28dec1aae1471e Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Aug 24 15:16:38 2014 +0200 fixes #3471: Use nuiton-utils 3.0-rc-6 and replace old version API clean code --- .../src/main/java/jaxx/compiler/JAXXCompiler.java | 2 - .../swing/config/ConfigCategoryUIHandler.java | 1 - .../swing/config/model/ConfigTableModel.java | 6 +- .../swing/config/model/MyDelegateConfigTest.java | 142 +++++++++++---------- .../swing/config/model/MyInheritedConfigTest.java | 136 +++++++++++--------- jaxx-demo/src/main/java/jaxx/demo/DemoConfig.java | 10 +- .../src/main/java/jaxx/demo/DemoUIHandler.java | 2 + jaxx-demo/src/main/java/jaxx/demo/RunDemo.java | 2 +- .../jaxx/runtime/swing/editor/ClassCellEditor.java | 2 +- .../java/jaxx/runtime/swing/wizard/WizardUI.java | 2 +- jaxx-widgets-extra/pom.xml | 2 +- .../jaxx/widgets/extra/editor/JEditEditor.java | 3 +- pom.xml | 2 +- 13 files changed, 164 insertions(+), 148 deletions(-) diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompiler.java b/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompiler.java index 9e8c241..7fe6f46 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompiler.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/JAXXCompiler.java @@ -2057,7 +2057,6 @@ public class JAXXCompiler { } /** - * @return * @since 2.4 * @deprecated since 2.4.1, will be removed in version 3.0, has no effect do not use it... */ @@ -2067,7 +2066,6 @@ public class JAXXCompiler { } /** - * @param needSwingUtil * @since 2.4 * @deprecated since 2.4.1, will be removed in version 3.0, has no effect do not use it... */ diff --git a/jaxx-config/src/main/java/jaxx/runtime/swing/config/ConfigCategoryUIHandler.java b/jaxx-config/src/main/java/jaxx/runtime/swing/config/ConfigCategoryUIHandler.java index bca8ab3..c4fadfc 100644 --- a/jaxx-config/src/main/java/jaxx/runtime/swing/config/ConfigCategoryUIHandler.java +++ b/jaxx-config/src/main/java/jaxx/runtime/swing/config/ConfigCategoryUIHandler.java @@ -27,7 +27,6 @@ import jaxx.runtime.swing.config.model.ConfigTableModel; import jaxx.runtime.swing.config.model.OptionModel; import jaxx.runtime.swing.renderer.ClassTableCellRenderer; import jaxx.runtime.swing.renderer.ColorCellRenderer; -import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/jaxx-config/src/main/java/jaxx/runtime/swing/config/model/ConfigTableModel.java b/jaxx-config/src/main/java/jaxx/runtime/swing/config/model/ConfigTableModel.java index b0aeae1..0a76508 100644 --- a/jaxx-config/src/main/java/jaxx/runtime/swing/config/model/ConfigTableModel.java +++ b/jaxx-config/src/main/java/jaxx/runtime/swing/config/model/ConfigTableModel.java @@ -23,7 +23,7 @@ package jaxx.runtime.swing.config.model; */ import org.apache.commons.lang3.StringUtils; -import org.nuiton.util.converter.ConverterUtil; +import org.nuiton.converter.ConverterUtil; import javax.swing.table.AbstractTableModel; import java.beans.PropertyChangeEvent; @@ -144,9 +144,7 @@ public class ConfigTableModel extends AbstractTableModel { public void destroy() { - if (categoryModel != null) { - categoryModel.destroy(); - } + categoryModel.destroy(); } @Override diff --git a/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyDelegateConfigTest.java b/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyDelegateConfigTest.java index 16a2dff..1bacaa6 100644 --- a/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyDelegateConfigTest.java +++ b/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyDelegateConfigTest.java @@ -68,8 +68,9 @@ public class MyDelegateConfigTest { @Test public void testCreateModel() throws Exception { - builder.createModel(config); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .flushModel(); Assert.assertNotNull(configModel); Assert.assertNotNull(configModel.getApplicationConfig()); } @@ -81,37 +82,36 @@ public class MyDelegateConfigTest { @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase0() throws Exception { - builder.createModel(config); - builder.registerCallBack(null, null, null, null); + builder.createModel(config) + .registerCallBack(null, null, null, null); } @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase1() throws Exception { - builder.createModel(config); - builder.registerCallBack("yo", null, null, null); + builder.createModel(config) + .registerCallBack("yo", null, null, null); } @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase2() throws Exception { - builder.createModel(config); - builder.registerCallBack("yo", "yo description", null, null); + builder.createModel(config) + .registerCallBack("yo", "yo description", null, null); } @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase4() throws Exception { - builder.createModel(config); Runnable callback = new Runnable() { @Override public void run() { } }; - builder.registerCallBack("yo", "yo description", null, callback); + builder.createModel(config) + .registerCallBack("yo", "yo description", null, callback); } @Test public void testRegisterCallback() throws Exception { - builder.createModel(config); Runnable callback = new Runnable() { @Override @@ -119,8 +119,9 @@ public class MyDelegateConfigTest { } }; ImageIcon icon = SwingUtil.createActionIcon("add"); - builder.registerCallBack("yo", "yo description", icon, callback); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder.createModel(config) + .registerCallBack("yo", "yo description", icon, callback) + .flushModel(); Assert.assertNotNull(configModel); Assert.assertNotNull(configModel.getApplicationConfig()); CallBackEntry callBackEntry = @@ -137,21 +138,22 @@ public class MyDelegateConfigTest { @Test(expected = NullPointerException.class) public void testAddCategoryLimitCase1() throws Exception { - builder.createModel(config); - builder.addCategory(null, null); + builder.createModel(config) + .addCategory(null, null); } @Test(expected = NullPointerException.class) public void testAddCategoryLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("", null); + builder.createModel(config) + .addCategory("", null); } @Test public void testAddCategory() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - CategoryModel categoryModel = builder.flushCategory(); + CategoryModel categoryModel = builder + .createModel(config) + .addCategory("cat0", "cat0 label") + .flushCategory(); Assert.assertNotNull(categoryModel); Assert.assertEquals("cat0", categoryModel.category); Assert.assertEquals("cat0 label", categoryModel.categoryLabel); @@ -166,23 +168,24 @@ public class MyDelegateConfigTest { @Test(expected = IllegalStateException.class) public void testAddOptionLimitCase1() throws Exception { - builder.createModel(config); - builder.addOption(null); + builder.createModel(config) + .addOption(null); } @Test(expected = NullPointerException.class) public void testAddOptionLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(null); } @Test public void testAddOption() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyDelegateConfig.Option.LOCALE); - OptionModel optionModel = builder.flushOption(); + OptionModel optionModel = builder + .createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyDelegateConfig.Option.LOCALE) + .flushOption(); Assert.assertNotNull(optionModel); Assert.assertEquals(MyDelegateConfig.Option.LOCALE, optionModel.def); @@ -200,32 +203,33 @@ public class MyDelegateConfigTest { @Test(expected = IllegalStateException.class) public void testSetOptionPropertyNameLimitCase1() throws Exception { - builder.createModel(config); - builder.setOptionPropertyName(null); + builder.createModel(config) + .setOptionPropertyName(null); } @Test(expected = IllegalStateException.class) public void testSetOptionPropertyNameLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.setOptionPropertyName(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .setOptionPropertyName(null); } @Test(expected = NullPointerException.class) public void testSetOptionPropertyNameLimitCase3() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyDelegateConfig.Option.LOCALE); - builder.setOptionPropertyName(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyDelegateConfig.Option.LOCALE) + .setOptionPropertyName(null); } @Test public void testSetOptionPropertyName() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyDelegateConfig.Option.LOCALE); - builder.setOptionPropertyName(MyDelegateConfig.PROPERTY_LOCALE); - OptionModel optionModel = builder.flushOption(); + OptionModel optionModel = builder + .createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyDelegateConfig.Option.LOCALE) + .setOptionPropertyName(MyDelegateConfig.PROPERTY_LOCALE) + .flushOption(); Assert.assertNotNull(optionModel); Assert.assertEquals(MyDelegateConfig.Option.LOCALE, optionModel.def); Assert.assertEquals(MyDelegateConfig.PROPERTY_LOCALE, optionModel.propertyName); @@ -239,34 +243,34 @@ public class MyDelegateConfigTest { @Test(expected = IllegalStateException.class) public void testSetOptionEditorLimitCase1() throws Exception { - builder.createModel(config); - builder.setOptionEditor(null); + builder.createModel(config) + .setOptionEditor(null); } @Test(expected = IllegalStateException.class) public void testSetOptionEditorLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.setOptionEditor(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .setOptionEditor(null); } @Test(expected = NullPointerException.class) public void testSetOptionEditorLimitCase3() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyDelegateConfig.Option.LOCALE); - builder.setOptionEditor(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyDelegateConfig.Option.LOCALE) + .setOptionEditor(null); } @Test public void testSetOptionEditor() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyDelegateConfig.Option.LOCALE); TableCellEditor cellEditor = MyDefaultCellEditor.newBooleanEditor(); - builder.setOptionEditor(cellEditor); - OptionModel optionModel = builder.flushOption(); + OptionModel optionModel = builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyDelegateConfig.Option.LOCALE) + .setOptionEditor(cellEditor) + .flushOption(); Assert.assertNotNull(optionModel); Assert.assertEquals(MyDelegateConfig.Option.LOCALE, optionModel.def); Assert.assertNull(optionModel.propertyName); @@ -275,18 +279,21 @@ public class MyDelegateConfigTest { @Test public void testFlushModel() throws Exception { - builder.createModel(config); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .flushModel(); Assert.assertNotNull(configModel); Assert.assertNull(builder.model); } @Test public void testSaveClassOption() throws Exception { - builder.createModel(config); - builder.addCategory(CATEGORY, "cat0 label"); - builder.addOption(MyDelegateConfig.Option.DEMO_CLASS, MyDelegateConfig.PROPERTY_DEMO_CLASS); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .addCategory(CATEGORY, "cat0 label") + .addOption(MyDelegateConfig.Option.DEMO_CLASS) + .setOptionPropertyName(MyDelegateConfig.PROPERTY_DEMO_CLASS) + .flushModel(); configModel.setCategory(CATEGORY); CategoryModel categoryModel = configModel.getCategoryModel(); @@ -306,10 +313,11 @@ public class MyDelegateConfigTest { @Test public void testSaveColorOption() throws Exception { - builder.createModel(config); - builder.addCategory(CATEGORY, "cat0 label"); - builder.addOption(MyDelegateConfig.Option.DEMO_COLOR); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .addCategory(CATEGORY, "cat0 label") + .addOption(MyDelegateConfig.Option.DEMO_COLOR) + .flushModel(); configModel.setCategory(CATEGORY); CategoryModel categoryModel = configModel.getCategoryModel(); diff --git a/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyInheritedConfigTest.java b/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyInheritedConfigTest.java index cc64323..9442fcb 100644 --- a/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyInheritedConfigTest.java +++ b/jaxx-config/src/test/java/jaxx/runtime/swing/config/model/MyInheritedConfigTest.java @@ -67,8 +67,9 @@ public class MyInheritedConfigTest { @Test public void testCreateModel() throws Exception { - builder.createModel(config); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .flushModel(); Assert.assertNotNull(configModel); Assert.assertNotNull(configModel.getApplicationConfig()); } @@ -80,37 +81,37 @@ public class MyInheritedConfigTest { @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase0() throws Exception { - builder.createModel(config); - builder.registerCallBack(null, null, null, null); + builder.createModel(config) + .registerCallBack(null, null, null, null); } @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase1() throws Exception { - builder.createModel(config); - builder.registerCallBack("yo", null, null, null); + builder.createModel(config) + .registerCallBack("yo", null, null, null); } @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase2() throws Exception { - builder.createModel(config); - builder.registerCallBack("yo", "yo description", null, null); + builder.createModel(config) + .registerCallBack("yo", "yo description", null, null); } @Test(expected = NullPointerException.class) public void testRegisterCallbackLimitCase4() throws Exception { - builder.createModel(config); Runnable callback = new Runnable() { @Override public void run() { } }; - builder.registerCallBack("yo", "yo description", null, callback); + builder.createModel(config) + .registerCallBack("yo", "yo description", null, callback); } @Test public void testRegisterCallback() throws Exception { - builder.createModel(config); + Runnable callback = new Runnable() { @Override @@ -118,8 +119,10 @@ public class MyInheritedConfigTest { } }; ImageIcon icon = SwingUtil.createActionIcon("add"); - builder.registerCallBack("yo", "yo description", icon, callback); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .registerCallBack("yo", "yo description", icon, callback) + .flushModel(); Assert.assertNotNull(configModel); Assert.assertNotNull(configModel.getApplicationConfig()); CallBackEntry callBackEntry = @@ -136,21 +139,22 @@ public class MyInheritedConfigTest { @Test(expected = NullPointerException.class) public void testAddCategoryLimitCase1() throws Exception { - builder.createModel(config); - builder.addCategory(null, null); + builder.createModel(config) + .addCategory(null, null); } @Test(expected = NullPointerException.class) public void testAddCategoryLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("", null); + builder.createModel(config) + .addCategory("", null); } @Test public void testAddCategory() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - CategoryModel categoryModel = builder.flushCategory(); + CategoryModel categoryModel = builder + .createModel(config) + .addCategory("cat0", "cat0 label") + .flushCategory(); Assert.assertNotNull(categoryModel); Assert.assertEquals("cat0", categoryModel.category); Assert.assertEquals("cat0 label", categoryModel.categoryLabel); @@ -165,23 +169,24 @@ public class MyInheritedConfigTest { @Test(expected = IllegalStateException.class) public void testAddOptionLimitCase1() throws Exception { - builder.createModel(config); - builder.addOption(null); + builder.createModel(config) + .addOption(null); } @Test(expected = NullPointerException.class) public void testAddOptionLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(null); } @Test public void testAddOption() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyInheritedConfig.Option.LOCALE); - OptionModel optionModel = builder.flushOption(); + OptionModel optionModel = builder + .createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyInheritedConfig.Option.LOCALE) + .flushOption(); Assert.assertNotNull(optionModel); Assert.assertEquals(MyInheritedConfig.Option.LOCALE, optionModel.def); @@ -205,26 +210,27 @@ public class MyInheritedConfigTest { @Test(expected = IllegalStateException.class) public void testSetOptionPropertyNameLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.setOptionPropertyName(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .setOptionPropertyName(null); } @Test(expected = NullPointerException.class) public void testSetOptionPropertyNameLimitCase3() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyInheritedConfig.Option.LOCALE); - builder.setOptionPropertyName(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyInheritedConfig.Option.LOCALE) + .setOptionPropertyName(null); } @Test public void testSetOptionPropertyName() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyInheritedConfig.Option.LOCALE); - builder.setOptionPropertyName(MyInheritedConfig.PROPERTY_LOCALE); - OptionModel optionModel = builder.flushOption(); + OptionModel optionModel = builder + .createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyInheritedConfig.Option.LOCALE) + .setOptionPropertyName(MyInheritedConfig.PROPERTY_LOCALE) + .flushOption(); Assert.assertNotNull(optionModel); Assert.assertEquals(MyInheritedConfig.Option.LOCALE, optionModel.def); Assert.assertEquals(MyInheritedConfig.PROPERTY_LOCALE, optionModel.propertyName); @@ -244,28 +250,28 @@ public class MyInheritedConfigTest { @Test(expected = IllegalStateException.class) public void testSetOptionEditorLimitCase2() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.setOptionEditor(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .setOptionEditor(null); } @Test(expected = NullPointerException.class) public void testSetOptionEditorLimitCase3() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyInheritedConfig.Option.LOCALE); - builder.setOptionEditor(null); + builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyInheritedConfig.Option.LOCALE) + .setOptionEditor(null); } @Test public void testSetOptionEditor() throws Exception { - builder.createModel(config); - builder.addCategory("cat0", "cat0 label"); - builder.addOption(MyInheritedConfig.Option.LOCALE); TableCellEditor cellEditor = MyDefaultCellEditor.newBooleanEditor(); - builder.setOptionEditor(cellEditor); - OptionModel optionModel = builder.flushOption(); + OptionModel optionModel = builder.createModel(config) + .addCategory("cat0", "cat0 label") + .addOption(MyInheritedConfig.Option.LOCALE) + .setOptionEditor(cellEditor) + .flushOption(); Assert.assertNotNull(optionModel); Assert.assertEquals(MyInheritedConfig.Option.LOCALE, optionModel.def); Assert.assertNull(optionModel.propertyName); @@ -274,8 +280,9 @@ public class MyInheritedConfigTest { @Test public void testFlushModel() throws Exception { - builder.createModel(config); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .flushModel(); Assert.assertNotNull(configModel); Assert.assertNull(builder.model); } @@ -295,10 +302,12 @@ public class MyInheritedConfigTest { @Test public void testSaveClassOption() throws Exception { - builder.createModel(config); - builder.addCategory(CATEGORY, "cat0 label"); - builder.addOption(MyDelegateConfig.Option.DEMO_CLASS, MyDelegateConfig.PROPERTY_DEMO_CLASS); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .addCategory(CATEGORY, "cat0 label") + .addOption(MyDelegateConfig.Option.DEMO_CLASS) + .setOptionPropertyName(MyDelegateConfig.PROPERTY_DEMO_CLASS) + .flushModel(); configModel.setCategory(CATEGORY); CategoryModel categoryModel = configModel.getCategoryModel(); Assert.assertNotNull(categoryModel); @@ -316,10 +325,11 @@ public class MyInheritedConfigTest { @Test public void testSaveColorOption() throws Exception { - builder.createModel(config); - builder.addCategory(CATEGORY, "cat0 label"); - builder.addOption(MyDelegateConfig.Option.DEMO_COLOR); - ConfigUIModel configModel = builder.flushModel(); + ConfigUIModel configModel = builder + .createModel(config) + .addCategory(CATEGORY, "cat0 label") + .addOption(MyDelegateConfig.Option.DEMO_COLOR) + .flushModel(); configModel.setCategory(CATEGORY); CategoryModel categoryModel = configModel.getCategoryModel(); diff --git a/jaxx-demo/src/main/java/jaxx/demo/DemoConfig.java b/jaxx-demo/src/main/java/jaxx/demo/DemoConfig.java index 9d3ddcc..24afcf2 100644 --- a/jaxx-demo/src/main/java/jaxx/demo/DemoConfig.java +++ b/jaxx-demo/src/main/java/jaxx/demo/DemoConfig.java @@ -31,8 +31,8 @@ import org.jdesktop.beans.AbstractBean; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ArgumentsParserException; import org.nuiton.config.ConfigOptionDef; -import org.nuiton.util.Version; -import org.nuiton.util.VersionUtil; +import org.nuiton.util.version.Version; +import org.nuiton.util.version.Versions; import javax.swing.KeyStroke; import java.awt.Color; @@ -116,10 +116,10 @@ public class DemoConfig extends AbstractBean implements Supplier<ApplicationConf applicationConfig.loadDefaultOptions(Option.values()); + String sVersion = applicationConfig.getOption("application.version"); + Version version = Versions.valueOf(sVersion); // on supprime le stamp de snapshot s'il existe - String sVersion = VersionUtil.removeSnapshot( - applicationConfig.getOption("application.version")); - Version version = VersionUtil.valueOf(sVersion); + version = Versions.removeSnapshot(version); applicationConfig.setDefaultOption("version", version.getVersion()); installSaveUserAction(PROPERTY_FULLSCREEN, diff --git a/jaxx-demo/src/main/java/jaxx/demo/DemoUIHandler.java b/jaxx-demo/src/main/java/jaxx/demo/DemoUIHandler.java index f50b8ef..8865a8c 100644 --- a/jaxx-demo/src/main/java/jaxx/demo/DemoUIHandler.java +++ b/jaxx-demo/src/main/java/jaxx/demo/DemoUIHandler.java @@ -147,6 +147,8 @@ public class DemoUIHandler implements UIHandler<DemoUI>{ JPanel mainPane = ui.getMainPane(); mainPane.getActionMap().put(OPEN_CONFIG_ACTION, new AbstractAction() { + private static final long serialVersionUID = 1L; + @Override public void actionPerformed(ActionEvent e) { showConfig(ui); diff --git a/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java b/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java index d4afb0c..ddfe7de 100644 --- a/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java +++ b/jaxx-demo/src/main/java/jaxx/demo/RunDemo.java @@ -46,7 +46,7 @@ public class RunDemo { /** Logger */ private static Log log = LogFactory.getLog(RunDemo.class); - public static void main(String[] args) { + public static void main(String... args) { long startingTime = System.nanoTime(); log.info("JAXX Demo start at " + new Date() + " args: " + Arrays.toString(args)); diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java b/jaxx-runtime/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java index 6a39140..5b37baf 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java @@ -22,7 +22,7 @@ package jaxx.runtime.swing.editor; import org.apache.commons.beanutils.Converter; -import org.nuiton.util.converter.ConverterUtil; +import org.nuiton.converter.ConverterUtil; import javax.swing.DefaultCellEditor; import javax.swing.JTable; diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUI.java b/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUI.java index c737e6e..fb50ea6 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUI.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUI.java @@ -75,7 +75,7 @@ public interface WizardUI<E extends WizardStep, M extends WizardModel<E>> { /** * Méthode invoquée lorsque l'étape courante a changé dans le modèle. * - * @param newStep l'ancienne étape + * @param oldStep l'ancienne étape * @param newStep la nouvelle étape courante */ void onStepChanged(E oldStep, E newStep); diff --git a/jaxx-widgets-extra/pom.xml b/jaxx-widgets-extra/pom.xml index 0d2921b..49e514c 100644 --- a/jaxx-widgets-extra/pom.xml +++ b/jaxx-widgets-extra/pom.xml @@ -119,7 +119,7 @@ <executions> <execution> <id>create-assemblies</id> - <phase>verify</phase> + <phase>package</phase> <goals> <goal>single</goal> </goals> diff --git a/jaxx-widgets-extra/src/main/java/org/nuiton/jaxx/widgets/extra/editor/JEditEditor.java b/jaxx-widgets-extra/src/main/java/org/nuiton/jaxx/widgets/extra/editor/JEditEditor.java index e1cc009..b82e236 100644 --- a/jaxx-widgets-extra/src/main/java/org/nuiton/jaxx/widgets/extra/editor/JEditEditor.java +++ b/jaxx-widgets-extra/src/main/java/org/nuiton/jaxx/widgets/extra/editor/JEditEditor.java @@ -35,6 +35,7 @@ import javax.swing.event.CaretListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.util.FileUtil; @@ -197,7 +198,7 @@ public class JEditEditor extends JPanel implements EditorInterface, DocumentList @Override public boolean saveAs(File file) { try { - FileUtil.writeString(file, editor.getText(), "utf-8"); + FileUtils.write(file, editor.getText(), "utf-8"); isModified = false; return true; } catch (IOException eee) { diff --git a/pom.xml b/pom.xml index 464ac3b..504b416 100644 --- a/pom.xml +++ b/pom.xml @@ -229,7 +229,7 @@ <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-utils</artifactId> - <version>3.0-rc-5</version> + <version>3.0-SNAPSHOT</version> </dependency> <dependency> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm