Bug 577923 - Irrelevant items cannot be removed/hidden from scope area in the filter used by MarkerSupportView.
Summary: Irrelevant items cannot be removed/hidden from scope area in the filter used ...
Status: RESOLVED MOVED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2021-12-21 09:12 EST by Enda O Brien CLA
Modified: 2023-04-21 03:58 EDT (History)
6 users (show)

See Also:


Attachments
A screenshot showing the filter dialog, highlighting the scope area (44.97 KB, image/png)
2021-12-21 09:12 EST, Enda O Brien CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enda O Brien CLA 2021-12-21 09:12:48 EST
Created attachment 287715 [details]
A screenshot showing the filter dialog, highlighting the scope area

MarkerSupportView and its parent ExtendedMarkersView allows RCP applications to implement their own view similar to the problems view, tasks view, etc...
The filter used by this view has the problem that the scope area cannot be customized.
Not all of the options are relivant for every rcp application.
There should be a way to remove some of these radio button options.

For reference these are the hard coded options in ScopeArea used to filter on scope.

    /**
	 * Constant for any element.
	 */
	static final int ON_ANY = 0;

	/**
	 * Constant for any element in same container.
	 */
	static final int ON_ANY_IN_SAME_CONTAINER = 3;

	/**
	 * Constant for selected element and children.
	 */
	static final int ON_SELECTED_AND_CHILDREN = 2;
	/**
	 * Constant for any selected element only.
	 */
	static final int ON_SELECTED_ONLY = 1;
	/**
	 * Constant for on working set.
	 */
	static final int ON_WORKING_SET = 4;
Comment 1 Andrey Loskutov CLA 2021-12-21 09:24:17 EST
Patches are welcome : 
https://wiki.eclipse.org/Platform/How_to_Contribute
Comment 2 Eclipse Genie CLA 2022-03-08 12:22:52 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/191618
Comment 3 Enda O Brien CLA 2022-03-09 09:10:32 EST
I submitted a gerrit patch but the build is failing for some reason I dont understand. Would someone with knowledge of the build system be able to help out debugging the error ?

[ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:2.7.0:compare-version-with-baselines (compare-attached-artifacts-with-release) on project org.eclipse.e4.ui.workbench.renderers.swt: Version have moved backwards for (org.eclipse.e4.ui.workbench.renderers.swt/0.15.300.v20220302-1518). Baseline has 0.15.400.v20220308-0630) with delta: 0.0.-100 -> [Help 1]

note: I didn't modify any code in the plugin mentioned above.

https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/191618
Comment 4 Enda O Brien CLA 2022-03-11 08:52:24 EST
The build is passing now after doing a rebase.
Comment 5 Mickael Istria CLA 2022-03-14 10:28:04 EDT
Which radio buttons are you willing to remove concretely and why?
If this is about application configuration and not a feature addition, I'm not sure an extension point is best; instead it would be simpler to use preferences and let RCP customize them in their plugin_configuration.ini .
Comment 6 Mickael Istria CLA 2022-03-14 10:31:01 EDT
(In reply to Mickael Istria from comment #5)
> Which radio buttons are you willing to remove concretely and why?
> If this is about application configuration and not a feature addition, I'm
> not sure an extension point is best; instead it would be simpler to use
> preferences and let RCP customize them in their plugin_configuration.ini .

Please ignore that comment, I think given the amount of config in markerSupport.exsd, it's better to keep everything there.
Comment 7 Wim Jongman CLA 2022-03-14 10:48:00 EDT
(In reply to Mickael Istria from comment #5)
> Which radio buttons are you willing to remove concretely and why?
> If this is about application configuration and not a feature addition, I'm
> not sure an extension point is best; instead it would be simpler to use
> preferences and let RCP customize them in their plugin_configuration.ini .

There is already an extension point markersupport (which is flagged experimental). Enda has added an extra attribute to this extension point to control the display of these variables.

No new extension point was added.
Comment 8 Wim Jongman CLA 2022-03-14 12:39:24 EDT
(In reply to Mickael Istria from comment #6)
> (In reply to Mickael Istria from comment #5)
> > Which radio buttons are you willing to remove concretely and why?

The use-case is described in the initial comment. What other clarification are you looking for?

> it's better to keep everything there.

What do you mean by that?
Comment 9 Mickael Istria CLA 2022-03-15 04:19:59 EDT
(In reply to Wim Jongman from comment #8)
> The use-case is described in the initial comment. What other clarification
> are you looking for?

I'm looking for information in term of usability, to evaluate whether visibility of the radio components can be decided automatically according to the context.
Also, I'm actually not sure the grain is correct: rather than tweaking the content of the dialog in such a fine grain, it might be better to just let extenders override the ScopeArea from their specific view implementation, or maybe even consider a dedicated Problem Filter dialog.
Comment 10 Enda O Brien CLA 2022-03-15 09:18:51 EDT

(In reply to Mickael Istria from comment #9)
> (In reply to Wim Jongman from comment #8)
> > The use-case is described in the initial comment. What other clarification
> > are you looking for?
> 
> I'm looking for information in term of usability, 

For example: 
We don't use working sets in our application so 'working sets' is not needed.
We have the concept of a single active project in the workspace and don't want to show markers for non active projects. So 'On any Element in the same project' isn't relevant.

> to evaluate whether
> visibility of the radio components can be decided automatically according to
> the context.

I think it should be application specific, at least the concept of an active project is not in eclipse.

> Also, I'm actually not sure the grain is correct: rather than tweaking the
> content of the dialog in such a fine grain, it might be better to just let
> extenders override the ScopeArea from their specific view implementation, 

The problem with this is that there is a lot of internal code in this area.
e.g.

FilterConfigurationDialog is internal.
Its ScopeArea implemtation is internal. ScopeArea is referenced as GroupFilterConfigurationArea in the FilterConfigurationDialog.
GroupFilterConfigurationArea is also internal. GroupFilterConfigurationArea uses MarkerFieldFilterGroup which is also internal.

> or
> maybe even consider a dedicated Problem Filter dialog.

This will face the same problem with internal code.
Also, most of the problem filter dialog works for us.
Comment 11 Enda O Brien CLA 2022-04-19 05:33:40 EDT
I moved the patch to github as recommended in the Gerrit review: https://github.com/eclipse-platform/eclipse.platform.ui/pull/17
Comment 12 Enda O Brien CLA 2022-04-21 11:05:02 EDT
Is it possible for this to be merged ?
Comment 13 Enda O Brien CLA 2022-04-21 11:05:19 EDT
Is it possible for this to be merged ?
Comment 14 Enda Fadian CLA 2023-04-19 12:12:55 EDT
Can this be merged or is there further work required?
Comment 15 Lars Vogel CLA 2023-04-21 03:58:47 EDT
(In reply to Enda Fadian from comment #14)
> Can this be merged or is there further work required?

Hi Enda,

could you move the change to a PR? If you do, please add me via cc so that I can review.

----------
From the Gerrit comment:

This repository is now moved to GitHub: https://github.com/eclipse-platform/eclipse.platform.ui . Please immediately set you `upstream` repo url to use GitHub instead of Gerrit
$ git remote set-url upstream git@github.com:eclipse-platform/eclipse.platform.ui.git

If you're not planning to continue working on this patch; please mark this current Gerrit review as "Abandoned".
If you're willing to transfer this issue to GitHub Pull Requests:
1. On GitHub Web Interface, fork the repository, and retrieve the URL for the fork eg `git@github.com:my-github-userid/eclipse.platform.ui.git`
2. $ git remote add origin git@github.com:my-github-userid/eclipse.platform.ui.git
3. Checkout this current patch (See the "Download" link on this Gerrit review page)
4. $ git push origin HEAD:refs/heads/a-meaningful-branch-name
5. As output of the push, Git shows a link to Create a Pull Request, follow this link and create the pull request. If some useful discussion took place on Gerrit, you may want to include a link to the Gerrit review on the GitHub pull request message, for reference.

-------------