eclipse-mylyn / org.eclipse.mylyn

Eclipse Public License 2.0
14 stars 9 forks source link

duplicate elements shown in context preview page when duplicates exist in the model #247

Open gnl42 opened 1 year ago

gnl42 commented 1 year ago

This issue was created in gitlab.eclipse.org by Eugene Kuleshov (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=256887. Also referenced:

`I am working with projects organized hierarchically on disk. For example:

foo-parent foo-module1 src resources foo-module2 src resources

This structure give 3 projects in Eclipse:

foo-parent foo-module1 foo-module2

Note that such project layout is quite popular in Maven community.

Now, when resource in foo-module1/src/resources is changed, e.g. using one of Eclipse editors, this same resource is forcefully shown in the package explorer two times, first in foo-module1/src/resources and second in foo-parent/foo-module1/src/resources

This clutters package explorer view and also forcing user to deal with this clutter, basically distracting him form the main task.`

BeckerFrank commented 1 year ago

In your case, you will also get each search result twice.

In such a case, I always filter out the foo-module* projects from the foo-parent project. Did you try this?

merks commented 1 year ago

@gnl42

Lots of people don't know about filters. You can do that via the properties of a project:

image

Here I have two nested projects but I don't want to show them twice, so in the parent project, I filter out the children of the nested projects so that I still see the placeholder folder, but not the "duplicate" contents. Here's a filter expression which uses regular expressions:

maven-osgi/org.eclipse.orbit.maven.generator/.*|maven-bnd/org.eclipse.orbit.maven.bnd.generator/.*
gnl42 commented 1 year ago

Thanks. I'll have to try it out.

Could something like that be incorporated into focused mode?

BeckerFrank commented 1 month ago

Thanks. I'll have to try it out.

Could something like that be incorporated into focused mode?

I think to do this only in focused mode is wrong. For me this should be a workspace setting like in org.eclipse.mylyn/.project