Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Refresh CDO object color in a tree viewer when permission changes(How to register for notification ?)
Refresh CDO object color in a tree viewer when permission changes [message #1235567] Fri, 24 January 2014 17:26 Go to next message
Laurent Le Moux is currently offline Laurent Le MouxFriend
Messages: 184
Registered: September 2011
Senior Member
Hi all,

I have a RCP application with some kind of explorer view which displays CDO objects in a tree viewer.
I set a CDOLabelProvider to the tree viewer.
And, the RCP application connects to my CDO repository through a security manager.

So, when the connected user only have READ access on the CDO objects they appear in yellow in the tree, whereas they appear in black in case of WRITE access.

My problem is that the color is not refreshed when the permission on the object changes.

More precisely, if I change the object permission from READ to WRITE with another application, the running RCP application doesn't get notified and the tree item color doesn't switch to black (I have to restart the application to get the refresh...).

Can somebody please tell how to register for notification ?

I defined the following change subscription policy for my opened CDO transaction :
transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);


I guess I should be using CDOEventHandler somehow (but simply creating an instance in my explorer #createPartControl does nothing...).

Kind regards,

Laurent
Re: Refresh CDO object color in a tree viewer when permission changes [message #1235895 is a reply to message #1235567] Sat, 25 January 2014 16:17 Go to previous messageGo to next message
Laurent Le Moux is currently offline Laurent Le MouxFriend
Messages: 184
Registered: September 2011
Senior Member
Hi again,

To get notified, I finally got my explorer to implement net4j event IListener.
The implemented method #notifyEvent refreshes my tree viewer when receiving a CDOViewInvalidationEvent.

Kind regards,

Laurent
Re: Refresh CDO object color in a tree viewer when permission changes [message #1242267 is a reply to message #1235895] Sun, 09 February 2014 08:43 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 25.01.2014 17:17, schrieb Laurent Le Moux:
> Hi again,
>
> To get notified, I finally got my explorer to implement net4j event IListener.
> The implemented method #notifyEvent refreshes my tree viewer when receiving a CDOViewInvalidationEvent.
Excellent. Any questions remaining?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:General questions about CDO
Next Topic:as I can remove the cache server CDO
Goto Forum:
  


Current Time: Sat Aug 24 07:24:54 GMT 2019

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

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

Back to the top