Community
Participate
Working Groups
If we look at the code: public MarkerFieldFilterGroup(IConfigurationElement configurationElement, MarkerContentGenerator markerBuilder) { element = configurationElement; generator = markerBuilder; initializeWorkingSet(); scope = processScope(); we see that we get initalizeWorkingSet() which tells us: /** * Initialise the working set for the receiver. Use the window working set * for the working set and set the scope to ON_WORKING_SET if they are to be * used by default. */ private void initializeWorkingSet() { IWorkbenchWindow window = PlatformUI.getWorkbench() .getActiveWorkbenchWindow(); if (window != null) { IWorkbenchPage page = window.getActivePage(); if (page != null) { setWorkingSet(page.getAggregateWorkingSet()); if ((PlatformUI.getPreferenceStore() .getBoolean(IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT))) setScope(ON_WORKING_SET); } } } So when the boolean is true it will set the scope to ON_WORKING_SET what i find strange on this code is that i would expect one other check: if ( windowWorkingSetIsSet && (PlatformUI.getPreferenceStore() .getBoolean(IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT))) setScope(ON_WORKING_SET); But thats another issue that i notice. But that private method just tests and sets the workingset and sets the scope. But that setting of the scope is completely void because the next line in the constructor: initializeWorkingSet(); scope = processScope(); is resetting the scope to what is configured or ANY if nothing can be found: private int processScope() { if (element == null) return ON_ANY; String scopeValue = element.getAttribute(ATTRIBUTE_SCOPE); if (ATTRIBUTE_ON_SELECTED_ONLY.equals(scopeValue)) return ON_SELECTED_ONLY; if (ATTRIBUTE_ON_SELECTED_AND_CHILDREN.equals(scopeValue)) return ON_SELECTED_AND_CHILDREN; if (ATTRIBUTE_ON_ANY_IN_SAME_CONTAINER.equals(scopeValue)) return ON_ANY_IN_SAME_CONTAINER; return ON_ANY; } now the question is if the element is set and it as a scope configured should or should that not override the working set scope? If we do want to always follow the configured one then i guess we could at least do: private int processScope() { if (element == null) return scope; String scopeValue = element.getAttribute(ATTRIBUTE_SCOPE); if (ATTRIBUTE_ON_SELECTED_ONLY.equals(scopeValue)) return ON_SELECTED_ONLY; if (ATTRIBUTE_ON_SELECTED_AND_CHILDREN.equals(scopeValue)) return ON_SELECTED_AND_CHILDREN; if (ATTRIBUTE_ON_ANY_IN_SAME_CONTAINER.equals(scopeValue)) return ON_ANY_IN_SAME_CONTAINER; return scope; } so return the scope which is already set.
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.
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.