Community
Participate
Working Groups
Complete the generation and implementation of validation rules from the UML 2.0 source model.
*** Bug 128266 has been marked as a duplicate of this bug. ***
Created attachment 35921 [details] ported existing validation rules from old api to new Patch for some of validation rules ... more to come.
Created attachment 36338 [details] additional validation rules additional validation rules
Comment on attachment 36338 [details] additional validation rules modified
Created attachment 36914 [details] more validation rules
The changes from attachment 3 [details] have been committed (with modifications).
Created attachment 37131 [details] patches for Behavior and Interface Patch for Behavior and Interface
Created attachment 37153 [details] combined patch for operation, behavior, port combined patch for operation, behavior, port
Created attachment 37217 [details] Patch for profile and package
Created attachment 37236 [details] combinedFragment and ExecutionSpecification
Created attachment 37419 [details] MessageOperations
The changes from attachment 37153 [details], attachment 37217 [details], attachment 37236 [details] and attachment 37419 [details] have been committed to CVS. The remainder of the validation rules will be implemented in a future release i.e. 2.1).
Created attachment 40586 [details] connectorOperations validation rules updated
Created attachment 41343 [details] validation patch for extension ends
Deferring to a future release.
Created attachment 84050 [details] patch that implements several validations This patch some implements validations in several elements (Actor, Association, InitialNode, Parameter, etc.)
Thanks for the contribution, Javier! James will look into having these changes committed (pending IP review) as soon as possible.
The patch is under review now.
I am very happy to have the chance of contributing to this so exciting project. So I'm willing to provide more patches implementing validations in the future. I don't know if this is the most suitable place to ask but, is there any plan to use in the future the OCL compiler that is (or will be) provided by the OCLTools project (http://wiki.eclipse.org/OCLTools)?
Thanks for the contribution! Some general comments: - code can be compressed in some areas for example in MergeNodeOperations.. boolean isValid = true; isValid = mergeNode.getOutgoings().size() == 1; if (!isValid) {} - In UseCaseOperations, I don't believe there is a need for the following: Proposed: List<Association> assocList = new ArrayList<Association>(); if (useCase.getAssociations() != null) { assocList.addAll(useCase.getAssociations()); } for (Association association : assocList) { I believe the original is ok since null is not returned. Original: for (Association association : useCase.getAssociations()) { - The customized UML code formatter could be used to make consistent use of indentation. Looks good! I will create an update with suggested 'tweaks' and we can discuss further.
Created attachment 85114 [details] Update for ActorOperations
Created attachment 85115 [details] Update for ActivityEdgeOperations source or target could be owned by an activity node within some activity.
Created attachment 85127 [details] Update for AssociationOperations re-wrote the validation rules to match OCL more closely.
Hi Javier, Please have a look at the suggested alternative patches for ActorOperations, ActivityEdgeOperations and AssociationOperations. - James.
Thank you for reviewing the code. Your modifications clearly improve it. Nothing to say by my side, but thank you. Javier.
Hi! Any plan to commit soon the new validations in the CVS?
Hi Javier, As it stands, the patch you created cannot be committed because it is incomplete and requires more work. I had made some updates to your patch (for ActorOperations, ActivityEdgeOperations and AssociationOperations) but the remainder of your original patch needs to be updated before I can commit it. Please resubmit your patch with updates to the remaining validation rules so that they more closely match the code style that already exists. Also please double check the correctness of the remaining validation rules that you submitted as some of them are incomplete. Use the 3 updates that I submitted as suggestions on re-writting the remaining ones. I'll be happy to commit the patch once it is updated. Cheers, - James.
Created attachment 228168 [details] Patch for class RegionOperations A small patch that implements validation rules for regions
(In reply to comment #28) > Created attachment 228168 [details] > Patch for class RegionOperations > > A small patch that implements validation rules for regions Thanks for the contribution! I'll look into committing these changes immediately following M6.
(In reply to comment #29) > (In reply to comment #28) > > Created attachment 228168 [details] > > Patch for class RegionOperations > > > > A small patch that implements validation rules for regions > > Thanks for the contribution! I'll look into committing these changes immediately > following M6. OK, I've committed/pushed changes to the 'master' branch in git. Note that I didn't apply the patch as-is because it was missing custom messages (which all of the other implemented validation rules have) and needed to be formatted to be consistent with UML2 style conventions. Ansgar, please take those into account should you consider submitting implementations for other constraints in the future. Thanks!