Bug 575808 - E4 Parts without View Tag can show up in "Show View Dialog" as Category Children
Summary: E4 Parts without View Tag can show up in "Show View Dialog" as Category Children
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.20   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-03 06:12 EDT by Mathias Mehrmann CLA
Modified: 2021-09-03 06:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Mehrmann CLA 2021-09-03 06:12:46 EDT
While running into Bug#575329 we also found some discrepancies in our E4 Part definitions.

We had E4 parts that did not have a "View" Tag. 
But they had set a Category.

Normally org.eclipse.ui.internal.dialogs.ShowViewDialog will filter out MParts that are not a View (!isView(descriptor)).

But if you have a MPart which is a View and has the same category as a MPart that does not have it, this Non-View-MPart will also show up in that Category.

It's a wrong definition on our side that we already solved but also a possible inconcistency that costs us some time to find the problem.

org.eclipse.ui.internal.dialogs.ViewContentProvider.determineTopLevelElements(Object)
is using !isView(descriptor)

org.eclipse.ui.internal.dialogs.ViewContentProvider.determineViewsInCategory(String)
is not using it.

Wouldn't it be better if both locations react in the same way?
Comment 1 Lars Vogel CLA 2021-09-03 06:16:40 EDT
(In reply to Mathias Mehrmann from comment #0)
> While running into Bug#575329 we also found some discrepancies in our E4
> Part definitions.
> 
> We had E4 parts that did not have a "View" Tag. 
> But they had set a Category.
> 
> Normally org.eclipse.ui.internal.dialogs.ShowViewDialog will filter out
> MParts that are not a View (!isView(descriptor)).
> 
> But if you have a MPart which is a View and has the same category as a MPart
> that does not have it, this Non-View-MPart will also show up in that
> Category.
> 
> It's a wrong definition on our side that we already solved but also a
> possible inconcistency that costs us some time to find the problem.
> 
> org.eclipse.ui.internal.dialogs.ViewContentProvider.
> determineTopLevelElements(Object)
> is using !isView(descriptor)
> 
> org.eclipse.ui.internal.dialogs.ViewContentProvider.
> determineViewsInCategory(String)
> is not using it.
> 
> Wouldn't it be better if both locations react in the same way?

Sounds reasonable. Please provide a Gerrit.