Resources manager [message #693357] |
Wed, 06 July 2011 10:08 |
beax 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03053 seconds