Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 113772

Summary: removing a project should remove launcher-entry as well
Product: [Eclipse Project] Platform Reporter: arne anka <eclipse-bugs>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Michael_Rennie
Version: 3.1.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 19521    
Bug Blocks:    

Description arne anka CLA 2005-10-26 05:41:14 EDT
removing a project should remove launcher-entry as well. created a test-project and run it, 
after that i deleted it -- but the launcher-entry still exists and because the test-project was 
the last one run it's the one run on click to "Run".
because the project the launch-configuration is bound to is deleted the configuration should be 
deleted as well while deleting the project.
Comment 1 Darin Wright CLA 2005-10-26 09:28:42 EDT
We don't delete launch configurations when a project is deleted as the project 
may be from a repository. In this case, the user may simply be deleting the 
project before fetching a new version from the repository.

It might be useful to have a preference to control this, or prompt the user. 
However, this also requires the support of bug 19521, that allows a config to 
be associated with a resource/project.
Comment 2 arne anka CLA 2005-10-26 09:49:41 EDT
> as the project may be from a repository
right.

> It might be useful to have a preference to control this, or prompt the user. 
ok, that would be a better way. make my issue a feature request for that. 

> However, this also requires the support of bug 19521,
that dependency is not obvious to me but i don't know much about eclipse's internals. (btw the 
issue occured with a c++-project as well, if it matters)
there's no easy way to determine whether there's a launch-configuration for the project to 
delete?
Comment 3 Darin Wright CLA 2005-10-26 09:55:20 EDT
For a "platform solution" that will work for all debuggers/launches 
contributed to the platform (i.e. Java, C++, etc), we need a way for the 
platform to know what project a launch configuration is associated with (if 
any). Currently, there is no API for this at the platform level, as there is 
no hard requirement for a config to be associated with a project. We are 
investigating support for this.
Comment 4 Michael Rennie CLA 2006-01-11 17:11:29 EST
fixed leveraging configuration mapping/filtering, see bug 19521 for details.
Comment 5 Michael Rennie CLA 2006-01-12 10:17:23 EST
re-opening to reassign for verification
Comment 6 Michael Rennie CLA 2006-01-12 10:17:47 EST
please verify Darin
Comment 7 Michael Rennie CLA 2006-01-13 15:37:20 EST
made additional changes:
1. include a prompt for the user to select associated launch configurations to delete
2. a preference on the Launch Configurations page for whether to delete associated launch configurations or not (always/never/prompt -- default is to prompt).

see LaunchManager, LaunchConfigurationsPreferencePage, o.e.debug.ui plugin.xml and DeleteLaunchConfigurations
Comment 8 Michael Rennie CLA 2006-01-13 15:37:39 EST
please verify changes Darin
Comment 9 Darin Wright CLA 2006-01-13 23:38:51 EST
Modified message on 'delete' dialog to explain why we are prompting the user.

Verified.