Tabbed Property Pages in a Dialog [message #901594] |
Mon, 13 August 2012 15:06 |
Brian Fitzpatrick Messages: 500 Registered: July 2009 |
Senior Member |
|
|
Hi all,
I've discovered how to open a standard property dialog (http://wiki.eclipse.org/FAQ_How_do_I_open_a_Property_dialog%3F) and that works great.
However, I'm attempting to open a property dialog that hosts property tabs contributed via the "org.eclipse.ui.views.properties.tabbed" set of extension points and running into troubles. I found an example that suggests using the PreferenceManager and internal PropertyDialog class to do this, but I can't figure out a way to get from a TabbedPropertySheetPage to a PropertyPage.
The example (modified a little) is something like this:
ISelection sel = new StructuredSelection(bo);
TabbedPropertySheetPage namepage = new TabbedPropertySheetPage(new ITabbedPropertySheetPageContributor() {
public String getContributorId() {
return "contributorId";
}
});
PropertyPage page = null; // how do I get from a tabbed property sheet page to a PropertyPage?
PreferenceManager mgr = new PreferenceManager();
IPreferenceNode node = new PreferenceNode("1", page);
mgr.addToRoot(node);
PropertyDialog dialog = new PropertyDialog(shell, mgr, sel);
dialog.create();
dialog.setMessage(page.getTitle());
dialog.open();
Is there an easier way to open a property dialog for objects with registered tabbed properties? Or how do I get from a TabbedPropertySheetPage to a PropertyPage?
Thanks in advance.
--Fitz
|
|
|
Powered by
FUDForum. Page generated in 0.03191 seconds