Bug 305708 - [CommonNavigator] NavigatorContentProvider not invoked although InvokeAlwaysRegardlessOfSuppressedExt
Summary: [CommonNavigator] NavigatorContentProvider not invoked although InvokeAlwaysR...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-12 12:12 EST by Stefano Merenda CLA
Modified: 2019-09-06 15:36 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Merenda CLA 2010-03-12 12:12:29 EST
Hi all,

hope it is fine, when I post this issue here...

I had a problem with the Common Navigator Framework. I have debugged the system in detail and also read the documentation. I feel that there is a bug and may be I also have a fix for that.

The problem occurs when overriding another navigator content extension. The NavigatorContentProvider is not invoked although according to the documentation it should.
Enclosed the an excerpt of the plugin.xml:

      <navigatorContent
            activeByDefault="true"
            contentProvider="org.oomega.core.eclipse.navigator.NavigatorContentProvider"
            icon="icons/oomega.gif"
            id="org.oomega.core.eclipse.modelContent"
            labelProvider="org.oomega.core.eclipse.navigator.NavigatorLabelProvider"
            name="Model Repository Content"
            priority="high"
            providesSaveables="true">
         <override
               policy="InvokeAlwaysRegardlessOfSuppressedExt"
               suppressedExtensionId="org.eclipse.ui.navigator.resourceContent">
         </override>

         ...

      </navigatorContent>

When debugging the the code a got the feeling that the wrong OverridePolicy is checked. When I replace InvokeAlwaysRegardlessOfSuppressedExt by InvokeOnlyIfSuppressedExtAlsoVisibleAndActive everything works fine (as shown).

	private boolean isOverridingExtensionInSet(INavigatorContentDescriptor aDescriptor, Set theEnabledExtensions) {

		if (aDescriptor.getSuppressedExtensionId() != null /*
															 * The descriptor is
															 * an override
															 * descriptor
															 */
				&& aDescriptor.getOverridePolicy() == OverridePolicy.InvokeOnlyIfSuppressedExtAlsoVisibleAndActive) {
			/*
			 * if the policy is set as such, it can lead to this extension being
			 * invoked twice; once as a first class extension, and once an
			 * overriding extension.
			 */
			if (theEnabledExtensions.contains(contentService.getExtension(aDescriptor.getOverriddenDescriptor()))) {
				return true;
			}
		}
		return false;
	}

Do I misunderstand something or am I right?!?

Kind regards,
stefano
Comment 1 Kat Sharp CLA 2010-07-12 07:26:10 EDT
Is there any update for this? I have noticed the same problem.
Comment 2 Eclipse Webmaster CLA 2019-09-06 15:36:51 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.