If I create clones of a perspective, can I make them independent of each other? [message #1063042] |
Tue, 11 June 2013 17:00 |
Eclipse User |
|
|
|
I am a bit confused on how much i can do with perspectives. I have a perspective created in my plugin.xml, and a couple of views. In MyPerspective.java, I included and placed all the views exactly how I want them. Now, out of all these views, maybe 2 or 3 are dependent on a specific object. I do not know how many of these objects the client/user is going to have. So my idea was/is to create new instances of my perspective. I am trying to use the clone ability in IPerspectiveRegistry in the preStartUp() method of WorkbenchAdvisor:
IPerspectiveRegistry registry = PlatformUI.getWorkbench().getPerspectiveRegistry();
IPerspectiveDescriptor perspective = registry.findPerspectiveWithId(PERSPECTIVE_ID);
for (ObjectDefinition objectDef : DefinitionUtil.getObjectDefinitions()) {
IPerspectiveDescriptor newPerspective = registry.clonePerspective("perspectives." + objectDef.getUniqueCode(),
objectDef.getName(), perspective);
Running my application I get the list of all these perspectives with their different name. My big question:
-All my perspective seem to share the same views. For example, if I edit something in one, it shows the exact same thing in all of them. Is there a way to make them all independent?
Thank you very much! This will help me alot
|
|
|
Powered by
FUDForum. Page generated in 0.02623 seconds