use of com.centurylink.mdw.plugin.actions.WorkflowElementActionHandler in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetEditor method createWorkflowAsset.
@SuppressWarnings("restriction")
private WorkflowElement createWorkflowAsset() {
if (isProcess()) {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.create(WorkflowProcess.class, getElement().getPackage());
return null;
} else {
IWorkbench workbench = PlatformUI.getWorkbench();
org.eclipse.ui.internal.dialogs.NewWizard wizard = new org.eclipse.ui.internal.dialogs.NewWizard();
wizard.setCategoryId("mdw.designer.asset");
wizard.init(workbench, new StructuredSelection(new Object[] { getElement().getPackage() }));
IDialogSettings workbenchSettings = org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.getDefault().getDialogSettings();
IDialogSettings wizardSettings = workbenchSettings.getSection("NewWizardAction");
if (wizardSettings == null)
wizardSettings = workbenchSettings.addNewSection("NewWizardAction");
wizardSettings.put("NewWizardSelectionPage.STORE_SELECTED_ID", getWizardId());
wizard.setDialogSettings(wizardSettings);
wizard.setForcePreviousAndNextButtons(true);
if (isTaskTemplate() && getElement() instanceof Activity) {
Activity activity = (Activity) getElement();
if (activity.isAutoFormManualTask())
wizardSettings.put(TaskTemplate.TASK_TYPE, TaskTemplate.AUTOFORM);
else
wizardSettings.put(TaskTemplate.TASK_TYPE, TaskTemplate.CUSTOM);
}
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.create();
dialog.open();
IWizardPage wizardPage = dialog.getCurrentPage();
if (wizardPage instanceof WorkflowAssetPage)
return ((WorkflowAssetPage) wizardPage).getWorkflowAsset();
}
return null;
}
use of com.centurylink.mdw.plugin.actions.WorkflowElementActionHandler in project mdw-designer by CenturyLinkCloud.
the class ProjectMonitoringSection method launchVisualVm.
private void launchVisualVm() {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.launchSwing(project, "Java VisualVM");
}
use of com.centurylink.mdw.plugin.actions.WorkflowElementActionHandler in project mdw-designer by CenturyLinkCloud.
the class ProjectMonitoringSection method launchJConsole.
private void launchJConsole() {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.launchSwing(project, "JConsole");
}
use of com.centurylink.mdw.plugin.actions.WorkflowElementActionHandler in project mdw-designer by CenturyLinkCloud.
the class ServerConsole method addToMenuAndToolbar.
public void addToMenuAndToolbar() {
// start action
startAction = new Action("Start") {
public void run() {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.run(getRunnableObject());
}
};
startAction.setImageDescriptor(MdwPlugin.getImageDescriptor("icons/run.gif"));
Object runnableObj = getRunnableObject();
String startText = "Start";
if (runnableObj instanceof WorkflowProject)
startText += " " + ((WorkflowProject) runnableObj).getName();
else if (runnableObj instanceof ServerSettings)
startText += " " + ((ServerSettings) runnableObj).getServerName();
startAction.setToolTipText(startText);
startAction.setEnabled(runnableObj != null);
// client shell action
clientShellAction = new Action("Client Shell") {
public void run() {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.clientShell(getRunnableObject());
}
};
clientShellAction.setImageDescriptor(MdwPlugin.getImageDescriptor("icons/client_shell.gif"));
clientShellAction.setToolTipText("Client Shell");
clientShellAction.setEnabled(false);
// deploy action
deployAction = new Action("Deploy") {
public void run() {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.deploy(getRunnableObject());
}
};
deployAction.setImageDescriptor(MdwPlugin.getImageDescriptor("icons/deploy.gif"));
deployAction.setToolTipText("Deploy");
deployAction.setEnabled(false);
// stop action
stopAction = new Action("Stop") {
public void run() {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.stop(getRunnableObject());
}
};
stopAction.setImageDescriptor(MdwPlugin.getImageDescriptor("icons/stop.gif"));
stopAction.setToolTipText("Stop");
stopAction.setEnabled(false);
// create menu
getViewSite().getActionBars().getMenuManager().add(startAction);
// getViewSite().getActionBars().getMenuManager().add(clientShellAction);
getViewSite().getActionBars().getMenuManager().add(deployAction);
getViewSite().getActionBars().getMenuManager().add(stopAction);
getViewSite().getActionBars().getMenuManager().add(new Separator());
// create toolbar
getViewSite().getActionBars().getToolBarManager().add(startAction);
getViewSite().getActionBars().getToolBarManager().add(clientShellAction);
getViewSite().getActionBars().getToolBarManager().add(deployAction);
getViewSite().getActionBars().getToolBarManager().add(stopAction);
getViewSite().getActionBars().getToolBarManager().add(new Separator());
}
use of com.centurylink.mdw.plugin.actions.WorkflowElementActionHandler in project mdw-designer by CenturyLinkCloud.
the class ProcessExplorerView method handleRefresh.
public void handleRefresh() {
BusyIndicator.showWhile(getSite().getShell().getDisplay(), new Runnable() {
public void run() {
treeViewer.collapseAll();
WorkflowProjectManager projectMgr = WorkflowProjectManager.getInstance();
projectMgr.refresh();
treeViewer.setInput(projectMgr.getWorkflowProjects());
}
});
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
for (WorkflowProject project : WorkflowProjectManager.getInstance().getWorkflowProjects()) {
if (!project.isFilePersist())
actionHandler.syncOpenEditors(project);
}
}
Aggregations