Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to call programatic refresh on common navigator?
How to call programatic refresh on common navigator? [message #328908] Fri, 06 June 2008 10:04 Go to next message
Eclipse UserFriend
Hi

I've almost got common navigator working in rcp using a couple of GMF
editors. There are two minor issues, first one I recall being a feature?

1. When running the RCP for the first time I need to restart RCP in
order for NavigatorRoot to be defined and show content (toggling the
content off/on in the content customization has same effect). All
subsequent launches the RCP works 'fine', shows content and updates
model content.(after manually refreshing)

2. This is the more annoying one, I have to first manually right click
refresh on the common navigator view (which is installed in my default
perspective layout at launch). There doesn't appear to be an easy way to
access the cnf view to call refresh. I currently do setfocus() followed
by refresh() in my CNF getInitialInput() method, I then use the ID to
plug into my layout, however this doesn't work.

Are there any workarounds/solns for these niggles?

regards
Steve
Re: How to call programatic refresh on common navigator? [message #328913 is a reply to message #328908] Fri, 06 June 2008 11:20 Go to previous messageGo to next message
Eclipse UserFriend
steve orobec wrote:
> Hi
>
> I've almost got common navigator working in rcp using a couple of GMF
> editors. There are two minor issues, first one I recall being a feature?
>
> 1. When running the RCP for the first time I need to restart RCP in
> order for NavigatorRoot to be defined and show content (toggling the
> content off/on in the content customization has same effect). All
> subsequent launches the RCP works 'fine', shows content and updates
> model content.(after manually refreshing)

Did you follow the instructions here for setting up the RCP application?

http://wiki.eclipse.org/Common_Navigator_Framework

That should set your root correctly to be the root of the workspace (I
assume you are using resources).



>
> 2. This is the more annoying one, I have to first manually right click
> refresh on the common navigator view (which is installed in my default
> perspective layout at launch). There doesn't appear to be an easy way to
> access the cnf view to call refresh. I currently do setfocus() followed
> by refresh() in my CNF getInitialInput() method, I then use the ID to
> plug into my layout, however this doesn't work.

YOu have to refresh the viewer, do a getCommonViewer() to get the
CommonViewer which is a TreeViewer. There are all kinds of refresh()
methods there for you.

However, if you are using resources, it should just work without a refresh.

>
> Are there any workarounds/solns for these niggles?
>
> regards
> Steve
Re: How to call programatic refresh on common navigator? [message #328938 is a reply to message #328913] Fri, 06 June 2008 20:25 Go to previous messageGo to next message
Eclipse UserFriend
Francis Upton (News) wrote:
> steve orobec wrote:
>> Hi
>>
>> I've almost got common navigator working in rcp using a couple of GMF
>> editors. There are two minor issues, first one I recall being a feature?
>>
>> 1. When running the RCP for the first time I need to restart RCP in
>> order for NavigatorRoot to be defined and show content (toggling the
>> content off/on in the content customization has same effect). All
>> subsequent launches the RCP works 'fine', shows content and updates
>> model content.(after manually refreshing)
>
> Did you follow the instructions here for setting up the RCP application?
>
> http://wiki.eclipse.org/Common_Navigator_Framework
>
> That should set your root correctly to be the root of the workspace (I
> assume you are using resources).
>
>
>
>>
>> 2. This is the more annoying one, I have to first manually right click
>> refresh on the common navigator view (which is installed in my default
>> perspective layout at launch). There doesn't appear to be an easy way to
>> access the cnf view to call refresh. I currently do setfocus()
>> followed by refresh() in my CNF getInitialInput() method, I then use
>> the ID to plug into my layout, however this doesn't work.
>
> YOu have to refresh the viewer, do a getCommonViewer() to get the
> CommonViewer which is a TreeViewer. There are all kinds of refresh()
> methods there for you.
>
> However, if you are using resources, it should just work without a refresh.
>
>>
>> Are there any workarounds/solns for these niggles?
>>
>> regards
>> Steve
Francis

I managed to resolve problem 2, just problem 1. When I launch the rcp
for the first time I shut it down straight away and relaunch and
everything works fine.

regards
Steve
Re: How to call programatic refresh on common navigator? [message #328968 is a reply to message #328938] Mon, 09 June 2008 10:20 Go to previous message
Eclipse UserFriend
Can you clarify what you mean by launching the first time? Do you have
an empty workspace the first time, or is there something there? If you
can make this happen with a snippet of code, can you post that so I can
reproduce it?

steve orobec wrote:
> Francis Upton (News) wrote:
>> steve orobec wrote:
>>> Hi
>>>
>>> I've almost got common navigator working in rcp using a couple of GMF
>>> editors. There are two minor issues, first one I recall being a feature?
>>>
>>> 1. When running the RCP for the first time I need to restart RCP in
>>> order for NavigatorRoot to be defined and show content (toggling the
>>> content off/on in the content customization has same effect). All
>>> subsequent launches the RCP works 'fine', shows content and updates
>>> model content.(after manually refreshing)
>>
>> Did you follow the instructions here for setting up the RCP application?
>>
>> http://wiki.eclipse.org/Common_Navigator_Framework
>>
>> That should set your root correctly to be the root of the workspace (I
>> assume you are using resources).
>>
>>
>>
>>>
>>> 2. This is the more annoying one, I have to first manually right
>>> click refresh on the common navigator view (which is installed in my
>>> default
>>> perspective layout at launch). There doesn't appear to be an easy way to
>>> access the cnf view to call refresh. I currently do setfocus()
>>> followed by refresh() in my CNF getInitialInput() method, I then use
>>> the ID to plug into my layout, however this doesn't work.
>>
>> YOu have to refresh the viewer, do a getCommonViewer() to get the
>> CommonViewer which is a TreeViewer. There are all kinds of refresh()
>> methods there for you.
>>
>> However, if you are using resources, it should just work without a
>> refresh.
>>
>>>
>>> Are there any workarounds/solns for these niggles?
>>>
>>> regards
>>> Steve
> Francis
>
> I managed to resolve problem 2, just problem 1. When I launch the rcp
> for the first time I shut it down straight away and relaunch and
> everything works fine.
>
> regards
> Steve
Previous Topic:how to find plugin and its id
Next Topic:How to create branding for feature in eclipse 3.3 or higher
Goto Forum:
  


Current Time: Wed May 07 23:54:07 EDT 2025

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

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

Back to the top