[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Bug in Navigator Framework and Fix

Hi Stefano,

Thanks for your note; I'm not sure if this is bug or not; but, more importantly, this is the wrong place for this type of note.  This mailing list is for the discussions related to the maintenance of the platform UI by committers and contributors, not for people to report bugs or ask questions. To ask questions, please post in the newsgroups. And to report bugs, please use bugzilla (bugs.eclipse.org).  I look forward to your bug report and we can discuss the issue there.

Francis

On Fri, Mar 12, 2010 at 4:11 AM, Stefano Merenda <stefano.merenda@xxxxxxxxxx> wrote:
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


OOMEGA GbR | Stefano Merenda
Fingerhutstraße 6, 80995 Munich, Germany

Phone +49 89 829097-70 | Fax +49 89 829097-80


_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev