Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Limited List
Limited List [message #431848] Tue, 28 July 2009 08:16 Go to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Hello.

I want to implement a limited EList that only containes a configurable
count of elements.
Further more I want the newest entrys to become inserted at the beginning
of the list. When the list is full, I want the oldest entrys to get
removed from the list.

How can this done using EMF?

Thanks,
Jan
Re: Limited List [message #431883 is a reply to message #431848] Tue, 28 July 2009 16:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30686
Registered: July 2009
Senior Member
Jan,

EMF's list implementations extend the highly configurable BasicEList
class so you can accomplish a lot by overriding various protected
methods in that class. What you describe will require a lot of careful
thought though. For example, if someone uses add with an index, the
added object really must end up at the index, not at the beginning. The
framework will never expect items to just disappear from the list too...


Jan Kohnert wrote:
> Hello.
>
> I want to implement a limited EList that only containes a configurable
> count of elements. Further more I want the newest entrys to become
> inserted at the beginning of the list. When the list is full, I want
> the oldest entrys to get removed from the list.
>
> How can this done using EMF?
>
> Thanks,
> Jan
>
Previous Topic:Instance of EList
Next Topic:Refreshing an object inside a resource
Goto Forum:
  


Current Time: Sun Dec 08 20:42:32 GMT 2019

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

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

Back to the top