[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Programitically Load Perspectives

You really should not use the perspective name, the ID is the good way to do ! But you can walk through the extension registry find the perspective with your own way, get the ID an open it.

// get the extension registry.
final IExtensionRegistry registry = Platform.getExtensionRegistry();

// get the perspectives extension
final IConfigurationElement[] perspectives = registry.getConfigurationElementsFor(PERPSECTIVES_EXTENSION_ID);


// Loop in the categories and categoriesRef
for (int i = 0; i < perspectives.length; i++) {
	// Find your perspective by name
}

// open it !




Mark wrote:
I think the showPerspective method needs the perspective ID. I'd like to create the perspective from the XML string that's stored in the preferences. Any idea how to do that?

Thanks - Mark