Skip to main content



      Home
Home » Modeling » UML2 » Programmatically retrieving applicable profiles
Programmatically retrieving applicable profiles [message #476458] Wed, 07 November 2007 06:22 Go to next message
Eclipse UserFriend
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 #476523 is a reply to message #476458] Wed, 07 November 2007 10:36 Go to previous messageGo to next message
Eclipse UserFriend
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 #476526 is a reply to message #476523] Mon, 12 November 2007 05:52 Go to previous messageGo to next message
Eclipse UserFriend
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 #476533 is a reply to message #476526] Tue, 13 November 2007 09:24 Go to previous messageGo to next message
Eclipse UserFriend
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 #476535 is a reply to message #476526] Tue, 13 November 2007 11:21 Go to previous messageGo to next message
Eclipse UserFriend
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 #476538 is a reply to message #476533] Wed, 14 November 2007 08:51 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>>>
>
>
Previous Topic:UML2 & OCL version compatibility
Next Topic:[Announce] The EclipseCon 2008 Submission Deadline is Rapidly Approaching.
Goto Forum:
  


Current Time: Sat Aug 30 13:23:04 EDT 2025

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

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

Back to the top