Closed eclipse-ocl-bot closed 1 month ago
By Ed Willink on Feb 22, 2017 05:35
Main problem is that, oops, UML2AS does not copy the isStatic attribute so there isu actually a non-static isFound method when OCL syntax/semantic checks.
By Ed Willink on Feb 22, 2017 05:56
Once the isStatic copying is added to UML2AS (and AS2UML) for Operations (and Properties), and a body is added to the test the testConsole_Bug512553() JUnit test demonstrates that the operation is parsed and executes too.
By Ed Willink on Feb 22, 2017 07:45
Pushed to master for M6.
By Ed Willink on Mar 17, 2017 07:35
(In reply to Ed Willink from comment #2)
JUnit test demonstrates that the operation is parsed and executes too.
But on closer inspection the "::" / "." is wrong.
test::Person::isFound('John')
is a correct static invocation (test checks for parse fail)
test::Person.isFound('John')
which the test checks is a compatibility static invocation that enables allInstances() to work.
By Ed Willink on Mar 17, 2017 13:12
Problem is that null rather than the static type is passed to EssentialOCLCSLeft2RightVisitor.getInvocations as the fallback static typeValue.
Pushed to master for M7.
| --- | --- | | Bugzilla Link | 512553 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Feb 22, 2017 04:48 EDT | | Modified | Mar 17, 2017 13:12 EDT | | Reporter | Ed Willink |
Description
From the OCL newsgroup: Custom static operation
Here is the sample model:
<?xml version="1.0" encoding="UTF-8"?>\