/**
   * Retrieve a boolean value from a launch configuration
   *
   * @param configuration launch configuration
   * @param name launch attribute name
   * @param defaultValue default value to use if attribute does not exist
   * @return boolean value
   */
  public static boolean getBoolean(
      ILaunchConfiguration configuration, String name, boolean defaultValue) {
    boolean value = defaultValue;
    try {
      if (configuration != null) value = configuration.getAttribute(name, defaultValue);
    } catch (CoreException e) {
      DLTKLaunchingPlugin.log(e);
    }

    return value;
  }
  /**
   * Returns the project name associated with the launch configuration
   *
   * @param configuration launch configuration
   * @return project name or <code>null</code> if no project has been associated
   */
  public static String getProjectName(ILaunchConfiguration configuration) {
    String projectName = null;
    try {
      projectName =
          configuration.getAttribute(
              ScriptLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String) null);
    } catch (CoreException e) {
      DLTKLaunchingPlugin.log(e);
    }

    return projectName;
  }