Skip to content

Commit

Permalink
PD-58/PD-565 :: Add method to get ProductCmptType class names without…
Browse files Browse the repository at this point in the history
… Generation suffix

Change-Id: I50412de514cd6d693dee0bd633c6adf2a53eb0f8
  • Loading branch information
lara0905 committed Jul 25, 2024
1 parent 5c39217 commit 09b20f7
Show file tree
Hide file tree
Showing 17 changed files with 176 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<setEntry value="org.apache.httpcomponents.httpclient@default:default"/>
<setEntry value="org.apache.httpcomponents.httpcore@default:default"/>
<setEntry value="org.apache.logging.log4j.api@default:default"/>
<setEntry value="org.apache.logging.log4j.to.slf4j@default:default"/>
<setEntry value="org.apache.lucene.analysis-common@default:default"/>
<setEntry value="org.apache.lucene.analysis-smartcn@default:default"/>
<setEntry value="org.apache.lucene.core@default:default"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Export-Package: org.faktorips.devtools.model.builder,
org.faktorips.devtools.model.builder.java.util,
org.faktorips.devtools.model.builder.labels,
org.faktorips.devtools.model.builder.propertybuilder,
org.faktorips.devtools.model.builder.propertydef,
org.faktorips.devtools.model.builder.settings,
org.faktorips.devtools.model.builder.xmodel,
org.faktorips.devtools.model.builder.xmodel.builder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,37 @@ Please see LICENSE.txt for full license terms, including the\n\
additional permissions and restrictions as well the possibility\n\
of alternative license terms.
modelbuilderset=Model Faktor-IPS Generator
generatorLocaleLabel=Generator Language
generatorLocaleDescription=The language in which the code and documentation is generated. Currently supported are the values de and en.
formulaCompilingDescription=Specifies the kind of formula compiling.
formulaCompilingLabel=Formula Compiling
baseClassPolicyComponentLabel=Base class of policy components
baseClassPolicyComponentDescription=Defines the qualified name of the base class of all policy components. Leave the value empty if the default base class should be used.
baseClassProductComponentLabel=Base class of product components
baseClassProductComponentDescription=Defines the qualified name of the base class of all product components. Leave the value empty if the default base class should be used.
camelCaseSeparatedDescription=Separate constant names for camel case properties with an underscore
camelCaseSeparatedLabel=CamelCase separation in constant names
changesOverTimeNamingConventionLabel=Naming scheme for changes over time
changesOverTimeNamingConventionDescription=This property redirects to .ipsproject's root attribute 'changesInTimeNamingConvention'
formulaCompilingDescription=Specifies the kind of formula compiling.
formulaCompilingLabel=Formula Compiling
valueSetMethodsDescription=Whether the value set methods should be unified for all ValueSet implementations, or as originally reflect their type in the method name. The three options are Unified, ByValueSetType or Both. This option should be mirrored in the manifest if one is used.
valueSetMethodsLabel=Unify Value Set Methods
generateChangeListenerLabel=Generate change listener
generateChangeListenerDescription=Enables the generation of a notification mechanism
generateConvenienceGettersDescription=Enables the generation of getter methods of ProductComponentType attributes in the according PolicyCmptType class.
generateConvenienceGettersLabel=Generate convenience getters
generateCopySupportDescription=Enables the generation of a model copy mechanism
generateCopySupportLabel=Generate copy support
generateDeltaSupportDescription=Enables the generation of a delta determining mechanism for model objects
generateDeltaSupportLabel=Generate delta support
generatePublishedInterfacesDescription=Generate the published interfaces (true) or only implementation classes (false)
generatePublishedInterfacesLabel=Generate published Interfaces
generateVisitorSupportDescription=Enables the generation of visitor code
generateVisitorSupportLabel=Generate visitor support
generatorLocaleLabel=Generator Language
generatorLocaleDescription=The language in which the code and documentation is generated. Currently supported are the values de and en.
generateGetEffectiveFromAsCalendarDescription=Enables the generation of the getter method getEffectiveFromAsCalendar(). Only works with the setting "Base class of policy components".
generateGetEffectiveFromAsCalendarLabel=Generate the getEffectiveFromAsCalendar() method
localDateDatatypeHelperVariantDescription=Define what helper variant is used for local date data types (LocalDate, LocalDateTime, LocalTime), i.e. Joda or Java8
localDateDatatypeHelperVariantLabel=LocalDate data type helper variant
serializablePolicyCmptsDescription=Enables the generation of Serializable support on policy components
serializablePolicyCmptsLabel=Generate Serializable Support
toXMLSupportDescription=Generates toXml() methods into Product Component and Generation classes
toXMLSupportLabel=Generate toXML Support
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@
name="%modelbuilderset"
point="org.faktorips.devtools.model.artefactbuilderset">
<builderSet class="org.faktorips.devtools.model.builder.java.ModelBuilderSet">
<builderSetPropertyDef
defaultValue="false"
description="%generateChangeListenerDescription"
disableValue="false"
label="%generateChangeListenerLabel"
name="generateChangeListener"
type="boolean"/>
<builderSetPropertyDef
defaultValue="true"
description="%generateDeltaSupportDescription"
disableValue="false"
label="%generateDeltaSupportLabel"
name="generateDeltaSupport"
type="boolean"/>
<builderSetPropertyDef
defaultValue="true"
description="%generateCopySupportDescription"
disableValue="false"
label="%generateCopySupportLabel"
name="generateCopySupport"
type="boolean"/>
<builderSetPropertyDef
defaultValue="true"
description="%generateVisitorSupportDescription"
disableValue="false"
label="%generateVisitorSupportLabel"
name="generateVisitorSupport"
type="boolean"/>
<builderSetPropertyDef
defaultValue="de"
description="%generatorLocaleDescription"
Expand All @@ -31,6 +59,28 @@
<value value="Both" />
</discreteValues>
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="Unified"
description="%valueSetMethodsDescription"
disableValue="ByValueSetType"
label="%valueSetMethodsLabel"
name="valueSetMethods"
type="enum">
<discreteValues>
<!-- @see org.faktorips.devtools.model.builder.settings.ValueSetMethods -->
<value value="Unified" />
<value value="ByValueSetType" />
<value value="Both" />
</discreteValues>
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="false"
description="%toXMLSupportDescription"
disableValue="false"
label="%toXMLSupportLabel"
name="toXMLSupport"
type="boolean">
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="true"
description="%camelCaseSeparatedDescription"
Expand All @@ -47,6 +97,22 @@
name="generatePublishedInterfaces"
type="boolean">
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="false"
description="%serializablePolicyCmptsDescription"
disableValue="false"
label="%serializablePolicyCmptsLabel"
name="serializablePolicyCmpts"
type="boolean">
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="false"
description="%generateConvenienceGettersDescription"
disableValue="true"
label="%generateConvenienceGettersLabel"
name="generateConvenienceGetters"
type="boolean">
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="java8"
description="%localDateDatatypeHelperVariantDescription"
Expand All @@ -59,6 +125,38 @@
<value value="java8" />
</discreteValues>
</builderSetPropertyDef>
<builderSetPropertyDef
class="org.faktorips.devtools.model.builder.propertydef.PolicyBaseClassBuilderSetPropertyDef"
description="%baseClassPolicyComponentDescription"
label="%baseClassPolicyComponentLabel"
name="baseClassPolicyComponent"
defaultValue=""
type="string">
</builderSetPropertyDef>
<builderSetPropertyDef
class="org.faktorips.devtools.model.builder.propertydef.ProductBaseClassBuilderSetPropertyDef"
description="%baseClassProductComponentDescription"
label="%baseClassProductComponentLabel"
name="baseClassProductComponent"
defaultValue=""
type="string">
</builderSetPropertyDef>
<builderSetPropertyDef
class="org.faktorips.devtools.model.builder.propertydef.ChangesOverTimeNamingConventionPropertyDef"
description="%changesOverTimeNamingConventionDescription"
label="%changesOverTimeNamingConventionLabel"
name="changesInTimeNamingConvention"
defaultValue=""
type="string">
</builderSetPropertyDef>
<builderSetPropertyDef
defaultValue="true"
description="%generateGetEffectiveFromAsCalendarDescription"
disableValue="true"
label="%generateGetEffectiveFromAsCalendarLabel"
name="generateGetEffectiveFromAsCalendar"
type="boolean">
</builderSetPropertyDef>
</builderSet>
</extension>
<extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ private String getJavaClassNameForPolicyCmptType(IPolicyCmptType type, boolean i
return getJavaClassName(type, interfaces, XPolicyCmptClass.class);
}

public String getJavaClassNameForProductCmptTypeIgnoreChangingOverTime(IProductCmptType type, boolean interfaces) {
return getJavaClassName(type, interfaces, XProductCmptClass.class);
}

private String getJavaClassNameForProductCmptType(IProductCmptType type, boolean interfaces) {
if (type.isChangingOverTime()) {
return getJavaClassName(type, interfaces, XProductCmptGenerationClass.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* restrictions as well as the possibility of alternative license terms.
*******************************************************************************/

package org.faktorips.devtools.stdbuilder;
package org.faktorips.devtools.model.builder.propertydef;

import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* restrictions as well as the possibility of alternative license terms.
*******************************************************************************/

package org.faktorips.devtools.stdbuilder;
package org.faktorips.devtools.model.builder.propertydef;

import org.faktorips.devtools.model.builder.java.JavaBuilderSet;
import org.faktorips.devtools.model.internal.ipsproject.ChangesOverTimeNamingConvention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*******************************************************************************
* Copyright (c) Faktor Zehn GmbH - faktorzehn.org
*
*
* This source code is available under the terms of the AGPL Affero General Public License version
* 3.
*
*
* Please see LICENSE.txt for full license terms, including the additional permissions and
* restrictions as well as the possibility of alternative license terms.
*******************************************************************************/

package org.faktorips.devtools.stdbuilder;
package org.faktorips.devtools.model.builder.propertydef;

import org.eclipse.osgi.util.NLS;

public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.faktorips.devtools.stdbuilder.messages"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "org.faktorips.devtools.model.builder.propertydef.messages"; //$NON-NLS-1$

public static String AbstractBaseClassBuilderSetPropertyDef_CantLoadJavaClass;
public static String AbstractBaseClassBuilderSetPropertyDef_NotSubclass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* restrictions as well as the possibility of alternative license terms.
*******************************************************************************/

package org.faktorips.devtools.stdbuilder;
package org.faktorips.devtools.model.builder.propertydef;

import org.faktorips.runtime.internal.AbstractModelObject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* restrictions as well as the possibility of alternative license terms.
*******************************************************************************/

package org.faktorips.devtools.stdbuilder;
package org.faktorips.devtools.model.builder.propertydef;

import org.faktorips.runtime.internal.ProductComponent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Import-Package: com.google.common.base;version="30.1.0",
org.faktorips.devtools.model.builder.labels,
org.faktorips.devtools.model.builder.naming,
org.faktorips.devtools.model.builder.propertybuilder,
org.faktorips.devtools.model.builder.propertydef,
org.faktorips.devtools.model.builder.settings,
org.faktorips.devtools.model.builder.xmodel,
org.faktorips.devtools.model.builder.xmodel.builder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,23 @@
</discreteValues>
</builderSetPropertyDef>
<builderSetPropertyDef
class="org.faktorips.devtools.stdbuilder.PolicyBaseClassBuilderSetPropertyDef"
class="org.faktorips.devtools.model.builder.propertydef.PolicyBaseClassBuilderSetPropertyDef"
description="%baseClassPolicyComponentDescription"
label="%baseClassPolicyComponentLabel"
name="baseClassPolicyComponent"
defaultValue=""
type="string">
</builderSetPropertyDef>
<builderSetPropertyDef
class="org.faktorips.devtools.stdbuilder.ProductBaseClassBuilderSetPropertyDef"
class="org.faktorips.devtools.model.builder.propertydef.ProductBaseClassBuilderSetPropertyDef"
description="%baseClassProductComponentDescription"
label="%baseClassProductComponentLabel"
name="baseClassProductComponent"
defaultValue=""
type="string">
</builderSetPropertyDef>
<builderSetPropertyDef
class="org.faktorips.devtools.stdbuilder.ChangesOverTimeNamingConventionPropertyDef"
class="org.faktorips.devtools.model.builder.propertydef.ChangesOverTimeNamingConventionPropertyDef"
description="%changesOverTimeNamingConventionDescription"
label="%changesOverTimeNamingConventionLabel"
name="changesInTimeNamingConvention"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
modelbuilderset=Model Faktor-IPS Generator
generatorLocaleDescription=Die Sprache in der Code und Dokumentation generiert werden. Derzeit werden die Werte de und en unterst\u00FCtzt.
generatorLocaleLabel=Generator-Sprache
formulaCompilingDescription=Legt fest wohin Formeln kompiliert werden.
formulaCompilingLabel=Formel-Kompilierung
baseClassPolicyComponentLabel=Basisklasse f\u00FCr Vertragsklassen
baseClassPolicyComponentDescription=Qualifizierter Name der Basisklasse f\u00FCr Vertragsklassen. Falls ein leerer String angegeben wird, wird die Defaultbasisklasse benutzt.
baseClassProductComponentLabel=Basisklasse f\u00FCr Produktklassen
baseClassProductComponentDescription=Qualifizierter Name der Basisklasse f\u00FCr Produktklassen. Falls ein leerer String angegeben wird, wird die Defaultbasisklasse benutzt.
camelCaseSeparatedDescription=Konstantennamen f\u00FCr Camel-Case-Properties mit Unterstrich trennen.
camelCaseSeparatedLabel=Camel-Case-Trennung in Konstantennamen
changesOverTimeNamingConventionLabel=Namensschema f\u00FCr \u00C4nderungen im Zeitablauf
changesOverTimeNamingConventionDescription=Diese Einstellung wird aus dem Root-Attribut 'changesInTimeNamingConvention' der .ipsproject-Datei \u00FCbernommen.
formulaCompilingDescription=Legt fest wohin Formeln kompiliert werden.
formulaCompilingLabel=Formel-Kompilierung
valueSetMethodsDescription=Legt fest ob die ValueSet-Methoden f\u00FCr alle ValueSet-Implementierungen vereinheitlicht werden sollen oder wie urspr\u00FCnglich ihren Typ im Methodennamen widerspiegeln sollen. Wird ein Manifest verwendet sollte diese Einstellung auch dort gepflegt werden.
valueSetMethodsLabel=Vereinheitlichte Wertebereichsmethoden
generateChangeListenerDescription=Generiert Unterst\u00FCtzung f\u00FCr das Listener-Pattern in allen Vertragsklassen.
generateChangeListenerLabel=Change-Listener generieren
generateConvenienceGettersDescription=Generiert Getter-Methoden f\u00FCr Produkt-Attribute in produktkonfigurierten Vertragsklassen.
generateConvenienceGettersLabel=Getter f\u00FCr Produktattribute in Vertragsklassen
generateCopySupportDescription=Generiert copy-Methoden in Vertagsklassen.
generateCopySupportLabel=Copy-Support generieren
generateDeltaSupportDescription=Generiert einen Mechanismus zur Ermittelung von Modell-Unterschieden.
generateDeltaSupportLabel=Delta-Support generieren
generatePublishedInterfacesDescription=Generiert nur Implementierungsklassen (false) oder auch Published Interfaces (true)
generatePublishedInterfacesLabel=Published Interfaces generieren
generateVisitorSupportDescription=Generiert Unterst\u00FCtzung f\u00FCr das Visitor-Pattern in allen Vertragsklassen.
generateVisitorSupportLabel=Visitor-Support generieren
generatorLocaleDescription=Die Sprache in der Code und Dokumentation generiert werden. Derzeit werden die Werte de und en unterst\u00FCtzt.
generatorLocaleLabel=Generator-Sprache
generateGetEffectiveFromAsCalendarDescription=Legt fest ob die Methode getEffectiveFromAsCalendar() generiert werden soll. Funktioniert nur in Kombination mit der Einstellung "Basisklasse f\u00FCr Vertragsklassen".
generateGetEffectiveFromAsCalendarLabel=Generiert die getEffectiveFromAsCalendar() Methode
localDateDatatypeHelperVariantDescription=Hier kann die Variante der DatatypeHelper definiert werden, die f\u00FCr die Local* Datatypes (LocalDate, LocalDateTime, LocalTime) verwendet wird. M\u00F6glich sind Joda oder Java8
localDateDatatypeHelperVariantLabel=LocalDate-DatatypeHelper-Variante
serializablePolicyCmptsDescription=L\u00E4sst alle generierten Klassen Serializable implementieren.
serializablePolicyCmptsLabel=Serializable-Support generieren
toXMLSupportDescription=Generiert toXml()-Methoden in Produktbaustein und -generationsklassen.
toXMLSupportLabel=toXML-Support generieren
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* restrictions as well as the possibility of alternative license terms.
*******************************************************************************/

package org.faktorips.devtools.stdbuilder;
package org.faktorips.devtools.model.builder.propertydef;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
Expand All @@ -24,6 +24,7 @@
import org.eclipse.jdt.core.IType;
import org.faktorips.devtools.abstraction.AJavaProject;
import org.faktorips.devtools.abstraction.Wrappers;
import org.faktorips.devtools.model.builder.propertydef.AbstractBaseClassBuilderSetPropertyDef;
import org.faktorips.devtools.model.ipsproject.IIpsProject;
import org.faktorips.runtime.Message;
import org.junit.Test;
Expand Down
Loading

0 comments on commit 09b20f7

Please sign in to comment.