This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository eugene. See https://gitlab.nuiton.org/nuiton/eugene.git commit 8485469e2314e012dacb3d5c09550d039e467da9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Oct 8 16:20:22 2016 +0200 remove stereotype report --- eugene-java-templates/pom.xml | 3 +- .../nuiton/eugene/plugin/AbstractEugeneReport.java | 150 --------- .../renderer/AbstractEugeneReportRenderer.java | 338 --------------------- .../main/resources/stereotypes-report.properties | 52 ---- .../resources/stereotypes-report_en.properties | 21 -- .../resources/stereotypes-report_fr.properties | 52 ---- 6 files changed, 1 insertion(+), 615 deletions(-) diff --git a/eugene-java-templates/pom.xml b/eugene-java-templates/pom.xml index d86f56a..631f67e 100644 --- a/eugene-java-templates/pom.xml +++ b/eugene-java-templates/pom.xml @@ -171,7 +171,6 @@ <reportSet> <reports> <report>tag-values-report</report> - <report>stereotypes-report</report> </reports> </reportSet> </reportSets> @@ -187,7 +186,7 @@ <plugin> <groupId>org.nuiton.eugene</groupId> <artifactId>eugene-maven-plugin</artifactId> - <version>3.0-alpha-1</version> + <version>3.0-alpha-7</version> <dependencies> <dependency> <groupId>${project.groupId}</groupId> diff --git a/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/AbstractEugeneReport.java b/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/AbstractEugeneReport.java deleted file mode 100644 index 870233b..0000000 --- a/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/AbstractEugeneReport.java +++ /dev/null @@ -1,150 +0,0 @@ -package org.nuiton.eugene.plugin; - -/* - * #%L - * EUGene :: Maven plugin - * %% - * Copyright (C) 2012 - 2013 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% - */ - -import org.apache.maven.doxia.siterenderer.Renderer; -import org.apache.maven.plugins.annotations.Component; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.project.MavenProject; -import org.apache.maven.reporting.AbstractMavenReport; -import org.apache.maven.reporting.AbstractMavenReportRenderer; -import org.apache.maven.reporting.MavenReportException; -import org.codehaus.plexus.i18n.I18N; - -import java.io.File; -import java.util.Locale; - -/** - * Abstract application config report used by normal and aggregate report. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 2.10 - */ -public abstract class AbstractEugeneReport<D> extends AbstractMavenReport { - - /** - * Report output directory. Note that this parameter is only relevant if the goal is run from the command line or - * from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output - * directory configured in the Maven Site Plugin is used instead. - */ - @Parameter(property = "config.outputDirectory", - defaultValue = "${project.reporting.outputDirectory}", - required = true) - protected File outputDirectory; - - /** - * Report output encoding. Note that this parameter is only relevant if the goal is run from the command line or - * from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output - * encoding configured in the Maven Site Plugin is used instead. - */ - @Parameter(property = "config.outputEncoding", - defaultValue = "${project.reporting.outputEncoding}", - required = true) - protected String outputEncoding; - - /** - * Skip to generate the report. - */ - @Parameter(property = "config.skip") - protected boolean skip; - - /** - * Location of javadoc report. - */ - @Parameter(property = "eugene.javaDocDestDir", defaultValue = "apidocs") - protected String javaDocDestDir; - - /** - * Location of xref report. - */ - @Parameter(property = "eugene.jxrDestDir", defaultValue = "xref") - protected String jxrDestDir; - - /** - * The Maven Project. - */ - @Parameter(defaultValue = "${project}", readonly = true) - protected MavenProject project; - - /** - * Doxia Site Renderer component. - */ - @Component - protected Renderer siteRenderer; - - /** - * Internationalization component. - */ - @Component - protected I18N i18n; - - protected abstract AbstractMavenReportRenderer createRenderer(Locale locale, D data); - - protected abstract D initData(Locale locale) throws MavenReportException; - - @Override - public String getDescription(Locale locale) { - return i18n.getString(getOutputName(), locale, "report.description"); - } - - @Override - public String getName(Locale locale) { - return i18n.getString(getOutputName(), locale, "report.title"); - } - - @Override - public String getCategoryName() { - return CATEGORY_PROJECT_REPORTS; - } - - @Override - public boolean canGenerateReport() { - return !skip; - } - - @Override - protected Renderer getSiteRenderer() { - return siteRenderer; - } - - @Override - protected String getOutputDirectory() { - return outputDirectory.getAbsolutePath(); - } - - @Override - protected MavenProject getProject() { - return project; - } - - @Override - protected void executeReport(Locale locale) throws MavenReportException { - - D data = initData(locale); - - AbstractMavenReportRenderer renderer = createRenderer(locale, data); - renderer.render(); - - } - -} diff --git a/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/renderer/AbstractEugeneReportRenderer.java b/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/renderer/AbstractEugeneReportRenderer.java deleted file mode 100644 index 5a69f35..0000000 --- a/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/renderer/AbstractEugeneReportRenderer.java +++ /dev/null @@ -1,338 +0,0 @@ -package org.nuiton.eugene.plugin.renderer; - -/* - * #%L - * EUGene :: Maven plugin - * %% - * Copyright (C) 2012 - 2013 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% - */ - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.maven.doxia.sink.Sink; -import org.apache.maven.doxia.sink.SinkEventAttributeSet; -import org.apache.maven.doxia.sink.SinkEventAttributes; -import org.apache.maven.reporting.AbstractMavenReportRenderer; -import org.codehaus.plexus.i18n.I18N; -import org.nuiton.eugene.models.object.ObjectModel; -import org.nuiton.eugene.models.object.ObjectModelAttribute; -import org.nuiton.eugene.models.object.ObjectModelClass; -import org.nuiton.eugene.models.object.ObjectModelClassifier; -import org.nuiton.eugene.models.object.ObjectModelElement; -import org.nuiton.eugene.models.object.ObjectModelEnumeration; -import org.nuiton.eugene.models.object.ObjectModelInterface; -import org.nuiton.eugene.models.object.ObjectModelOperation; -import org.nuiton.eugene.models.object.ObjectModelPackage; -import org.nuiton.eugene.models.object.ObjectModelParameter; - -import java.util.Locale; -import java.util.Set; - -/** - * @author Tony Chemit - chemit@codelutin.com - * @since 2.10 - */ -public abstract class AbstractEugeneReportRenderer<D, DD> extends AbstractMavenReportRenderer { - - /** - * Internationalization component. - */ - protected final I18N i18n; - - /** - * The locale we are rendering for. - */ - protected final Locale locale; - - /** - * The name of the bundle containing our I18n resources. - */ - protected final String bundleName; - - /** - * Data to describe. - */ - protected final D data; - - protected final String javaDocDestDir; - - protected final String jxrDestDir; - - protected abstract Set<DD> getDataDetails(); - - protected abstract String getProviderDescription(D data); - - public AbstractEugeneReportRenderer(Sink sink, - I18N i18n, - Locale locale, - String bundleName, - String javaDocDestDir, - String jxrDestDir, - D data) { - super(sink); - this.i18n = i18n; - this.locale = locale; - this.bundleName = bundleName; - this.javaDocDestDir = javaDocDestDir; - this.jxrDestDir = jxrDestDir; - this.data = data; - this.sink = sink; - } - - @Override - public String getTitle() { - return getText("report.title"); - } - - @Override - public void renderBody() { - - String implementation = data.getClass().getName(); - - sink.section1(); - - sink.sectionTitle1(); - sink.text(getText("report.overview.title")); - sink.sectionTitle1_(); - - sink.lineBreak(); - - sink.paragraph(); - sink.text(getText("report.overview.text")); - sink.text(" "); - sink.italic(); - sink.text(getProviderDescription(data)); - sink.italic_(); - sink.bold(); - sink.text(implementation); - sink.bold_(); - sink.text(" "); - sink.link("./" + javaDocDestDir + "/" + implementation.replace('.', '/') + ".html"); - sink.text("javadoc"); - sink.link_(); - sink.link("./" + jxrDestDir + "/" + implementation.replace('.', '/') + ".html"); - sink.text(" "); - sink.text("xref"); - sink.link_(); - sink.text("."); - sink.paragraph_(); - - sink.paragraph(); - sink.link(getEugeneDocLink()); - sink.text(getText("report.overview.more.information")); - sink.link_(); - sink.paragraph_(); - - Set<DD> detailEntries = getDataDetails(); - - renderSummaryTable(data, detailEntries); - - sink.section1_(); - - if (CollectionUtils.isNotEmpty(detailEntries)) { - - sink.section1(); - - sink.sectionTitle1(); - sink.text(getText("report.detail.title")); - sink.sectionTitle1_(); - - sink.lineBreak(); - - sink.paragraph(); - sink.text(getText("report.detail.text")); - sink.paragraph_(); - - for (DD detailEntry : detailEntries) { - - renderDetail(detailEntry); - - } - - sink.section1_(); - - } - - } - - protected abstract String getEugeneDocLink(); - - protected abstract void renderSummaryTable(D provider, Set<DD> detailEntries); - - protected abstract void renderDetail(DD detail); - - protected String getText(boolean key) { - return getText("report." + String.valueOf(key)); - } - - /** - * Gets the localized message for this report. - * - * @param key the message key. - * @return the message. - */ - protected String getText(String key) { - return i18n.getString(bundleName, locale, key); - } - - protected void renderWarningIcon() { - sink.figure(); - sink.figureGraphics("images/icon_warning_sml.gif"); - sink.figure_(); - } - - protected void renderErrorIcon() { - sink.figure(); - sink.figureGraphics("images/icon_error_sml.gif"); - sink.figure_(); - } - - protected void renderSuccessIcon() { - sink.figure(); - sink.figureGraphics("images/icon_success_sml.gif"); - sink.figure_(); - } - - protected void renderInfoIcon() { - sink.figure(); - sink.figureGraphics("images/icon_info_sml.gif"); - sink.figure_(); - } - - protected void sinkHeaderCellText(String text) { - sink.tableHeaderCell(); - sink.text(text); - sink.tableHeaderCell_(); - } - - protected void sinkHeaderCellText(SinkEventAttributes width, String text) { - sink.tableHeaderCell(width); - sink.text(text); - sink.tableHeaderCell_(); - } - - protected void sinkCellText(SinkEventAttributes width, String text) { - sink.tableCell(width); - sink.text(text); - sink.tableCell_(); - } - - protected void sinkCellText(String text) { - sink.tableCell(); - sink.text(text); - sink.tableCell_(); - } - - protected void sinkCellVerbatimText(String text) { - sink.tableCell(); - sink.verbatim(SinkEventAttributeSet.MONOSPACED); - sink.text(text); - sink.verbatim_(); - sink.tableCell_(); - } - - protected void sinkCellLink(String text, String url) { - sink.tableCell(); - sink.link(url); - sink.text(text); - sink.link_(); - sink.tableCell_(); - } - - protected void renderTargets(Set<Class<?>> targets) { - - boolean moreThanOne = targets.size() > 1; - - if (moreThanOne) { - - sink.list_(); - - } - - for (Class<?> target : targets) { - - if (moreThanOne) { - - sink.listItem(); - - } - - renderDetailTarget(target); - - if (moreThanOne) { - - sink.listItem_(); - - } - - } - - if (moreThanOne) { - - sink.list_(); - - } - - } - - protected void renderDetailTarget(Class<?> target) { - - if (ObjectModel.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.model")); - - } else if (ObjectModelPackage.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.package")); - - } else if (ObjectModelClassifier.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.classifier")); - - } else if (ObjectModelClass.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.class")); - - } else if (ObjectModelInterface.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.interface")); - - } else if (ObjectModelEnumeration.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.enumeration")); - - } else if (ObjectModelAttribute.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.attribute")); - - } else if (ObjectModelParameter.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.parameter")); - - } else if (ObjectModelOperation.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.operation")); - - } else if (ObjectModelElement.class.isAssignableFrom(target)) { - - sink.text(getText("report.detail.target.element")); - - } - - } - -} diff --git a/eugene-maven-plugin/src/main/resources/stereotypes-report.properties b/eugene-maven-plugin/src/main/resources/stereotypes-report.properties deleted file mode 100644 index 27e6139..0000000 --- a/eugene-maven-plugin/src/main/resources/stereotypes-report.properties +++ /dev/null @@ -1,52 +0,0 @@ -### -# #%L -# EUGene :: Maven plugin -# %% -# Copyright (C) 2006 - 2014 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% -### -report.title=EUGene Stereotypes -report.description=Provides details of stereotypes available in a given class -report.overview.title=Overview -report.overview.text=This report summarizes all stereotypes available ith the class -report.overview.more.information=More information about Stereotypes in EUGene -tagValueProvider.not.found=Could not find stereotype provider named ''{0}'' - -report.detail.title=Detail of stereotype -report.detail.text=We give details of each stereotype - -report.summary.stereotypes=Stereotypes found -report.noStereotypes=No stereotype defined in this provider. -report.stereotype.name=Name -report.stereotype.description=Description -report.stereotype.target=Target(s) - -report.detail.stereotype.title=Stereotype -report.detail.stereotype.name=Name -report.detail.stereotype.description=Description -report.detail.stereotype.target=Target(s) -report.detail.target.model=on a model -report.detail.target.package=on a package -report.detail.target.classifier=on a classifier -report.detail.target.class=on a class -report.detail.target.interface=on a interface -report.detail.target.enumeration=on a enumeration -report.detail.target.attribute=on a attribute -report.detail.target.parameter=on a parameter -report.detail.target.operation=on a operation -report.detail.target.element=on a element -report.detail.stereotype.usage.title=Usage diff --git a/eugene-maven-plugin/src/main/resources/stereotypes-report_en.properties b/eugene-maven-plugin/src/main/resources/stereotypes-report_en.properties deleted file mode 100644 index 4745c8a..0000000 --- a/eugene-maven-plugin/src/main/resources/stereotypes-report_en.properties +++ /dev/null @@ -1,21 +0,0 @@ -### -# #%L -# EUGene :: Maven plugin -# %% -# Copyright (C) 2006 - 2014 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% -### diff --git a/eugene-maven-plugin/src/main/resources/stereotypes-report_fr.properties b/eugene-maven-plugin/src/main/resources/stereotypes-report_fr.properties deleted file mode 100644 index b76380e..0000000 --- a/eugene-maven-plugin/src/main/resources/stereotypes-report_fr.properties +++ /dev/null @@ -1,52 +0,0 @@ -### -# #%L -# EUGene :: Maven plugin -# %% -# Copyright (C) 2006 - 2014 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% -### -report.title=EUGene St\u00E9r\u00E9otypes -report.description=Documente les st\u00E9r\u00E9otypes d'un provider donn\u00E9. -report.overview.title=Pr\u00E9ambule -report.overview.text=Ce rapport d\u00E9crit les st\u00E9r\u00E9otypes d\u00E9finies dans la classe -stereotypeProvider.not.found=Impossible de trouver le st\u00E9r\u00E9otype prodiver nomm\u00E9 ''{0}'' -report.overview.more.information=Pour plus d'informations sur les St\u00E9r\u00E9otypes dans EUGene - -report.detail.title=D\u00E9tail des st\u00E9r\u00E9otypes -report.detail.text=On d\u00E9taille ici les st\u00E9r\u00E9otypes trouv\u00E9s. - -report.noStereotypes=Pas de st\u00E9r\u00E9otype d\u00E9finie dans ce provider. -report.summary.stereotype=St\u00E9r\u00E9otypes d\u00E9tect\u00E9es -report.stereotype.name=Nom -report.stereotype.description=Description -report.stereotype.target=Cible(s) - -report.detail.stereotype.title=St\u00E9r\u00E9otype -report.detail.stereotype.name=Nom -report.detail.stereotype.description=Description -report.detail.stereotype.target=Cible(s) -report.detail.target.model=sur un mod\u00E8le -report.detail.target.package=sur un paquetage -report.detail.target.classifier=sur un classifier -report.detail.target.class=sur une classe -report.detail.target.interface=sur une interface -report.detail.target.enumeration=sur une \u00E9numeration -report.detail.target.attribute=sur un attribut -report.detail.target.parameter=sur un param\u00E8tre -report.detail.target.operation=sur une op\u00E9ration -report.detail.target.element=sur un \u00E9l\u00E9ment -report.detail.stereotype.usage.title=Utilisation -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.