Bug 549179 - Adding project to a run configuration with a dependency to a project that is already in the run configration
Summary: Adding project to a run configuration with a dependency to a project that is ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.12   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: 4.22 M3   Edit
Assignee: Sarika Sinha CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2019-07-11 09:09 EDT by Dieter Mai CLA
Modified: 2021-11-10 13:04 EST (History)
3 users (show)

See Also:


Attachments
result after A6 (19.76 KB, image/png)
2019-07-11 09:12 EDT, Dieter Mai CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Mai CLA 2019-07-11 09:09:59 EDT
Hello

If you add a project to a run configuration and the added project has a dependency to a project that is already in the run configuration, then that project is added again and the list becomes erratic.

Actions to reproduce:
[A1] Create a Java project "TestProjectA" with a main class.
[A2] Create a Java project "TestProjectB".
[A3] Add "TestProjectA" to the classpath "TestProjectB"
[A4] Create a new run configuration "TestProjectARunConfig" with "TestProjectA" as the Main Project and its main class as main class.
[A5] Go to the Dependency view of "TestProjectARunConfig"
[A6] Add the Project "TestProjectB" to the classpath of "TestProjectARunConfig". The checkbox "Add required Projects of selected Projects" in the Project Selection dialog has to be checked.

What is Observed
[O1] Project "TestProjectA" is created.
[O2] Project "TestProjectB" is created.
[O3] Dependency is added.
[O4] The run configuration "TestProjectARunConfig" is created 
[O5] The Dependency view displays "TestProjectA" and the jdk in the classpath.
[O6] The Dependency view displays "TestProjectB" [OK] and "TestProjectA" twice [NOK]. The second "TestProjectA" behaves erratic when trying to move [NOK]

What I Expect
[E6] Only "TestProjectB" is added since "TestProjectA" is already in the list

How the issue heals:
- select another run configuration and switch back again. 



My eclipse version:
Version: 2019-06 (4.12)
Build id: 20190614-1200
Comment 1 Dieter Mai CLA 2019-07-11 09:12:11 EDT
Created attachment 279245 [details]
result after A6
Comment 2 Sarika Sinha CLA 2019-07-12 00:29:23 EDT
I can reproduce this. But this does not look like new problem. I was able to reproduce on older builds also.

Putting on 4.13 list but not sure will be able to work on this.
Comment 3 Sarika Sinha CLA 2019-08-19 05:11:14 EDT
If someone can work on this bug?
Comment 4 Dieter Mai CLA 2019-12-27 15:20:30 EST
reproducible with eclipse 2019-12
Comment 5 Dieter Mai CLA 2021-03-24 16:30:58 EDT
Retested this with Eclipse 2021-03. The issue is unchanged.

The issue occurs only with java9+
Comment 6 Sarika Sinha CLA 2021-03-25 01:42:48 EDT
Will try to work on this.
Comment 7 Eclipse Genie CLA 2021-11-04 03:57:20 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/187301
Comment 9 Sarika Sinha CLA 2021-11-10 13:04:17 EST
I20211109-1800