Skip to content

Commit

Permalink
Merge pull request #983 from AdamBJ/FixForIssue947
Browse files Browse the repository at this point in the history
Fix for issue 947
  • Loading branch information
vahdat-ab committed Jan 31, 2017
2 parents 5c71af9 + 5b47dd0 commit 5b89e44
Show file tree
Hide file tree
Showing 213 changed files with 213 additions and 638 deletions.
3 changes: 1 addition & 2 deletions UmpleToJava/UmpleTLTemplates/toString_declare.ump
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class UmpleToJava {

public String toString()
{
String outputString = "";<<#
<<#
String customToStringPrefixCode = GeneratorHelper.toCode(uClass.getApplicableCodeInjections("before","toString"));
String customToStringPostfixCode = GeneratorHelper.toCode(uClass.getApplicableCodeInjections("after","toString"));
if (customToStringPrefixCode != null)
Expand Down Expand Up @@ -87,7 +87,6 @@ class UmpleToJava {
ret += " + System.getProperties().getProperty(\"line.separator\") +\n ";
ret += "\" \" + " + "\""+reflexiveNames.get(m)+" = \"+("+reflexive.get(m)+"!=null?Integer.toHexString(System.identityHashCode("+reflexive.get(m)+")):\"null\")";
}
ret += "\n + outputString";
append(realSb,"\n return {0};", ret);
#>>
}!>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,13 @@ public class FLoatGenerator

public String toString()
{
String outputString = "";
return super.toString() + "["+
"x" + ":" + getX()+ "," +
"y" + ":" + getY()+ "," +
"a" + ":" + getA()+ "," +
"b" + ":" + getB()+ "," +
"c" + ":" + getC()+ "," +
"rho" + ":" + getRho()+ "," +
"theta" + ":" + getTheta()+ "]"
+ outputString;
"theta" + ":" + getTheta()+ "]";
}
}
4 changes: 1 addition & 3 deletions cruise.umple/test/cruise/umple/compiler/RangeX.java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ public class RangeX

public String toString()
{
String outputString = "";
return super.toString() + "["+
"start" + ":" + getStart()+ "," +
"end" + ":" + getEnd()+ "]"
+ outputString;
"end" + ":" + getEnd()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,11 @@ public class RegularFlight

public String toString()
{
String outputString = "";
return super.toString() + "["+
"flightNumber" + ":" + getFlightNumber()+ "," +
"flightNumber3" + ":" + getFlightNumber3()+ "," +
"flightNumber4" + ":" + getFlightNumber4()+ "," +
"lala" + ":" + getLala()+ "]" + System.getProperties().getProperty("line.separator") +
" " + "time" + "=" + (getTime() != null ? !getTime().equals(this) ? getTime().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "time" + "=" + (getTime() != null ? !getTime().equals(this) ? getTime().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"name" + ":" + getName()+ "]" + System.getProperties().getProperty("line.separator") +
" " + "studentsPriority" + "=" + (getStudentsPriority() != null ? !getStudentsPriority().equals(this) ? getStudentsPriority().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "studentsPriority" + "=" + (getStudentsPriority() != null ? !getStudentsPriority().equals(this) ? getStudentsPriority().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@ public class Student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"id" + ":" + getId()+ "]" + System.getProperties().getProperty("line.separator") +
" " + "mentorsPriority" + "=" + (getMentorsPriority() != null ? !getMentorsPriority().equals(this) ? getMentorsPriority().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "mentorsPriority" + "=" + (getMentorsPriority() != null ? !getMentorsPriority().equals(this) ? getMentorsPriority().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"name" + ":" + getName()+ "]" + System.getProperties().getProperty("line.separator") +
" " + "myStudentsPriority" + "=" + (getMyStudentsPriority() != null ? !getMyStudentsPriority().equals(this) ? getMyStudentsPriority().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "myStudentsPriority" + "=" + (getMyStudentsPriority() != null ? !getMyStudentsPriority().equals(this) ? getMyStudentsPriority().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@ public class Student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"id" + ":" + getId()+ "]" + System.getProperties().getProperty("line.separator") +
" " + "ProfsPriority" + "=" + (getProfsPriority() != null ? !getProfsPriority().equals(this) ? getProfsPriority().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "ProfsPriority" + "=" + (getProfsPriority() != null ? !getProfsPriority().equals(this) ? getProfsPriority().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+ "]" + System.getProperties().getProperty("line.separator") +
" " + "studentsPriority" + "=" + (getStudentsPriority() != null ? !getStudentsPriority().equals(this) ? getStudentsPriority().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "studentsPriority" + "=" + (getStudentsPriority() != null ? !getStudentsPriority().equals(this) ? getStudentsPriority().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ public class Student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"id" + ":" + getId()+ "]"
+ outputString;
"id" + ":" + getId()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ public class student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"age" + ":" + getAge()+ "]"
+ outputString;
"age" + ":" + getAge()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ public class Client

public String toString()
{
String outputString = "";
return super.toString() + "["+
"minAge" + ":" + getMinAge()+ "," +
"age" + ":" + getAge()+ "]"
+ outputString;
"age" + ":" + getAge()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ public class student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"age" + ":" + getAge()+ "]"
+ outputString;
"age" + ":" + getAge()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ public class student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"age" + ":" + getAge()+ "," +
"weight" + ":" + getWeight()+ "]"
+ outputString;
"weight" + ":" + getWeight()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ public class student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"age" + ":" + getAge()+ "," +
"weight" + ":" + getWeight()+ "]"
+ outputString;
"weight" + ":" + getWeight()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ public class student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"age" + ":" + getAge()+ "," +
"weight" + ":" + getWeight()+ "]"
+ outputString;
"weight" + ":" + getWeight()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ public class student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"age" + ":" + getAge()+ "," +
"weight" + ":" + getWeight()+ "]"
+ outputString;
"weight" + ":" + getWeight()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ public class Client

public String toString()
{
String outputString = "";
return super.toString() + "["+
"minAge" + ":" + getMinAge()+ "]"
+ outputString;
"minAge" + ":" + getMinAge()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ public class Client

public String toString()
{
String outputString = "";
return super.toString() + "["+
"minAge" + ":" + getMinAge()+ "]"
+ outputString;
"minAge" + ":" + getMinAge()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ public class Teacher extends Person

public String toString()
{
String outputString = "";
return super.toString() + "["+
"position" + ":" + getPosition()+ "]"
+ outputString;
"position" + ":" + getPosition()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class Token

public String toString()
{
String outputString = "";
return super.toString() + "["+ "]" + System.getProperties().getProperty("line.separator") +
" " + "p" + "=" + (getP() != null ? !getP().equals(this) ? getP().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "p" + "=" + (getP() != null ? !getP().equals(this) ? getP().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ public class Registration

public String toString()
{
String outputString = "";
return super.toString() + "["+
"grade" + ":" + getGrade()+ "]" + System.getProperties().getProperty("line.separator") +
" " + "student = "+(getStudent()!=null?Integer.toHexString(System.identityHashCode(getStudent())):"null") + System.getProperties().getProperty("line.separator") +
" " + "courseSection = "+(getCourseSection()!=null?Integer.toHexString(System.identityHashCode(getCourseSection())):"null")
+ outputString;
" " + "courseSection = "+(getCourseSection()!=null?Integer.toHexString(System.identityHashCode(getCourseSection())):"null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ public class Student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"c" + ":" + getC()+ "]"
+ outputString;
"c" + ":" + getC()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public class Foo

public String toString()
{
String outputString = "";
return super.toString() + "["+
"bar" + ":" + getBar()+ "]"
+ outputString;
"bar" + ":" + getBar()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public class Foo

public String toString()
{
String outputString = "";
return super.toString() + "["+
"name" + ":" + getName()+ "]"
+ outputString;
"name" + ":" + getName()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"x" + ":" + getX()+ "," +
"str" + ":" + getStr()+ "," +
Expand All @@ -403,7 +402,6 @@ public class Mentor
" " + "tt" + "=" + (getTt() != null ? !getTt().equals(this) ? getTt().toString().replaceAll(" "," ") : "this" : "null") + System.getProperties().getProperty("line.separator") +
" " + "u" + "=" + (getU() != null ? !getU().equals(this) ? getU().toString().replaceAll(" "," ") : "this" : "null") + System.getProperties().getProperty("line.separator") +
" " + "v" + "=" + (getV() != null ? !getV().equals(this) ? getV().toString().replaceAll(" "," ") : "this" : "null") + System.getProperties().getProperty("line.separator") +
" " + "w" + "=" + (getW() != null ? !getW().equals(this) ? getW().toString().replaceAll(" "," ") : "this" : "null")
+ outputString;
" " + "w" + "=" + (getW() != null ? !getW().equals(this) ? getW().toString().replaceAll(" "," ") : "this" : "null");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class Student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"name" + ":" + getName()+ "]"
+ outputString;
"name" + ":" + getName()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class Student

public String toString()
{
String outputString = "";
return super.toString() + "["+
"grade" + ":" + getGrade()+ "]"
+ outputString;
"grade" + ":" + getGrade()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"id" + ":" + getId()+ "," +
"capacity" + ":" + getCapacity()+ "]"
+ outputString;
"capacity" + ":" + getCapacity()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"id" + ":" + getId()+ "]"
+ outputString;
"id" + ":" + getId()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"capacity" + ":" + getCapacity()+ "," +
"id" + ":" + getId()+ "," +
"name" + ":" + getName()+ "]"
+ outputString;
"name" + ":" + getName()+ "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ public class Mentor

public String toString()
{
String outputString = "";
return super.toString() + "["+
"capacity" + ":" + getCapacity()+ "," +
"id" + ":" + getId()+ "," +
"name" + ":" + getName()+ "]"
+ outputString;
"name" + ":" + getName()+ "]";
}
}
Loading

0 comments on commit 5b89e44

Please sign in to comment.