[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] launch shortcut question

> Hello, 
> For our debugger I am implementing a launch configuration type and a
> launch shortcut for that type. 
> Some of the configurations of that type are created based on a 
> project and for these configurations I call 
> LaunchConfigurationWorkingCopy.setMappedResources().
> But other configurations of the same type are based on different 
> selection (an external file from a different view) so there is no 
> project associated with these launch configuration instances. In 
> that case I donât call 
> Here is the problem: 
> When I select a project and click on the debug toolbar a previously 
> created configuration based on external file is launched 
> automatically.  Everything works fine if all my launch 
> configurations had mapped resource associated with them. 
> I traced that this behaviour is due to 
> LaunchConfigurationManager.getApplicableLaunchConfigurations.
> When the function is trying to find launch configurations applicable
> to a specific resource it assumes that if a launch configuration 
> doesnât have mapped resources the launch configuration should be 
> I was wandering if there is an API that should be called so the 
> launch configuration manager wonât assume  configuration that 
> doesnât have mapped resource will be applicable for this resource?
> Thanks 
> Dobrin_______________________________________________

You should be able to solve this by having your launch shortcut implement 
ILaunchShortcut2. This allows the shortcut to determine which existing 
configurations are applicable to a selection or active editor.