Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to refresh decorators?
How to refresh decorators? [message #162936] Tue, 27 November 2007 21:28 Go to next message
Nicolai Kamenzky is currently offline Nicolai Kamenzky
Messages: 82
Registered: July 2009
Member
Hi!

I have successfully implemented IDecoratorProvider and
IDecorator and want to refresh my decorators
programmatically.

Refreshing works fine if I call refresh() of all my
IDecorator instances.

But where do I get to know the currently existing
IDecorator instances?

Cheers,
Nicolai


--

I'm using an evaluation license of nemo since 86 days.
You should really try it!
http://www.malcom-mac.com/nemo
Re: How to refresh decorators? [message #163113 is a reply to message #162936] Wed, 28 November 2007 15:39 Go to previous messageGo to next message
Cherie Revells is currently offline Cherie Revells
Messages: 299
Registered: July 2009
Senior Member
Nicolai,

You will need to keep track of your IDecorator instances somewhere if
you need the ability to refresh them all. You might be able to keep a
static list in your IDecoratorProvider that is updated when a new
decorator is added.

Regards,
Cherie

Nicolai Kamenzky wrote:
> Hi!
>
> I have successfully implemented IDecoratorProvider and
> IDecorator and want to refresh my decorators
> programmatically.
>
> Refreshing works fine if I call refresh() of all my
> IDecorator instances.
>
> But where do I get to know the currently existing
> IDecorator instances?
>
> Cheers,
> Nicolai
>
>
Re: How to refresh decorators? [message #163163 is a reply to message #163113] Wed, 28 November 2007 18:40 Go to previous messageGo to next message
Nicolai Kamenzky is currently offline Nicolai Kamenzky
Messages: 82
Registered: July 2009
Member
Hi Cherie,

I have already implemented it this way but I have
the problem that I don't know when to remove those
instances.
If I don't remove them from my list the number of
instances is only increasing and thus consume too
much memory.
Without adding them to my list those instances
would be garbage collected at some point.

Any suggestions?
Nicolai

In article <fik2am$n1u$1@build.eclipse.org> Cherie
Revells<crevells@ca.ibm.com> wrote:
> Nicolai,

> You will need to keep track of your IDecorator instances somewhere
> if you need the ability to refresh them all. You might be able to
> keep a static list in your IDecoratorProvider that is updated when
> a new decorator is added.

> Regards,
> Cherie

> Nicolai Kamenzky wrote:
>> Hi!
>>
>> I have successfully implemented IDecoratorProvider and
>> IDecorator and want to refresh my decorators
>> programmatically.
>>
>> Refreshing works fine if I call refresh() of all my
>> IDecorator instances.
>>
>> But where do I get to know the currently existing
>> IDecorator instances?
>>
>> Cheers,
>> Nicolai
>>



--

I'm using an evaluation license of nemo since 86 days.
You should really try it!
http://www.malcom-mac.com/nemo
Re: How to refresh decorators? [message #1036612 is a reply to message #163163] Mon, 08 April 2013 15:57 Go to previous message
Eclipse User
Hy guys, it comes late but can be usefull, here is way to refresh
decorators :

EditPolicy ep = getEditPolicy(EditPolicyRoles.DECORATION_ROLE);
if (ep != null && ep instanceof GraphicalEditPolicyEx){
((GraphicalEditPolicyEx)ep).refresh();
}

Ludovic

Le 28/11/2007 19:40, Nicolai Kamenzky a écrit :
> Hi Cherie,
>
> I have already implemented it this way but I have
> the problem that I don't know when to remove those
> instances.
> If I don't remove them from my list the number of
> instances is only increasing and thus consume too
> much memory.
> Without adding them to my list those instances
> would be garbage collected at some point.
>
> Any suggestions?
> Nicolai
>
> In article <fik2am$n1u$1@xxxxxxxxe.org> Cherie
> Revells<crevells@xxxxxxxx.com> wrote:
>> Nicolai,
>
>> You will need to keep track of your IDecorator instances somewhere
>> if you need the ability to refresh them all. You might be able to
>> keep a static list in your IDecoratorProvider that is updated when
>> a new decorator is added.
>
>> Regards,
>> Cherie
>
>> Nicolai Kamenzky wrote:
>>> Hi!
>>>
>>> I have successfully implemented IDecoratorProvider and
>>> IDecorator and want to refresh my decorators
>>> programmatically.
>>>
>>> Refreshing works fine if I call refresh() of all my
>>> IDecorator instances.
>>>
>>> But where do I get to know the currently existing
>>> IDecorator instances?
>>>
>>> Cheers,
>>> Nicolai
>>>
>
>
>
Previous Topic:EOpposite in diagram editor
Next Topic:DecoratorProvidor error
Goto Forum:
  


Current Time: Tue Sep 23 10:25:48 GMT 2014

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

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