use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class TaskManagerAction method run.
public void run(IAction action) {
WorkflowProject workflowProject = getProject(getSelection());
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(workflowProject, WebApp.TaskManager);
if (workflowProject != null)
launchAction.launch(workflowProject);
else if (mostRecentTaskManagerWorkflowProject != null)
launchAction.launch(mostRecentTaskManagerWorkflowProject);
}
use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class TaskManagerAction method populateMenu.
/**
* populates the plugin action menu (the taskmgr icon) with its items
*/
public void populateMenu(Menu menu) {
WorkflowProjectManager wfProjectMgr = WorkflowProjectManager.getInstance();
List<WorkflowProject> workflowProjects = wfProjectMgr.getWorkflowProjects();
if (workflowProjects.isEmpty()) {
MenuItem item = new MenuItem(menu, SWT.NONE);
item.setText("(No Projects)");
item.setImage(MdwPlugin.getImageDescriptor("icons/wait.gif").createImage());
item.setEnabled(false);
} else {
for (final WorkflowProject workflowProject : workflowProjects) {
String projName = workflowProject.isFrameworkProject() ? "MDWFramework" : workflowProject.getName();
MenuItem item = new MenuItem(menu, SWT.NONE);
final WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(workflowProject, WebApp.TaskManager);
item.setText(projName + " - " + launchAction.getLabel());
item.setImage(launchAction.getIconImage());
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
mostRecentTaskManagerWorkflowProject = workflowProject;
launchAction.launch(workflowProject);
}
});
}
}
}
Aggregations