Skip to main content



      Home
Home » Modeling » ATL » Exception during invocation of operation applyStereotype
Exception during invocation of operation applyStereotype [message #980194] Sun, 11 November 2012 07:40 Go to next message
Eclipse UserFriend
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 05:36 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Exception during invocation of operation applyStereotype [message #990679 is a reply to message #981334] Thu, 13 December 2012 13:27 Go to previous messageGo to next message
Eclipse UserFriend
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 04:22 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Exception during invocation of operation applyStereotype [message #991150 is a reply to message #990783] Mon, 17 December 2012 09:32 Go to previous messageGo to next message
Eclipse UserFriend
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 10:00 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 18:43:58 EDT 2025

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

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

Back to the top