This is an automated email from the git hooks/post-receive script. New commit to branch feature/editor in repository eugene. See https://gitlab.nuiton.org/nuiton/eugene.git commit 0fe5926fa96b6b430a4fa60fd2f66d4da0a087d2 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Oct 2 19:19:06 2016 +0200 use nuiton-config 3.0 + last stable of jaxx --- eugene-editor-maven-plugin/pom.xml | 46 ++++----- .../src/main/config/EugeneEditor.toml | 11 +++ .../config/EugeneEditorConfigOption.java | 103 --------------------- .../application/ui/content/ContentUIHandler.java | 6 +- .../eugene/editor/plugin/EugeneEditorMojo.java | 11 +-- pom.xml | 28 +++--- 6 files changed, 57 insertions(+), 148 deletions(-) diff --git a/eugene-editor-maven-plugin/pom.xml b/eugene-editor-maven-plugin/pom.xml index 27ecd26..8c2a888 100644 --- a/eugene-editor-maven-plugin/pom.xml +++ b/eugene-editor-maven-plugin/pom.xml @@ -246,14 +246,15 @@ <plugin> <artifactId>maven-plugin-plugin</artifactId> - <configuration> - <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> - </configuration> <executions> <execution> + <id>default-descriptor</id> + <phase>process-classes</phase> + </execution> + <execution> + <id>help-goal</id> <goals> <goal>helpmojo</goal> - <goal>descriptor</goal> </goals> </execution> </executions> @@ -265,17 +266,17 @@ <plugins> <!-- expose new plexus components --> - <plugin> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-component-metadata</artifactId> - <executions> - <execution> - <goals> - <goal>generate-metadata</goal> - </goals> - </execution> - </executions> - </plugin> + <!--<plugin>--> + <!--<groupId>org.codehaus.plexus</groupId>--> + <!--<artifactId>plexus-component-metadata</artifactId>--> + <!--<executions>--> + <!--<execution>--> + <!--<goals>--> + <!--<goal>generate-metadata</goal>--> + <!--</goals>--> + <!--</execution>--> + <!--</executions>--> + <!--</plugin>--> <plugin> <groupId>org.codehaus.mojo</groupId> @@ -296,9 +297,8 @@ </plugin> <plugin> - <groupId>${project.groupId}</groupId> - <artifactId>eugene-maven-plugin</artifactId> - <version>${project.version}</version> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-config-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> @@ -306,9 +306,11 @@ <configuration> <modelName>EugeneEditor</modelName> <packageName>org.nuiton.eugene.editor.application.config</packageName> + <!-- FIXME-tchemit error with m-plugin-p ! find out why. --> + <useNuitonI18n>false</useNuitonI18n> </configuration> <goals> - <goal>generate-config</goal> + <goal>generate</goal> </goals> </execution> </executions> @@ -476,7 +478,9 @@ <executions> <execution> <phase>compile</phase> - <goals><goal>run</goal></goals> + <goals> + <goal>run</goal> + </goals> <configuration> <sourceDirectory>${sourceDirectory}</sourceDirectory> <generatedSourceDirectory>${sourceDirectory}</generatedSourceDirectory> @@ -487,7 +491,7 @@ <dependency> <groupId>org.nuiton.topia</groupId> <artifactId>topia-templates</artifactId> - <version>3.1.3</version> + <version>3.2-SNAPSHOT</version> <scope>compile</scope> </dependency> </dependencies> diff --git a/eugene-editor-maven-plugin/src/main/config/EugeneEditor.toml b/eugene-editor-maven-plugin/src/main/config/EugeneEditor.toml new file mode 100644 index 0000000..229a083 --- /dev/null +++ b/eugene-editor-maven-plugin/src/main/config/EugeneEditor.toml @@ -0,0 +1,11 @@ +description = "eugene.editor.config" +[[options]] +name = "workingDirectory" +key = "eugene.editor.working.directory" +type = "file" +description = "eugene.editor.config.workingDirectory.description" +[[options]] +name = "modelExtensionFile" +key = "eugene.editor.modelExtensionFile" +type = "file" +description = "eugene.editor.config.modelExtensionFile.description" \ No newline at end of file diff --git a/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/config/EugeneEditorConfigOption.java b/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/config/EugeneEditorConfigOption.java deleted file mode 100644 index 2ce2930..0000000 --- a/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/config/EugeneEditorConfigOption.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.nuiton.eugene.editor.application.config; - -import org.nuiton.config.ApplicationConfig; -import org.nuiton.config.ConfigOptionDef; - -import java.io.File; - -import static org.nuiton.i18n.I18n.n; - -/** - * Created on 15/09/16. - * - * @author Tony Chemit - chemit@codelutin.com - */ -public enum EugeneEditorConfigOption implements ConfigOptionDef { - - /** le nom du fichier de configuration (sans le prefix .) */ - CONFIG_FILE( - String.class, ApplicationConfig.CONFIG_FILE_NAME, - n("eugene.editor.config.configFileName.description"), - null - ), - /** le repertoire de stoquage local */ - WORKING_DIRECTORY( - File.class, "eugene.editor.working.directory", - n("eugene.editor.config.workingDirectory.description"), - null - ), - /** le repertoire de stoquage local */ - MODEL_EXTENSION_FILE( - File.class, "eugene.editor.modelExtensionFile", - n("eugene.editor.config.modelExtensionFile.description"), - null - ); - - - /** - * Clef qui represente l'option (c'est celle enregistrée dans le fichier de - * configuration). - */ - protected final String key; - - /** Clef i18n de description de l'option */ - protected final String description; - - /** Type de l'option */ - protected final Class<?> type; - - /** Valeur par défaut de l'option */ - protected String defaultValue; - - EugeneEditorConfigOption(Class<?> type, String key, String description, String defaultValue) { - this.key = key; - this.description = description; - this.type = type; - this.defaultValue = defaultValue; - } - - @Override - public String getKey() { - return key; - } - - @Override - public String getDescription() { - return description; - } - - @Override - public Class<?> getType() { - return type; - } - - @Override - public String getDefaultValue() { - return defaultValue; - } - - @Override - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - public boolean isTransient() { - // pour le moment on ne sauvegarde rien - return true; - } - - @Override - public void setTransient(boolean b) { - } - - @Override - public boolean isFinal() { - return false; - } - - @Override - public void setFinal(boolean b) { - } - -} diff --git a/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/ui/content/ContentUIHandler.java b/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/ui/content/ContentUIHandler.java index 48bd69f..d77b240 100644 --- a/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/ui/content/ContentUIHandler.java +++ b/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/application/ui/content/ContentUIHandler.java @@ -20,8 +20,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static org.nuiton.i18n.I18n.t; - /** * Created on 16/09/16. * @@ -100,7 +98,7 @@ public abstract class ContentUIHandler<X extends WithStereotypes & WithTagValues String stereotype = entry.getKey(); JCheckBox b = new JCheckBox(); b.setText(stereotype); - b.setToolTipText(t(entry.getValue().getI18nDocumentationKey())); + b.setToolTipText(entry.getValue().getDescription()); stereotypes.add(b); $objectMap.put("stereotype-" + stereotype, b); } @@ -120,7 +118,7 @@ public abstract class ContentUIHandler<X extends WithStereotypes & WithTagValues String tagValue = entry.getKey(); JLabel label = new JLabel(tagValue); $objectMap.put("tagValue-" + tagValue, field); - label.setToolTipText(t(entry.getValue().getI18nDocumentationKey())); + label.setToolTipText(entry.getValue().getDescription()); label.setLabelFor(field); tagValues.add(label); diff --git a/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/plugin/EugeneEditorMojo.java b/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/plugin/EugeneEditorMojo.java index 823c537..c8237bd 100644 --- a/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/plugin/EugeneEditorMojo.java +++ b/eugene-editor-maven-plugin/src/main/java/org/nuiton/eugene/editor/plugin/EugeneEditorMojo.java @@ -64,8 +64,6 @@ public class EugeneEditorMojo extends AbstractPlugin { @Component(hint = "xmlobjectmodel") protected ModelReader modelReader; protected ObjectModel model; - protected AggregateTagValueMetadatasProvider tagValueMetadatasProvider; - protected AggregateStereotypeMetadatasProvider stereotypeMetadatasProvider; protected ClassLoader contextClassLoader; protected URLClassLoader classLoader; /** @@ -90,12 +88,7 @@ public class EugeneEditorMojo extends AbstractPlugin { contextClassLoader = Thread.currentThread().getContextClassLoader(); classLoader = initClassLoader(getProject(), generatedSourceDirectory, true, false, false, true, true); - tagValueMetadatasProvider = new AggregateTagValueMetadatasProvider(tagValueMetadatasProviders); - stereotypeMetadatasProvider = new AggregateStereotypeMetadatasProvider(stereotypeMetadatasProviders); - modelReader.setVerbose(verbose); - modelReader.setTagValueMetadatasProvider(tagValueMetadatasProvider); - modelReader.setStereotypeMetadatasProvider(stereotypeMetadatasProvider); File[] files = generatedSourceDirectory.listFiles(f -> f.getName().endsWith(".objectmodel")); if (files != null) { @@ -131,8 +124,8 @@ public class EugeneEditorMojo extends AbstractPlugin { EugeneEditorApplicationContext applicationContext = new EugeneEditorApplicationContext( config, classLoader, - tagValueMetadatasProvider, - stereotypeMetadatasProvider, + new AggregateTagValueMetadatasProvider(tagValueMetadatasProviders), + new AggregateStereotypeMetadatasProvider(stereotypeMetadatasProviders), model); JAXXInitialContext ctx = new JAXXInitialContext().add(applicationContext); diff --git a/pom.xml b/pom.xml index ce482c2..c81df99 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,8 @@ <http://www.gnu.org/licenses/lgpl-3.0.html>. #L% --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -120,7 +121,6 @@ <modules> <module>eugene</module> - <module>eugene-config-templates</module> <module>eugene-java-templates</module> <module>eugene-plantuml-templates</module> <module>eugene-yaml-templates</module> @@ -141,8 +141,9 @@ <ciViewId>Eugene</ciViewId> <processorPluginVersion>1.3</processorPluginVersion> - <nuitonUtilsVersion>3.0-SNAPSHOT</nuitonUtilsVersion> + <nuitonUtilsVersion>3.0-rc-15</nuitonUtilsVersion> <nuitonI18nVersion>3.6.2</nuitonI18nVersion> + <nuitonConfigVersion>3.0</nuitonConfigVersion> <plantumlVersion>8047</plantumlVersion> <snakeyamlVersion>1.17</snakeyamlVersion> <antlr4Version>4.5</antlr4Version> @@ -154,11 +155,10 @@ <plexusPluginVersion>1.3.8</plexusPluginVersion> <doxiaVersion>1.6</doxiaVersion> <mavenVersion>3.3.9</mavenVersion> - <jaxxVersion>2.33-SNAPSHOT</jaxxVersion> + <jaxxVersion>2.33</jaxxVersion> <i18nVersion>3.6.2</i18nVersion> <swingXVersion>1.6.5-1</swingXVersion> - - <ciViewId>Eugene</ciViewId> + <javaVersion>1.7</javaVersion> <signatureArtifactId>java17</signatureArtifactId> <signatureVersion>1.0</signatureVersion> @@ -218,7 +218,7 @@ <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-config</artifactId> - <version>3.0-rc-4</version> + <version>${nuitonConfigVersion}</version> </dependency> <dependency> @@ -587,8 +587,8 @@ </plugin> <plugin> - <groupId>org.nuiton.i18n</groupId> - <artifactId>i18n-maven-plugin</artifactId> + <groupId>org.nuiton.i18n</groupId> + <artifactId>i18n-maven-plugin</artifactId> <version>${i18nVersion}</version> </plugin> <plugin> @@ -597,6 +597,12 @@ <version>${jaxxVersion}</version> </plugin> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-config-maven-plugin</artifactId> + <version>${nuitonConfigVersion}</version> + </plugin> + </plugins> </pluginManagement> <extensions> @@ -633,12 +639,12 @@ <tasks> <copy todir="target/site/xsd/v1" verbose="${maven.verbose}" failonerror="false" overwrite="true"> <fileset dir="${basedir}/eugene/src/main/resources/xsd"> - <include name="**/*.xsd" /> + <include name="**/*.xsd"/> </fileset> </copy> <copy todir="target/site/dtd/v1" verbose="${maven.verbose}" failonerror="false" overwrite="true"> <fileset dir="${basedir}/eugene/src/main/resources/dtd"> - <include name="**/*.dtd" /> + <include name="**/*.dtd"/> </fileset> </copy> </tasks> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.