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

Bug 489211

Summary: Support for editing RuntimeClasspathEntry instances
Product: [Eclipse Project] JDT Reporter: Carsten Pfeiffer <carsten.pfeiffer>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: sarika.sinha
Version: 4.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Carsten Pfeiffer CLA 2016-03-08 08:27:04 EST
The launch configuration dialog for e.g. Java Applications has a "Classpath" tab, which allows to add/remove "User Entries" to the classpath.

When you press Advanced -> Add Library, you get a wizard which first allows you to select a library (a classpath container) and then configure it in the next step (if the container is configurable).

After adding such a library, it is unfortunately impossible to edit it again, because the "Edit" button is disabled. All you can do is remove it and create a new one.

The general support for editing such entries is already there, see org.eclipse.jdt.internal.debug.ui.classpath.IClasspathEditor. Only two things would be needed to allow editing such libraries:

1) provide an implementation of IClasspathEditor that uses 			BuildPathDialogAccess.configureContainerEntry() to invoke the configuration dialog
2) let org.eclipse.jdt.internal.launching.RuntimeClasspathEntry implement IAdaptable that delegates to Platform.getAdapterManager()
3) provide an AdapterFactory for RuntimeClasspathEntry/IClasspathEditor that checks if the entry is of kind CPE_CONTAINER and then returns the IClasspathEditor of 1)

I have an implementation of this that works for me and I'd like to contribute it. I'm not sure if adding an interface to RuntimeClasspathEntry is compatibility problem though, even though it is an internal class.
Comment 1 Eclipse Genie CLA 2019-04-21 15:03:11 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Sarika Sinha CLA 2019-04-21 23:49:19 EDT
@Carsten,
Are still willing to add up your contribution ? With Modularity Dependencies it might be a little more work.


Not sure how I missed this bug before!
Comment 3 Carsten Pfeiffer CLA 2019-05-13 04:55:20 EDT
I don't have the code anymore, so unfortunately I can't just contribute it easily.