Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CommonNavigator with resources + own navigatorContent(CNF)
CommonNavigator with resources + own navigatorContent [message #661873] Mon, 28 March 2011 11:32
SophieR is currently offline SophieRFriend
Messages: 5
Registered: June 2010
Junior Member
Hello,

I have a problem with the Common Navigator Framework: the input to my view is changed to the workspace root the first time I open it after starting Eclipse, even though I have overridden the getInitialInput method in my extension of CommonNavigator to show something else (and it works well the following times). I read mails & bug reports concerning similar problems for RCP, but I am doing a plugin and running the platform, and I couldn't find any mention of this problem in this case...
My use case is the following: I use CommonNavigator to show resources, files & folders, but not on the whole workspace. In fact we have a notion of project with a main file with a specific nature, and once the project is "opened" (that is the main editor of my plugin is opened on this main file), data is loaded in different views, and one of the views should show the content of a subdirectory inside this project (the other views are ViewParts and do not use CNF). So my plugin.xml references for the viewerContentBinding org.eclipse.ui.navigator.resourceContent, resources.filters, etc, in addition to my own navigationContent (Because I want to inherit from "normal" behavior / icons / etc for some files).

So I tried to correct this problem of the view showing the whole workspace, and finally found a solution (more a workaround, in fact): I subclass CommonViewer and override inputChanged, in order to do nothing in case the input is an IWorkspaceRoot (and otherwise call super.inputChanged). Apparently it works, but I suspect I have done something wrong somewhere and this solution is not optimal...could you tell me if you know of a better way to solve this problem, or what it is caused by?

thanks,

Sophie
Previous Topic:Problems with product and multi user install
Next Topic:From a command handler how can I know if it is invoked?
Goto Forum:
  


Current Time: Thu Apr 18 15:36:17 GMT 2024

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

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

Back to the top