Re: info on Common Navigator Framework [message #480819] |
Tue, 18 August 2009 11:09 |
Eclipse User |
|
|
|
Ciao Mario
sorry for the long silence but I was off on holiday ...
I did manage to create my view that use a commonViewer without extending it
.... so the view extends ViewPart and the createPartControl will just define
a new CommonViewer.
just a few question:
In the create part control I do create a commonviewer passing a different
name than the view id (this will give me the possibility to put more than a
CommonViewer inside the view itself)
at the moment I didn't use any filter, DND or sorter to keep it simple ...
and it works fine.
<extension
point="org.eclipse.ui.navigator.viewer">
<viewer
viewerId="com.rcpquickstart.cnftutorial.views.SampleView.main "/>
<viewerContentBinding
viewerId="com.rcpquickstart.cnftutorial.views.SampleView.main ">
<includes>
<contentExtension
pattern="com.rcpquickstart.cnftutorial.parentBeanContent"/ >
</includes>
</viewerContentBinding>
</extension>
<extension
point="org.eclipse.ui.views">
<category
id="com.rcpquickstart.cnftutorial"
name="Sample Category">
</category>
<view
category="com.rcpquickstart.cnftutorial"
class="com.rcpquickstart.cnftutorial.views.SampleView"
icon="icons/sample.gif"
id="com.rcpquickstart.cnftutorial.views.SampleView"
name="Sample View">
</view>
</extension>
Questions:
1. at the moment I'm just displaying static information ... (following the
example I did set the common viewer input to a NavigatorRoot structure)
what will it be the right way to change the common viewer information ...
updating the model and call a refresh on the common viewer or there is a
better way using listeners or triggers ... ???
2. in the CommonNavigator code I have seen the method setCommonNavigator:
even reading the code I could not give a meaning to the use of the frame. if
this is not asking too much could you explain it a bit (note: I know that
this method cannot be called if I declare my content view inside the
ViewPart).
Many thanks
Kar
"Kar" <carmeloscala@hotmail.com> wrote in message
news:h4jkd8$fks$1@build.eclipse.org...
> thanks mario
> I'll have a look today
> ciaoo
>
>
> "Mario Winterer" <mario.winterer@gmx.at> wrote in message
> news:h4ft6r$ae5$1@build.eclipse.org...
>> Kar,
>>
>> I think it should be possible to implement a custom ViewPart (by not
>> subclassing CommonNavigator) that directly uses the CommonViewer.
>> It's all about the id that is passed to the constructor of CommonViewer.
>> This id should then be used in the extension point to bind content to the
>> viewer.
>> Have a look at CommonNavigator#createPartControl,
>> CommonNavigator#createCommonViewer and
>> CommonNavigator#createCommonViewerObject to get an idea of how it could
>> be done.
>>
>> Mario
>>
>> "Kar" <carmeloscala@hotmail.com> schrieb im Newsbeitrag
>> news:h4ca8i$n9k$1@build.eclipse.org...
>>> Hi all,
>>> I'm thinking in rewriting a bit of my rcp application and move in using
>>> the Common Navigator Framework for the tree viewer (which displays
>>> information contained in a db).
>>>
>>> Right now my view uses a pShelf widget with shelves containing
>>> TreeViewer(s) and a TableViewer(s).
>>>
>>> Just as a question for someone that it is starting reading the doc about
>>> CNF . would it be possible to implement something like this using CNF.
>>> I mean there will be an easy way to bind the my viewers in a single
>>> view? For what I have seen I can only bind a single CNF to a view ...
>>>
>>> Thanks in advance
>>> Kar
>>>
>>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.07915 seconds