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

Bug 579030

Summary: LaunchConfig delete does not update cached names
Product: [Eclipse Project] JDT Reporter: Frank Benoit <frank.rene.benoit>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 4.22   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Frank Benoit CLA 2022-03-01 07:58:47 EST
When a launch config exists without file representation (no .launch file), then a delete does not notify the manager to be updated.

This can be seen if a launch config is created programatically/used/deleted. Another creation of launch config shall be created with the same name, but now the
    getLaunchManager().generateLaunchConfigurationName(launchName);
gives a name with the " (1)" postfix.

org.eclipse.debug.internal.core.LaunchConfiguration


@Override
public void delete() throws CoreException {
    if (exists()) { // << tests if the launch exists as a file
        // ...

        // update the launch manager cache synchronously
        getLaunchManager().launchConfigurationDeleted(this); // <1>
    }
    <2>
}

I think the line with <1> should be moved to <2>
Comment 1 Frank Benoit CLA 2022-03-01 08:34:43 EST
Sorry, debugging showed, all is good.