@Override
  public void launch(
      final ILaunchConfiguration config,
      final String mode,
      final ILaunch launch,
      final IProgressMonitor monitor)
      throws CoreException {
    final int WORK_LAUNCH = 10;
    final int WORK_POST_LAUNCH = 100;
    SubMonitor subMonitor = SubMonitor.convert(monitor, WORK_LAUNCH + WORK_POST_LAUNCH);

    // Validate all XML before doing anything else
    final SoftPkg spd = SpdLauncherUtil.getSpd(config);
    IStatus status = SpdLauncherUtil.validateAllXML(spd);
    if (!status.isOK()) {
      throw new CoreException(status);
    }

    final ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();
    insertProgramArguments(spd, launch, copy);

    try {
      super.launch(copy, mode, launch, subMonitor.newChild(WORK_LAUNCH));
      SpdLauncherUtil.postLaunch(spd, copy, mode, launch, subMonitor.newChild(WORK_POST_LAUNCH));
    } finally {
      if (monitor != null) {
        monitor.done();
      }
    }
  }
  /** @since 10.0 */
  protected void insertProgramArguments(
      final SoftPkg spd, final ILaunch launch, final ILaunchConfigurationWorkingCopy configuration)
      throws CoreException {
    final String args =
        configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "");

    final String newArgs = SpdLauncherUtil.insertProgramArguments(spd, args, launch, configuration);
    configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, newArgs);
  }