Package org.eclipse.launchbar.core.target

# Class LaunchTargetUtils

java.lang.Object
org.eclipse.launchbar.core.target.LaunchTargetUtils

public class LaunchTargetUtils extends Object

Since:
  3.1

## Method Summary

Modifier and Type
Method
Description
`static List<String>`
`getExistingLaunchTargetNames()`
Get the names of all existing launch targets.
`static boolean`
`isInvalidName(String name)`
Check for invalid characters.
`static String`
`sanitizeLaunchConfigurationName(String name)`
Replace launch configuration name disallowed characters with underscores.
`static String`
`sanitizeName(String name)`
Replace any invalid characters with a safe value.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### isInvalidName

public static boolean isInvalidName(String name)
Check for invalid characters.

Parameters:
  `name` - The name to check.
Returns:
  true if name contains characters in `INVALID_NAME_PATTERN`.

### sanitizeName

public static String sanitizeName(String name)
Replace any invalid characters with a safe value.

Parameters:
  `name` - The name to check.
Returns:
  name with any character in the `INVALID_NAME_PATTERN` replaced with "_"

### sanitizeLaunchConfigurationName

public static String sanitizeLaunchConfigurationName(String name)
Replace launch configuration name disallowed characters with underscores. Copied from org.eclipse.debug.internal.core.LaunchConfigurationManager LaunchManager.isValidLaunchConfigurationName() can be used to verify a name.

Parameters:
  `name` - the name to sanitize.
Since:
  3.1

### getExistingLaunchTargetNames

public static List<String> getExistingLaunchTargetNames()
Get the names of all existing launch targets.

Returns:
  List of existing launch target names. If the launch target manager service is not available, an empty list is returned.
Since:
  3.1