Bug 559758 - Duplicated nodes in Debug/Run Configurations UI
Summary: Duplicated nodes in Debug/Run Configurations UI
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.15   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: 4.18 RC1   Edit
Assignee: Torbjörn Svensson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 548702 561632 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-31 15:50 EST by Torbjörn Svensson CLA
Modified: 2021-02-06 07:59 EST (History)
5 users (show)

See Also:
sarika.sinha: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjörn Svensson CLA 2020-01-31 15:50:41 EST
If there are nested projects in the workspace, the launch configuration for the sub-project will be visible multiple times in the Debug/Run Configurations dialog.

Steps to reproduce:
1. Create a new Project, name it "rootProject".
2. Create a new Project, name it "subProject" and set location to be a sub-directory to "rootProject" in step 1.
3. Create a new launch configuration, any kind works I think, and make sure to configure it as "shared" under the "Commons" tab and place it inside the project named "subProject". For simplicity, name it "launchConfigSubProject".
4. Open Run Configurations dialog or Debug Configurations dialog.
5. There will be 2 "launchConfigSubProject" nodes in the tree to the left. There should only be one!
Comment 1 Eclipse Genie CLA 2020-01-31 15:59:41 EST
New Gerrit change created: https://git.eclipse.org/r/156986
Comment 2 Sarika Sinha CLA 2020-03-09 01:16:09 EDT
Will review after Java 14 release.
Comment 3 Alexander Fedorov CLA 2020-04-01 05:27:18 EDT
*** Bug 561632 has been marked as a duplicate of this bug. ***
Comment 4 Sarika Sinha CLA 2020-04-02 04:56:35 EDT
(In reply to Sarika Sinha from comment #2)
> Will review after Java 14 release.

@Alexander,
Please review/guide the change as you are already looking into this.
Comment 5 Alexander Fedorov CLA 2020-04-02 05:17:28 EDT
(In reply to Sarika Sinha from comment #4)
> (In reply to Sarika Sinha from comment #2)
> > Will review after Java 14 release.
> 
> @Alexander,
> Please review/guide the change as you are already looking into this.

@Sarika recently provided my review comments in Gerrit, waiting for contributor to reply
Comment 7 Sarika Sinha CLA 2020-11-20 05:11:57 EST
Thanks Torbjörn and Alexander!
Comment 8 Sarika Sinha CLA 2020-11-26 07:56:22 EST
(In reply to Torbjörn Svensson from comment #0)
> If there are nested projects in the workspace, the launch configuration for
> the sub-project will be visible multiple times in the Debug/Run
> Configurations dialog.
> 
> Steps to reproduce:
> 1. Create a new Project, name it "rootProject".
> 2. Create a new Project, name it "subProject" and set location to be a
> sub-directory to "rootProject" in step 1.
> 3. Create a new launch configuration, any kind works I think, and make sure
> to configure it as "shared" under the "Commons" tab and place it inside the
> project named "subProject". For simplicity, name it "launchConfigSubProject".
> 4. Open Run Configurations dialog or Debug Configurations dialog.
> 5. There will be 2 "launchConfigSubProject" nodes in the tree to the left.
> There should only be one!

I tried the fix with  I20201125-1800.
The second run configuration appears for a second and then disappears. Can that be fixed?
Comment 9 Eclipse Genie CLA 2020-11-29 16:42:05 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/172984
Comment 10 Torbjörn Svensson CLA 2020-11-29 16:54:12 EST
(In reply to Sarika Sinha from comment #8)
> I tried the fix with  I20201125-1800.
> The second run configuration appears for a second and then disappears. Can
> that be fixed?

I've tried to take another stab at this with the gerrit https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/172984.

When I've tried a few different use-cases, I cannot get the entries to appear for only a short while, but I am able to get them sticky and that they will only be removed if the dialog is closed and then reopened.

I've also noticed another issue (unrelated to the changes in this ticket), but it might have a slightly higher impact with the changes introduced with this ticket.

1. Create a new Project, name it "rootProject".
2. Create a new Project, name it "subProject" and set location to be a sub-directory to "rootProject" in step 1.
3. Create a new "Launch Group" configuration.
4. On the "Common tab", select to share it and save it in /subProject.
5. Click apply.
6. Alter the location of the launch configuration file and set it to be /rootProject/subProject
7. Click apply again and then select the launch configuration in the tree to the left in the dialog. => An error dialog pops up with stating that the launch configuration does not exist.

With earlier versions, the same issue can happen, one just has to select the right launch configuration item in the tree...


@Sharika: Can you please take the gerrit for a spin and see if that works better for the use-case where you have the momentarily display of the 2nd configuration?
Comment 11 Sarika Sinha CLA 2020-11-30 01:35:21 EST
Yes I tried the gerrit and it does solve the appear/disappear issue.
Please create a new bug and associate the gerrit there, we can release that in 4.19 M1 as we are already in RC2 of 4.18.

I do see the problem of disappearing launch configuration on the change of the shared folder in 4.16 as well as after the fix so we need another bug for that. If you can spare time to work on that as well, it will be great.
Comment 12 Torbjörn Svensson CLA 2020-12-01 12:29:59 EST
(In reply to Sarika Sinha from comment #11)
> Yes I tried the gerrit and it does solve the appear/disappear issue.
> Please create a new bug and associate the gerrit there, we can release that
> in 4.19 M1 as we are already in RC2 of 4.18.
> 
> I do see the problem of disappearing launch configuration on the change of
> the shared folder in 4.16 as well as after the fix so we need another bug
> for that. If you can spare time to work on that as well, it will be great.

Maybe it's better to just revert https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/156986 for the 4.18 and reopen this ticket in order to not make it worse than earlier versions?

I'll open a new ticket regardless for the related issue that I mention in comment 10.
Comment 13 Torbjörn Svensson CLA 2020-12-01 12:42:22 EST
(In reply to Torbjörn Svensson from comment #12)
> I'll open a new ticket regardless for the related issue that I mention in
> comment 10.

Bug 569371 created.
Comment 14 Sarika Sinha CLA 2020-12-01 13:57:56 EST
(In reply to Torbjörn Svensson from comment #12)
> (In reply to Sarika Sinha from comment #11)
> > Yes I tried the gerrit and it does solve the appear/disappear issue.
> > Please create a new bug and associate the gerrit there, we can release that
> > in 4.19 M1 as we are already in RC2 of 4.18.
> > 
> > I do see the problem of disappearing launch configuration on the change of
> > the shared folder in 4.16 as well as after the fix so we need another bug
> > for that. If you can spare time to work on that as well, it will be great.
> 
> Maybe it's better to just revert
> https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/156986 for the
> 4.18 and reopen this ticket in order to not make it worse than earlier
> versions?
> 

It is not worse, as finally we see only 1 instead of seeing duplicate ones. 
So please create a new bug and associate the filter gerrit to it.
Comment 15 Torbjörn Svensson CLA 2020-12-01 15:23:58 EST
(In reply to Sarika Sinha from comment #14)
> It is not worse, as finally we see only 1 instead of seeing duplicate ones. 
> So please create a new bug and associate the filter gerrit to it.

OK. Bug 569373.
Comment 16 Mickael Istria CLA 2020-12-09 06:27:36 EST
*** Bug 548702 has been marked as a duplicate of this bug. ***
Comment 17 Eclipse Genie CLA 2021-02-06 07:59:40 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/175917