use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class WebToolsAction method run.
public void run(IAction action) {
WorkflowProject workflowProject = getProject(getSelection());
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(workflowProject, WebApp.WebTools);
if (workflowProject != null)
launchAction.launch(workflowProject);
else if (mostRecentWebToolsLaunchWorkflowProject != null)
launchAction.launch(mostRecentWebToolsLaunchWorkflowProject);
}
use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class WebToolsAction method populateMenu.
/**
* populates the plugin action menu (the webtools 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();
// MDWWeb
MenuItem item = new MenuItem(menu, SWT.NONE);
final WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(workflowProject, WebApp.WebTools);
item.setText(projName + " - " + launchAction.getLabel());
item.setImage(launchAction.getIconImage());
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
mostRecentWebToolsLaunchWorkflowProject = workflowProject;
launchAction.launch(workflowProject);
}
});
}
}
}
use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class NotificationChecker method doCheck.
private void doCheck() {
if (running) {
try {
String msg = checkNotices();
if (msg != null) {
WebApp webapp = workflowProject.checkRequiredVersion(5, 5) ? WebApp.MdwHub : WebApp.TaskManager;
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(workflowProject, webapp);
String urlPath;
if (taskInstanceId == null)
urlPath = workflowProject.getMyTasksPath();
else
urlPath = workflowProject.getTaskInstancePath(taskInstanceId, isAssigned);
showBalloon(msg, launchAction, urlPath);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class Page method run.
public void run() {
boolean is55 = getProject().checkRequiredVersion(5, 5);
String urlPath;
if (isTaskInstancePage()) {
MdwInputDialog dlg = new MdwInputDialog(MdwPlugin.getShell(), "Task Instance ID", false);
if (dlg.open() != Dialog.OK)
return;
try {
Long taskInstanceId = new Long(dlg.getInput());
urlPath = getProject().getTaskInstancePath(taskInstanceId);
} catch (NumberFormatException ex) {
MessageDialog.openError(MdwPlugin.getShell(), "Invalid Input", "Invalid task instance ID: " + dlg.getInput());
return;
}
} else {
// TODO: why does new path format not work?
// if (is55)
// urlPath = TaskAttributeConstant.PAGE_PATH + getName();
// else
urlPath = TaskAttributeConstant.PAGE_COMPATIBILITY_PATH + getName();
}
WebApp webapp = is55 ? WebApp.MdwHub : WebApp.TaskManager;
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(getProject(), webapp);
launchAction.launch(getPackage(), urlPath);
}
use of com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerActionGroup method createTaskManagerAction.
private IAction createTaskManagerAction() {
IAction action = new Action() {
@Override
public void run() {
if (webLaunchApplies(getSelection())) {
if (getSelection().getFirstElement() instanceof WorkflowProject) {
WorkflowProject project = (WorkflowProject) getSelection().getFirstElement();
WebLaunchActions.getLaunchAction(project, WebApp.TaskManager).launch(project);
} else if (getSelection().getFirstElement() instanceof WorkflowPackage) {
WorkflowPackage packageVersion = (WorkflowPackage) getSelection().getFirstElement();
WebLaunchActions.getLaunchAction(packageVersion.getProject(), WebApp.TaskManager).launch(packageVersion);
}
}
}
};
WebLaunchAction launchAction = WebLaunchActions.getLaunchAction(null, WebApp.TaskManager);
action.setId(MdwMenuManager.MDW_MENU_PREFIX + "launch.task.manager");
action.setText(launchAction.getLabel());
action.setImageDescriptor(launchAction.getImageDescriptor());
return action;
}
Aggregations