Go back a level and you will see the code base for the entire project:
- http://svn.refractions.net/udig/udig/trunk

The InfoView is in the "info" plugin:
- 
http://svn.refractions.net/udig/udig/trunk/plugins/net.refractions.udig.tool.info

The class is here:
- 
http://svn.refractions.net/udig/udig/trunk/plugins/net.refractions.udig.tool.info/src/net/refractions/udig/tool/info/internal/InfoView2.java

The code snippet is probably this one; that will give you an action
you can place in the view toolbar or view menu. The action is a bit
silly in that it looks for the last known map and changes its modal
tool.
-----
    protected void fillActionBars() {
        IActionBars actionBars = getViewSite().getActionBars();
        IToolBarManager toolBar = actionBars.getToolBarManager();

        IAction infoTool =
ApplicationGIS.getToolManager().getToolAction(InfoTool.ID,
InfoTool.CATEGORY_ID);
        assert( infoTool != null );
        if( toolBar != null ){
            toolBar.add( infoTool );
        }
        super.fillActionBars();
    }
-----

On Thu, May 21, 2009 at 4:26 PM, Rodolphe QUEMERAIS
<[email protected]> wrote:
> Thanks Jody for the answer. Things are getting a bit clearer.
>
> But where can i find "code base for the info view" ??? I checked tutorials
> and code exemples but missed it.
>
> I created a map in a view as in RCP tutorial so I will add tools to the view
> toolbar. My other problem is I think I will turn back to uDig 1.1.1 because
> of compatibility reasons with my genuine RCP app based on Eclipse 3.3. So I
> will loose the MapViewer class that helped to create a map in a view as in
> RCP tutorial. Can I easily create a map in a view with 1.1.1 ???
>
> 2009/5/20 Jody Garnett <[email protected]>
>>
>> > For now, I plugged my plugin to an "empty RCP" Test application before
>> > using
>> > it with my real RCP App. But I don't find a way to make appear the
>> > button on
>> > the toolbar that would act on Modal Tools of my plugin. Those modal
>> > tools
>> > are vital to my app. I already tested them in an application made
>> > following
>> > custom app tutorial... and they worked fine.
>> >
>> > The fact is, in the customapp tutorial you just have to create category
>> > and
>> > associated tools and they appear in the toolbar. But in this new case of
>> > new
>> > build RCP app.
>>
>> > What did I miss ? create Menu, ActionSet, Command.. I'm a lost...
>>
>> In the custom app tutorial there is a step where you turn on some
>> actions sets to enable the different tools. Please note these action
>> sets are used by the MapEditor code when it builds up the tool bar
>> that is open - when that editor is open. As such they will *not* apply
>> to your application where your map is in a view.
>>
>> If you are making use of your map in a view I would recommend adding
>> the tools to the view toolbar; there is an example of adding a tool to
>> a view toolbar in the codebase for the "info" view.
>>
>> Jody
>>
>> >
>> > _______________________________________________
>> > User-friendly Desktop Internet GIS (uDig)
>> > http://udig.refractions.net
>> > http://lists.refractions.net/mailman/listinfo/udig-devel
>> >
>> >
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to