xmf-xmodeler / Mosaic

Java client for XMF2
0 stars 2 forks source link

inconsistent implementation of function allInstances() #72

Closed bjbenner closed 8 years ago

bjbenner commented 8 years ago

The implementation of the function allInstances() at XCore::Class (returntype: Seq) is different to teh implementation of FMML::MetaClass (returntype: Set). Why is this the Case? Is it possible to use the same implementation?

bjbenner commented 8 years ago

Class @Operation allInstances():Seq(Object) Kernel_allInstances(self.allSubclasses()) end

MetaClass @Operation allInstances():XCore::Element Root.allContentsOf(self) end

bjbenner commented 8 years ago

check, if method in MetaClass can be replaced by implementation of Class. Use file search

bjbenner commented 8 years ago

Kernel_allInstances does not work for multilevel extension. Why is this the case?

jgulden commented 8 years ago

AllInstances is a modified Garbage Collector. GC seems to operate on object snapshots only, and seems to ignore contents of class models. This behaviour should maybe be changed in general, since with the introduction of multi-level models, class diagrams typically contain instances as well.

jgulden commented 8 years ago

Special garbage collector in class "AllInstances" modifies gc behaviour to push all objects with matching .of() value on the stack. Does not work as intended now, needs to be fixed.

jgulden commented 8 years ago

Fixed in commit 97ffac4.