Package org.jbpm.eclipse.util

Examples of org.jbpm.eclipse.util.JBPMRuntime


            monitor.done();
        }
    }
   
    private void createJBPMRuntime(IJavaProject project, IProgressMonitor monitor) throws CoreException {
    JBPMRuntime runtime = runtimePage.getJBPMRuntime();
    if (runtime != null) {
      IFile file = project.getProject().getFile(".settings/.jbpm.runtime");
      String runtimeString = "<runtime>" + runtime.getName() + "</runtime>";
      if (!file.exists()) {
        IFolder folder = project.getProject().getFolder(".settings");
        if (!folder.exists()) {
          folder.create(true, true, null);
        }
View Full Code Here


    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 2;
        composite.setLayout(gridLayout);
       
        JBPMRuntime defaultRuntime = JBPMRuntimeManager.getDefaultJBPMRuntime();
    projectSpecificRuntime = createCheckBox(composite,
      "Use default jBPM Runtime (currently "
        + (defaultRuntime == null ? "undefined)" : defaultRuntime.getName() + ")"));
    projectSpecificRuntime.setSelection(true);
    projectSpecificRuntime.addSelectionListener(new SelectionListener() {
      public void widgetDefaultSelected(SelectionEvent e) {
        // do nothing
      }
View Full Code Here

            jBPMRuntimeCombo.add(runtimes[i].getName());
          }
          jBPMRuntimeCombo.select(0);
      selectedRuntime = jBPMRuntimeCombo.getText();
        }
        JBPMRuntime defaultRuntime = JBPMRuntimeManager.getDefaultJBPMRuntime();
    projectSpecificRuntime.setText("Use default jBPM Runtime (currently "
      + (defaultRuntime == null ? "undefined)" : defaultRuntime.getName() + ")"));
  }
View Full Code Here

    data.widthHint = 450;
    control.setLayoutData(data);

    jBPMRuntimesBlock.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        JBPMRuntime runtime = jBPMRuntimesBlock.getDefaultJBPMRuntime();
        if (runtime == null) {
          setErrorMessage("Select a default jBPM Runtime");
        } else {
          setErrorMessage(null);
        }
View Full Code Here

  public JBPMRuntime getResult() {
    return runtime;
  }

    protected void okPressed() {
        runtime = new JBPMRuntime();
        runtime.setName(nameText.getText());
        runtime.setPath(pathText.getText());
        super.okPressed();
    }
View Full Code Here

    jbpmRuntimesList.setInput(jbpmRuntimes);
    jbpmRuntimesList.refresh();
  }

  public JBPMRuntime[] getJBPMRuntimes() {
    JBPMRuntime selected = getDefaultJBPMRuntime();
    for (JBPMRuntime runtime: jbpmRuntimes) {
      runtime.setDefault(runtime.equals(selected));
    }
    return jbpmRuntimes.toArray(new JBPMRuntime[jbpmRuntimes.size()]);
  }
View Full Code Here

  }
 
  private void addJBPMRuntime() {
    JBPMRuntimeDialog dialog = new JBPMRuntimeDialog(getShell(), jbpmRuntimes);
    if (dialog.open() == Window.OK) {
      JBPMRuntime result = dialog.getResult();
      if (result != null) {
        JBPMRuntimeManager.recognizeJars(result);
        jbpmRuntimes.add(result);
        jbpmRuntimesList.refresh();
        jbpmRuntimesList.setSelection(new StructuredSelection(result));
View Full Code Here

    }
  }
 
  private void editJBPMRuntime() {
    IStructuredSelection selection= (IStructuredSelection) jbpmRuntimesList.getSelection();
    JBPMRuntime runtime = (JBPMRuntime) selection.getFirstElement();
    if (runtime == null) {
      return;
    }
    JBPMRuntimeDialog dialog = new JBPMRuntimeDialog(getShell(), jbpmRuntimes);
    dialog.setJBPMRuntime(runtime);
    if (dialog.open() == Window.OK) {
      JBPMRuntime result = dialog.getResult();
      if (result != null) {
        JBPMRuntimeManager.recognizeJars(result);
        // replace with the edited VM
        int index = jbpmRuntimes.indexOf(runtime);
        jbpmRuntimes.remove(index);
View Full Code Here

  }
 
  class JBPMRuntimesLabelProvider extends LabelProvider implements ITableLabelProvider {
    public String getColumnText(Object element, int columnIndex) {
      if (element instanceof JBPMRuntime) {
        JBPMRuntime runtime = (JBPMRuntime) element;
        switch(columnIndex) {
          case 0:
            return runtime.getName();
          case 1:
            return runtime.getPath();
        }
      }
      return element.toString();
    }
View Full Code Here

TOP

Related Classes of org.jbpm.eclipse.util.JBPMRuntime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.