Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Resources manager(Help with designing resource manager)
Resources manager [message #693357] Wed, 06 July 2011 10:08 Go to next message
beax  is currently offline beax Friend
Messages: 1
Registered: July 2011
Junior Member
Hello,
I'm newbie to Eclipse RCP and I'm only discovering its' features.
I am designig editor application which has 3 basic resources - Foo, Bar, Lorem. Lorem can be of 3 types, A, B, C.
I have created 3 views to display the resources and now I show the resources Foo and Bar in TableViewer, Lorem in TreeViewer and double-left-clicking on each resource executes own editor for resource Foo, Bar and Lorem.A, Lorem.B, Lorem.C. I want context popup menu which shows when right-clicked on the resource. Foo and Bar is OK, but problem is with Lorem.
The context menu should have some basic commands, but I would like it in general.

Add Foo - when not clicked on Foo Resource in FooResourcesListView
Edit Foo, Remove Foo - when clicked on Foo Resource in FooResourceListView

Add Bar - when not clicked on Bar Resource in BarResourcesListView
Edit Bar, Remove Bar - when clicked on Bar Resource in BarResourceListView

Lorem Resources view is a tree with 3 parents - A, B, C. There should be resources of type Lorem.A in A parent, etc.

Showing context menu for Foo and Bar is OK, I have used visibleWhen and instanceof, but I have problem with Lorem resources.
The tree model contains 2 classes, TreeParent and TreeObject. TreeObject stores in string type of Lorem resource.

Is it possible to find out the type of selected TreeObject?
Or am I doing it wrong and complicated? I also thought about Project Explorer, but I would like 3 separated views for each resource type.

Thank you very much,
Beax
Re: Resources manager [message #693368 is a reply to message #693357] Wed, 06 July 2011 10:37 Go to previous message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior Member

Which extension point are you using for contributing actions...?
if you are using popup menus extension point with object contributions you have to use object state property and the model class (tree object) should implement IActionFilter.

if you are using command framework(menus extension point) you need to use property testers.



Previous Topic:Where is the content in Register View from?
Next Topic:System tray icon not working in 3.7 on MAc?
Goto Forum:
  


Current Time: Mon Dec 06 19:58:59 GMT 2021

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

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

Back to the top