Eugene-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
January 2011
- 2 participants
- 16 discussions
26 Jan '11
Author: tchemit
Date: 2011-01-26 13:45:00 +0100 (Wed, 26 Jan 2011)
New Revision: 1034
Url: http://nuiton.org/repositories/revision/eugene/1034
Log:
Evolution #1248: Remove deprecated extensions in 2.3
Removed:
trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManager.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManagerExtension.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManager.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManagerExtension.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManager.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManagerExtension.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManager.java
trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManagerExtension.java
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManager.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManager.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManager.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,90 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.eugene.java;
-
-import org.nuiton.eugene.models.object.ObjectModelElement;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * To manage annotations for any {@link ObjectModelElement} of a classifier.
- * <p/>
- * Created: 17 déc. 2009
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @version $Revision$
- * @since 2.0.0
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.AnnotationsManager}
- */
-@Deprecated
-public class AnnotationsManager {
-
- private static final String[] EMPTY_STRING_ARRAY = new String[]{};
-
- protected Map<ObjectModelElement, List<String>> annotations;
-
- /**
- * Add the {@code annotation} for the given {@code element} of
- * the classifier.
- *
- * @param element the element where to register the annotation
- * @param annotation the annotation to register
- */
- public void addAnnotation(ObjectModelElement element, String annotation) {
- Map<ObjectModelElement, List<String>> map = getAnnotations();
- List<String> list = map.get(element);
- if (list == null) {
- list = new ArrayList<String>();
- map.put(element, list);
- }
- list.add(annotation);
- }
-
- /**
- * Obtain the array of annotations registred for a given element of
- * the classifier.
- *
- * @param element the element where to search for annotations
- * @return the annotations for the element (empty arry if none found
- */
- public String[] getAnnotations(ObjectModelElement element) {
- Map<ObjectModelElement, List<String>> map = getAnnotations();
- List<String> list = map.get(element);
- return list == null ? EMPTY_STRING_ARRAY :
- list.toArray(new String[list.size()]);
- }
-
- protected Map<ObjectModelElement, List<String>> getAnnotations() {
- if (annotations == null) {
- annotations = new HashMap<ObjectModelElement, List<String>>();
- }
- return annotations;
- }
-
-}
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManagerExtension.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManagerExtension.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/AnnotationsManagerExtension.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,111 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.eugene.java;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.eugene.models.object.ObjectModelClassifier;
-import org.nuiton.eugene.models.object.ObjectModelElement;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Created: 17 déc. 2009
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @version $Revision$
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.AnnotationsManagerExtension}
- */
-@Deprecated
-public class AnnotationsManagerExtension {
-
- private static final Log log = LogFactory.getLog(AnnotationsManagerExtension.class);
-
- /**
- * Extension static used to identify AnnotationsManagerExtension in
- * ObjectModel.
- */
- public static final String OBJECTMODEL_EXTENSION = "annotations";
-
- /**
- * Map of AnotationsManager with key equals to the classifier qualified
- * name associated to the AnotationsManager
- */
- protected Map<String, AnnotationsManager> managers;
-
- private static final String[] EMPTY_STRING_ARRAY = new String[]{};
-
- /**
- * Get the registred annotations for the given {@code element} in the
- * given {@code classifier}.
- *
- * <b>Note:</b> The method always returns a {@code none null} value, but
- * an empty array when no annotation when no annotation found for the
- * element.
- *
- * @param classifier the classifier where is the element
- * @param element the element on which searching annotations
- * @return the array of annotation registred or an empty array if none.
- */
- public String[] getAnnotations(ObjectModelClassifier classifier,
- ObjectModelElement element) {
- AnnotationsManager annotationsManager = getManager(classifier);
- String[] result = null;
- if (annotationsManager != null) {
- result = annotationsManager.getAnnotations(element);
- }
- return result == null ? EMPTY_STRING_ARRAY : result;
- }
-
- /**
- * Get the AnotationsManager associated to the classifier. If not exist,
- * it will be created.
- *
- * @param classifier reference for the AnotationsManager
- * @return the annotationsManager associated to the classifier (never null)
- */
- public AnnotationsManager getManager(ObjectModelClassifier classifier) {
- Map<String, AnnotationsManager> managers = getManagers();
- String fqn = classifier.getQualifiedName();
- AnnotationsManager manager = managers.get(fqn);
- if (manager == null) {
- manager = new AnnotationsManager();
- managers.put(fqn, manager);
- if (log.isDebugEnabled()) {
- log.debug("Add new annotationsManager for : " + fqn);
- }
- }
- return manager;
- }
-
- protected Map<String, AnnotationsManager> getManagers() {
- if (managers == null) {
- managers = new HashMap<String, AnnotationsManager>();
- }
- return managers;
- }
-}
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManager.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManager.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManager.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,83 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.eugene.java;
-
-import org.nuiton.eugene.models.object.ObjectModelOperation;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * To manage some verbatim code to inject in operations.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.0.2
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.CodesManager}
- */
-@Deprecated
-public class CodesManager {
-
- private static final String EMPTY_STRING = "";
-
- /** store of codes associated to operations */
- protected Map<ObjectModelOperation, StringBuilder> codes;
-
- /**
- * Add the {@code annotation} for the given {@code element} of
- * the classifier.
- *
- * @param operation the operation on which add the code
- * @param code the code to add
- */
- public void addCode(ObjectModelOperation operation, String code) {
- Map<ObjectModelOperation, StringBuilder> map = getCodes();
-
- StringBuilder buffer = map.get(operation);
- if (buffer == null) {
- buffer = new StringBuilder();
- map.put(operation, buffer);
- }
- buffer.append('\n').append(code);
- }
-
- /**
- * Obtain the codes registred for a given operation of the classifier.
- *
- * @param operation the operation where to search for code
- * @return the code for the operation (empty if none found)
- */
- public String getCode(ObjectModelOperation operation) {
- Map<ObjectModelOperation, StringBuilder> map = getCodes();
- StringBuilder buffer = map.get(operation);
- return buffer == null ? EMPTY_STRING : buffer.toString();
- }
-
- protected Map<ObjectModelOperation, StringBuilder> getCodes() {
- if (codes == null) {
- codes = new HashMap<ObjectModelOperation, StringBuilder>();
- }
- return codes;
- }
-}
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManagerExtension.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManagerExtension.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/CodesManagerExtension.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,115 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-package org.nuiton.eugene.java;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.eugene.models.object.ObjectModelClassifier;
-import org.nuiton.eugene.models.object.ObjectModelOperation;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Object model extensions to manage verbatim code to attzach to operations.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @see CodesManager
- * @since 2.0.2
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.CodesManagerExtension}
- */
-@Deprecated
-public class CodesManagerExtension {
-
- private static final Log log = LogFactory.getLog(CodesManagerExtension.class);
-
- /** Extension static used to identify CodesManagerExtension in ObjectModel */
- public static final String OBJECTMODEL_EXTENSION = "codes";
-
- /**
- * Map of CodesManager with key equals to the classifier qualified name
- * associated to the CodesManager
- */
- protected Map<String, CodesManager> managers;
-
- /**
- * Add the {@code code} for the given {@code operation} of the
- * given {@code classifier}.
- *
- * @param classifier the classifier container of the operation
- * @param operation the operation on which to add the code
- * @param code the code to add for the operation
- */
- public void addcode(ObjectModelClassifier classifier,
- ObjectModelOperation operation,
- String code) {
- CodesManager codesManager = getManager(classifier);
- codesManager.addCode(operation, code);
- }
-
- /**
- * Get body code for a operation of the given classifier.
- * <p/>
- * The CodesManager must be defined in the model.
- *
- * @param classifier reference for the codes
- * @param operation the operation to seek
- * @return the body code of the method
- */
- public String getCode(ObjectModelClassifier classifier,
- ObjectModelOperation operation) {
- CodesManager manager = getManager(classifier);
- return manager.getCode(operation);
- }
-
- /**
- * Get the CodesManager associated to the classifier.
- * <p/>
- * <b>Note:</b> If not exist, it will be created.
- *
- * @param classifier reference for the ImportsManager
- * @return the codesManager associated to the classifier (never null)
- */
- protected CodesManager getManager(ObjectModelClassifier classifier) {
- Map<String, CodesManager> managers = getManagers();
- String fqn = classifier.getQualifiedName();
- CodesManager manager = managers.get(fqn);
- if (manager == null) {
- manager = new CodesManager();
- managers.put(fqn, manager);
- if (log.isDebugEnabled()) {
- log.debug("Add new codesManager for : " + fqn);
- }
- }
- return manager;
- }
-
- protected Map<String, CodesManager> getManagers() {
- if (managers == null) {
- managers = new HashMap<String, CodesManager>();
- }
- return managers;
- }
-}
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManager.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManager.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManager.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,72 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.eugene.java;
-
-import org.nuiton.eugene.GeneratorUtil;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * Manager of constant names.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since ?
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.ConstantsManager}
- */
-@Deprecated
-public class ConstantsManager {
- /**
- * cache of constant name (values) for property name (keys)
- */
- protected Map<String, String> nameToConstant;
-
- /**
- * Obtain a constant nmae from a property name and store it in cache
- * the first time it had to build it.
- *
- * @param propertyName the propertyName to convert
- * @return the equivalent constant name
- */
- public String getConstantName(String propertyName) {
- Map<String, String> map = getNameToConstant();
- if (map.containsKey(propertyName)) {
- return map.get(propertyName);
- }
- // convert propertyName to constant name
- String constantName =
- GeneratorUtil.convertVariableNameToConstantName(propertyName);
- map.put(propertyName,constantName);
- return constantName;
- }
-
- protected Map<String, String> getNameToConstant() {
- if (nameToConstant == null) {
- nameToConstant = new TreeMap<String, String>();
- }
- return nameToConstant;
- }
-}
\ No newline at end of file
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManagerExtension.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManagerExtension.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/ConstantsManagerExtension.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,57 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.eugene.java;
-
-/**
- * @author tchemit <chemit(a)codelutin.com>
- * @since ?
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.ConstantsManagerExtension}
- */
-@Deprecated
-public class ConstantsManagerExtension {
-
- /**
- * Extension static used to identify {@code ConstantsManagerExtension} in
- * ObjectModel
- */
- public static final String OBJECTMODEL_EXTENSION = "constants";
-
- /**
- * the unique manager to use
- */
- protected ConstantsManager manager = new ConstantsManager();
-
- /**
- * Obtain a constant nmae from a property name and store it in cache
- * the first time it had to build it.
- *
- * @param propertyName the propertyName to convert
- * @return the equivalent constant name
- */
- public String getConstantName(String propertyName) {
- return manager.getConstantName(propertyName);
- }
-}
\ No newline at end of file
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManager.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManager.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManager.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,188 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.eugene.java;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Class used in generators that allows to manage easily imports. A first-pass
- * allow to register imports, and in a second-pass, returns the type to use in
- * generated code.
- *
- * @author thimel, chemit
- * @version $Revision$
-
- * @since 2.0.0
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.ImportsManager}
- */
-@Deprecated
-public class ImportsManager {
-
- private static Set<String> primitiveTypes;
-
- static {
- primitiveTypes = new HashSet<String>();
-
- primitiveTypes.add("byte");
- primitiveTypes.add("Byte");
- primitiveTypes.add("short");
- primitiveTypes.add("Short");
- primitiveTypes.add("int");
- primitiveTypes.add("Integer");
- primitiveTypes.add("long");
- primitiveTypes.add("Long");
- primitiveTypes.add("float");
- primitiveTypes.add("Float");
- primitiveTypes.add("double");
- primitiveTypes.add("Double");
-
- primitiveTypes.add("char");
- primitiveTypes.add("Char");
- primitiveTypes.add("String");
-
- primitiveTypes.add("boolean");
- primitiveTypes.add("Boolean");
-
- primitiveTypes.add("void");
-
- }
- private Map<String, String> imports = new HashMap<String, String>();
- private State state = State.FILLING;
-
- /**
- * From the given class, add it to the imports list.
- * @param clazz the class to import
- * @return true if import add was successful
- * @see ImportsManager#addImport(String)
- */
- public boolean addImport(Class<?> clazz) {
- return addImport(clazz.getName());
- }
-
- /**
- * From the given fqn (fully qualified name), add it to the imports list.
- * If there is a conflict adding this import, will return false.
- * If reading of the imports has started, this method will return false,
- * unless type does not need to be imported.
- * @param fqn the fully qualified name to import
- * @return true if import add was successful
- */
- public boolean addImport(String fqn) {
- // if no package don't include it
- if (fqn.indexOf(".") == -1) {
- return true;
- }
-
- // Exclude java.lang classes
- if (fqn == null || fqn.trim().isEmpty() ||
- (fqn.startsWith("java.lang.") && fqn.lastIndexOf(".") == 9)) {
- return true;
- }
- // Exclude primitive types
- if (primitiveTypes.contains(fqn)) {
- return true;
- }
- // Reject generics
- if (fqn.indexOf("<") != -1 || fqn.indexOf(">") != -1) {
- return false;
- }
- String name = fqn.substring(fqn.lastIndexOf(".") + 1);
- String inPlaceFqn = imports.get(name);
- if (inPlaceFqn == null) {
- // Someone has started to read imports, impossible to add some more
- if (state == State.READING) {
- return false;
- } else {
- imports.put(name, fqn);
- return true;
- }
- }
- // if fqn is not the same, return false. Otherwise, no need to override.
- return inPlaceFqn.equals(fqn);
- }
-
- /**
- * Accorging to the already added types, returns the type to write in file.
- * If there is a conflict, returns the fully qualified name, otherwise
- * returns the simple name
- * @param fqn the fully qualified name to add
- * @return the fqn or simple name according to in-place imports
- */
- public String getType(String fqn) {
- boolean importResult = addImport(fqn);
- if (!importResult) {
- // There is a conflict, do not use simple name
- return fqn;
- } else {
- // No conflict, use simple name
- int packageEndIndex = fqn.lastIndexOf(".");
- if (packageEndIndex == -1) {
- return fqn;
- } else {
- return fqn.substring(packageEndIndex + 1);
- }
- }
- }
-
- /**
- * List the imports. This method will remove the useless imports according
- * to the given packageName (no need to import a class in the same package)
- * @param packageName the current package name (to avoid useless imports)
- * @return the imports alphabeticaly sorted
- */
- public List<String> getImports(String packageName) {
- state = State.READING;
- List<String> result = new ArrayList<String>();
- for (String fqn : imports.values()) {
- if (!(fqn.lastIndexOf(".") == packageName.length() &&
- fqn.startsWith(packageName + "."))) {
- result.add(fqn);
- }
- }
- Collections.sort(result);
- return result;
- }
-
- /**
- * Method to reset imports list. If imports has been listed, it becomes back
- * possible to add imports.
- */
- public void clearImports() {
- imports.clear();
- state = State.FILLING;
- }
-
- private enum State {
-
- FILLING, READING
- }
-}
Deleted: trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManagerExtension.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManagerExtension.java 2011-01-26 12:44:37 UTC (rev 1033)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/java/ImportsManagerExtension.java 2011-01-26 12:45:00 UTC (rev 1034)
@@ -1,101 +0,0 @@
-/*
- * #%L
- * EUGene :: EUGene
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2004 - 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.eugene.java;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.eugene.models.object.ObjectModelClassifier;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * ImportsManagerExtension
- *
- * Created: 2 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Extension for ObjectModel to manage imports for all classifiers in the model.
- *
- * @deprecated since 2.3, use now the class {@link org.nuiton.eugene.java.extension.ImportsManagerExtension}
- * */
-@Deprecated
-public class ImportsManagerExtension {
-
- private static final Log log = LogFactory.getLog(ImportsManagerExtension.class);
-
- /**
- * Extension static used to identify ImportsManagerExtension in ObjectModel
- */
- public static final String OBJECTMODEL_EXTENSION = "imports";
-
- /**
- * Map of ImportsManager with key equals to the classifier qualified name associated to
- * the ImportsManager
- */
- protected Map<String, ImportsManager> managers;
-
- /**
- * Get the ImportsManager associated to the classifier. If not exist, it will be created.
- *
- * @param classifier reference for the ImportsManager
- * @return the importsManager associated to the classifier (never null)
- */
- public ImportsManager getManager(ObjectModelClassifier classifier) {
- Map<String, ImportsManager> managers = getManagers();
- String fqn = classifier.getQualifiedName();
- ImportsManager manager = managers.get(fqn);
- if (manager == null) {
- manager = new ImportsManager();
- managers.put(fqn, manager);
- if (log.isDebugEnabled()) {
- log.debug("Add new importsManager for : " + fqn);
- }
- }
- return manager;
- }
-
- /**
- * Get imports for a classifier. The ImportsManager must be defined in the model.
- *
- * @param classifier reference for the imports
- * @return a List of String which contains all imports for the classifier
- */
- public List<String> getImports(ObjectModelClassifier classifier) {
- ImportsManager manager = getManager(classifier);
- return manager.getImports(classifier.getPackageName());
- }
-
- protected Map<String, ImportsManager> getManagers() {
- if (managers == null) {
- managers = new HashMap<String, ImportsManager>();
- }
- return managers;
- }
-}
1
0
Author: tchemit
Date: 2011-01-26 13:44:37 +0100 (Wed, 26 Jan 2011)
New Revision: 1033
Url: http://nuiton.org/repositories/revision/eugene/1033
Log:
Evolution #1245: Updates nuiton-utils to 2.0
Evolution #1246: Updates nuiton-i18n to 2.2
Evolution #1247: Updates mavenpom to 2.4.2
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-01-23 17:29:32 UTC (rev 1032)
+++ trunk/pom.xml 2011-01-26 12:44:37 UTC (rev 1033)
@@ -33,7 +33,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmineAndCentral</artifactId>
- <version>2.4.2-SNAPSHOT</version>
+ <version>2.4.2</version>
</parent>
<artifactId>eugene</artifactId>
@@ -379,8 +379,8 @@
<projectId>eugene</projectId>
<processorPluginVersion>1.1</processorPluginVersion>
- <nuitonUtilsVersion>1.5.2</nuitonUtilsVersion>
- <nuitonI18nVersion>2.0.1</nuitonI18nVersion>
+ <nuitonUtilsVersion>2.0</nuitonUtilsVersion>
+ <nuitonI18nVersion>2.2</nuitonI18nVersion>
<!--Multilanguage maven-site -->
<locales>en,fr</locales>
1
0
Author: tchemit
Date: 2011-01-23 18:29:32 +0100 (Sun, 23 Jan 2011)
New Revision: 1032
Url: http://nuiton.org/repositories/revision/eugene/1032
Log:
Updates to mavenpom 2.4.2
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-01-21 17:22:03 UTC (rev 1031)
+++ trunk/pom.xml 2011-01-23 17:29:32 UTC (rev 1032)
@@ -33,7 +33,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmineAndCentral</artifactId>
- <version>2.4.1</version>
+ <version>2.4.2-SNAPSHOT</version>
</parent>
<artifactId>eugene</artifactId>
1
0
r1031 - in trunk: eugene/src/main/java/org/nuiton/eugene maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin
by tchemit@users.nuiton.org 21 Jan '11
by tchemit@users.nuiton.org 21 Jan '11
21 Jan '11
Author: tchemit
Date: 2011-01-21 18:22:03 +0100 (Fri, 21 Jan 2011)
New Revision: 1031
Url: http://nuiton.org/repositories/revision/eugene/1031
Log:
Evolution #1219: Add documentation for stereotype and tagvalue in the annotation
Modified:
trunk/eugene/src/main/java/org/nuiton/eugene/EugeneStereoTypes.java
trunk/eugene/src/main/java/org/nuiton/eugene/EugeneTagValues.java
trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java
trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java
Modified: trunk/eugene/src/main/java/org/nuiton/eugene/EugeneStereoTypes.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/EugeneStereoTypes.java 2011-01-21 14:45:11 UTC (rev 1030)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/EugeneStereoTypes.java 2011-01-21 17:22:03 UTC (rev 1031)
@@ -48,7 +48,8 @@
* @see JavaBeanTransformer
* @see JavaGeneratorUtil#hasBeanStereotype(ObjectModelClassifier)
*/
- @StereotypeDefinition(target = ObjectModelClassifier.class)
+ @StereotypeDefinition(target = ObjectModelClassifier.class,
+ documentation = "To specify that a class is a JavaBean")
String STEREOTYPE_BEAN = "bean";
/**
@@ -56,7 +57,8 @@
*
* @see GeneratorUtil#hasIndexedStereotype(ObjectModelAttribute)
*/
- @StereotypeDefinition(target = ObjectModelAttribute.class)
+ @StereotypeDefinition(target = ObjectModelAttribute.class,
+ documentation = "To specify that a attribute is indexed")
String STEREOTYPE_INDEXED = "indexed";
/**
@@ -65,7 +67,8 @@
* @see GeneratorUtil#hasOrderedStereotype(ObjectModelAttribute)
* @since 2.3
*/
- @StereotypeDefinition(target = ObjectModelAttribute.class)
+ @StereotypeDefinition(target = ObjectModelAttribute.class,
+ documentation = "To specify that a attribute is ordered")
String STEREOTYPE_ORDERED = "ordered";
}
Modified: trunk/eugene/src/main/java/org/nuiton/eugene/EugeneTagValues.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/EugeneTagValues.java 2011-01-21 14:45:11 UTC (rev 1030)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/EugeneTagValues.java 2011-01-21 17:22:03 UTC (rev 1031)
@@ -32,6 +32,7 @@
import org.nuiton.eugene.models.object.ObjectModelReader;
import static org.nuiton.eugene.ModelPropertiesUtil.TagValueDefinition;
+
/**
* Defines all tag values managed by Eugene.
* <p/>
@@ -54,7 +55,8 @@
* @see ObjectModelReader#loadModelTagValue(ObjectModel, String, String)
* @since 2.3
*/
- @TagValueDefinition(target = {ObjectModel.class})
+ @TagValueDefinition(target = {ObjectModel.class},
+ documentation = "To set the version of the model.")
String TAG_VERSION = "version";
/**
@@ -67,7 +69,8 @@
* @see GeneratorUtil#getDocumentationTagValue(ObjectModelElement)
* @since 2.5
*/
- @TagValueDefinition(target = {ObjectModel.class, ObjectModelElement.class})
+ @TagValueDefinition(target = {ObjectModel.class, ObjectModelElement.class},
+ documentation = "Sets the documentation of a model or any of his elements")
String TAG_DOCUMENTATION = "documentation";
/**
@@ -79,7 +82,8 @@
* @see JavaGeneratorUtil#getConstantPrefixTagValue(ObjectModel, ObjectModelClassifier)
* @since 2.3
*/
- @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class})
+ @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class},
+ documentation = "Sets the prefix of any constant to be generated for the given class")
String TAG_CONSTANT_PREFIX = "constantPrefix";
/**
@@ -91,7 +95,8 @@
* @see JavaGeneratorUtil#getNoPCSTagValue(ObjectModel, ObjectModelClassifier)
* @since 2.3
*/
- @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class})
+ @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class},
+ documentation = "To specify to not generate any propertyChange code for a class or any class of a model")
String TAG_NO_PCS = "noPCS";
/**
@@ -102,6 +107,7 @@
* @see JavaGeneratorUtil#getI18nPrefixTagValue(ObjectModelElement, ObjectModel)
* @since 2.3
*/
- @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class})
+ @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class},
+ documentation = "Sets the i18n prefix to use on I18n keys generated")
String TAG_I18N_PREFIX = "i18n";
}
Modified: trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java 2011-01-21 14:45:11 UTC (rev 1030)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java 2011-01-21 17:22:03 UTC (rev 1031)
@@ -178,6 +178,14 @@
* @return the array of target object model element which can accept the tag value.
*/
Class<?>[] target();
+
+ /**
+ * Obtain the english documentation of the stereotype.
+ *
+ * @return the documentation of the stereotype.
+ * @since 2.3.1
+ */
+ String documentation();
}
/**
@@ -205,6 +213,14 @@
* @return the array of target object model element which can accept the tag value.
*/
Class<?>[] target();
+
+ /**
+ * Obtain the english documentation of the tag value.
+ *
+ * @return the documentation of the tag value.
+ * @since 2.3.1
+ */
+ String documentation();
}
/**
Modified: trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java
===================================================================
--- trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java 2011-01-21 14:45:11 UTC (rev 1030)
+++ trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java 2011-01-21 17:22:03 UTC (rev 1031)
@@ -251,7 +251,8 @@
buffer.append(name);
buffer.append("] targets : '");
buffer.append(toString(value));
- buffer.append('\'');
+ buffer.append("\' : ");
+ buffer.append(((ModelPropertiesUtil.TagValueDefinition) value).documentation());
}
},
stereotype {
@@ -283,7 +284,8 @@
buffer.append(name);
buffer.append("] targets : '");
buffer.append(toString(value));
- buffer.append('\'');
+ buffer.append("\' : ");
+ buffer.append(((ModelPropertiesUtil.StereotypeDefinition) value).documentation());
}
};
1
0
r1030 - in trunk: eugene/src/main/java/org/nuiton/eugene maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin
by tchemit@users.nuiton.org 21 Jan '11
by tchemit@users.nuiton.org 21 Jan '11
21 Jan '11
Author: tchemit
Date: 2011-01-21 15:45:11 +0100 (Fri, 21 Jan 2011)
New Revision: 1030
Url: http://nuiton.org/repositories/revision/eugene/1030
Log:
Evolution #1218: Add stereotypes and tagvalues in the available-data goal
Modified:
trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java
trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java
Modified: trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java
===================================================================
--- trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java 2011-01-21 10:43:29 UTC (rev 1029)
+++ trunk/eugene/src/main/java/org/nuiton/eugene/ModelPropertiesUtil.java 2011-01-21 14:45:11 UTC (rev 1030)
@@ -221,6 +221,8 @@
protected Map<String, TagValueDefinition> tagValueStore;
+ protected Map<String, StereotypeDefinition> stereotypeStore;
+
protected boolean verbose;
protected ModelPropertiesProvider() {
@@ -235,7 +237,7 @@
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
-
+
public abstract void init() throws Exception;
protected void scanStereotypeClass(Class<?> holder) throws IllegalAccessException {
@@ -279,13 +281,11 @@
}
}
- protected Map<String, StereotypeDefinition> stereotypeStore;
-
- protected Map<String, StereotypeDefinition> getStereotypeStore() {
+ public Map<String, StereotypeDefinition> getStereotypeStore() {
return stereotypeStore;
}
- protected Map<String, TagValueDefinition> getTagValueStore() {
+ public Map<String, TagValueDefinition> getTagValueStore() {
return tagValueStore;
}
Modified: trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java
===================================================================
--- trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java 2011-01-21 10:43:29 UTC (rev 1029)
+++ trunk/maven-eugene-plugin/src/main/java/org/nuiton/eugene/plugin/AvailableDataMojo.java 2011-01-21 14:45:11 UTC (rev 1030)
@@ -29,6 +29,7 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import org.nuiton.eugene.ModelPropertiesUtil;
import org.nuiton.eugene.ModelReader;
import org.nuiton.eugene.Template;
import org.nuiton.eugene.models.Model;
@@ -47,12 +48,12 @@
* (otherwise will display all known data types).
* <p/>
*
+ * @author tchemit <chemit(a)codelutin.com>
* @goal available-data
* @requiresProject true
* @requiresDirectInvocation true
* @requiresDependencyResolution test
* @since 2.0.0
- * @author tchemit <chemit(a)codelutin.com>
*/
public class AvailableDataMojo extends AbstractMojo {
@@ -65,7 +66,9 @@
* modeltype,
* modelreader,
* modeltemplate,
- * writer
+ * writer,
+ * stereotype,
+ * tagvalue
* </pre>
* <p/>
* <b>Note:</b> Let empty to display all data types.
@@ -82,18 +85,21 @@
* @component role="org.nuiton.eugene.models.Model"
*/
protected Map<String, Model> modelTypes;
+
/**
* All available writers introspects via plexus
*
* @component role="org.nuiton.eugene.ModelReader"
*/
protected Map<String, ModelReader<?>> modelReaders;
+
/**
* All available templates introspects via plexus
*
* @component role="org.nuiton.eugene.Template"
*/
protected Map<String, Template<?>> modelTemplates;
+
/**
* All available writers introspects via plexus
*
@@ -101,6 +107,14 @@
*/
protected Map<String, ChainedFileWriter> writers;
+ /**
+ * All available model properties providers introspects via plexus
+ *
+ * @component role="org.nuiton.eugene.ModelPropertiesUtil$ModelPropertiesProvider"
+ * @since 2.3.1
+ */
+ protected Map<String, ModelPropertiesUtil.ModelPropertiesProvider> modelPropertiesProviders;
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
StringBuilder buffer = new StringBuilder();
@@ -162,13 +176,7 @@
buffer.append("s : ");
}
for (Map.Entry<String, ?> e : map.entrySet()) {
- String name = e.getKey();
- Object value = e.getValue();
- buffer.append("\n [");
- buffer.append(name);
- buffer.append("] with implementation '");
- buffer.append(data.toString(value));
- buffer.append('\'');
+ data.toString(buffer, e);
}
}
@@ -184,6 +192,7 @@
public Map<String, ?> getData(AvailableDataMojo mojo) {
return mojo.writers;
}
+
@Override
String toString(Object data) {
ChainedFileWriter w = (ChainedFileWriter) data;
@@ -212,6 +221,70 @@
public Map<String, ?> getData(AvailableDataMojo mojo) {
return mojo.modelTemplates;
}
+ },
+ tagvalue {
+ @Override
+ public Map<String, ?> getData(AvailableDataMojo mojo) {
+ return mojo.getModelPropertiesProvider().getTagValueStore();
+ }
+
+ @Override
+ String toString(Object data) {
+ ModelPropertiesUtil.TagValueDefinition d = (ModelPropertiesUtil.TagValueDefinition) data;
+ StringBuilder sb = new StringBuilder();
+ Class<?>[] targets = d.target();
+ for (Class<?> aClass : targets) {
+ sb.append(", ").append(aClass.getSimpleName());
+ }
+ String result = sb.toString();
+ if (targets.length > 0) {
+ result = result.substring(2);
+ }
+ return result;
+ }
+
+ @Override
+ void toString(StringBuilder buffer, Map.Entry<String, ?> e) {
+ String name = e.getKey();
+ Object value = e.getValue();
+ buffer.append("\n [");
+ buffer.append(name);
+ buffer.append("] targets : '");
+ buffer.append(toString(value));
+ buffer.append('\'');
+ }
+ },
+ stereotype {
+ @Override
+ public Map<String, ?> getData(AvailableDataMojo mojo) {
+ return mojo.getModelPropertiesProvider().getStereotypeStore();
+ }
+
+ @Override
+ String toString(Object data) {
+ ModelPropertiesUtil.StereotypeDefinition d = (ModelPropertiesUtil.StereotypeDefinition) data;
+ StringBuilder sb = new StringBuilder();
+ Class<?>[] targets = d.target();
+ for (Class<?> aClass : targets) {
+ sb.append(", ").append(aClass.getSimpleName());
+ }
+ String result = sb.toString();
+ if (targets.length > 0) {
+ result = result.substring(2);
+ }
+ return result;
+ }
+
+ @Override
+ void toString(StringBuilder buffer, Map.Entry<String, ?> e) {
+ String name = e.getKey();
+ Object value = e.getValue();
+ buffer.append("\n [");
+ buffer.append(name);
+ buffer.append("] targets : '");
+ buffer.append(toString(value));
+ buffer.append('\'');
+ }
};
abstract Map<String, ?> getData(AvailableDataMojo mojo);
@@ -219,6 +292,39 @@
String toString(Object data) {
return data.getClass().getName();
}
+
+ void toString(StringBuilder buffer, Map.Entry<String, ?> e) {
+ String name = e.getKey();
+ Object value = e.getValue();
+ buffer.append("\n [");
+ buffer.append(name);
+ buffer.append("] with implementation '");
+ buffer.append(toString(value));
+ buffer.append('\'');
+ }
}
+ protected ModelPropertiesUtil.ModelPropertiesProvider getModelPropertiesProvider() {
+
+ ModelPropertiesUtil.ModelPropertiesProvider provider;
+
+ if (modelPropertiesProviders == null ||
+ modelPropertiesProviders.isEmpty()) {
+
+ // could not find any model properties via plexus
+ // try to obtain them by ServiceLoader
+
+ provider = ModelPropertiesUtil.newStore(
+ getClass().getClassLoader(),
+ false
+ );
+ } else {
+ provider = ModelPropertiesUtil.newStore(
+ modelPropertiesProviders.values(),
+ false
+ );
+ }
+ return provider;
+ }
+
}
1
0
Author: tchemit
Date: 2011-01-21 11:43:29 +0100 (Fri, 21 Jan 2011)
New Revision: 1029
Url: http://nuiton.org/repositories/revision/eugene/1029
Log:
Evolution #1217: Updates Processor to 1.1
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-23 10:27:24 UTC (rev 1028)
+++ trunk/pom.xml 2011-01-21 10:43:29 UTC (rev 1029)
@@ -41,8 +41,8 @@
<modules>
<module>eugene</module>
+ <module>maven-eugene-plugin</module>
<module>ant-eugene-task</module>
- <module>maven-eugene-plugin</module>
</modules>
<dependencyManagement>
@@ -378,7 +378,7 @@
<!-- pour un muli module on doit fixer le projectId -->
<projectId>eugene</projectId>
- <processorPluginVersion>1.0.4</processorPluginVersion>
+ <processorPluginVersion>1.1</processorPluginVersion>
<nuitonUtilsVersion>1.5.2</nuitonUtilsVersion>
<nuitonI18nVersion>2.0.1</nuitonI18nVersion>
1
0