use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ProcessInstanceListView method refreshProjects.
private void refreshProjects() {
projectCombo.removeAll();
projectCombo.add("");
List<WorkflowProject> workflowProjects = WorkflowProjectManager.getInstance().getWorkflowProjects();
if (workflowProjects != null && !workflowProjects.isEmpty()) {
for (WorkflowProject wfProject : workflowProjects) projectCombo.add(wfProject.getName());
if (workflowProject == null)
projectCombo.select(0);
else
projectCombo.setText(workflowProject.getName());
}
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ToolboxView method handleFilter.
public void handleFilter() {
if (isDirty()) {
MessageDialog.openWarning(getSite().getShell(), MSG_SAVE, "Please save or abandon outstanding changes before filtering");
return;
}
WorkflowProject project = getProject();
try {
ToolboxFilterDialog filterDlg = new ToolboxFilterDialog(getSite().getShell(), project, project.getSuppressedActivityImplementors());
int res = filterDlg.open();
if (res == Dialog.OK) {
project.setSuppressedActivityImplementors(filterDlg.getSuppressedImplementors());
toolboxWrapper.update();
actionGroup.getDeleteAction().setEnabled(false);
}
} catch (IOException ex) {
PluginMessages.uiError(ex, "Filter Implementors", project);
}
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class WebUpdateAction method run.
/**
* @see IActionDelegate#run(IAction)
*/
public void run(final IAction action) {
IProject webProject = null;
WorkflowProject workflowProject = null;
try {
if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).getFirstElement() instanceof IProject) {
webProject = (IProject) ((IStructuredSelection) selection).getFirstElement();
workflowProject = WorkflowProjectManager.getInstance().getWorkflowProject(webProject);
}
if (workflowProject == null) {
MessageDialog.openError(shell, "MDW Update", "Selection must be a Workflow Web project.\n(Try refreshing Process Explorer view.)");
return;
}
ProjectUpdater updater = new ProjectUpdater(workflowProject, MdwPlugin.getSettings());
if (action.getId().equals("mdw.workflow.updateFrameworkWebJars")) {
updater.updateWebProjectJars(null);
} else if (action.getId().equals("mdw.workflow.associateWebAppSourceCode")) {
ProgressMonitorDialog pmDialog = new MdwProgressMonitorDialog(shell);
final WorkflowProject wfProject = workflowProject;
pmDialog.run(true, false, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
monitor.beginTask("Setting Java source attachment locations", 100);
monitor.worked(20);
ProjectConfigurator configurator = new ProjectConfigurator(wfProject, MdwPlugin.getSettings());
try {
configurator.createWebProjectSourceCodeAssociations(shell, monitor);
} catch (CoreException ex) {
PluginMessages.log(ex);
}
}
});
}
} catch (Exception ex) {
PluginMessages.log(ex);
}
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class ImportProjectPage method populateProjectList.
public void populateProjectList() {
List<WorkflowProject> projectList = new ArrayList<>();
String workflowApp = applicationCombo.getText();
if (discoveredWorkflowApps != null) {
for (WorkflowApplication discoveredApp : discoveredWorkflowApps) {
if (workflowApp.equals(discoveredApp.getName())) {
// set the project list
for (WorkflowEnvironment workflowEnv : discoveredApp.getEnvironmentList()) {
WorkflowProject project = new WorkflowProject(discoveredApp, workflowEnv);
projectList.add(project);
}
break;
}
}
}
setProjectList(projectList);
((ImportProjectWizard) getWizard()).initializeProjectSelectPage();
}
use of com.centurylink.mdw.plugin.project.model.WorkflowProject in project mdw-designer by CenturyLinkCloud.
the class NewPackagePage method drawWidgets.
@Override
public void drawWidgets(Composite parent) {
// create the composite to hold the widgets
Composite composite = new Composite(parent, SWT.NULL);
// create the layout for this wizard page
GridLayout gl = new GridLayout();
int ncol = 4;
gl.numColumns = ncol;
composite.setLayout(gl);
createWorkflowProjectControls(composite, ncol);
final WorkflowProject project = WorkflowProjectManager.getInstance().getWorkflowProject(workflowProjectCombo.getText());
workflowProjectCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
initializeControls(project);
}
});
createNameControls(composite, ncol);
if (!project.checkRequiredVersion(6, 1, 1))
createFormatControls(composite, ncol);
createGroupControls(composite, ncol);
initializeControls(getProject());
setControl(composite);
packageNameTextField.forceFocus();
}
Aggregations