Bug 295817 - [CommonNavigator] Clearer error message wanted when no label provider found
Summary: [CommonNavigator] Clearer error message wanted when no label provider found
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 231905
  Show dependency tree
 
Reported: 2009-11-22 19:26 EST by Francis Upton IV CLA
Modified: 2012-06-20 07:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Upton IV CLA 2009-11-22 19:26:15 EST
(From the newsgroup)

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
Report message to a moderator
  	  	 
- Re: Common Navigator "navigatorContent" fails [message #495927 is a reply to message #495167 ] 	Fri, 06 November 2009 11:36 Go to previous message
Paul E. Keyser is currently offline Paul E. Keyser
Messages: 845
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 ..."