Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumshow to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/476852/#msg_476852
Originally posted by: adilanwar10.yahoo.fr
Hi all,
I m working on a UML profile called VUML, in this profile i need to apply a
stereotype called "viewExtension" to 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 .
i think that something is wrong in my profile definition
I attach the definition file
thanks for any solution
Adil
]]>2008-01-15T16:43:48-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/476855/#msg_476855
After a quick look at your prifile, I cannot spot anything wrong with it.
What is the exception you are getting?
- James.
"Adil Anwar" <adilanwar10@yahoo.fr> wrote in message
news:fminsb$24d$1@build.eclipse.org...
> Hi all,
> I m working on a UML profile called VUML, in this profile i need to apply
> a stereotype called "viewExtension" to 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 .
>
> i think that something is wrong in my profile definition
> I attach the definition file
> thanks for any solution
> Adil
>
>
>
>]]>james bruck2008-01-16T16:52:09-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/625903/#msg_625903
After a quick look at your prifile, I cannot spot anything wrong with it.
What is the exception you are getting?
- James.
"Adil Anwar" <adilanwar10@yahoo.fr> wrote in message
news:fminsb$24d$1@build.eclipse.org...
> Hi all,
> I m working on a UML profile called VUML, in this profile i need to apply
> a stereotype called "viewExtension" to 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 .
>
> i think that something is wrong in my profile definition
> I attach the definition file
> thanks for any solution
> Adil
>
>
>
>]]>james bruck2008-01-16T16:52:09-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/476856/#msg_476856
Originally posted by: adilanwar10.yahoo.fr
Hi James,
Thanks, i will to develop this transformation with ATL language
here a part of my ATL code
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)
Regards,
Adil]]>2008-01-16T17:30:17-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/625904/#msg_625904
Originally posted by: adilanwar10.yahoo.fr
Hi James,
Thanks, i will to develop this transformation with ATL language
here a part of my ATL code
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)
Regards,
Adil]]>2008-01-16T17:30:17-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/476860/#msg_476860
The code in that area looks like this...
if (definition == null || getExtension(element, stereotype) == null
throw new IllegalArgumentException(String.valueOf(stereotype));
}
Is it possible that the stereotype was already previously applied.?
- James.
"Adil Anwar" <adilanwar10@yahoo.fr> wrote in message
news:fmlevj$pnc$1@build.eclipse.org...
> Hi James,
> Thanks, i will to develop this transformation with ATL language
> here a part of my ATL code
>
> vext : UML2!Dependency(
> client <-v,
> supplier <-thisModule.resolveTemp(re.relation,'b')->asSequence().first()
> )
> do{
> v.applyStereotype(thisModule.view);
> vext.applyStereotype(thisModule.viewExtension);
>
> I have got the exception below :
>
> 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)
>
>
> Regards,
> Adil
>]]>james bruck2008-01-17T13:40:30-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/625908/#msg_625908
The code in that area looks like this...
if (definition == null || getExtension(element, stereotype) == null
throw new IllegalArgumentException(String.valueOf(stereotype));
}
Is it possible that the stereotype was already previously applied.?
- James.
"Adil Anwar" <adilanwar10@yahoo.fr> wrote in message
news:fmlevj$pnc$1@build.eclipse.org...
> Hi James,
> Thanks, i will to develop this transformation with ATL language
> here a part of my ATL code
>
> vext : UML2!Dependency(
> client <-v,
> supplier <-thisModule.resolveTemp(re.relation,'b')->asSequence().first()
> )
> do{
> v.applyStereotype(thisModule.view);
> vext.applyStereotype(thisModule.viewExtension);
>
> I have got the exception below :
>
> 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)
>
>
> Regards,
> Adil
>]]>james bruck2008-01-17T13:40:30-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/476861/#msg_476861
Originally posted by: adilanwar10.yahoo.fr
Hi James,
I don't think that, because with the instruction
vext : UML2!Dependency, i will create a new element,' Dependency' ,
without stereotype.
so it's not possible that the stereotype was previously applied,
perhaps the 'definition' variable is null
or getExtension(element, stereotype) returns null
in my profile, after creating the stereotype 'viewExtension' , i create an
extension with the metaclass Dependency, is that true ??
or i have missed somethings
thanks for your help
73.
Adil
"James Bruck" <jbruck@ca.ibm.com> a ]]>2008-01-18T11:55:15-00:00Re: how to apply a stereotype to a dependency programmatically
https://www.eclipse.org/forums/index.php/mv/msg/151552/625909/#msg_625909
Originally posted by: adilanwar10.yahoo.fr
Hi James,
I don't think that, because with the instruction
vext : UML2!Dependency, i will create a new element,' Dependency' ,
without stereotype.
so it's not possible that the stereotype was previously applied,
perhaps the 'definition' variable is null
or getExtension(element, stereotype) returns null
in my profile, after creating the stereotype 'viewExtension' , i create an
extension with the metaclass Dependency, is that true ??
or i have missed somethings
thanks for your help
73.
Adil