Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: Very Important : How to load lazily any element which is there in containment relationship
Re: Very Important : How to load lazily any element which is there in containment relationship [message #421395] Wed, 06 August 2008 12:34 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Raju,

Please direct EMF questions to the EMF newsgroup, which I've added to
the "to" list of the reply. More comments below.


Raju Mishra wrote:
> Hi ,
> i have a model which is some thing like this ,
> <Table>
> <DecisionTable/>
> </Table>
> Table and DecisionTable elemens have containment relationship.
> i feed this model as input to the tree viewer . This model gets opened in an
> editor on double click of table node .
> when we released first version of this perticular application we did not
> consider of possibility of very larget tables (50 MB size ) and defined
> containment relationship between Table element and DecisionTable element .
> DecsionTable element is the one which has this large data.
> Now because of large data inside DecsionTable node ,tree view population
> takes time(it loads whole data from file system) . If there are 2 , 3 such
> tables ,application hangs even at the time of population of tree view.
> Now we want some how to load <DecisionTable> element lazily on double click
> of <Table> node . <DecisionTable> node is not shown in the view only
> <Table> node is shown.
> We could achieve this by chnaging relationship between <Table> and
> <DecisionTable> to Reference from Containment but at this point in time we
> can not chnage model because of backward compatibilty issue .We will not be
> able to open old models if we do that .
>
Since EMF 2.2, we've supported cross resource containment. This would
allow, but not require, the decision table children to be in a separate
resource. Using this involves ensuring that "resolveProxies" is true
for the containment reference and setting the GenModel "Containment
Proxies" to true. You'll also want to specialize hasChildren for your
item provider so call hasChildren(object, true) so that proxies aren't
resolve just determining the "+" on the Table.
> One more option we have to write our own content provider but i would like
> to acheive this EMF ways .
> So , please help me out if it can be achieved in EMF ways . I just want to
> load lazily any element which is there in containment relationship.
>
It still has to be in a different resource to be lazily loaded, but with
this approach you can still read resources where the decision table is
nested directly as before.
> Thanks ,
> Raju Mishra
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Very Important : How to load lazily any element which is there in containment relationship [message #421400 is a reply to message #421395] Wed, 06 August 2008 13:30 Go to previous message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

Thanks a lot for quick response.


"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:g7c5ps$ec1$1@build.eclipse.org...
> Raju,
>
> Please direct EMF questions to the EMF newsgroup, which I've added to the
> "to" list of the reply. More comments below.
>
>
> Raju Mishra wrote:
>> Hi ,
>> i have a model which is some thing like this ,
>> <Table>
>> <DecisionTable/>
>> </Table>
>> Table and DecisionTable elemens have containment relationship.
>> i feed this model as input to the tree viewer . This model gets opened in
>> an editor on double click of table node .
>> when we released first version of this perticular application we did not
>> consider of possibility of very larget tables (50 MB size ) and defined
>> containment relationship between Table element and DecisionTable element
>> . DecsionTable element is the one which has this large data.
>> Now because of large data inside DecsionTable node ,tree view population
>> takes time(it loads whole data from file system) . If there are 2 , 3
>> such tables ,application hangs even at the time of population of tree
>> view.
>> Now we want some how to load <DecisionTable> element lazily on double
>> click of <Table> node . <DecisionTable> node is not shown in the view
>> only <Table> node is shown.
>> We could achieve this by chnaging relationship between <Table> and
>> <DecisionTable> to Reference from Containment but at this point in time
>> we can not chnage model because of backward compatibilty issue .We will
>> not be able to open old models if we do that .
>>
> Since EMF 2.2, we've supported cross resource containment. This would
> allow, but not require, the decision table children to be in a separate
> resource. Using this involves ensuring that "resolveProxies" is true for
> the containment reference and setting the GenModel "Containment Proxies"
> to true. You'll also want to specialize hasChildren for your item
> provider so call hasChildren(object, true) so that proxies aren't resolve
> just determining the "+" on the Table.
>> One more option we have to write our own content provider but i would
>> like to acheive this EMF ways .
>> So , please help me out if it can be achieved in EMF ways . I just want
>> to load lazily any element which is there in containment relationship.
>>
> It still has to be in a different resource to be lazily loaded, but with
> this approach you can still read resources where the decision table is
> nested directly as before.
>> Thanks ,
>> Raju Mishra
>>
>>
Previous Topic:Problem with databinding
Next Topic:right newsgroup for XText questions
Goto Forum:
  


Current Time: Wed Apr 24 13:45:17 GMT 2024

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

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

Back to the top