Bug 568243

Summary: CodeMinings are never disposed
Product: [Eclipse Project] Platform Reporter: Julien HENRY <julien.henry>
Component: TextAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: gautier.desaintmartinlacaze
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Julien HENRY CLA 2020-10-26 06:20:48 EDT
I have started to implement a code mining, and I noticed that the dispose method is never called.

For example you can put a breakpoint here: https://github.com/angelozerr/jdt-codemining/blob/137822bf77451b51d717e5565eac19d0fffd5ac0/org.eclipse.jdt.codemining/src/org/eclipse/debug/ui/codemining/provisional/AbstractDebugVariableCodeMiningProvider.java#L99

The code mining provider is instanciated here:
https://github.com/eclipse/eclipse.platform.text/blob/6c75d96e39e7421210e1a47a787ded7c1b99e539/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java#L4024
and then stored on the source viewer.

But then when the code viewer is closed, the dispose method of the ICodeMiningProvider is never called.