public void run() {
TreeSelection sel = (TreeSelection)viewer.getSelection();
if(sel.getFirstElement() instanceof TreeParentNode){
TreeParentNode selNode = (TreeParentNode)sel.getFirstElement();
ActionsPreferencePage page = new ActionsPreferencePage();
page.setFilter(selNode);
PreferenceManager mgr = new PreferenceManager();
IPreferenceNode node = new PreferenceNode("1", page);
mgr.addToRoot(node);
PreferenceDialog dialog = new PreferenceDialog(viewer.getControl().getShell(), mgr);
dialog.create();
dialog.setMessage(page.getTitle());
dialog.open();
}
}
};