Package org.eclipse.launchbar.core.internal

# Class LaunchBarManager

java.lang.Object
org.eclipse.launchbar.core.internal.LaunchBarManager

All Implemented Interfaces:
  `org.eclipse.debug.core.ILaunchConfigurationListener`, `ILaunchBarManager`, `ILaunchTargetListener`

public class LaunchBarManager extends Object implements ILaunchBarManager, ILaunchTargetListener
The brains of the launch bar.

## Constructor Summary

Constructors
Constructor
Description
`LaunchBarManager()`
`LaunchBarManager(boolean doInit)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addListener(ILaunchBarListener listener)`
Add a listener that can react to launch bar changes
`void`
`dispose()`
`org.eclipse.debug.core.ILaunchConfiguration`
`getActiveLaunchConfiguration()`
Returns the active launch configuration as derived from the active descriptor and target.
`ILaunchDescriptor`
`getActiveLaunchDescriptor()`
Returns the active launch descriptor.
`org.eclipse.debug.core.ILaunchMode`
`getActiveLaunchMode()`
Returns the active launch mode.
`ILaunchTarget`
`getActiveLaunchTarget()`
Returns the active launch target.
`String`
`getDescriptorTypeId(ILaunchDescriptorType type)`
Return the type id for the given launch descriptor type.
`org.eclipse.debug.core.ILaunchConfiguration`
`getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target)`
Returns the launch configuration derived from the given launch descriptor and target.
`org.eclipse.debug.core.ILaunchConfigurationType`
`getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target)`
Returns the launch configuration type used for configurations that are derived from the given launch descriptor and launch target without creating a launch configuration.
`ILaunchDescriptor[]`
`getLaunchDescriptors()`
Returns all know launch descriptors.
`org.eclipse.debug.core.ILaunchMode[]`
`getLaunchModes()`
Return all launch modes for the active launch descriptor and active launch target.
`ILaunchTarget[]`
`getLaunchTargets(ILaunchDescriptor descriptor)`
Return all launch targets supported by the given launch descriptor.
`void`
`init()`
`void`
`launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration configuration)`
`void`
`launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration configuration)`
`void`
`launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration configuration)`
`ILaunchDescriptor`
`launchObjectAdded(Object launchObject)`
A launch object has been added.
`void`
`launchObjectChanged(Object launchObject)`
A launch object has changed in some way that affects the launch bar.
`void`
`launchObjectRemoved(Object launchObject)`
A launch object has been removed.
`void`
`launchTargetAdded(ILaunchTarget target)`
A launch target was added.
`void`
`launchTargetRemoved(ILaunchTarget target)`
A launch target was removed.
`void`
`removeListener(ILaunchBarListener listener)`
Remove a listener
`void`
`setActiveLaunchDescriptor(ILaunchDescriptor descriptor)`
Set the active launch descriptor.
`void`
`setActiveLaunchMode(org.eclipse.debug.core.ILaunchMode mode)`
Set the active launch mode.
`void`
`setActiveLaunchTarget(ILaunchTarget target)`
Set the active launch target.
`void`
`setLaunchMode(ILaunchDescriptor desc, org.eclipse.debug.core.ILaunchMode mode)`
Sets the preferred mode for the given descriptor
`void`
`setLaunchTarget(ILaunchDescriptor desc, ILaunchTarget target)`
Sets preferred target for launch descriptor

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

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

### Methods inherited from interface org.eclipse.launchbar.core.target.ILaunchTargetListener

`launchTargetStatusChanged`

## Constructor Details

### LaunchBarManager

public LaunchBarManager()

### LaunchBarManager

public LaunchBarManager(boolean doInit)

## Method Details

### init

public void init() throws org.eclipse.core.runtime.CoreException

Throws:
  `org.eclipse.core.runtime.CoreException`

### getDescriptorTypeId

public String getDescriptorTypeId(ILaunchDescriptorType type)
Description copied from interface: `ILaunchBarManager`
Return the type id for the given launch descriptor type. This is defined in the extension point that defines the type.

Specified by:
  `getDescriptorTypeId` in interface `ILaunchBarManager`
Parameters:
  `type` - descriptor type
Returns:
  the type id for the descriptor type

### getLaunchConfigurationType

public org.eclipse.debug.core.ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Returns the launch configuration type used for configurations that are derived from the given launch descriptor and launch target without creating a launch configuration.

Specified by:
  `getLaunchConfigurationType` in interface `ILaunchBarManager`
Parameters:
  `descriptor` - launch descriptor
  `target` - launch target
Returns:
  launch configuration type
Throws:
  `org.eclipse.core.runtime.CoreException`

### launchObjectAdded

public ILaunchDescriptor launchObjectAdded(Object launchObject)
Description copied from interface: `ILaunchBarManager`
A launch object has been added. Create a matching launch descriptor if available.

Specified by:
  `launchObjectAdded` in interface `ILaunchBarManager`
Returns:
  the launch descriptor that got created, null of none was

### launchObjectRemoved

public void launchObjectRemoved(Object launchObject) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
A launch object has been removed. Remove the associated launch descriptor if there is one.

Specified by:
  `launchObjectRemoved` in interface `ILaunchBarManager`
Throws:
  `org.eclipse.core.runtime.CoreException`

### launchObjectChanged

public void launchObjectChanged(Object launchObject) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
A launch object has changed in some way that affects the launch bar.

Specified by:
  `launchObjectChanged` in interface `ILaunchBarManager`
Parameters:
  `launchObject` -
Throws:
  `org.eclipse.core.runtime.CoreException`

### getLaunchDescriptors

public ILaunchDescriptor[] getLaunchDescriptors()
Description copied from interface: `ILaunchBarManager`
Returns all know launch descriptors.

Specified by:
  `getLaunchDescriptors` in interface `ILaunchBarManager`
Returns:
  launch descriptors

### getActiveLaunchDescriptor

public ILaunchDescriptor getActiveLaunchDescriptor()
Description copied from interface: `ILaunchBarManager`
Returns the active launch descriptor.

Specified by:
  `getActiveLaunchDescriptor` in interface `ILaunchBarManager`
Returns:
  active launch descriptor

### setActiveLaunchDescriptor

public void setActiveLaunchDescriptor(ILaunchDescriptor descriptor) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Set the active launch descriptor.

Specified by:
  `setActiveLaunchDescriptor` in interface `ILaunchBarManager`
Parameters:
  `descriptor` - launch descriptor
Throws:
  `org.eclipse.core.runtime.CoreException`

### getLaunchModes

public org.eclipse.debug.core.ILaunchMode[] getLaunchModes() throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Return all launch modes for the active launch descriptor and active launch target.

Specified by:
  `getLaunchModes` in interface `ILaunchBarManager`
Returns:
  launch modes
Throws:
  `org.eclipse.core.runtime.CoreException`

### getActiveLaunchMode

public org.eclipse.debug.core.ILaunchMode getActiveLaunchMode()
Description copied from interface: `ILaunchBarManager`
Returns the active launch mode.

Specified by:
  `getActiveLaunchMode` in interface `ILaunchBarManager`
Returns:
  active launch mode

### setLaunchMode

public void setLaunchMode(ILaunchDescriptor desc, org.eclipse.debug.core.ILaunchMode mode) throws org.eclipse.core.runtime.CoreException
Sets the preferred mode for the given descriptor

Parameters:
  `desc` -
  `mode` -
Throws:
  `org.eclipse.core.runtime.CoreException`

### setActiveLaunchMode

public void setActiveLaunchMode(org.eclipse.debug.core.ILaunchMode mode) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Set the active launch mode.

Specified by:
  `setActiveLaunchMode` in interface `ILaunchBarManager`
Parameters:
  `mode` - launch mode
Throws:
  `org.eclipse.core.runtime.CoreException`

### getLaunchTargets

public ILaunchTarget[] getLaunchTargets(ILaunchDescriptor descriptor)
Description copied from interface: `ILaunchBarManager`
Return all launch targets supported by the given launch descriptor.

Specified by:
  `getLaunchTargets` in interface `ILaunchBarManager`
Parameters:
  `descriptor` - launch descriptor
Returns:
  launch targets

### getActiveLaunchTarget

public ILaunchTarget getActiveLaunchTarget()
Description copied from interface: `ILaunchBarManager`
Returns the active launch target.

Specified by:
  `getActiveLaunchTarget` in interface `ILaunchBarManager`
Returns:
  active launch target

### setLaunchTarget

public void setLaunchTarget(ILaunchDescriptor desc, ILaunchTarget target) throws org.eclipse.core.runtime.CoreException
Sets preferred target for launch descriptor

Parameters:
  `desc` -
  `target` -
Throws:
  `org.eclipse.core.runtime.CoreException`

### setActiveLaunchTarget

public void setActiveLaunchTarget(ILaunchTarget target) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Set the active launch target.

Specified by:
  `setActiveLaunchTarget` in interface `ILaunchBarManager`
Parameters:
  `target` - launch target
Throws:
  `org.eclipse.core.runtime.CoreException`

### getActiveLaunchConfiguration

public org.eclipse.debug.core.ILaunchConfiguration getActiveLaunchConfiguration() throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Returns the active launch configuration as derived from the active descriptor and target.

Specified by:
  `getActiveLaunchConfiguration` in interface `ILaunchBarManager`
Returns:
  active launch configuration
Throws:
  `org.eclipse.core.runtime.CoreException`

### getLaunchConfiguration

public org.eclipse.debug.core.ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) throws org.eclipse.core.runtime.CoreException
Description copied from interface: `ILaunchBarManager`
Returns the launch configuration derived from the given launch descriptor and target.

Specified by:
  `getLaunchConfiguration` in interface `ILaunchBarManager`
Parameters:
  `descriptor` - launch descriptor
  `target` - launch target
Returns:
  launch configuration
Throws:
  `org.eclipse.core.runtime.CoreException`

### addListener

public void addListener(ILaunchBarListener listener)
Description copied from interface: `ILaunchBarManager`
Add a listener that can react to launch bar changes

Specified by:
  `addListener` in interface `ILaunchBarManager`
Parameters:
  `listener` -

### removeListener

public void removeListener(ILaunchBarListener listener)
Description copied from interface: `ILaunchBarManager`
Remove a listener

Specified by:
  `removeListener` in interface `ILaunchBarManager`
Parameters:
  `listener` -

### launchConfigurationAdded

public void launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration configuration)

Specified by:
  `launchConfigurationAdded` in interface `org.eclipse.debug.core.ILaunchConfigurationListener`

### launchConfigurationRemoved

public void launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration configuration)

Specified by:
  `launchConfigurationRemoved` in interface `org.eclipse.debug.core.ILaunchConfigurationListener`

### launchConfigurationChanged

public void launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration configuration)

Specified by:
  `launchConfigurationChanged` in interface `org.eclipse.debug.core.ILaunchConfigurationListener`

### dispose

public void dispose()

### launchTargetAdded

public void launchTargetAdded(ILaunchTarget target)
Description copied from interface: `ILaunchTargetListener`
A launch target was added.

Specified by:
  `launchTargetAdded` in interface `ILaunchTargetListener`
Parameters:
  `target` - the new launch target

### launchTargetRemoved

public void launchTargetRemoved(ILaunchTarget target)
Description copied from interface: `ILaunchTargetListener`
A launch target was removed.

Specified by:
  `launchTargetRemoved` in interface `ILaunchTargetListener`
Parameters:
  `target` - the target about to be removed.