|Re: Common Navigator + RCP [message #486793 is a reply to message #486705]
||Sat, 19 September 2009 05:01
| Francis Upton IV
Registered: July 2009
Location: Oakland, CA
|Simon Chemouil wrote on Fri, 18 September 2009 11:59|
I have integrated a few CNF-based views in my RCP app, including the
standard Project Explorer view.
The problem I had is getting the proper icons/labels when using the
Project Explorer view directly in my RCP app.
(Please not that I faced the other common problem with custom navigators
to supply my own input, but solved it by inheriting from CommonViewer).
I have found a solution detailed here: http://www.cpuidle.de/blog/?p=48
It worked but is a kind of a hack I'd like to avoid. I found this
problem dates back to 2005 (when the answer was given on Eclipse
newsgroups). I am using RCP with 3.5 and I would have hoped a cleaner
solution would be available. Maybe I am missing something.
But without the workaround, I get no images / label ! (actually, no
labels if I don't call org.eclipse.ui.ide.IDE.registerAdapters();
and no images if I don't call the declareWorkbenchImages hack)
This bug marked it as fixed:
... but I couldn't find the "new" way to do it.
Is there any new, better solution ?
Thanks for your help,
Nope, still sucks, still unfixed. We tried in 3.5. Here is the bug to follow:
Turns out it's not an easy problem to fix.
Platform UI Committer for Common Navigator
|Re: Common Navigator + RCP [message #486941 is a reply to message #486793]
||Mon, 21 September 2009 08:56
| Simon Chemouil
Registered: July 2009
Francis Upton a écrit :|
> Nope, still sucks, still unfixed. We tried in 3.5. Here is the bug to
> Turns out it's not an easy problem to fix.
Thanks for your answer. I see this is tricky to solve, but I really hope
it will make it into 3.6. I guess a lot of RCP developers face this and
waste time on finding the solution. In the mean time I casted a vote for
I have posted a bit too soon last time and I still have something not
working with my Project Explorer, hopefully you can help.
When I start my application, the Project Explorer view is empty, even if
I select it (left-click). It's only when I right click into it is filled
with projects (I'm triggering something, but I have a hard time
finding out what it is by debugging it because a breakpoint on a right
click makes X freeze).
I have tried various unsuccessful approaches, including calling refresh
on the Project Explorer's CommonViewer manually in the postStartup()
method of my Workbench advisor (it finds the view just fine, but the
refresh doesn't do a thing).
Maybe I'm doing something wrong. Here's a summary of my actions:
- I'm integrating the Project Explorer directly (no inheritance to
provide the initial input)
-> org.eclipse.ui.navigator.ProjectExplorer in my perspective
- In my application WorkbenchAdvisor, I used the declareImages() hack
- I call org.eclipse.ui.ide.IDE.registerAdapters(); in my preStart()
With this, images and labels are present but only after a right-click
which somehow enables my Project view. I can't find what I am missing,
either another hack to force the proper initialization by emulating the
right-click, or some enablement technique.
Thanks a lot, any suggestion is greatly appreciated.
Powered by FUDForum
. Page generated in 0.01708 seconds