private static boolean openPreferenceNode(final String propertyPageId, final IPreferenceNode targetNode,
final String title, Object element, Map<String, Object> data) {
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PropertyDialog dialog = new PropertyDialog(SpringUIPlugin.getActiveWorkbenchShell(), manager,
new StructuredSelection(element));
if (propertyPageId != null) {
dialog.setSelectedNode(propertyPageId);
}
if (data != null) {
dialog.setPageData(data);
}
final boolean[] result = new boolean[] { false };
BusyIndicator.showWhile(getStandardDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.getShell().setText(title);
result[0] = (dialog.open() == Window.OK);
}
});
return result[0];
}