Examples of IRooInstall


Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

      if (install.getName() != null && install.getName().equals(name)) {
        return false;
      }
    }
    for (int i = 0; i < fVMs.size(); i++) {
      IRooInstall vm = fVMs.get(i);
      if (vm.getName().equals(name)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

   * Bring up a wizard that lets the user create a new VM definition.
   */
  private void addVM() {
    RooInstallDialog wizard = new RooInstallDialog(getShell(), new DefaultRooInstall(null, null, false), this);
    if (wizard.open() == Window.OK) {
      IRooInstall result = wizard.getResult();
      if (result != null) {
        fVMs.add(result);
        fVMList.refresh();
        fVMList.setSelection(new StructuredSelection(result));
        setSelection(new StructuredSelection(result));
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

  /**
   * Performs the edit VM action when the Edit... button is pressed
   */
  private void editVM() {
    IStructuredSelection selection = (IStructuredSelection) fVMList.getSelection();
    IRooInstall vm = (IRooInstall) selection.getFirstElement();
    if (vm == null) {
      return;
    }
    RooInstallDialog wizard = new RooInstallDialog(getShell(), vm, this);
    if (wizard.open() == Window.OK) {
      IRooInstall result = wizard.getResult();
      if (result != null) {
        // replace with the edited VM
        int index = fVMs.indexOf(vm);
        fVMs.remove(index);
        fVMs.add(index, result);
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

  private void sortByLocation() {
    fVMList.setComparator(new ViewerComparator() {
      @Override
      public int compare(Viewer viewer, Object e1, Object e2) {
        if ((e1 instanceof IRooInstall) && (e2 instanceof IRooInstall)) {
          IRooInstall left = (IRooInstall) e1;
          IRooInstall right = (IRooInstall) e2;
          return left.getHome().compareToIgnoreCase(right.getHome());
        }
        return super.compare(viewer, e1, e2);
      }

      @Override
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

  private void sortByName() {
    fVMList.setComparator(new ViewerComparator() {
      @Override
      public int compare(Viewer viewer, Object e1, Object e2) {
        if ((e1 instanceof IRooInstall) && (e2 instanceof IRooInstall)) {
          IRooInstall left = (IRooInstall) e1;
          IRooInstall right = (IRooInstall) e2;
          return left.getName().compareToIgnoreCase(right.getName());
        }
        return super.compare(viewer, e1, e2);
      }

      @Override
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

  private class RooProjectLabelProvider extends WorkbenchLabelProvider {
    @Override
    protected String decorateText(String input, Object element) {
      if (element instanceof IProject) {
        IRooInstall install = RooCoreActivator.getDefault().getInstallManager()
            .getRooInstall((IProject) element);
        if (install != null) {
          return input + " [" + install.getName() + "]";
        }
      }
      return super.decorateText(input, element);
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

    /**
     * @see ITableLabelProvider#getColumnText(Object, int)
     */
    public String getColumnText(Object element, int columnIndex) {
      if (element instanceof IRooInstall) {
        IRooInstall vm = (IRooInstall) element;
        switch (columnIndex) {
        case 0:
          return vm.getName();
        case 1:
          return vm.getHome();
        }
      }
      return element.toString();
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

    fJREBlock.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        setValid(false);

        IRooInstall install = getCurrentDefaultVM();
        if (install == null) {
          setErrorMessage("Select a default Roo installation");
        }
        else {
          setErrorMessage(null);
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

    if (homeText.getText() == null || homeText.getText().equals("")) {
      setError("Select a Roo home directory");
      return;
    }
    else if (validateHome) {
      IRooInstall install = new DefaultRooInstall(homeText.getText(), nameText.getText(), false);
      IStatus status = install.validate();
      if (!status.isOK()) {
        setError(status.getMessage());
      }
      versionText.setText(install.getVersion());

    }
    if (nameText.getText() == null || nameText.getText().equals("")) {
      setError("A unique name is required");
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.roo.core.model.IRooInstall

      protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException,
          InterruptedException {

        monitor.beginTask("Creating Roo project: ", 6);
        monitor.subTask("loading Spring Roo");
        IRooInstall install = (useDefault ? RooCoreActivator.getDefault().getInstallManager()
            .getDefaultRooInstall() : RooCoreActivator.getDefault().getInstallManager().getRooInstall(
            rooInstall));
        monitor.worked(1);

        Bootstrap bootstrap = null;
        try {
          // Create project location
          monitor.subTask("creating project location");
          File projectFile = new File(new File(location), projectPage.getProjectName());
          if (!projectFile.exists()) {
            projectFile.mkdirs();
          }
          monitor.worked(2);
          monitor.subTask("starting Spring Roo shell");

          String javaVersion = JavaCore.getOption("org.eclipse.jdt.core.compiler.compliance");
          String rooJavaVersion = (ROO_JAVA_VERSION_MAPPING.containsKey(javaVersion) ? ROO_JAVA_VERSION_MAPPING
              .get(javaVersion)
              : "6");

          // Create Roo project by launching Roo and invoking the
          // create project command
          String projectLocation = projectFile.getCanonicalPath();

          bootstrap = new Bootstrap(projectLocation, install.getHome(), install.getVersion(), new ProjectRefresher(null));

          // Init Roo shell
          bootstrap.start(new StyledTextAppender(shellPage.getRooShell()), projectPage.getProjectName());
          monitor.worked(3);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.