This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Original submitter: sunflower Description: Steps to reproduce: I) - Create a java project. - Create a uml project and associate it to the java project. - Add a class diagram into the uml project. - Put a class element on the diagram and name it 'Class1'. - Put a class element on the diagram and name it 'Class2'. - Insert attribute 'private int state' into 'Class2' class element. 'public int getState()' and 'public void setState( int val )' operations are created for the 'state' attribute. - Create a sequence diagram. - Drag and drop 'Class1' and 'Class2' class elements from Model tree on the sequence diagram. - Draw 'Synchronous' message from 'Class1' Lifeline to 'Class2' Lifeline. - Invoke 'Operations|Add Operation' popup menu on the message. - Type 'setState( 3 )' and press 'Enter'. There is 'public void setState(#DataTypeList Unnamed)' message name instead of 'setState( 3 )' calling of 'setState' operation. II) - Create a java project. - Add 'Class2' into the java project: -------------------------------------------- public class Class2 { public void setState(int state){ } } -------------------------------------------- - Add 'Class1' into the java project: -------------------------------------------- public class Class1 { public void run(){ Class2 cls2 = new Class2(); cls2.setState( 3 ); } } -------------------------------------------- - Create a uml project ('Java-Platform Model by Reverse-Engineering a Java Project') and asssocate it to the java project - Select 'Class1|public void run()' operation under the UML Model tree and invoke 'Reverse Engineer Operation...'. - Choose 'Sequence Diagram' on the 'New Wizard' dialog and press 'OK' button. The message between 'Class1' and 'Class2' Lifelines has 'public void setState(int state)' name instead of expected 'setState( 3 )'.
The part II is described in issue 82874 from reverse engineering subcomponent The part I is related to diagram sequence subcomponent
The user executed the menu item to create a new operation. The value "3" is not a valid parameter. Therefore, the value "3" is not vaild. To specify a parameter instance data, you should use the message name.
I use UML 2.0 Superstructure Specification from http://www.omg.org/technology/documents/formal/uml.htm Please see chapter: 14.3.20 Message (from BasicInteractions) Constraints: [3] In the case when the Message signature is an Operation, the arguments of the Message must correspond to the parameters of the Operation. A Parameter corresponds to an Argument if the Argument is of the same Class or a specialization of that of the Parameter. [5] Arguments of a Message must only be: i) attributes of the sending lifeline. ii) constants. iii) symbolic values (which are wildcard values representing any legal value). iv) explicit parameters of the enclosing Interaction. v) attributes of the class owning the Interaction. According to this the value "3" is a valid parameter.
That is true, I meant in our current implementation that we decided to handle parameter arguments via the name. When we decided to handle the arguement the way you are talking about, it still will not be via creating a new operation. When you say you want to create a new operation you are creating a new operation and specifing the parameters, not the arguments. I am changing this from an defeat to an enhancement.
currently message name has no formatting, but shoudl have next: "Syntax for the Message name is the following: <messageident> ::= ([<attribute> ‘=’] <signal-or-operation-name> [‘(‘ [<argument> [‘,’<argument>]* ‘)’] [‘:’ <return-value>]) | ‘*’ <argument> ::= (<[parameter-name> ‘=’] <argument-value>) | (<attribute> ‘=’ <out-parameter-name> [‘:’ <argument-value>] | ‘ -’" and we have something called operations which in fact is our extension.
isn't implemented yet, as a part fix in re-operation name should be set to actual call, so user will be able to show name and got expected result without manually specifying it. in other cases it still will need manual entreing of 'call("sample")' and similar names