Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Common Navigator "navigatorContent" fails
Common Navigator "navigatorContent" fails [message #495167] Wed, 04 November 2009 00:38 Go to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
R3.4.2 (no, we can't migrate to 3.5 yet), WinXP

I have a working CNF in my RCP -- nice navigator appears, shows the
workspace, actions like "New -> Folder" work, all fine. I've added a
bunch of objectContribution's, all of which work.

Then, to try to add more content to the tree, I followed the directions in:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/cnf.htm


and the more extensive ones in:
http://scribbledideas.blogspot.com/2006/07/pdf-versions-now- available.html

I have a content-provider and a label-provider and a bunch of XML that
(to me) looks essentially identical to what is in the help docs ...

But all I get when I try to expand the resource-type to which I've tried
to attach the extra content is an error message: "Error: no label
provider for ..." (and then the path of the resource).

The fact that the CNF offers a child of the resource-type to which I've
tried to attach the extra content indicates that some part of the
plugging in worked.

Obviously almost anything could be wrong, but does that error provide
any sort of clue as to where to look? And what hints are there for
debugging this? (For example, since my content-provider and
label-provider are not being called, no point in setting breakpoints in
them ...)

-Paul
Re: Common Navigator "navigatorContent" fails [message #495927 is a reply to message #495167] Fri, 06 November 2009 16:36 Go to previous messageGo to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
Paul E. Keyser wrote:
> R3.4.2 (no, we can't migrate to 3.5 yet), WinXP
>
> But all I get when I try to expand the resource-type to which I've tried
> to attach the extra content is an error message: "Error: no label
> provider for ..." (and then the path of the resource).
>

Found it -- the bug was (no surprise) in my code: I was returning a
value of type Foo from the ContentProvider and the LabelProvider would
return null for a value of type Foo. The example code does have a
label-provider returning null for unhandled types ... and evidently the
CNF handles a null from a LabelProvider by displaying that somewhat
cryptic error.

A clearer error-message might help:
"Available label-providers all returned null for ..."

-Paul
Re: Common Navigator "navigatorContent" fails [message #499485 is a reply to message #495927] Mon, 23 November 2009 00:31 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
Paul E. Keyser wrote on Fri, 06 November 2009 11:36
Paul E. Keyser wrote:

A clearer error-message might help:
"Available label-providers all returned null for ..."

-Paul


https://bugs.eclipse.org/bugs/show_bug.cgi?id=295817


Previous Topic:Project nature overlay won't be displayed
Next Topic:How to detect drop target window (view?) when drag and drop common navigator item between windows?
Goto Forum:
  


Current Time: Thu Apr 25 23:35:49 GMT 2024

Powered by FUDForum. Page generated in 0.03263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top