Skip to main content



      Home
Home » Modeling » QVT-OML » allSubobjectsOfType works with some types.
allSubobjectsOfType works with some types. [message #1837491] Sun, 31 January 2021 22:10 Go to next message
Eclipse UserFriend
Hello,

I am using a KDM instance and I create some queries.

When I use this code:


self.allSubobjectsOfType(code::CodeElement) -> forEach(r){
			
			r.codeRelation[Extends] -> forEach(q){
					
				log("Extends: "+q._from.name + " -> " + q.getTo().name)
			}
	}



The ouput is empty. The problem is that the function does not get types of code::CodeElement, and I dont know why, because it works with other types, for instance MethodUnit, StorableUnit and others.

The xmi is too big to attached it.

Thanks,

Daniel.
Re: allSubobjectsOfType works with some types. [message #1837499 is a reply to message #1837491] Mon, 01 February 2021 03:15 Go to previous messageGo to next message
Eclipse UserFriend
Hi

Could you please attach the full QVTo project?

Daniel San Martín wrote on Sun, 31 January 2021 22:10

The xmi is too big to attached it.

Please create a minimal version that demonstrates the problem. Otherwise it will be really hard to find out what goes wrong.


Kind regards
Christopher
Re: allSubobjectsOfType works with some types. [message #1837501 is a reply to message #1837499] Mon, 01 February 2021 04:36 Go to previous message
Eclipse UserFriend
Hi

Are you sure that you did not mean allSubobjectsOfKind? looks like the same gotcha whereby oclIsType is almost plays a bug. Ditto in Java; xx.getClass() == XX.class rather than xx instanceof XX.

Are you sure that [Extends] is not filtering out all possibilities?

Regards

Ed Willink
Previous Topic:QVTo transformation from command line
Next Topic:QVTo apply stereotype
Goto Forum:
  


Current Time: Wed Jul 02 17:21:26 EDT 2025

Powered by FUDForum. Page generated in 0.03365 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top