Home » Modeling » UML2 » Problems with static profiles in fragment bundle
|
Re: Problems with static profiles in fragment bundle [message #502036 is a reply to message #501650] |
Fri, 04 December 2009 20:38 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
There is an expectation that if there is an EAnnotation under the profile,
then the first reference element under the EAnnotation is the "defined"
profile. If you are using static profile definition, then there shouldn't
be an EAnnotation under your profile. If not, then you should see the
Ecore representation under the EAnnotation.
If possible, please post a small snippet of the "top" part of your profile.
Try removing the EAnnotation under your profile if you are using static
profile defn.
Ensure that the profile is defined if you are not using static profiles.
Cheers,
- James.
"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:hf7vug$1tu$1@build.eclipse.org...
> Hi all,
>
> i tried to separate the profile.uml model from the static implementation
> via Eclipse's fragment bundle mechanism. So i declared the plugin with the
> profile.uml as host for the static implementation bundle. The idea by
> separating them is to be flexible enough to use one physical profile.uml
> file as the foundation for several profile implementations.
>
> For example, if you want to implement a profile for RSA, you have to use
> RSA-specific extension points. But they are only available in RSAm not in
> a free eclipse distribution for example. That offers me (if it works) the
> possibility to modify the profile.uml isolated to a spefific tool.
> (Papyrus has also an dedicated extension point for profiles).
>
> But, it seems that it doesn't work with fragments. Currently, i'm not able
> to select the generated profile in the UML editor. When i add it manually
> in the XMI it is correctly applied, but by trying to add an stereotype, an
> exception is thrown:
>
> java.lang.ClassCastException:
> org.eclipse.uml2.uml.internal.impl.ProfileImpl cannot be cast to
> org.eclipse.emf.ecore.EPackage
> at
> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:69)
> at
> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:311)
> at
> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:90)
> at
> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:320)
> at
> org.eclipse.uml2.uml.internal.operations.ElementOperations.g etApplicableStereotypes(ElementOperations.java:1521)
> at
> org.eclipse.uml2.uml.internal.impl.ElementImpl.getApplicable Stereotypes(ElementImpl.java:525)
> at
> org.eclipse.uml2.uml.editor.actions.ApplyStereotypeAction.ru n(ApplyStereotypeAction.java:60)
> at
> org.eclipse.emf.edit.ui.action.CommandAction.runWithEvent(Co mmandAction.java:200)
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
>
>
> It seems as that the implementation is not recognized, or something
> similar.
>
> Does anyone know what'S going wrong here?
>
> Thanks Timothy
|
|
|
Re: Problems with static profiles in fragment bundle [message #502162 is a reply to message #502036] |
Sun, 06 December 2009 19:29 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi James,
no, there is no "defined" annotation, since i use static profile. The
exceptional thing i tried was to separate the host plugin with the
profile model (*.uml) and the plugin with the generated profile code as
fragment.
As mentioned before, when i load the profile manually via "Load
Ressource" it is found, but adding the profile manually as profile
causes this ClassCastException. May this depend on different class
loaders? Do a fragment and host plugin have different class loaders?
Timothy
James Bruck schrieb:
> There is an expectation that if there is an EAnnotation under the profile,
> then the first reference element under the EAnnotation is the "defined"
> profile. If you are using static profile definition, then there shouldn't
> be an EAnnotation under your profile. If not, then you should see the
> Ecore representation under the EAnnotation.
>
> If possible, please post a small snippet of the "top" part of your profile.
> Try removing the EAnnotation under your profile if you are using static
> profile defn.
> Ensure that the profile is defined if you are not using static profiles.
>
> Cheers,
> - James.
>
> "Timothy Marc" <timothymarc@freenet.de> wrote in message
> news:hf7vug$1tu$1@build.eclipse.org...
>> Hi all,
>>
>> i tried to separate the profile.uml model from the static implementation
>> via Eclipse's fragment bundle mechanism. So i declared the plugin with the
>> profile.uml as host for the static implementation bundle. The idea by
>> separating them is to be flexible enough to use one physical profile.uml
>> file as the foundation for several profile implementations.
>>
>> For example, if you want to implement a profile for RSA, you have to use
>> RSA-specific extension points. But they are only available in RSAm not in
>> a free eclipse distribution for example. That offers me (if it works) the
>> possibility to modify the profile.uml isolated to a spefific tool.
>> (Papyrus has also an dedicated extension point for profiles).
>>
>> But, it seems that it doesn't work with fragments. Currently, i'm not able
>> to select the generated profile in the UML editor. When i add it manually
>> in the XMI it is correctly applied, but by trying to add an stereotype, an
>> exception is thrown:
>>
>> java.lang.ClassCastException:
>> org.eclipse.uml2.uml.internal.impl.ProfileImpl cannot be cast to
>> org.eclipse.emf.ecore.EPackage
>> at
>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:69)
>> at
>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:311)
>> at
>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:90)
>> at
>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:320)
>> at
>> org.eclipse.uml2.uml.internal.operations.ElementOperations.g etApplicableStereotypes(ElementOperations.java:1521)
>> at
>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getApplicable Stereotypes(ElementImpl.java:525)
>> at
>> org.eclipse.uml2.uml.editor.actions.ApplyStereotypeAction.ru n(ApplyStereotypeAction.java:60)
>> at
>> org.eclipse.emf.edit.ui.action.CommandAction.runWithEvent(Co mmandAction.java:200)
>> at
>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
>>
>>
>> It seems as that the implementation is not recognized, or something
>> similar.
>>
>> Does anyone know what'S going wrong here?
>>
>> Thanks Timothy
>
>
|
|
|
Re: Problems with static profiles in fragment bundle [message #502283 is a reply to message #502162] |
Mon, 07 December 2009 15:23 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
If there is no "defined" annotation, then you should not be getting to the
point in the code producing the error.
There is a check for the nsURI not being null before the cast to EPackage.
- James.
"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:hfh0n7$pn7$1@build.eclipse.org...
> Hi James,
>
> no, there is no "defined" annotation, since i use static profile. The
> exceptional thing i tried was to separate the host plugin with the profile
> model (*.uml) and the plugin with the generated profile code as fragment.
>
> As mentioned before, when i load the profile manually via "Load Ressource"
> it is found, but adding the profile manually as profile causes this
> ClassCastException. May this depend on different class loaders? Do a
> fragment and host plugin have different class loaders?
>
> Timothy
>
> James Bruck schrieb:
>> There is an expectation that if there is an EAnnotation under the
>> profile, then the first reference element under the EAnnotation is the
>> "defined" profile. If you are using static profile definition, then
>> there shouldn't be an EAnnotation under your profile. If not, then you
>> should see the Ecore representation under the EAnnotation.
>>
>> If possible, please post a small snippet of the "top" part of your
>> profile.
>> Try removing the EAnnotation under your profile if you are using static
>> profile defn.
>> Ensure that the profile is defined if you are not using static profiles.
>>
>> Cheers,
>> - James.
>>
>> "Timothy Marc" <timothymarc@freenet.de> wrote in message
>> news:hf7vug$1tu$1@build.eclipse.org...
>>> Hi all,
>>>
>>> i tried to separate the profile.uml model from the static implementation
>>> via Eclipse's fragment bundle mechanism. So i declared the plugin with
>>> the profile.uml as host for the static implementation bundle. The idea
>>> by separating them is to be flexible enough to use one physical
>>> profile.uml file as the foundation for several profile implementations.
>>>
>>> For example, if you want to implement a profile for RSA, you have to use
>>> RSA-specific extension points. But they are only available in RSAm not
>>> in a free eclipse distribution for example. That offers me (if it works)
>>> the possibility to modify the profile.uml isolated to a spefific tool.
>>> (Papyrus has also an dedicated extension point for profiles).
>>>
>>> But, it seems that it doesn't work with fragments. Currently, i'm not
>>> able to select the generated profile in the UML editor. When i add it
>>> manually in the XMI it is correctly applied, but by trying to add an
>>> stereotype, an exception is thrown:
>>>
>>> java.lang.ClassCastException:
>>> org.eclipse.uml2.uml.internal.impl.ProfileImpl cannot be cast to
>>> org.eclipse.emf.ecore.EPackage
>>> at
>>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:69)
>>> at
>>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:311)
>>> at
>>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:90)
>>> at
>>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:320)
>>> at
>>> org.eclipse.uml2.uml.internal.operations.ElementOperations.g etApplicableStereotypes(ElementOperations.java:1521)
>>> at
>>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getApplicable Stereotypes(ElementImpl.java:525)
>>> at
>>> org.eclipse.uml2.uml.editor.actions.ApplyStereotypeAction.ru n(ApplyStereotypeAction.java:60)
>>> at
>>> org.eclipse.emf.edit.ui.action.CommandAction.runWithEvent(Co mmandAction.java:200)
>>> at
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
>>>
>>>
>>> It seems as that the implementation is not recognized, or something
>>> similar.
>>>
>>> Does anyone know what'S going wrong here?
>>>
>>> Thanks Timothy
>>
|
|
|
Re: Problems with static profiles in fragment bundle [message #628106 is a reply to message #501650] |
Fri, 04 December 2009 20:38 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
There is an expectation that if there is an EAnnotation under the profile,
then the first reference element under the EAnnotation is the "defined"
profile. If you are using static profile definition, then there shouldn't
be an EAnnotation under your profile. If not, then you should see the
Ecore representation under the EAnnotation.
If possible, please post a small snippet of the "top" part of your profile.
Try removing the EAnnotation under your profile if you are using static
profile defn.
Ensure that the profile is defined if you are not using static profiles.
Cheers,
- James.
"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:hf7vug$1tu$1@build.eclipse.org...
> Hi all,
>
> i tried to separate the profile.uml model from the static implementation
> via Eclipse's fragment bundle mechanism. So i declared the plugin with the
> profile.uml as host for the static implementation bundle. The idea by
> separating them is to be flexible enough to use one physical profile.uml
> file as the foundation for several profile implementations.
>
> For example, if you want to implement a profile for RSA, you have to use
> RSA-specific extension points. But they are only available in RSAm not in
> a free eclipse distribution for example. That offers me (if it works) the
> possibility to modify the profile.uml isolated to a spefific tool.
> (Papyrus has also an dedicated extension point for profiles).
>
> But, it seems that it doesn't work with fragments. Currently, i'm not able
> to select the generated profile in the UML editor. When i add it manually
> in the XMI it is correctly applied, but by trying to add an stereotype, an
> exception is thrown:
>
> java.lang.ClassCastException:
> org.eclipse.uml2.uml.internal.impl.ProfileImpl cannot be cast to
> org.eclipse.emf.ecore.EPackage
> at
> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:69)
> at
> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:311)
> at
> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:90)
> at
> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:320)
> at
> org.eclipse.uml2.uml.internal.operations.ElementOperations.g etApplicableStereotypes(ElementOperations.java:1521)
> at
> org.eclipse.uml2.uml.internal.impl.ElementImpl.getApplicable Stereotypes(ElementImpl.java:525)
> at
> org.eclipse.uml2.uml.editor.actions.ApplyStereotypeAction.ru n(ApplyStereotypeAction.java:60)
> at
> org.eclipse.emf.edit.ui.action.CommandAction.runWithEvent(Co mmandAction.java:200)
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
>
>
> It seems as that the implementation is not recognized, or something
> similar.
>
> Does anyone know what'S going wrong here?
>
> Thanks Timothy
|
|
|
Re: Problems with static profiles in fragment bundle [message #628108 is a reply to message #502036] |
Sun, 06 December 2009 19:29 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi James,
no, there is no "defined" annotation, since i use static profile. The
exceptional thing i tried was to separate the host plugin with the
profile model (*.uml) and the plugin with the generated profile code as
fragment.
As mentioned before, when i load the profile manually via "Load
Ressource" it is found, but adding the profile manually as profile
causes this ClassCastException. May this depend on different class
loaders? Do a fragment and host plugin have different class loaders?
Timothy
James Bruck schrieb:
> There is an expectation that if there is an EAnnotation under the profile,
> then the first reference element under the EAnnotation is the "defined"
> profile. If you are using static profile definition, then there shouldn't
> be an EAnnotation under your profile. If not, then you should see the
> Ecore representation under the EAnnotation.
>
> If possible, please post a small snippet of the "top" part of your profile.
> Try removing the EAnnotation under your profile if you are using static
> profile defn.
> Ensure that the profile is defined if you are not using static profiles.
>
> Cheers,
> - James.
>
> "Timothy Marc" <timothymarc@freenet.de> wrote in message
> news:hf7vug$1tu$1@build.eclipse.org...
>> Hi all,
>>
>> i tried to separate the profile.uml model from the static implementation
>> via Eclipse's fragment bundle mechanism. So i declared the plugin with the
>> profile.uml as host for the static implementation bundle. The idea by
>> separating them is to be flexible enough to use one physical profile.uml
>> file as the foundation for several profile implementations.
>>
>> For example, if you want to implement a profile for RSA, you have to use
>> RSA-specific extension points. But they are only available in RSAm not in
>> a free eclipse distribution for example. That offers me (if it works) the
>> possibility to modify the profile.uml isolated to a spefific tool.
>> (Papyrus has also an dedicated extension point for profiles).
>>
>> But, it seems that it doesn't work with fragments. Currently, i'm not able
>> to select the generated profile in the UML editor. When i add it manually
>> in the XMI it is correctly applied, but by trying to add an stereotype, an
>> exception is thrown:
>>
>> java.lang.ClassCastException:
>> org.eclipse.uml2.uml.internal.impl.ProfileImpl cannot be cast to
>> org.eclipse.emf.ecore.EPackage
>> at
>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:69)
>> at
>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:311)
>> at
>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:90)
>> at
>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:320)
>> at
>> org.eclipse.uml2.uml.internal.operations.ElementOperations.g etApplicableStereotypes(ElementOperations.java:1521)
>> at
>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getApplicable Stereotypes(ElementImpl.java:525)
>> at
>> org.eclipse.uml2.uml.editor.actions.ApplyStereotypeAction.ru n(ApplyStereotypeAction.java:60)
>> at
>> org.eclipse.emf.edit.ui.action.CommandAction.runWithEvent(Co mmandAction.java:200)
>> at
>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
>>
>>
>> It seems as that the implementation is not recognized, or something
>> similar.
>>
>> Does anyone know what'S going wrong here?
>>
>> Thanks Timothy
>
>
|
|
|
Re: Problems with static profiles in fragment bundle [message #628110 is a reply to message #502162] |
Mon, 07 December 2009 15:23 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
If there is no "defined" annotation, then you should not be getting to the
point in the code producing the error.
There is a check for the nsURI not being null before the cast to EPackage.
- James.
"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:hfh0n7$pn7$1@build.eclipse.org...
> Hi James,
>
> no, there is no "defined" annotation, since i use static profile. The
> exceptional thing i tried was to separate the host plugin with the profile
> model (*.uml) and the plugin with the generated profile code as fragment.
>
> As mentioned before, when i load the profile manually via "Load Ressource"
> it is found, but adding the profile manually as profile causes this
> ClassCastException. May this depend on different class loaders? Do a
> fragment and host plugin have different class loaders?
>
> Timothy
>
> James Bruck schrieb:
>> There is an expectation that if there is an EAnnotation under the
>> profile, then the first reference element under the EAnnotation is the
>> "defined" profile. If you are using static profile definition, then
>> there shouldn't be an EAnnotation under your profile. If not, then you
>> should see the Ecore representation under the EAnnotation.
>>
>> If possible, please post a small snippet of the "top" part of your
>> profile.
>> Try removing the EAnnotation under your profile if you are using static
>> profile defn.
>> Ensure that the profile is defined if you are not using static profiles.
>>
>> Cheers,
>> - James.
>>
>> "Timothy Marc" <timothymarc@freenet.de> wrote in message
>> news:hf7vug$1tu$1@build.eclipse.org...
>>> Hi all,
>>>
>>> i tried to separate the profile.uml model from the static implementation
>>> via Eclipse's fragment bundle mechanism. So i declared the plugin with
>>> the profile.uml as host for the static implementation bundle. The idea
>>> by separating them is to be flexible enough to use one physical
>>> profile.uml file as the foundation for several profile implementations.
>>>
>>> For example, if you want to implement a profile for RSA, you have to use
>>> RSA-specific extension points. But they are only available in RSAm not
>>> in a free eclipse distribution for example. That offers me (if it works)
>>> the possibility to modify the profile.uml isolated to a spefific tool.
>>> (Papyrus has also an dedicated extension point for profiles).
>>>
>>> But, it seems that it doesn't work with fragments. Currently, i'm not
>>> able to select the generated profile in the UML editor. When i add it
>>> manually in the XMI it is correctly applied, but by trying to add an
>>> stereotype, an exception is thrown:
>>>
>>> java.lang.ClassCastException:
>>> org.eclipse.uml2.uml.internal.impl.ProfileImpl cannot be cast to
>>> org.eclipse.emf.ecore.EPackage
>>> at
>>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:69)
>>> at
>>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:311)
>>> at
>>> org.eclipse.uml2.uml.internal.operations.ProfileApplicationO perations.getAppliedDefinition(ProfileApplicationOperations. java:90)
>>> at
>>> org.eclipse.uml2.uml.internal.impl.ProfileApplicationImpl.ge tAppliedDefinition(ProfileApplicationImpl.java:320)
>>> at
>>> org.eclipse.uml2.uml.internal.operations.ElementOperations.g etApplicableStereotypes(ElementOperations.java:1521)
>>> at
>>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getApplicable Stereotypes(ElementImpl.java:525)
>>> at
>>> org.eclipse.uml2.uml.editor.actions.ApplyStereotypeAction.ru n(ApplyStereotypeAction.java:60)
>>> at
>>> org.eclipse.emf.edit.ui.action.CommandAction.runWithEvent(Co mmandAction.java:200)
>>> at
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
>>>
>>>
>>> It seems as that the implementation is not recognized, or something
>>> similar.
>>>
>>> Does anyone know what'S going wrong here?
>>>
>>> Thanks Timothy
>>
|
|
| |
Goto Forum:
Current Time: Sat Apr 27 01:01:49 GMT 2024
Powered by FUDForum. Page generated in 0.03762 seconds
|