eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

Loaded OCL resource does not sync properly when .ocl file is edited #1056

Open eclipse-ocl-bot opened 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 402580 | | Status | NEW | | Importance | P3 normal | | Reported | Mar 06, 2013 15:20 EDT | | Modified | Mar 06, 2013 16:59 EDT | | Version | 3.2.0 | | Reporter | Matt Eby |

Description

I'm encountering a situation where a loaded CompleteOCL resource does not get synchronized properly when the .ocl file is edited with the CompleteOCL editor:

import uml : 'http://www.eclipse.org/uml2/4.0.0/UML#/'

context uml::Class\
    \
    def: alwaysFail1() : Boolean =  \
        self->alwaysFail2()\
        \
    def: alwaysFail2() : Boolean =  \
        false\
        \
    inv alwaysFail:\
        self.alwaysFail1()

The above OCL validates to false as expected. If (with model still open) the .ocl file is edited (for example add whitespace) and saved then the model validation evaluates to invalid. If the model is closed, reopened and CompleteOCL resource loaded it will then evaluate to false as expected.

I did not find this issue addressed in other reports but forgive me if it is a duplicate. Also, this seems to be a problem independent of the metamodel. I originally encountered on a DSL but reduced it to the small example in UML.

Thanks,\ Matt

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Mar 06, 2013 16:59

Yes. I'm aware of synchronization issues; it's not easy.

Now there's a Bugzilla to keep reminding me. Thanks.

At least there's a workaround. I'm afraid that I'm not sure when this general area of functionality will be what I'm looking at.