Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Exception during invocation of operation applyStereotype
Exception during invocation of operation applyStereotype [message #980194] Sun, 11 November 2012 12:40 Go to next message
Chalmerist SE is currently offline Chalmerist SEFriend
Messages: 1
Registered: November 2012
Junior Member
Hi there,

I'm trying to do a transformation from EAST-ADL to Paryrus UML.
When I apply the Stereotype I get the the exception "Exception during invocation of operation applyStereotype".
Find below the details of the Exception and ATL file.
Could someone please help us with this matter?

profiles: Sequence {IN1!EAST-ADL2}
stereotype: IN1!AnalysisLevel
Exception during invocation of operation applyStereotype on (name: BBW_AnalysisLevel, visibility: <unset>)...


-- @path EA=/Test/domainmodel.ecore
-- @nsURI U/M/L/=/h/t/t/p/://///w/w/w/./e/c/l/i/p/s/e/./o/r/g///u/m/l/2//3.0.0/UML
-- @nsURI profile=/h/t/t/p/://///w/w/w/./p/a/p/y/r/u/s/u/m/l/./o/r/g//EAST-ADL2/1

module fifth;
create OUT : UML from IN : EA, IN1 : profile;

rule topLevelPackage {
	from
		s : EA!EAXML,
		s2 : EA!AnalysisLevel
	to 
		t1 : UML!Model (
		name <- s.topLevelPackage->asSequence().first().shortName
		),
		t2 : UML!Package (
		nestingPackage <- t1,
		name<- s.topLevelPackage->asSequence().first().subPackage->asSequence().first().shortName
		),
		
		t3 : UML!Package(
			nestingPackage <- t2,
			name <- s2.shortName )
	do {
	t1.applyProfile(profile!Profile.allInstances().asSequence().first());
	
	-- store stereotype for later application 
	thisModule.stereo <- profile!Stereotype.allInstances()
	-> any( e | e.name = 'AnalysisLevel');
	
	t3.getAllAppliedProfiles().debug('profiles');
	thisModule.stereo.debug('stereotype');
	
	--apply stereotype to target model element
	t3.applyStereotype(thisModule.stereo);


Re: Exception during invocation of operation applyStereotype [message #981334 is a reply to message #980194] Mon, 12 November 2012 10:36 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi,

When setting up the launch configuration parameters of your transformation (e.g. cf. the "Advanced" tab of the ATL Launch Configuration wizard), have you set the "Support UML2 Stereotypes application" option?

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Exception during invocation of operation applyStereotype [message #990679 is a reply to message #981334] Thu, 13 December 2012 18:27 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
Hi


I resolved the problem as you mention when I run the transformation from Eclipse, but if I try from a java program I cannot make the option work, and I still recive the exception....

options.put("supportUML2Stereotypes", "true");

...

transformationLauncher.launch(ILauncher.RUN_MODE, new NullProgressMonitor(), options,
new FileInputStream("../ATL_prototype/transformations/transf.asm")....


any idea?

thank you!
Re: Exception during invocation of operation applyStereotype [message #990783 is a reply to message #990679] Fri, 14 December 2012 09:22 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Are you using the EMFVMLauncher?
If yes, with the option you've declared, it calls the UML2ModelAdapter that should make your transformation work...

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Exception during invocation of operation applyStereotype [message #991150 is a reply to message #990783] Mon, 17 December 2012 14:32 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
Hello,

Yes, I am using EMFVMLauncher, but it doesnt work.

Now, I could make it work a program which applies a stereotype by code, but it works since I did this
http://www.eclipse.org/forums/index.php/mv/msg/367608/991105/#msg_991105

I am trying to do the same with the program that executes the ATL transformation with no success Sad

Any idea about how could I do that?

BTW, I've just moved to Juno
Re: Exception during invocation of operation applyStereotype [message #991155 is a reply to message #991150] Mon, 17 December 2012 15:00 Go to previous message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
ok, I found the way

resourceSet = ((EMFModelFactory)modelFactory).getResourceSet();

then, I use the "init" function that Mauro and Dario provided to this resourceSet
Previous Topic:Setting map value in the target model
Next Topic:Inter-Model Refenrence, How do I do it correctly?
Goto Forum:
  


Current Time: Thu Apr 25 16:43:42 GMT 2024

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

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

Back to the top