Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Model element present in a view
Model element present in a view [message #164110] Tue, 04 December 2007 12:44 Go to next message
Eclipse UserFriend
Originally posted by: boucher.fbk.eu

Hi all,

I'd like to know if there is a "simple" way to know if an element from a
model is present in one/several diagram(s)?

Thank you.
Re: Model element present in a view [message #164161 is a reply to message #164110] Tue, 04 December 2007 13:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: trommas.yahoo.com

Quentin wrote:
> Hi all,
>
> I'd like to know if there is a "simple" way to know if an element from a
> model is present in one/several diagram(s)?
>
> Thank you.
>

If I understand you, this is pretty simple. I do this a lot. You have to
grab your diagram element (the one that contains your model elements),
and then iterate the relevant collection).

In the model code (emf), you get it with: XYZmodelelement.eContainer

In GMF there are other ways, depending on context.

HTH,

Tomas Zijdemans
Re: Model element present in a view [message #164346 is a reply to message #164161] Wed, 05 December 2007 13:05 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

You may try eCrossReferences() of EObject; when diagrams are loaded it
should return notation views for model element that reference it.

Tomas Zijdemans wrote:
> Quentin wrote:
>> Hi all,
>>
>> I'd like to know if there is a "simple" way to know if an element from
>> a model is present in one/several diagram(s)?
>>
>> Thank you.
>>
>
> If I understand you, this is pretty simple. I do this a lot. You have to
> grab your diagram element (the one that contains your model elements),
> and then iterate the relevant collection).
>
> In the model code (emf), you get it with: XYZmodelelement.eContainer
>
> In GMF there are other ways, depending on context.
>
> HTH,
>
> Tomas Zijdemans
Previous Topic:gmf constraints
Next Topic:layout and borders not persisting
Goto Forum:
  


Current Time: Thu Apr 25 08:56:00 GMT 2024

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

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

Back to the top