use of com.centurylink.mdw.plugin.designer.model.AutomatedTestSuite in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method debugApplies.
public boolean debugApplies(IStructuredSelection selection) {
if (selection.size() != 1 || !(selection.getFirstElement() instanceof WorkflowElement))
return false;
WorkflowElement workflowElement = (WorkflowElement) selection.getFirstElement();
if (workflowElement instanceof AutomatedTestSuite || workflowElement instanceof AutomatedTestCase) {
WorkflowProject prj = workflowElement.getProject();
if (prj == null || !prj.checkRequiredVersion(6, 0) || !prj.isUserAuthorizedInAnyGroup(UserRoleVO.PROCESS_EXECUTION))
return false;
WorkflowPackage pkg = workflowElement.getPackage();
if (pkg != null && !pkg.isUserAuthorized(UserRoleVO.PROCESS_EXECUTION))
return false;
try {
AutomatedTestView testView = (AutomatedTestView) MdwPlugin.getActivePage().showView("mdw.views.launch.automatedTest");
return !testView.isLocked();
} catch (PartInitException ex) {
PluginMessages.uiError(ex, "Menu", workflowElement.getProject());
}
}
if (workflowElement instanceof WorkflowProcess || workflowElement instanceof ExternalEvent)
return !MdwPlugin.isRcp() && workflowElement.isUserAuthorized(UserRoleVO.PROCESS_EXECUTION);
else
return false;
}
Aggregations