RCP Application: How to remove Resource Perspective? [message #461565] |
Fri, 12 January 2007 06:08 |
Eclipse User |
|
|
|
Originally posted by: christian.daenekas.informatik.uni-oldenburg.de
Hello!
In my project I´m occupied with the integration and development of a
graphical editor (using GMF) in a Rich Client Application. Since my
question is more RCP than GMF specific I thought I ask her. When using
the Editor inside the RC the "Other Perspectives" dialog shows the
Resource Perspective beside the rest of the perspectives we´ve got. Now
how can I remove/hide this perspective. I´m not sure but I think the
unwanted Perspective result from dependencies to either
org.eclipse.ui.ide or org.eclipse.ui.navigator . However it isn´t
possible to get rid of these dependencies at the moment, so I want at
least remove the perspective from the application or somehow hide it. I
found a try to remove it in this group using the following code:
PerspectiveRegistry registry =
(PerspectiveRegistry)WorkbenchPlugin.getDefault().getPerspec tiveRegistry();
IPerspectiveDescriptor[] desc = registry.getPerspectives();
for(int i = 0; i < desc.length; i++) {
if(desc[i].getLabel().equals("Resource")) {
registry.deletePerspective(desc[i]);
}
}
But this doesn´t work. I hope you can help me here.
Greetings,
Christian Dänekas
|
|
|
Powered by
FUDForum. Page generated in 0.04261 seconds