R: Kosmo_int Digest, Vol 25, Issue 3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

R: Kosmo_int Digest, Vol 25, Issue 3

Giovanni Virdis
Hi Sergio,

i have a question? How i can use the itext-2.0.6.jar in my kosmo installation? Now kosmo use itext-1.4.7.jar.

-----Messaggio originale-----
Da: [hidden email] [mailto:[hidden email]] Per conto di [hidden email]
Inviato: martedì 16 giugno 2009 12.15
A: [hidden email]
Oggetto: Kosmo_int Digest, Vol 25, Issue 3

Send Kosmo_int mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.saig.es/mailman/listinfo/kosmo_int
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Kosmo_int digest..."


Today's Topics:

   1. Re: Integration of custom plugin (Sergio Ba?os Calvo)
   2. Patch FeatureInfoTool (Marek Caltik)
   3. Re: Patch FeatureInfoTool (Sergio Ba?os Calvo)


----------------------------------------------------------------------

Message: 1
Date: Mon, 15 Jun 2009 12:00:56 +0200
From: Sergio Ba?os Calvo <[hidden email]>
Subject: Re: [Kosmo_int] Integration of custom plugin
To: "International Kosmo mailing list (english languaje)"
        <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Good morning Giovanni.

In respect of the your custom extension:

1) In order to incorporate new functionalities to Kosmo - Desktop Client
you have two options: create an Extension class that performs the
loading of your plugins, or instantiate your own plugin, by calling it
through the workbench-properties file or by changing the
JUMPConfiguration class file.

    a) For the first option, you have to include your jar into the /ext
directory and the user will have the possibity to activate it or not
    b) For the second one, you have to setup it as you have done, but,
the RitecoITExtension.jar must be placed at the \bin directory, as you
have defined in your Kosmo.bat (./RitecoITExtension.jar)

2) The last step could be explained better through an example. Look at
the geoprocessing wizard extension:

      /**
     * Loads the geoprocessing wizard plugin
     */
    public void install( PlugInContext context ) throws Exception {
        if(this.geoprocessingWizardPlugIn == null)
        {
            this.geoprocessingWizardPlugIn = new
GeoprocessingWizardPlugIn();
        }
        this.geoprocessingWizardPlugIn.initialize(context);
    }

    In this class the associated plugin is called in the extension
install method.

    If you take a look into the GeoprocessingWizardPlugIn you can see
the next:

    @Override
    public void initialize( PlugInContext context ) throws Exception
{      
        context.getFeatureInstaller().addMainMenuItem(this,
                menuPath, getName()/*+ "{pos:5}"*/, false, getIcon(),
//$NON-NLS-1$
               
GeoprocessingWizardPlugIn.createEnableCheck(context.getWorkbenchContext()));
    }

    It adds itself to the Tools main menu, at the 5th position. If you
use the 2nd approach, the initialize() method is called directly during
the workbench-properties.xml processing, while if you load it through an
extension, it will be called at the install method.


3) Yes, it's posible to do it. We use Izpack (http://izpack.org) to
create the java installer and make a launch4j exe wrapper
(http://launch4j.sourceforge.net) around it to launch the installation.
The Kosmo.bat file can be changed to load a project at startup by adding
the parameter -proj sprFileName.spr to it. If you need more information
about any of them just ask and we'll help you as far as we can

Regards,


Giovanni Virdis escribió:

> Good morning Sergio,
>
> In order:
>
> I have create the jar for my exstension (RitecoITExtension.jar)and i put it into the directory \bin\ext of my Kosmo  installation.
>
> In the /bin directory I have create the file workbench-properties.xml with this code:
> <workbench>    
> <plug-in>it.riteco.sassari.nuovoElemento.NuovoElementoPlugIn</plug-in>                                                                                                  
> </workbench>
>
> I change the Kosmo.bat with the -properties
> SET PATH=..\dlls;%PATH%
> start .\jre\bin\javaw -Djava.library.path="..\dlls" -cp .;./RitecoITExtension.jar;./saig.jar -Xmx512M com.vividsolutions.jump.workbench.JUMPWorkbench -plug-in-directory ./ext -properties "workbench-properties.xml"
>
> but when I run the application I have the error when find to load the plugin.
> I don't understand the last step
>
> " On Kosmo loading the initialize() method for the myCustomPlugIn will be
> called. Inside this method you should put all the stuff needed for your
> plugin to be started (add it to a toolbar, create a new toolbar, add it
> to a menu, create a new main menu, ...)"
>
> If is possible I want create an exe that install kosmo on pc with my plug in and my project just loading on start. I must work with the folder relative of the installaztion the kosmo on my machine or I must work with the project on eclipse.
>
> Thanks
>
> Regards,
>
> Giovanni
>
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 04 May 2009 10:40:01 +0200
> From: Sergio Ba?os Calvo <[hidden email]>
> Subject: Re: [Kosmo_int] customize kosmo
> To: "International Kosmo mailing list (english languaje)"
> <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Good morning Giovanni.
>
> In order to incorporate your changes to Kosmo, you only have to create
> the jar for your extension and put it into the directory \bin\ext for
> your Kosmo installation. If you want the extension to be activated by
> default you should start your Kosmo version, activate the extension,
> mark the option "Mark as default" and exit the application. Kosmo will
> load by default the new extensions in sucesive executions (the options
> are saved into the workbench-state.xml file).
>
> There is also another option that can be used to load a plugin without
> the needing of activate it by default. The -properties options allow to
> load a custom XML file that enumerates a group of plugins that must be
> loaded on startup. You must change the Kosmo.bat file in order to use
> it, adding the -properties option:
>
> -- Example of Kosmo.bat
>
> SET PATH=..\dlls;%PATH%
> start.\jre\bin\javaw -Djava.library.path="..\dlls;" -cp
> .;./customExtension.jar;./saig.jar -Xmx800M
> com.vividsolutions.jump.workbench.JUMPWorkbench -plug-in-directory ./ext
> -properties "workbench-properties.xml"
>
>
> -- Example of worbench-properties.xml, that should be place into the
> directory \bin
>
> <workbench>
>   <plug-in>org.saig.jump.plugin.custom.myCustomPlugIn</plug-in>
> </workbench>
>
> On Kosmo loading the initialize() method for the myCustomPlugIn will be
> called. Inside this method you should put all the stuff needed for your
> plugin to be started (add it to a toolbar, create a new toolbar, add it
> to a menu, create a new main menu, ...).
>
> Regards,
>
> Giovanni Virdis escribió:
>  
>> Hi,
>>
>>  
>>
>> If is possibile i want create a my kosmo . I explain better . I want
>> create a new jar that executes kosmo modified with my exstension , and
>> with my project already open when start kosmo. The users  lunch kosmo
>> and they can use it as a normal kosmo but they have a new function
>> that I have implemented for a specific scope.
>>
>>  
>>
>> How I can do?
>>
>>  
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kosmo_int mailing list
>> [hidden email]
>> http://lists.saig.es/mailman/listinfo/kosmo_int
>>  
>>    
>
>  

--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]



------------------------------

Message: 2
Date: Tue, 16 Jun 2009 01:05:55 +0200
From: Marek Caltik <[hidden email]>
Subject: [Kosmo_int] Patch FeatureInfoTool
To: [hidden email], "International Kosmo mailing list (english languaje)"
        <[hidden email]>
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi all,

FeatureInfoTool displays info window, it's width is not set correctly
if layer has e.g. only one field. Some of toolbar's buttons can be
invisible.
This patch solves this - if content displayed is 'narrower' than
preferred width of the toolbar, toolbar's width will utilize (=
toolbar's width is the minimum width of the info window).

regards
Marek Caltik
Gista s.r.o
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FeatureInfoTool-Gista.patch
Type: application/octet-stream
Size: 1835 bytes
Desc: not available
Url : http://lists.saig.es/pipermail/kosmo_int/attachments/20090616/b32e1eb8/FeatureInfoTool-Gista-0001.obj

------------------------------

Message: 3
Date: Tue, 16 Jun 2009 09:48:59 +0200
From: Sergio Ba?os Calvo <[hidden email]>
Subject: Re: [Kosmo_int] Patch FeatureInfoTool
To: "International Kosmo mailing list (english languaje)"
        <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Good morning Marek.

We'll incorporate the patch to the next 2.0 Kosmo.

Thanks a lot for helping in improving Kosmo - Desktop Client.

Regards,

Marek Caltik escribió:

> Hi all,
>
> FeatureInfoTool displays info window, it's width is not set correctly
> if layer has e.g. only one field. Some of toolbar's buttons can be
> invisible.
> This patch solves this - if content displayed is 'narrower' than
> preferred width of the toolbar, toolbar's width will utilize (=
> toolbar's width is the minimum width of the info window).
>
> regards
> Marek Caltik
> Gista s.r.o
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kosmo_int mailing list
> [hidden email]
> http://lists.saig.es/mailman/listinfo/kosmo_int
>  


--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]



------------------------------

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int


End of Kosmo_int Digest, Vol 25, Issue 3
****************************************


_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int
Reply | Threaded
Open this post in threaded view
|

Re: Change Itext library (was: Re: R: Kosmo_int Digest, Vol 25, Issue 3)

Sergio Baños Calvo
Good afternoon, Giovanni.

You have two options:

1) Remove the itext-1.4.7.jar file from the \bin\libs directory, add the
itext-2.0.6.jar to the same directory and change the
META-INF\MANIFEST.MF from the saig.jar
2) Add the itext-2.0.6.jar to the classpath at the Kosmo.bat to hide the
other one. It should be similar to the next one:

SET PATH=..\dlls;%PATH%
start.\jre\bin\javaw -Djava.library.path="..\dlls;" -cp
.;./itext-2.0.6.jar;./saig.jar -Xmx800M
com.vividsolutions.jump.workbench.JUMPWorkbench -plug-in-directory ./ext

The second one is the easiest but the first one its the most addecuate
to me. Use any of them to solve the problem

Regards,

Giovanni Virdis escribió:

> Hi Sergio,
>
> i have a question? How i can use the itext-2.0.6.jar in my kosmo installation? Now kosmo use itext-1.4.7.jar.
>
> -----Messaggio originale-----
> Da: [hidden email] [mailto:[hidden email]] Per conto di [hidden email]
> Inviato: martedì 16 giugno 2009 12.15
> A: [hidden email]
> Oggetto: Kosmo_int Digest, Vol 25, Issue 3
>
> Send Kosmo_int mailing list submissions to
> [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.saig.es/mailman/listinfo/kosmo_int
> or, via email, send a message with subject or body 'help' to
> [hidden email]
>
> You can reach the person managing the list at
> [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Kosmo_int digest..."
>
>
> Today's Topics:
>
>    1. Re: Integration of custom plugin (Sergio Ba?os Calvo)
>    2. Patch FeatureInfoTool (Marek Caltik)
>    3. Re: Patch FeatureInfoTool (Sergio Ba?os Calvo)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 15 Jun 2009 12:00:56 +0200
> From: Sergio Ba?os Calvo <[hidden email]>
> Subject: Re: [Kosmo_int] Integration of custom plugin
> To: "International Kosmo mailing list (english languaje)"
> <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Good morning Giovanni.
>
> In respect of the your custom extension:
>
> 1) In order to incorporate new functionalities to Kosmo - Desktop Client
> you have two options: create an Extension class that performs the
> loading of your plugins, or instantiate your own plugin, by calling it
> through the workbench-properties file or by changing the
> JUMPConfiguration class file.
>
>     a) For the first option, you have to include your jar into the /ext
> directory and the user will have the possibity to activate it or not
>     b) For the second one, you have to setup it as you have done, but,
> the RitecoITExtension.jar must be placed at the \bin directory, as you
> have defined in your Kosmo.bat (./RitecoITExtension.jar)
>
> 2) The last step could be explained better through an example. Look at
> the geoprocessing wizard extension:
>
>       /**
>      * Loads the geoprocessing wizard plugin
>      */
>     public void install( PlugInContext context ) throws Exception {
>         if(this.geoprocessingWizardPlugIn == null)
>         {
>             this.geoprocessingWizardPlugIn = new
> GeoprocessingWizardPlugIn();
>         }
>         this.geoprocessingWizardPlugIn.initialize(context);
>     }
>
>     In this class the associated plugin is called in the extension
> install method.
>
>     If you take a look into the GeoprocessingWizardPlugIn you can see
> the next:
>
>     @Override
>     public void initialize( PlugInContext context ) throws Exception
> {      
>         context.getFeatureInstaller().addMainMenuItem(this,
>                 menuPath, getName()/*+ "{pos:5}"*/, false, getIcon(),
> //$NON-NLS-1$
>                
> GeoprocessingWizardPlugIn.createEnableCheck(context.getWorkbenchContext()));
>     }
>
>     It adds itself to the Tools main menu, at the 5th position. If you
> use the 2nd approach, the initialize() method is called directly during
> the workbench-properties.xml processing, while if you load it through an
> extension, it will be called at the install method.
>
>
> 3) Yes, it's posible to do it. We use Izpack (http://izpack.org) to
> create the java installer and make a launch4j exe wrapper
> (http://launch4j.sourceforge.net) around it to launch the installation.
> The Kosmo.bat file can be changed to load a project at startup by adding
> the parameter -proj sprFileName.spr to it. If you need more information
> about any of them just ask and we'll help you as far as we can
>
> Regards,
>
>
> Giovanni Virdis escribió:
>  
>> Good morning Sergio,
>>
>> In order:
>>
>> I have create the jar for my exstension (RitecoITExtension.jar)and i put it into the directory \bin\ext of my Kosmo  installation.
>>
>> In the /bin directory I have create the file workbench-properties.xml with this code:
>> <workbench>    
>> <plug-in>it.riteco.sassari.nuovoElemento.NuovoElementoPlugIn</plug-in>                                                                                                  
>> </workbench>
>>
>> I change the Kosmo.bat with the -properties
>> SET PATH=..\dlls;%PATH%
>> start .\jre\bin\javaw -Djava.library.path="..\dlls" -cp .;./RitecoITExtension.jar;./saig.jar -Xmx512M com.vividsolutions.jump.workbench.JUMPWorkbench -plug-in-directory ./ext -properties "workbench-properties.xml"
>>
>> but when I run the application I have the error when find to load the plugin.
>> I don't understand the last step
>>
>> " On Kosmo loading the initialize() method for the myCustomPlugIn will be
>> called. Inside this method you should put all the stuff needed for your
>> plugin to be started (add it to a toolbar, create a new toolbar, add it
>> to a menu, create a new main menu, ...)"
>>
>> If is possible I want create an exe that install kosmo on pc with my plug in and my project just loading on start. I must work with the folder relative of the installaztion the kosmo on my machine or I must work with the project on eclipse.
>>
>> Thanks
>>
>> Regards,
>>
>> Giovanni
>>
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 04 May 2009 10:40:01 +0200
>> From: Sergio Ba?os Calvo <[hidden email]>
>> Subject: Re: [Kosmo_int] customize kosmo
>> To: "International Kosmo mailing list (english languaje)"
>> <[hidden email]>
>> Message-ID: <[hidden email]>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> Good morning Giovanni.
>>
>> In order to incorporate your changes to Kosmo, you only have to create
>> the jar for your extension and put it into the directory \bin\ext for
>> your Kosmo installation. If you want the extension to be activated by
>> default you should start your Kosmo version, activate the extension,
>> mark the option "Mark as default" and exit the application. Kosmo will
>> load by default the new extensions in sucesive executions (the options
>> are saved into the workbench-state.xml file).
>>
>> There is also another option that can be used to load a plugin without
>> the needing of activate it by default. The -properties options allow to
>> load a custom XML file that enumerates a group of plugins that must be
>> loaded on startup. You must change the Kosmo.bat file in order to use
>> it, adding the -properties option:
>>
>> -- Example of Kosmo.bat
>>
>> SET PATH=..\dlls;%PATH%
>> start.\jre\bin\javaw -Djava.library.path="..\dlls;" -cp
>> .;./customExtension.jar;./saig.jar -Xmx800M
>> com.vividsolutions.jump.workbench.JUMPWorkbench -plug-in-directory ./ext
>> -properties "workbench-properties.xml"
>>
>>
>> -- Example of worbench-properties.xml, that should be place into the
>> directory \bin
>>
>> <workbench>
>>   <plug-in>org.saig.jump.plugin.custom.myCustomPlugIn</plug-in>
>> </workbench>
>>
>> On Kosmo loading the initialize() method for the myCustomPlugIn will be
>> called. Inside this method you should put all the stuff needed for your
>> plugin to be started (add it to a toolbar, create a new toolbar, add it
>> to a menu, create a new main menu, ...).
>>
>> Regards,
>>
>> Giovanni Virdis escribió:
>>  
>>    
>>> Hi,
>>>
>>>  
>>>
>>> If is possibile i want create a my kosmo . I explain better . I want
>>> create a new jar that executes kosmo modified with my exstension , and
>>> with my project already open when start kosmo. The users  lunch kosmo
>>> and they can use it as a normal kosmo but they have a new function
>>> that I have implemented for a specific scope.
>>>
>>>  
>>>
>>> How I can do?
>>>
>>>  
>>>
>>>  
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Kosmo_int mailing list
>>> [hidden email]
>>> http://lists.saig.es/mailman/listinfo/kosmo_int
>>>  
>>>    
>>>      
>>  
>>    
>
>  

--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int