Home » Modeling » UML2 » Programmatically retrieving applicable profiles
Programmatically retrieving applicable profiles [message #476458] |
Wed, 07 November 2007 06:22  |
Eclipse User |
|
|
|
Originally posted by: jp.schoch.fr.ibm.com
In earlier versions of the UML2 API, I thought it was possible to
retrieve all applicable profiles for a model or package (with something
like model.getApplicableProfiles()). This seems to be no longer the
case: I can access applied profiles, and I can apply a profile, but I
just don't know how to retrieve the applicable/deployed profiles... Any
help would be greatly appreciated.
Regards
JP
|
|
| | |
Re: Programmatically retrieving applicable profiles [message #476533 is a reply to message #476526] |
Tue, 13 November 2007 09:24   |
Eclipse User |
|
|
|
Hi JP,
To my knowledge there never existed a function called
model.getApplicableProfiles().
There is a function in ApplyProfileAction that looks at all the resources in
a resource set and if thre is a profile it presents it as a choice to be
chosen. You might want to look at that.
Otherwise applying a profile that is deployed or not is identical. You
need to load the profile as a resource, get at the profile therein, and then
apply it. The URL used to load the resource might be platform specific or
you may use URI converters but the process is the same.
- James.
"JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
news:fh9b7a$slm$1@build.eclipse.org...
> No, I really want to apply a deployed profile programmatically. I know
> how to retrieve a profile from my workspace and apply it, but I don't
> know how to retrieve deployed profiles.
>
> Cheers
> JP
>
> James Bruck wrote:
>> Are you thinking of Element::getApplicableStereotypes() or
>> Element::isStereotypeApplicable() perhaps?
>>
>> Cheers,
>> - James.
>>
>> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
>> news:fgs74j$ch9$1@build.eclipse.org...
>>> In earlier versions of the UML2 API, I thought it was possible to
>>> retrieve all applicable profiles for a model or package (with something
>>> like model.getApplicableProfiles()). This seems to be no longer the
>>> case: I can access applied profiles, and I can apply a profile, but I
>>> just don't know how to retrieve the applicable/deployed profiles... Any
>>> help would be greatly appreciated.
>>>
>>> Regards
>>> JP
>>
>>
>
|
|
| |
Re: Programmatically retrieving applicable profiles [message #476538 is a reply to message #476533] |
Wed, 14 November 2007 08:51  |
Eclipse User |
|
|
|
Originally posted by: jp.schoch.fr.ibm.com
James,
Thanks for your help. I had arrived at the same conclusion: I need to
load the profile as a resource.
Best Regards
JP
James Bruck wrote:
> Hi JP,
>
> To my knowledge there never existed a function called
> model.getApplicableProfiles().
>
> There is a function in ApplyProfileAction that looks at all the resources in
> a resource set and if thre is a profile it presents it as a choice to be
> chosen. You might want to look at that.
>
> Otherwise applying a profile that is deployed or not is identical. You
> need to load the profile as a resource, get at the profile therein, and then
> apply it. The URL used to load the resource might be platform specific or
> you may use URI converters but the process is the same.
>
> - James.
>
>
> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
> news:fh9b7a$slm$1@build.eclipse.org...
>> No, I really want to apply a deployed profile programmatically. I know
>> how to retrieve a profile from my workspace and apply it, but I don't
>> know how to retrieve deployed profiles.
>>
>> Cheers
>> JP
>>
>> James Bruck wrote:
>>> Are you thinking of Element::getApplicableStereotypes() or
>>> Element::isStereotypeApplicable() perhaps?
>>>
>>> Cheers,
>>> - James.
>>>
>>> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
>>> news:fgs74j$ch9$1@build.eclipse.org...
>>>> In earlier versions of the UML2 API, I thought it was possible to
>>>> retrieve all applicable profiles for a model or package (with something
>>>> like model.getApplicableProfiles()). This seems to be no longer the
>>>> case: I can access applied profiles, and I can apply a profile, but I
>>>> just don't know how to retrieve the applicable/deployed profiles... Any
>>>> help would be greatly appreciated.
>>>>
>>>> Regards
>>>> JP
>>>
>
>
|
|
|
Re: Programmatically retrieving applicable profiles [message #625439 is a reply to message #476458] |
Wed, 07 November 2007 10:36  |
Eclipse User |
|
|
|
Are you thinking of Element::getApplicableStereotypes() or
Element::isStereotypeApplicable() perhaps?
Cheers,
- James.
"JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
news:fgs74j$ch9$1@build.eclipse.org...
> In earlier versions of the UML2 API, I thought it was possible to retrieve
> all applicable profiles for a model or package (with something like
> model.getApplicableProfiles()). This seems to be no longer the case: I can
> access applied profiles, and I can apply a profile, but I just don't know
> how to retrieve the applicable/deployed profiles... Any help would be
> greatly appreciated.
>
> Regards
> JP
|
|
|
Re: Programmatically retrieving applicable profiles [message #625441 is a reply to message #476523] |
Mon, 12 November 2007 05:52  |
Eclipse User |
|
|
|
Originally posted by: jp.schoch.fr.ibm.com
No, I really want to apply a deployed profile programmatically. I know
how to retrieve a profile from my workspace and apply it, but I don't
know how to retrieve deployed profiles.
Cheers
JP
James Bruck wrote:
> Are you thinking of Element::getApplicableStereotypes() or
> Element::isStereotypeApplicable() perhaps?
>
> Cheers,
> - James.
>
> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
> news:fgs74j$ch9$1@build.eclipse.org...
>> In earlier versions of the UML2 API, I thought it was possible to retrieve
>> all applicable profiles for a model or package (with something like
>> model.getApplicableProfiles()). This seems to be no longer the case: I can
>> access applied profiles, and I can apply a profile, but I just don't know
>> how to retrieve the applicable/deployed profiles... Any help would be
>> greatly appreciated.
>>
>> Regards
>> JP
>
>
|
|
|
Re: Programmatically retrieving applicable profiles [message #625447 is a reply to message #476526] |
Tue, 13 November 2007 09:24  |
Eclipse User |
|
|
|
Hi JP,
To my knowledge there never existed a function called
model.getApplicableProfiles().
There is a function in ApplyProfileAction that looks at all the resources in
a resource set and if thre is a profile it presents it as a choice to be
chosen. You might want to look at that.
Otherwise applying a profile that is deployed or not is identical. You
need to load the profile as a resource, get at the profile therein, and then
apply it. The URL used to load the resource might be platform specific or
you may use URI converters but the process is the same.
- James.
"JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
news:fh9b7a$slm$1@build.eclipse.org...
> No, I really want to apply a deployed profile programmatically. I know
> how to retrieve a profile from my workspace and apply it, but I don't
> know how to retrieve deployed profiles.
>
> Cheers
> JP
>
> James Bruck wrote:
>> Are you thinking of Element::getApplicableStereotypes() or
>> Element::isStereotypeApplicable() perhaps?
>>
>> Cheers,
>> - James.
>>
>> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
>> news:fgs74j$ch9$1@build.eclipse.org...
>>> In earlier versions of the UML2 API, I thought it was possible to
>>> retrieve all applicable profiles for a model or package (with something
>>> like model.getApplicableProfiles()). This seems to be no longer the
>>> case: I can access applied profiles, and I can apply a profile, but I
>>> just don't know how to retrieve the applicable/deployed profiles... Any
>>> help would be greatly appreciated.
>>>
>>> Regards
>>> JP
>>
>>
>
|
|
|
Re: Programmatically retrieving applicable profiles [message #625458 is a reply to message #476526] |
Tue, 13 November 2007 11:21  |
Eclipse User |
|
|
|
JP,
Unfortunately, UML2 does not provide a registry of "deployed" profiles; this
is something that's typically done by an application based on UML2...
Kenn
"JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
news:fh9b7a$slm$1@build.eclipse.org...
> No, I really want to apply a deployed profile programmatically. I know
> how to retrieve a profile from my workspace and apply it, but I don't
> know how to retrieve deployed profiles.
>
> Cheers
> JP
>
> James Bruck wrote:
>> Are you thinking of Element::getApplicableStereotypes() or
>> Element::isStereotypeApplicable() perhaps?
>>
>> Cheers,
>> - James.
>>
>> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
>> news:fgs74j$ch9$1@build.eclipse.org...
>>> In earlier versions of the UML2 API, I thought it was possible to
>>> retrieve all applicable profiles for a model or package (with something
>>> like model.getApplicableProfiles()). This seems to be no longer the
>>> case: I can access applied profiles, and I can apply a profile, but I
>>> just don't know how to retrieve the applicable/deployed profiles... Any
>>> help would be greatly appreciated.
>>>
>>> Regards
>>> JP
>>
>>
>
|
|
|
Re: Programmatically retrieving applicable profiles [message #625461 is a reply to message #476533] |
Wed, 14 November 2007 08:51  |
Eclipse User |
|
|
|
Originally posted by: jp.schoch.fr.ibm.com
James,
Thanks for your help. I had arrived at the same conclusion: I need to
load the profile as a resource.
Best Regards
JP
James Bruck wrote:
> Hi JP,
>
> To my knowledge there never existed a function called
> model.getApplicableProfiles().
>
> There is a function in ApplyProfileAction that looks at all the resources in
> a resource set and if thre is a profile it presents it as a choice to be
> chosen. You might want to look at that.
>
> Otherwise applying a profile that is deployed or not is identical. You
> need to load the profile as a resource, get at the profile therein, and then
> apply it. The URL used to load the resource might be platform specific or
> you may use URI converters but the process is the same.
>
> - James.
>
>
> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
> news:fh9b7a$slm$1@build.eclipse.org...
>> No, I really want to apply a deployed profile programmatically. I know
>> how to retrieve a profile from my workspace and apply it, but I don't
>> know how to retrieve deployed profiles.
>>
>> Cheers
>> JP
>>
>> James Bruck wrote:
>>> Are you thinking of Element::getApplicableStereotypes() or
>>> Element::isStereotypeApplicable() perhaps?
>>>
>>> Cheers,
>>> - James.
>>>
>>> "JP Schoch" <jp.schoch@fr.ibm.com> wrote in message
>>> news:fgs74j$ch9$1@build.eclipse.org...
>>>> In earlier versions of the UML2 API, I thought it was possible to
>>>> retrieve all applicable profiles for a model or package (with something
>>>> like model.getApplicableProfiles()). This seems to be no longer the
>>>> case: I can access applied profiles, and I can apply a profile, but I
>>>> just don't know how to retrieve the applicable/deployed profiles... Any
>>>> help would be greatly appreciated.
>>>>
>>>> Regards
>>>> JP
>>>
>
>
|
|
|
Goto Forum:
Current Time: Sat Aug 30 19:51:32 EDT 2025
Powered by FUDForum. Page generated in 0.05907 seconds
|