protected ActionGroup createActionGroup()
{
SelectMappingSetAction selectMappingSetAction =
(SelectMappingSetAction) ActionManager.getInstance()
.getAction("XStructure.Actions.SelectMappingSet");
EditMappingSetAction editMappingSetAction =
(EditMappingSetAction) ActionManager.getInstance().getAction("XStructure.Actions.EditMappingSet");
ReloadAllMappingSetsAction reloadAllMappingSetsAction =
(ReloadAllMappingSetsAction) ActionManager.getInstance()
.getAction("XStructure.Actions.ReloadAllMappingSets");
StructureViewModel structureViewModel = getTreeModel();
if (structureViewModel instanceof XSViewTreeModel)
{
XSViewTreeModel xsViewTreeModel = (XSViewTreeModel) structureViewModel;
editMappingSetAction.getTemplatePresentation().setEnabled(
(xsViewTreeModel.getXMappingSet() != null));
}
else
{
editMappingSetAction.getTemplatePresentation().setEnabled(false);
}
DefaultActionGroup actionGroup = (DefaultActionGroup) super.createActionGroup();
actionGroup.addSeparator();