Skip to content

Commit

Permalink
Merge pull request #1209 from umple/Refactor1GenTemplates
Browse files Browse the repository at this point in the history
Refactoring many templates so their name appears in generated code. Contributes to #1186
  • Loading branch information
TimLethbridge committed Jan 27, 2018
2 parents 1a9f5b1 + f7bb62a commit c600698
Show file tree
Hide file tree
Showing 117 changed files with 233 additions and 233 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddImmutableUnidirectionalMany <<!<</*association_AddImmutableUnidirectionalMany*/>>
private boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddImmutableUnidirectionalMany <<! /* Code from template association_AddImmutableUnidirectionalMany */
<</*association_AddImmutableUnidirectionalMany*/>> private boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddImmutableUnidirectionalMany_relatedSpecialization <<!<</*association_AddImmutableUnidirectionalMany_relatedSpecialization*/>>
private boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddImmutableUnidirectionalMany_relatedSpecialization <<! /* Code from template association_AddImmutableUnidirectionalMany_relatedSpecialization */
<</*association_AddImmutableUnidirectionalMany_relatedSpecialization*/>> private boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddIndexControlFunctions <<!<</*association_AddIndexControlFunctions*/>>
public boolean <<=gen.translate("addAtMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>, int index)
association_AddIndexControlFunctions <<! /* Code from template association_AddIndexControlFunctions */
<</*association_AddIndexControlFunctions*/>> public boolean <<=gen.translate("addAtMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>, int index)
{
boolean wasAdded = false;
if(<<=gen.translate("addMethod",av)>>(<<=gen.translate("parameterOne",av)>>))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddIndexControlFunctions_relatedSpecialization <<!<</*association_AddIndexControlFunctions_relatedSpecialization*/>>
public boolean <<=gen.translate("addAtMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>, int index)
association_AddIndexControlFunctions_relatedSpecialization <<! /* Code from template association_AddIndexControlFunctions_relatedSpecialization */
<</*association_AddIndexControlFunctions_relatedSpecialization*/>> public boolean <<=gen.translate("addAtMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>, int index)
{
boolean wasAdded = false;
if(<<=gen.translate("addMethod",av)>>(<<=gen.translate("parameterOne",av)>>))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddIndexControlFunctions_specialization <<!<</*association_AddIndexControlFunctions_specialization*/>>
public boolean <<=gen.translate("addAtMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>, int index)
association_AddIndexControlFunctions_specialization <<! /* Code from template association_AddIndexControlFunctions_specialization */
<</*association_AddIndexControlFunctions_specialization*/>> public boolean <<=gen.translate("addAtMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>, int index)
{
boolean wasAdded = false;
if(<<=gen.translate("addMethod",av)>>(<<=gen.translate("parameterOne",av)>>))
Expand Down
4 changes: 2 additions & 2 deletions UmpleToJava/UmpleTLTemplates/association_AddMNToMany.ump
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToMany <<!<</*association_AddMNToMany*/>>
public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMNToMany <<! /* Code from template association_AddMNToMany */
<</*association_AddMNToMany*/>> public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasRemoved = false;
<<# if (customRemovePrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customRemovePrefixCode,gen.translate("removeMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToMany_relatedSpecialization <<!<</*association_AddMNToMany_relatedSpecialization*/>>
public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMNToMany_relatedSpecialization <<! /* Code from template association_AddMNToMany_relatedSpecialization */
<</*association_AddMNToMany_relatedSpecialization*/>> public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasRemoved = false;
<<# if (customRemovePrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customRemovePrefixCode,gen.translate("removeMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToMany_specialization <<!<</*association_AddMNToMany_specialization*/>>
public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMNToMany_specialization <<! /* Code from template association_AddMNToMany_specialization */
<</*association_AddMNToMany_specialization*/>> public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasRemoved = false;
<<# if (customRemovePrefixCode != null) { #>>
Expand Down
4 changes: 2 additions & 2 deletions UmpleToJava/UmpleTLTemplates/association_AddMNToOnlyOne.ump
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToOnlyOne <<!<</*association_AddMNToOnlyOne*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddMNToOnlyOne <<! /* Code from template association_AddMNToOnlyOne */
<</*association_AddMNToOnlyOne*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
if (<<=gen.translate("numberOfMethod",av)>>() >= <<=gen.translate("maximumNumberOfMethod",av)>>())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToOnlyOne_relatedSpecialization <<!<</*association_AddMNToOnlyOne_relatedSpecialization*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddMNToOnlyOne_relatedSpecialization <<! /* Code from template association_AddMNToOnlyOne_relatedSpecialization */
<</*association_AddMNToOnlyOne_relatedSpecialization*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
if (<<=gen.translate("numberOfMethod",av)>>() >= <<=gen.translate("maximumNumberOfMethod",av)>>_<<=gen.translate("type",av)>>())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToOnlyOne_specialization <<!<</*association_AddMNToOnlyOne_specialization*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddMNToOnlyOne_specialization <<! /* Code from template association_AddMNToOnlyOne_specialization */
<</*association_AddMNToOnlyOne_specialization*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
if (<<=gen.translate("numberOfMethod",av)>>() >= <<=gen.translate("maximumNumberOfMethod",av)>>_<<=gen.translate("type",av)>>())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToOptionalOne <<!<</*association_AddMNToOptionalOne*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMNToOptionalOne <<! /* Code from template association_AddMNToOptionalOne */
<</*association_AddMNToOptionalOne*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToOptionalOne_relatedSpecialization <<!<</*association_AddMNToOptionalOne_relatedSpecialization*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMNToOptionalOne_relatedSpecialization <<! /* Code from template association_AddMNToOptionalOne_relatedSpecialization */
<</*association_AddMNToOptionalOne_relatedSpecialization*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMNToOptionalOne_specialization <<!<</*association_AddMNToOptionalOne_specialization*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMNToOptionalOne_specialization <<! /* Code from template association_AddMNToOptionalOne_specialization */
<</*association_AddMNToOptionalOne_specialization*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { #>>
Expand Down
4 changes: 2 additions & 2 deletions UmpleToJava/UmpleTLTemplates/association_AddMStarToMany.ump
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMStarToMany <<!<</*association_AddMStarToMany*/>>
public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMStarToMany <<! /* Code from template association_AddMStarToMany */
<</*association_AddMStarToMany*/>> public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasRemoved = false;
<<# if (customRemovePrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customRemovePrefixCode,gen.translate("removeMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMStarToMany_relatedSpecialization <<!<</*association_AddMStarToMany_relatedSpecialization*/>>
public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMStarToMany_relatedSpecialization <<! /* Code from template association_AddMStarToMany_relatedSpecialization */
<</*association_AddMStarToMany_relatedSpecialization*/>> public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasRemoved = false;
<<# if (customRemovePrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customRemovePrefixCode,gen.translate("removeMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMStarToMany_specialization <<!<</*association_AddMStarToMany_specialization*/>>
public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMStarToMany_specialization <<! /* Code from template association_AddMStarToMany_specialization */
<</*association_AddMStarToMany_specialization*/>> public boolean <<=gen.translate("removeMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasRemoved = false;
<<# if (customRemovePrefixCode != null) { #>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMandatoryManyToOne <<!<</*association_AddMandatoryManyToOne*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddMandatoryManyToOne <<! /* Code from template association_AddMandatoryManyToOne */
<</*association_AddMandatoryManyToOne*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
<<=gen.translate("type",av)>> <<=gen.translate("parameterNew",av)>> = new <<=gen.translate("type",av)>>(<<=gen.translate("callerArgumentsExcept",relatedAssociation)>>);<<#for( TraceItem traceItemAssocAdd : traceItemAssocAdds )#>><<=
(traceItemAssocAdd!=null?"\n"+traceItemAssocAdd.trace(gen, av,"as_a", uClass,gen.translate("numberOfMethod",av)+"()"):"")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMandatoryManyToOne_relatedSpecialization <<!<</*association_AddMandatoryManyToOne_relatedSpecialization*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddMandatoryManyToOne_relatedSpecialization <<! /* Code from template association_AddMandatoryManyToOne_relatedSpecialization */
<</*association_AddMandatoryManyToOne_relatedSpecialization*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
<<=gen.translate("type",av)>> <<=gen.translate("parameterNew",av)>> = new <<=gen.translate("type",av)>>(<<=gen.translate("callerArgumentsExcept",relatedAssociation)>>);<<#for( TraceItem traceItemAssocAdd : traceItemAssocAdds )#>><<=
(traceItemAssocAdd!=null?"\n"+traceItemAssocAdd.trace(gen, av,"as_a", uClass,gen.translate("numberOfMethod",av)+"()"):"")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddMandatoryManyToOne_specialization <<!<</*association_AddMandatoryManyToOne_specialization*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddMandatoryManyToOne_specialization <<! /* Code from template association_AddMandatoryManyToOne_specialization */
<</*association_AddMandatoryManyToOne_specialization*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { #>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToManyMethod <<!<</*association_AddManyToManyMethod*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddManyToManyMethod <<! /* Code from template association_AddManyToManyMethod */
<</*association_AddManyToManyMethod*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToManyMethod_relatedSpecialization <<!<</*association_AddManyToManyMethod_relatedSpecialization*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddManyToManyMethod_relatedSpecialization <<! /* Code from template association_AddManyToManyMethod_relatedSpecialization */
<</*association_AddManyToManyMethod_relatedSpecialization*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToManyMethod_specialization <<!<</*association_AddManyToManyMethod_specialization*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddManyToManyMethod_specialization <<! /* Code from template association_AddManyToManyMethod_specialization */
<</*association_AddManyToManyMethod_specialization*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null && av.getMultiplicity().getUpperBound() == 1) { #>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToOne_relatedSpecialization <<!<</*association_AddManyToOne_relatedSpecialization*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddManyToOne_relatedSpecialization <<! /* Code from template association_AddManyToOne_relatedSpecialization */
<</*association_AddManyToOne_relatedSpecialization*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
return new <<=gen.translate("type",av)>>(<<=gen.translate("callerArgumentsExcept",relatedAssociation)>>);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToOne_specialization <<!<</*association_AddManyToOne_specialization*/>>
public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
association_AddManyToOne_specialization <<! /* Code from template association_AddManyToOne_specialization */
<</*association_AddManyToOne_specialization*/>> public <<=gen.translate("type",av)>> <<=gen.translate("addMethod",av)>>(<<=gen.translate("methodArgumentsExcept",relatedAssociation)>>)
{
// need to keep this because of the type differences between sub & super classes
return new <<=gen.translate("type",av)>>(<<=gen.translate("callerArgumentsExcept",relatedAssociation)>>);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToOptionalOne <<!<</*association_AddManyToOptionalOne*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddManyToOptionalOne <<! /* Code from template association_AddManyToOptionalOne */
<</*association_AddManyToOptionalOne*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UmpleToJava {
association_AddManyToOptionalOne_relatedSpecialization <<!<</*association_AddManyToOptionalOne_relatedSpecialization*/>>
public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
association_AddManyToOptionalOne_relatedSpecialization <<! /* Code from template association_AddManyToOptionalOne_relatedSpecialization */
<</*association_AddManyToOptionalOne_relatedSpecialization*/>> public boolean <<=gen.translate("addMethod",av)>>(<<=gen.translate("type",av)>> <<=gen.translate("parameterOne",av)>>)
{
boolean wasAdded = false;
<<# if (customAddPrefixCode != null) { addUncaughtExceptionVariables(realSb.toString().split("\\n").length,customAddPrefixCode,gen.translate("addMethod",av));
Expand Down
Loading

0 comments on commit c600698

Please sign in to comment.