Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Refining mode: problems with drop feature
icon5.gif  Refining mode: problems with drop feature [message #1053710] Tue, 07 May 2013 10:55 Go to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi everybody,
I recently started using the refining mode on ATL, I write -- @atlcompiler atl2010 at the start of the compiler, and all my rules right now seemed to work ok.

Then I tried to use the 'drop' feature as follows:

rule Classes2Drop {
	from
		s: UML2!Class (
			 s.getAppliedStereotypes().isEmpty()
		)
	to
		drop
		
}

And there seems to be some kind of error that I don't understand at all, it just says:
Quote:
The object 'org.eclipse.uml2.uml.internal.impl.ClassImpl@110b4ae (name: CreateNewIncidentActionDelegate, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false) (isActive: false)' is not contained in a resource.


So I wondered why this happened and I came up with several questions:
1 - do all the elements contained in these classes get deleted too?
2 - What happenes to the elements that reference these classes, or any other dropped element? is that what causes this error?
3 - what else could be the cause for this error?
I know it says that that element is not contained in a resource, but that doesn't seem to be the cased, also it seems to be an element of the type class, I don't get it.

If I change the code to address a certain stereotype like this:
rule Classes2Drop {
	from
		s: UML2!Class (
			 s.getAppliedStereotype('profile::Perspective').oclIsUndefined()
		)
	to
		drop
		
}

I get exactly the same error.
I didn't find much information online, so I'm completely lost here, I hope you guys can help!

Regards,
Javier
Re: Refining mode: problems with drop feature [message #1053726 is a reply to message #1053710] Tue, 07 May 2013 12:00 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Javier García wrote on Tue, 07 May 2013 12:55
Hi everybody,
I recently started using the refining mode on ATL, I write -- @atlcompiler atl2010 at the start of the compiler, and all my rules right now seemed to work ok.

Then I tried to use the 'drop' feature as follows:

rule Classes2Drop {
	from
		s: UML2!Class (
			 s.getAppliedStereotypes().isEmpty()
		)
	to
		drop
		
}

And there seems to be some kind of error that I don't understand at all, it just says:
Quote:
The object 'org.eclipse.uml2.uml.internal.impl.ClassImpl@110b4ae (name: CreateNewIncidentActionDelegate, visibility: <unset>) (isLeaf: false, isAbstract: false, isFinalSpecialization: false) (isActive: false)' is not contained in a resource.


So I wondered why this happened and I came up with several questions:
1 - do all the elements contained in these classes get deleted too?

Yes, as described in the documentation the "drop" feature is implementing a cascade-delete strategy (only considering containment references of course).

Quote:

2 - What happenes to the elements that reference these classes, or any other dropped element? is that what causes this error?

Such references are then supposedly set to OclUndefined (i.e.; no element).

Quote:

3 - what else could be the cause for this error?

It seems that one Class element is not contained anymore in any other element.
Have you already tried to remove your rule to see if this error actually comes from this specific rule?
Have you taken a look to other rules manipulating Class elements and that may cause the error (in conjunction with this deletion rule)?

Quote:

I know it says that that element is not contained in a resource, but that doesn't seem to be the cased, also it seems to be an element of the type class, I don't get it.

If I change the code to address a certain stereotype like this:
rule Classes2Drop {
	from
		s: UML2!Class (
			 s.getAppliedStereotype('profile::Perspective').oclIsUndefined()
		)
	to
		drop
		
}

I get exactly the same error.
I didn't find much information online, so I'm completely lost here, I hope you guys can help!

Regards,
Javier

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Refining mode: problems with drop feature [message #1053731 is a reply to message #1053726] Tue, 07 May 2013 12:23 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Isn't that just a warning ?
Re: Refining mode: problems with drop feature [message #1055657 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi,
Yes, it seems to be a warning as the transformation actually gets done properly (or so it seems) but since it shows up in red I just assumed it was an exception and the transformation wasn't being done.

Hugo, regarding what you said, yes I tested it was that rule the one bringing up the issue, since when I delete it it runs smoothly.

I've been testing more the refining mode and I don't quite understand this warning, as in some cases what I actually want to do is delete the elements that are not contained in a resource (and it does delete said elements) so I don't know if this means that the element is transformed but without a container, which also doesn't seem right since all elements are contained in something.

Anyways, if it's just a warning it's no big deal and I can go on, thank you both!
Re: Refining mode: problems with drop feature [message #1055672 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:33]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055744 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055817 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055818 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055896 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055897 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055974 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1055975 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056053 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056054 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056135 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:32]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056136 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:31]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056220 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:31]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056221 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:31]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056306 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:31]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056307 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:31]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056394 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:30]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056395 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:30]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056486 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:30]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056487 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:30]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056581 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:30]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056582 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:29]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056677 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:29]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056678 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:29]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056773 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:29]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056774 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056871 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056872 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056972 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1056973 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057075 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057076 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057180 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:28]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057181 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:27]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057284 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:27]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057285 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:27]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057389 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:27]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057390 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:27]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057495 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:27]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057496 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:26]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057607 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:26]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057608 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:26]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057715 is a reply to message #1053731] Wed, 08 May 2013 10:50 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:26]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057716 is a reply to message #1053731] Wed, 08 May 2013 10:51 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
No Message Body

[Updated on: Thu, 09 May 2013 08:26]

Report message to a moderator

Re: Refining mode: problems with drop feature [message #1057980 is a reply to message #1055672] Fri, 10 May 2013 10:08 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi again guys,
first sorry for writing the same message so many times, I don't even know how that happened.

Second, I am still getting the same error or warning as you pointed out, BUT now I'm using Ant to run the transformation and after running this, it can't save the file because it shows this same error, the exact message is:

Quote:

BUILD FAILED
C:\Users\A555206\e3.6\workspace\RCP2GWTTransformationChain\build.xml:22: The object 'org.eclipse.uml2.uml.internal.impl.InterfaceImpl@2140bb (name: MapGraphic, visibility: <unset>) (isLeaf: false, isAbstract: false)' is not contained in a resource.


I thought that since it uses the same input and output model it'd get saved if I didn't use the save feature, but that doesn't seem to work.
Anyways, it runs the transformation without an error, the error is when saving the file, so I don't know if that really makes a difference though.
Hope someone knows what's wrong!
Re: Refining mode: problems with drop feature [message #1058306 is a reply to message #1057980] Mon, 13 May 2013 14:08 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Do you observe the same behavior when running your transformation via a launch configuration for instance?
If you are able to save/serialize the resulting model in that case, have you tried to then open it using a model editor/browser (such as the MoDisco Model Browser) and navigate it in order to find out the concerned element(s)?

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Refining mode: problems with drop feature [message #1058452 is a reply to message #1058306] Tue, 14 May 2013 07:46 Go to previous message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi Hugo,
Yes, if I launch them with the normal launch configuration they work perfectly but showing the message "The object 'org.eclipse.uml2.uml.internal.impl.InterfaceImpl@2140bb (name: MapGraphic, visibility: <unset>) (isLeaf: false, isAbstract: false)' is not contained in a resource." which I thought to be an error, but it creates the transformed model anyways.
No, the element doesn't exist, I can open the model perfectly with any editor, but I tried finding the element this error refers to an I couldn't find it in the output model, but it does exist in the input model.
The object does exist in the input model, and in the input model it's not contained in any resource, which is exactly the reason I use this refining module, to delete any element that is not contained in any resource.

To explain a bit further my transformation chain:
1st - Run ATL module with a superimposed module to copy only the packages and classes I want.
2nd - (Refining)Delete all the elements that are not contained in any resource
3rd - (Refining) Delete elements that point to deleted elements (dependencies, associations, interfacerealizations...)

So the first transformation leaves some elements outside of any model, they appear in the root, at the same level as the root model.
The second transformation deletes these elements and shows up that error above, but the input model generated is clean.
The third transformation shows up an error of the same kind, but with a dependency, but I don't understand it since all elements in its input model are contained in a resource.

I hope I explained myself good, but if there's anything that needs more explanation just ask Smile

Thanks for your help!
regards,
Javier
Previous Topic:Generation of theTransformation in a java application
Next Topic:Problem in a helper
Goto Forum:
  


Current Time: Thu Mar 28 14:24:39 GMT 2024

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

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

Back to the top