Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332630

Summary: [Markers] ProblemFilter is checking for WindowWorking sets way to soon.
Product: [Eclipse Project] Platform Reporter: Johan Compagner <jcompagner>
Component: IDEAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Johan Compagner CLA 2010-12-15 08:51:44 EST
this is the constructor of the ProblemFilter:

public ProblemFilter(String filterName) {
		super(filterName, new String[] { IMarker.PROBLEM });
		if ((PlatformUI.getPreferenceStore()
				.getBoolean(IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT))) {
			IWorkbenchWindow window = PlatformUI.getWorkbench()
					.getActiveWorkbenchWindow();
			if (window != null) {
				IWorkbenchPage page = window.getActivePage();
				if (page != null) {
					setOnResource(MarkerFilter.ON_WORKING_SET);
					setWorkingSet(page.getAggregateWorkingSet());
				}
			}
		}

	}

But that constructor is called very early in the startup. Then there is no workbench window or active page yet. So the working sets can't be set and also the scope can't be set.

So my extension point impl:

 <extension point="org.eclipse.ui.ide.markerSupport">
     <problemFilter
           enabled="true"
           id="com.servoy.eclipse.core.servoyProblemFilter"
           name="Servoy Problems">
     </problemFilter>
</extension>

will never auto go to the working set which i want it is always on ANY..

I guess we should really move that code to the getter of the ProblemFilters class..

The thing is that i am trying very hard to get a Configuration/Problem Filter in the problems view that is enabled by default, displays warnings,errors (and info but that doesnt matter to much) and follows if possible the window working set. I throught that we had that support with the IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT preference.

Because we dont have that support in the declaration in the plugin.xml. I just can't create that one in there.
Comment 1 Hitesh CLA 2010-12-15 10:59:46 EST
Yep.Point!!

This bug reports Window Workingset being used as the default scope,in case of  ambiguity. Bug 332626 reports the opposite case, where scope is overwritten with ON_ANY. Maybe the window workingset scope was intended to be the default, as you pointed out. 

MarkerSupportRegistry does a bit more after an instance is created. ON_ANY seems like a more natural choice, and should be made the same across different parts of the code.
Comment 2 Johan Compagner CLA 2010-12-15 12:00:21 EST
no this is not the opposite of 332626  (which is also mine)
Its the same problem, i tries to solve it through different ways and both ways i was blocked

with 332626  because the scope gets overwritten again with the elements configuration (because the check for working sets is a bit earlier then the assignment of the configured scope)

This bug is about that the ProblemFilter tries to do the working set configuration in the constructor (as it does in 332626 in that class) but fails because there is no active window yet..

So i both i try to do the same thing, configure a Problemfilter/Configuration that is used in the Problems view that auto maps on window working sets.

The thing is that in the plugin.xml/extension point configuration i just can't say: USE_WORKING_SET, thats not an option. Which is a pity because that would help me if we had such an option there and that one falls back if there are now window working sets..
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:12:10 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 4 Eclipse Genie CLA 2021-12-02 13:03:49 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.