Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » If I create clones of a perspective, can I make them independent of each other?(Is there a good way to create various instances of an already created perspective, where all of them behave independent from each other?)
If I create clones of a perspective, can I make them independent of each other? [message #1063042] Tue, 11 June 2013 21:00
Paul G is currently offline Paul G
Messages: 2
Registered: June 2013
Junior Member
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
Previous Topic:EditorPart: getClientArea() before Control is painted
Next Topic:How to display the command's drop-down menu after the command icon is clicked?
Goto Forum:
  


Current Time: Sat Oct 25 18:15:07 GMT 2014

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

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