Package org.eclipse.maven.core

Examples of org.eclipse.maven.core.MavenCommand


    } else {
      final String workspace_location = ResourcesPlugin.getWorkspace().getRoot()
          .getRawLocation().toString();
     
      final String pomLocation = findPomLocation(selection, workspace_location);
      MavenCommand command = new MavenCommand();
     
      if ( pomLocation != null ) {
        String cmd = event.getParameter("commandLine");
        command.setCommandLine(cmd);
       
       
        Job job = new MavenExecutor(command, pomLocation);
       
        job.schedule();
View Full Code Here


  protected void addButtonsToButtonGroup(Composite parent) {
    Button b = createPushButton2(parent, "Add");
    b.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        MavenCommand command = new MavenCommand();
        command.setId("" + maxCommandId);
        MavenCommandDialog dialog = new MavenCommandDialog(new Shell(),
            command);
        dialog.create();
        int result = dialog.open();
        if (result == 0) {
          commands.put(command.getId(), command);
          nodeStore.put(PreferencesConstants.MAVEN_COMMAND_ALIAS
              + "." + maxCommandId, command.getAliasValue());
          nodeStore.put(PreferencesConstants.MAVEN_COMMANDLINE + "."
              + maxCommandId, command.getCommandLine());

          TableItem item = new TableItem(commandstable, SWT.LEFT);
          item.setText(command.getAliasValue());
          item.setData("id", command.getId());
          item.setData("indexInTable", tableItems.size());
          tableItems.put(command.getId(), item);

          maxCommandId++;
        }
      }
    });

    b = createPushButton2(parent, "Edit");
    b.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        if (selectedCommandsId.size() == 1) {
          String id = selectedCommandsId.iterator().next();

          MavenCommand command = commands.get(id);

          MavenCommandDialog dialog = new MavenCommandDialog(
              new Shell(), command);
          dialog.create();
          int result = dialog.open();
          if (result == 0) {
            ;
            commands.put(PreferencesConstants.MAVEN_COMMAND_ALIAS
                + "." + id, command);
            nodeStore.put(PreferencesConstants.MAVEN_COMMAND_ALIAS
                + "." + id, command.getAliasValue());
            nodeStore.put(PreferencesConstants.MAVEN_COMMANDLINE
                + "." + id, command.getCommandLine());

            tableItems.get(id).setText(command.getAliasValue());
            selectedCommandsId.clear();
            maxCommandId++;
          }
        }
      }
View Full Code Here

                  .length() + 1);
          commandNumber = Integer.parseInt(sId);
          if (maxCommandId <= commandNumber)
            maxCommandId = commandNumber + 1;

          MavenCommand command = new MavenCommand();
          command.setId("" + commandNumber);
          command.setAliasValue(nodeStore.get(
              PreferencesConstants.MAVEN_COMMAND_ALIAS + "."
                  + commandNumber, null));
          command.setCommandLine(nodeStore.get(
              PreferencesConstants.MAVEN_COMMANDLINE + "."
                  + commandNumber, null));
          commands.put(command.getId(), command);
        }
      }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.maven.core.MavenCommand

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.