Package org.eclipse.launchbar.core
Class DefaultLaunchConfigProvider
java.lang.Object
org.eclipse.launchbar.core.DefaultLaunchConfigProvider
- All Implemented Interfaces:
ILaunchConfigurationProvider
The launch config provider for the default descriptor which is the launch
config itself.
Override this class and register an extension if you want to support targets
other than the local connection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.debug.core.ILaunchConfiguration
getLaunchConfiguration
(ILaunchDescriptor descriptor, ILaunchTarget target) Create a launch configuration for the descriptor to launch on the target.org.eclipse.debug.core.ILaunchConfigurationType
getLaunchConfigurationType
(ILaunchDescriptor descriptor, ILaunchTarget target) Return the launch configuation type for the descriptor and target.boolean
launchConfigurationAdded
(org.eclipse.debug.core.ILaunchConfiguration configuration) A launch configuration has been added.boolean
launchConfigurationChanged
(org.eclipse.debug.core.ILaunchConfiguration configuration) A launch configuration has been changed.boolean
launchConfigurationRemoved
(org.eclipse.debug.core.ILaunchConfiguration configuration) A launch configuration has been removed.boolean
launchDescriptorMatches
(ILaunchDescriptor descriptor, org.eclipse.debug.core.ILaunchConfiguration configuration, ILaunchTarget target) Return true if given descriptor is associated with given launch configuration.void
launchDescriptorRemoved
(ILaunchDescriptor descriptor) A launch descriptor has been removed.void
launchTargetRemoved
(ILaunchTarget target) A launch target has been removed.boolean
supports
(ILaunchDescriptor descriptor, ILaunchTarget target) Does this config provider provide launch configurations for the combination of descriptor and target.
-
Constructor Details
-
DefaultLaunchConfigProvider
public DefaultLaunchConfigProvider()
-
-
Method Details
-
supports
public boolean supports(ILaunchDescriptor descriptor, ILaunchTarget target) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
Does this config provider provide launch configurations for the combination of descriptor and target. Note: this is called when filtering targets for a descriptor. Processing should be minimal.- Specified by:
supports
in interfaceILaunchConfigurationProvider
- Parameters:
descriptor
-target
-- Returns:
- true if target is supported, false otherwise.
- Throws:
org.eclipse.core.runtime.CoreException
-
getLaunchConfigurationType
public org.eclipse.debug.core.ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
Return the launch configuation type for the descriptor and target.- Specified by:
getLaunchConfigurationType
in interfaceILaunchConfigurationProvider
- Parameters:
descriptor
-target
- launch configuration type or null if not supported- Returns:
- 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:ILaunchConfigurationProvider
Create a launch configuration for the descriptor to launch on the target.- Specified by:
getLaunchConfiguration
in interfaceILaunchConfigurationProvider
- Parameters:
descriptor
- the descriptor to create the config fortarget
- the target to launch the config on- Returns:
- launch configuration
- Throws:
org.eclipse.core.runtime.CoreException
-
launchConfigurationAdded
public boolean launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
A launch configuration has been added. Provider can inspect it and associate with internal map. Provider should make sure it owns this launch configuration or it can modify it to take over.- Specified by:
launchConfigurationAdded
in interfaceILaunchConfigurationProvider
- Returns:
- true of provider owns this launch configuration
- Throws:
org.eclipse.core.runtime.CoreException
-
launchConfigurationChanged
public boolean launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
A launch configuration has been changed. Provider can inspect it to re-evaluate its internal map. Provider should make sure it owns this launch configuration or it can modify it to take over.- Specified by:
launchConfigurationChanged
in interfaceILaunchConfigurationProvider
- Returns:
- true of provider owns this launch configuration
- Throws:
org.eclipse.core.runtime.CoreException
-
launchConfigurationRemoved
public boolean launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
A launch configuration has been removed. This notification can be used to purge internal cache for example. This method is called after launch configuration has been removed from file system, so accessing its attributes won't work. If provider cannot determine if it owns it it should return false.- Specified by:
launchConfigurationRemoved
in interfaceILaunchConfigurationProvider
- Parameters:
configuration
-- Returns:
- true if provider owns this launch configuration
- Throws:
org.eclipse.core.runtime.CoreException
-
launchDescriptorRemoved
public void launchDescriptorRemoved(ILaunchDescriptor descriptor) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
A launch descriptor has been removed. Remove any launch configurations that were created for it.- Specified by:
launchDescriptorRemoved
in interfaceILaunchConfigurationProvider
- Parameters:
descriptor
-- Throws:
org.eclipse.core.runtime.CoreException
-
launchTargetRemoved
Description copied from interface:ILaunchConfigurationProvider
A launch target has been removed. Remove any launch configurations that were created for it.- Specified by:
launchTargetRemoved
in interfaceILaunchConfigurationProvider
- Parameters:
target
-- Throws:
org.eclipse.core.runtime.CoreException
-
launchDescriptorMatches
public boolean launchDescriptorMatches(ILaunchDescriptor descriptor, org.eclipse.debug.core.ILaunchConfiguration configuration, ILaunchTarget target) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILaunchConfigurationProvider
Return true if given descriptor is associated with given launch configuration. I.e. if getLaunchConfiguration(descriptor, target) returns a launch configuration, calling launchDescriptorMatches(descriptor, configuration, target) should return true. This method is used to activate descriptor when launch happens, return false all the time would mean launch would track launches of this specific descriptor (if they occur outside of launchbar).- Specified by:
launchDescriptorMatches
in interfaceILaunchConfigurationProvider
- Parameters:
configuration
- launch configuration in questiontarget
- - target to match, it can be null if launch bar cannot determine target, in this case it should act as wildcard- Returns:
- launch configuration
- Throws:
org.eclipse.core.runtime.CoreException
-