updateForSelection(currentExplorer.getSelectionProvider().getSelection());
}
private TaskExplorer getTaskExplorer(String id) {
Control [] excontrols = explorerContainer.getChildren();
TaskExplorer explorer=null;
for (int i=0; i<excontrols.length; i++) {
Control excontrol = excontrols[i];
Object data = excontrol.getData(ICompositeCheatsheetTags.EXPLORER);
if (data instanceof TaskExplorer) {
explorer = (TaskExplorer)data;
if (explorer.getId().equals(id)) {
return explorer;
}
}
}
// Load the explorer from an extension point
TaskExplorerManager explorerManager = TaskExplorerManager.getInstance();
explorer = explorerManager.getExplorer(id);
if (explorer != null) {
explorer.createControl(explorerContainer, mform.getToolkit());
explorer.getControl().setData(ICompositeCheatsheetTags.EXPLORER, explorer);
new TreeExplorerMenu(explorer);
}
return explorer;
}