use of org.eclipse.ui.internal.dialogs.PropertyPageManager in project sling by apache.
the class SlingProjectPropertyPage method openPropertyDialog.
public static void openPropertyDialog(Shell shell, IProject project) {
// find out if the override page is contributed, and show that instead of the default one
// TODO - stop relying on internals
PropertyPageManager pageManager = new PropertyPageManager();
PropertyPageContributorManager.getManager().contribute(pageManager, project);
List<?> nodes = pageManager.getElements(PreferenceManager.PRE_ORDER);
boolean overridePresent = false;
for (Object node : nodes) {
if (((IPreferenceNode) node).getId().equals(PAGE_ID_OVERRIDE)) {
overridePresent = true;
break;
}
}
String pageId = overridePresent ? PAGE_ID_OVERRIDE : PAGE_ID;
PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(shell, project, pageId, new String[] { pageId }, null);
dialog.open();
}
Aggregations