[ATL] problem with applystereotype [message #78327] |
Fri, 04 April 2008 11:22  |
Eclipse User |
|
|
|
Originally posted by: adilanwar10.yahoo.fr
Hi all,
sorry if this problem has been posted previously,
I need to apply a stereotype to a Dependency relationship
the classes members of this dependency are correctly stereotyped using the
applyStereotype operation, but when I do the same with the dependency
element i have an exception.
the code is this :
vext : UML2!Dependency(
name <- 'dep1',
client <- c,
visibility <-#public,
supplier <-thisModule.resolveTemp(re.relation,'c')->asSequence().first()
)
do{
c.applyStereotype(thisModule.view);
-- vext.applyStereotype(thisModule.viewExtension);
regards,
Adil
GRAVE: message: ERROR: exception during invocation of operation
applyStereotype on UML2!Dependency (java method: public
org.eclipse.emf.ecore.EObject
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereoty pe(org.eclipse.uml2.uml.Stereotype))
GRAVE: exception:
GRAVE: org.eclipse.uml2.uml.internal.impl.StereotypeImpl@6a67ab (name:
viewExtension, visibility: <unset>) (isLeaf: false, visibility: public,
isAbstract: false) (isActive: false, isAbstract: false)
java.lang.IllegalArgumentException:
org.eclipse.uml2.uml.internal.impl.StereotypeImpl@6a67ab (name:
viewExtension, visibility: <unset>) (isLeaf: false, visibility: public,
isAbstract: false) (isActive: false, isAbstract: false)
at
org.eclipse.uml2.uml.internal.operations.ElementOperations.a pplyStereotype(ElementOperations.java:1410)
at
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereoty pe(ElementImpl.java:501)
|
|
|
|
|
|
|
|
Re: [ATL] problem with applystereotype [message #78657 is a reply to message #78642] |
Thu, 10 April 2008 06:39  |
Eclipse User |
|
|
|
I encountered the same issue, the profile is correct, and is applied and
the uml2 model handler is not able to set values for the stereotypes. I
think the modelhandler does not refresh the profile, because this only
happens if the profile is recreated, and if you stop Eclipse and
restart, all worked well.
So it seem a caching issue, i haven't look in the code for details. But
when refining the profile a intern ECORE model is created, and i think
the modelhandler uses the old one, so it's totally correct to raise an
error because the stereotype is not part of the applied profile, which
is the new one.
Perhaps filling an bug report would be appropriated.
greetings, urs.
|
|
|
Powered by
FUDForum. Page generated in 0.03460 seconds