google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

Command-line Umple compiler was not report error #620

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Umple command line compiler was not reported the error when I'm was made a 
mistake and forgot to write multiplicity on directed association in model.ump 
file. 
"Similar" problem is evident on Umple web generator (in UML model - on the 
right side of application, association was deleted and if one pay attention 
loosing association was a good sign, but on the model.ump file on the 
application left side, line of code become useless but compiler unfortunately, 
does not signalized the error and generated the Java code).

NOTE: I'm was really excited when I was reveal and realized usefulness of yours 
project. Thank you so much for your effort, for your idea and because you share 
Umple with community. Best regards Zoran Savić from Belgrade, Serbia.

What is the expected output? What do you see instead?
As one expected, in that circumstances Java code generated without directed 
association. 

What is the expected output? What do you see instead?
As one expected in that circumstances, Java code generated without directed 
association. 

What version of the product are you using? On what operating system?
Umple release 1.20.2.4305
OS: Ubuntu 14.01 LTS (64-byte); Processor type is AMD; Browser type is Firefox..
Use: Live Examples From Umple Online -> Example was: Accidents

Please provide any additional information below.

file//: model.ump
class Nesreca { //class Accident. Class name was changed to Serbian language 
    id;
    Date datum;
    Time vreme;

    * -> 1 TezinaPovrede; // class SeriousnessLevel
    * ->  VrstaNesrece; // This line was not noticed as a error by Umple compiler! class AccidentType
    * -- 1 Zaposleni; // class Employee

    key {id}
}

Original issue reported on code.google.com by zoranssa...@gmail.com on 21 Aug 2014 at 8:38

Attachments:

GoogleCodeExporter commented 9 years ago
This is a clear problem that is easily reproducible. In the following 
simplified example, the bad line is ignored.

class Nesreca {

    * ->  VrstaNesrece; // This line was not noticed as a error by Umple compiler! 

}

Original comment by TimothyCLethbridge on 21 Aug 2014 at 10:58

GoogleCodeExporter commented 9 years ago
I will fix this.
Right now, it is parsed as follows:

[classDefinition][name:Nesreca][portBindingDefinition][fromPort:*][toPort:VrstaN
esrece][bindinHandler][inlineComment:This line was not noticed as a error by 
Umple compiler!]

Original comment by asopa...@gmail.com on 25 Aug 2014 at 1:03

GoogleCodeExporter commented 9 years ago
Solution requires modification of the grammar for the portBindingDefinition (in 
umple_structure grammar).
We need to restrict what is considered a 'fromPort' and/or 'toPort'.

Original comment by asopa...@gmail.com on 25 Aug 2014 at 1:35

GoogleCodeExporter commented 9 years ago
It turns out that this is valid syntax for ports. But ports can only be 
generated in C++. 

We therefore need to generate a series of warnings when a generate target is 
Java and certain syntax will be ignored in that language.

Original comment by TimothyCLethbridge on 25 Aug 2014 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by ahmedvc@gmail.com on 25 Aug 2014 at 4:41