New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Umple examples that were failing Java and PHP compilation #959
Conversation
I have opened issue #964 regarding the incorrect PHP code generation that was observed from the GeometricSystem.ump example |
ba69bdf
to
08f1138
Compare
double getPerimeterLength(){return 1.0;} | ||
boolean isLessThan(Polygon object){return true;} | ||
boolean isEqual(Polygon object){return true;} | ||
boolean isEqual(CurvedShape object){return false;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return false;}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally, I had removed that method from the examples. In this case, I removed it from the Quadrilateral class. However, when I compiled the Umple file, and then tried to compile Quadrilateral.java, the following error was thrown:
JackieLang:geometric_system$ javac Quadrilateral.java
Quadrilateral.java:8: error: Quadrilateral is not abstract and does not override abstract method isEqual(CurvedShape) in Polygon
public class Quadrilateral extends Polygon
^
1 error
The same error is thrown with the other examples in your other comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vahdat-ab Added the @@@skipjavacompile directive to GeometricSystem.ump. This can be removed when the issue with TComparable is resolved.
double getPerimeterLength(){return 1.0;} | ||
boolean isLessThan(Polygon object){return true;} | ||
boolean isEqual(Polygon object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(NonPolyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(NonPolyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(NonPolyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(NonPolyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(NonPolyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(NonPolyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
double volume(){return 1.0;} | ||
double surfaceArea(){return 1.0;} | ||
boolean isEqual(Polyhedra object){return true;} | ||
boolean isEqual(CurvedShape object){return true;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the following method should be deleted.
boolean isEqual(CurvedShape object){return true;}
* Add missing Boolean lock variable
* Rename attribute and use Umple generated API calls
* Rename attribute and use Umple API generated methods
* Add missing Boolean variable "lock" * Rename attribute and use Umple API generated methods
* Add missing semicolon
* Replace assignment statements with Umple API calls
* Replace assignment statements with Umple API calls
* Replace assignment statements with Umple API calls * Replace incorrect transition name
* Replace assignment statements with Umple API calls * Replace incorrect transition name
* Replace assignment, increment, and decrement statements with Umple API calls
* Fix method definitions, and add "dummy" return values to non void methods * Add @@@skipphpcompile because of incompatible methods
…xample * Skip Java compilation until issue with TComparable is fixed
08f1138
to
1218458
Compare
Description
This PR fixes the following Umple examples so that all Umple examples tested with
ant -Dmyenv=local -f build.exampletests.xml allUserManualAndExampleTests
in issue 758 now pass. The updated examples are:
Note, for GeometricSystem.ump, the "@@@skipphpcompile" directive was added because of incompatible methods such as
boolean isEqual(Color object)
Tests
No additional tests were added. I confirmed that the changes passed using
"ant -Dmyenv=local -f build.exampletests.xml allUserManualAndExampleTests".