Bug 548702 - Same launch config are listed multiple times (once per parent project)
Summary: Same launch config are listed multiple times (once per parent project)
Status: CLOSED DUPLICATE of bug 559758
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 minor with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-27 04:58 EDT by Balz Guenat CLA
Modified: 2020-12-09 06:27 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Balz Guenat CLA 2019-06-27 04:58:59 EDT
If you have a root project R and a subproject S and store a launch configuration as a file under S, this launch configuration will be listed twice in the list of launch configs.

This has been a bug for a long time, as is evident from the following m2e bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=398523
That report was closed as WONTFIX due to the problem not being fixable from m2e.

It is also not exclusive to Maven. Gradle projects can exhibit the bug as well.
Comment 1 Mickael Istria CLA 2019-06-27 05:07:51 EDT
I would argue that this is mostly an issue for the Debug view.
The hierarchical view is only a view, and we can't really do it differently in Platform, so the artifacts are duplicated in the "model" for each project containing them. The Platform has a way to use Resource filters to avoid that, and you can enable them for m2e in Preferences, but I don't know how well m2e work with them.
On Platform side, we can try to keep tackling such issue on the "view" side, by filtering out .launch config that back to the same filesystem location.
Comment 2 Balz Guenat CLA 2019-06-27 05:24:28 EDT
I don't see how this is specific to the debug view, unless you count the list of run configurations as part of the debug view.

I don't think the bug has anything to do with m2e. It's just that Maven projects tend to be hierarchical, meaning most of the time this bug occurs, it's in a Maven project. To be clear, the launch config doesn't have to be a Maven launch config. Any type of launch config will do.

Adding a resource filters is tedious.

Filtering out .launch files that point to the same location seems like a good idea.
Comment 3 Mickael Istria CLA 2019-06-27 05:28:24 EDT
(In reply to Balz Guenat from comment #2)
> I don't see how this is specific to the debug view, unless you count the
> list of run configurations as part of the debug view.

Sorry, I used the wrong term. I said "Debug view", but I meant "Debug component" or "Debug sub-project" or "Debug Git repository".

> I don't think the bug has anything to do with m2e. It's just that Maven
> projects tend to be hierarchical, meaning most of the time this bug occurs,
> it's in a Maven project. To be clear, the launch config doesn't have to be a
> Maven launch config. Any type of launch config will do.

You're right.

> Adding a resource filters is tedious.

Prefrences > Maven > "Hide folders of physically nested projects" should do that automatically for you.
Comment 4 Balz Guenat CLA 2019-06-27 05:50:46 EDT
(In reply to Mickael Istria from comment #3)
> Prefrences > Maven > "Hide folders of physically nested projects" should do
> that automatically for you.

1) That feature is marked experimental (as of 4.11).
2) It doesn't actually hide the nested folders, at least in my case.
3) It doesn't affect the bug. Launch configs are still listed multiple times.
4) It doesn't and can't help for non-Maven projects like Gradle or Eclipse Plugins. 

Note that for Gradle projects, subfolders actually are hidden but launch configs are still duplicated.
Comment 5 John Lu CLA 2019-09-24 15:39:59 EDT
The bug was introduced since Oxygen (4.7). The issue/bug didn't exist in neon (4.6)
Comment 6 Torbjörn Svensson CLA 2020-03-08 13:11:33 EDT
I think this bug is related to bug 559758, what do you think?
Comment 7 Balz Guenat CLA 2020-03-10 07:36:26 EDT
(In reply to Torbjörn  Svensson from comment #6)
> I think this bug is related to bug 559758, what do you think?

I would even say it's the same bug.
Comment 8 Mickael Istria CLA 2020-12-07 12:34:37 EST
I think bug 568790 would help there: by hiding the folder which is a nested project in the resource model, the included launches would probably not show in the launch configuration dialog; and only the one of the child project would show.
Comment 9 Sarika Sinha CLA 2020-12-09 06:18:33 EST
Duplicate entry in Debug Configuration dialog is partially solved by Bug 559758.
Comment 10 Mickael Istria CLA 2020-12-09 06:27:36 EST

*** This bug has been marked as a duplicate of bug 559758 ***