eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

Type inference issue with big OCL file #1633

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 480991 | | Status | RESOLVED DUPLICATE of bug 473249 | | Importance | P3 normal | | Reported | Oct 29, 2015 09:20 EDT | | Modified | Oct 29, 2015 10:16 EDT | | Version | 6.0.0 | | Reporter | Yves BERNARD |

Description

Created attachment 257622\ Screen shot

I experience difficulties with big .ocl files when I expect an expression to be evaluated as one of a more general type than explicitely specified.

Example:

Assume the following query definitions:

context uml::NamedElement\ def: GetName() : String = if self.name->isEmpty() then '' else '"'.concat(self.name).concat('"') endif

context uml::Activity\ def: GetActivityName(): String = self.GetName()

This works fine as long as the file is not too big.

Otherwise, it may happen that the editor shows an error like this: "Unresolved Operation 'UML::Activity::GetName()'".

If the code is modified with an explicit cast, then the error disappears. For instance:

context uml::Activity\ def: GetActivityName(): String = self.oclAsType(uml:NamedElement).GetName()

Clears the error.

In addition it seems that the editor windows is not properly synchronized with problems list. Exlpicit requests for validation (using the contextual menu) generate grey adornments in the left border (rather than red or yellow ones) and those which are colored are sometimes wrongly located (according to the corresponding underlinement, see attached screen shot)

Eclipse version: 4.5.1 (build 20150924-1200)\ OCL version: 6.0.0 v20150608-1714

Yves

OCL_screen shot.png

OCL_screen shot.png

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Oct 29, 2015 09:26

could be

https://bugs.eclipse.org/bugs/show_bug.cgi?id=473249

which is fixed in 6.0.1.

eclipse-ocl-bot commented 1 month ago

By Yves BERNARD on Oct 29, 2015 09:58

Ed,

I updated to 6.0.1 and the problem does not appears anymore. I suggest to close this bug.

Thanks,

Yves

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Oct 29, 2015 10:16

dup

This bug has been marked as a duplicate of bug 473249