Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Help on the Common Navigator Framework
Help on the Common Navigator Framework [message #496331] Mon, 09 November 2009 17:50 Go to next message
Damien Mising name is currently offline Damien Mising nameFriend
Messages: 7
Registered: July 2009
Junior Member
Hello everybody,

I am trying to add a navigator to my RCP application. Should I do this with the Common Navigator Framework or is CNF only meant for developing plugin of Eclipse IDE ?

I have tried to follow this tutorial : http://scribbledideas.blogspot.com/2006/05/building-common-n avigator-based-viewer.html but it does not help me much. For example, where should I write my code piece for opening double-clicked resources in the view ?

Many thanks in advance,
Damien
Re: Help on the Common Navigator Framework [message #499491 is a reply to message #496331] Mon, 23 November 2009 01:12 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
The Common Navigator Framework is what you want.

Look at the documentation for it (it's in your Eclipse SDK help or at the link in my signature). It should have enough to get you started. It's designed to work both in the IDE and an RCP environment.


Re: Help on the Common Navigator Framework [message #499535 is a reply to message #499491] Mon, 23 November 2009 10:04 Go to previous messageGo to next message
Damien Mising name is currently offline Damien Mising nameFriend
Messages: 7
Registered: July 2009
Junior Member
Thank you Francis,

I have gone a bit further with CNF since the last time, but I still have one blocking problem.

I have created a Navigator view with navigator contents and viewer content bindings as explained in http://scribbledideas.blogspot.com/2006/05/building-common-n avigator-based-viewer.html but when I create a new project from the context menu of the Navigator view of my RCP app, I get the following displayed: "no label provider for P/MyProject". I also have the same problem when the navigator is created from this extension wizard: http://blog.eclipse-tips.com/2008/06/easiest-way-to-create-c ommon-navigator.html.

Do you know what I am doing wrong ?

Thank you again,
Damien
Re: Help on the Common Navigator Framework [message #499948 is a reply to message #499535] Tue, 24 November 2009 15:07 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
What this means is that the no label provider associated with any navigatorContent extensions has returned a text value. You can turn on debug tracing in the CNF (in the tracing tab of your launch configuration), this will give you helpful messages. And you should set a breakpoint at your label provider's getText() and getStyledText() methods to see if they are being invoked. Make sure they return a non-null value.

It looks like this is happening with an IProject resource. Are you including the org.eclipse.ui.navigator.resources plugin? Do you intend to handle the processing of resources?


Re: Help on the Common Navigator Framework [message #499961 is a reply to message #499948] Tue, 24 November 2009 15:26 Go to previous messageGo to next message
Damien Mising name is currently offline Damien Mising nameFriend
Messages: 7
Registered: July 2009
Junior Member
Yes I added the org.eclipse.ui.navigator.resources plugin in my dependencies, and included it in the target platform and launch configuration. I did not really intend to use this plugin at first, but I thought it was almost mandatory to have it in order to handle resources properly.

I am just surprised that there is no label provider associated by default with the IProject resource that I create from the navigator "New>Project" wizard.

I will try what you advise and let you know. Tank you for that.
Damien
Re: Help on the Common Navigator Framework [message #499964 is a reply to message #499961] Tue, 24 November 2009 15:34 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
The org.eclipse.ui.navigator.resources contains this part in it's NCE:

<navigatorContent
name="%resource.extension.name"
priority="low"
icon="$nl$/icons/full/eview16/resource_persp.gif"
activeByDefault="true"
contentProvider=" org.eclipse.ui.internal.navigator.resources.workbench.Resour ceExtensionContentProvider "
labelProvider=" org.eclipse.ui.internal.navigator.resources.workbench.Resour ceExtensionLabelProvider "
id="org.eclipse.ui.navigator.resourceContent">
<enablement>
<or>
<adapt type="org.eclipse.core.resources.IProject" />
<instanceof
value="org.eclipse.core.resources.IResource" />
</or>
</enablement>

So it does handle projects. You might want to set a breakpoint also on the ResourceExtensionLabelProvider above.


Re: Help on the Common Navigator Framework [message #505412 is a reply to message #499964] Wed, 30 December 2009 12:47 Go to previous message
R.Afonso is currently offline R.AfonsoFriend
Messages: 10
Registered: December 2009
Junior Member
Hi,
any solution to this? I have the same problem
Previous Topic:Export Product silently "fails" on 3.5 and Windows 7
Next Topic:Javadocs as OSGi Bundle?
Goto Forum:
  


Current Time: Tue Mar 19 04:13:48 GMT 2024

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

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

Back to the top