Search in sources :

Example 36 with WorkflowProject

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());
    }
}
Also used : WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject)

Example 37 with WorkflowProject

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);
    }
}
Also used : WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject) ToolboxFilterDialog(com.centurylink.mdw.plugin.designer.dialogs.ToolboxFilterDialog) IOException(java.io.IOException)

Example 38 with WorkflowProject

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);
    }
}
Also used : IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) ProjectConfigurator(com.centurylink.mdw.plugin.project.assembly.ProjectConfigurator) CoreException(org.eclipse.core.runtime.CoreException) MdwProgressMonitorDialog(com.centurylink.mdw.plugin.designer.dialogs.MdwProgressMonitorDialog) ProgressMonitorDialog(org.eclipse.jface.dialogs.ProgressMonitorDialog) MdwProgressMonitorDialog(com.centurylink.mdw.plugin.designer.dialogs.MdwProgressMonitorDialog) ProjectUpdater(com.centurylink.mdw.plugin.project.assembly.ProjectUpdater) WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) IProject(org.eclipse.core.resources.IProject) CoreException(org.eclipse.core.runtime.CoreException) InvocationTargetException(java.lang.reflect.InvocationTargetException) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress)

Example 39 with WorkflowProject

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();
}
Also used : WorkflowApplication(com.centurylink.mdw.workflow.WorkflowApplication) WorkflowEnvironment(com.centurylink.mdw.workflow.WorkflowEnvironment) ArrayList(java.util.ArrayList) WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject)

Example 40 with WorkflowProject

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();
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) WorkflowProject(com.centurylink.mdw.plugin.project.model.WorkflowProject)

Aggregations

WorkflowProject (com.centurylink.mdw.plugin.project.model.WorkflowProject)128 WorkflowPackage (com.centurylink.mdw.plugin.designer.model.WorkflowPackage)31 WorkflowElement (com.centurylink.mdw.plugin.designer.model.WorkflowElement)25 WebLaunchAction (com.centurylink.mdw.plugin.actions.WebLaunchActions.WebLaunchAction)22 ArrayList (java.util.ArrayList)22 WorkflowProcess (com.centurylink.mdw.plugin.designer.model.WorkflowProcess)21 CoreException (org.eclipse.core.runtime.CoreException)19 Action (org.eclipse.jface.action.Action)19 IAction (org.eclipse.jface.action.IAction)18 IProject (org.eclipse.core.resources.IProject)17 IFile (org.eclipse.core.resources.IFile)16 PartInitException (org.eclipse.ui.PartInitException)16 IWorkbenchAction (org.eclipse.ui.actions.ActionFactory.IWorkbenchAction)16 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)15 ImageDescriptor (org.eclipse.jface.resource.ImageDescriptor)12 AutomatedTestCase (com.centurylink.mdw.plugin.designer.model.AutomatedTestCase)11 InvocationTargetException (java.lang.reflect.InvocationTargetException)11 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)11 IOException (java.io.IOException)10 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)9