Add support for constructors
In order to properly identify constructors and destructors when creating messages it is important to have this information in the metamodel.
As per discussion from our meeting on May 5th:
- a type enum is added to the operation (normal, constructor, destructor)
- constructors will be named create and destructors destroy
- we add an extra button to be able to add constructors and destructors
Comments (15)
-
reporter -
reporter References issue
#132: Changed operation type to constructor for operations with name "create" and to destructor for "destroy" of all models in the reusable model library.→ <<cset 41d0f756471f>>
-
reporter References issue
#132: Updated copying of operations. EcoreUtil is used and only the non-containment references then need to be updated. This makes sure that new attributes are always copied as well.→ <<cset f757082cf129>>
-
reporter References issue
#132: Displaying operation type for constructor and destructor instead of return type. A pretty printer changes the visualization to a stereotype (<<construct>> or <<destruct>>).→ <<cset f08bed4a2248>>
-
reporter References issue
#132: Fixed problem with class cast exception. For some reason the Object[] cannot be cast into OperationFeaturesp[].→ <<cset ebee1341f4cc>>
-
reporter References issue
#132: Constructor and destructor also needs to be considered for initial message.→ <<cset d1f54cdd386d>>
-
reporter - changed status to resolved
Resolved issue
#132: Finalized constructor/destructor support:- the class view has an additional buttons for more options, that now allows to add a constructor or destructor
- constructors are added at the beginning, after existing constructors
- destructors are added after constructors, after existing destructors
- a default constructor/destructor is added and the user can then adjust visibility and parameters
Note: It is possible that adding a constructor/destructor makes the model invalid, because there is already one with the same signature.
→ <<cset 9234ead19f46>>
-
reporter References issue
#132: Removed type field for constructor/destructor as it is clear that this a constructor or destructor.→ <<cset 38675fcdfb93>>
-
reporter References issue
#132: Updated models: All constructors and destructors of the model library are now ordered properly.Improved code for finding positioning to stop as soon as a normal operation was found.
→ <<cset a3d3930595f7>>
-
reporter References issue
#132: Removed return type from destructor (using void instead).→ <<cset 8a27a6307b27>>
-
reporter References issue
#132: Added support to properly draw create messages and allow creation of additional messages to define the creation.→ <<cset 3fb4bcebb8a3>>
-
reporter References issue
#132: Fixed NPE and proper filtering for operations.→ <<cset c328a8cbc0a0>>
-
reporter References issue
#132: Added support to properly draw create messages and allow creation of additional messages to define the creation.→ <<cset 01b46821d4ed>>
-
reporter References issue
#132: Fixed NPE and proper filtering for operations.→ <<cset 9f7e8e3829d1>>
-
reporter References
#132: Adds the filtering of constructors that are from a super class and not of the current/actual class (call receiver).When creating an instance of a specific class, only the constructors of that class should be selectable.
→ <<cset dd3fe6501cac>>
- Log in to comment
References issue
#132: Added OperationType enum attribute to Operation.→ <<cset 4230ee8cdc25>>