Examples of IBootInstall


Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

  public boolean performOk() {
    final boolean[] canceled = new boolean[] { false };
    BusyIndicator.showWhile(null, new Runnable() {
      public void run() {
        Set<IBootInstall> newInstalls = new LinkedHashSet<IBootInstall>();
        IBootInstall defaultVM = getCurrentDefaultVM();
        IBootInstall[] vms = fJREBlock.getJREs();
        for (IBootInstall vm : vms) {
          try {
            newInstalls.add(installManager.newInstall(vm.getUrl(), vm.getName()));
          } catch (Exception e) {
View Full Code Here

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

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

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

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

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

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

   */
  private void addVM() {
    try {
      BootInstallDialog wizard = new BootInstallDialog(getShell(), installManager.newInstall("", null), this, installManager);
      if (wizard.open() == Window.OK) {
        IBootInstall 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.boot.core.cli.install.IBootInstall

  /**
   * Performs the edit VM action when the Edit... button is pressed
   */
  private void editVM() {
    IStructuredSelection selection = (IStructuredSelection) fVMList.getSelection();
    IBootInstall vm = (IBootInstall) selection.getFirstElement();
    if (vm == null) {
      return;
    }
    BootInstallDialog wizard = new BootInstallDialog(getShell(), vm, this, installManager);
    if (wizard.open() == Window.OK) {
      IBootInstall 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.boot.core.cli.install.IBootInstall

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

      @Override
View Full Code Here

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

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

      @Override
View Full Code Here

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

  /**
   * Populates the JRE table with existing JREs defined in the workspace.
   */
  protected void fillWithWorkspaceJREs() {
    Collection<IBootInstall> installs = installManager.getInstalls();
    IBootInstall deflt = null;
    try {
      deflt = installManager.getDefaultInstall();
    } catch (Exception e) {
      BootActivator.log(e);
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

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

Examples of org.springframework.ide.eclipse.boot.core.cli.install.IBootInstall

   */
  public void handleBrowseButtonResult(String filePath) {
    if (hasText(filePath)) {
      url = new File(filePath).toURI().toString();
     
      IBootInstall newInstall = installFactory.newInstall(url, null); //name=null means let domain object choose its default name
      newInstall.clearCache();
     
      urlText.setText(url); //Note: triggers validation by way of listener attached to the urlText
     
      //Don't duplicate default name generation logic here. It belongs in the 'domain' objects implementing IBootInstall
      nameText.setText(prefPage.generateName(newInstall.getName(), install));
     
      // don't trigger validation again already triggered in urlText listener.
      //validate(true);
    }
  }
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.