Hi Giovanni.
You should create a new project that contains the modified
JUMPConfiguration class and the extending EditablePlugIn. The jar
contents should be like this:
---- com
--------- vividsolutions
----------------------- jump
----------------------------- workbench
----------------------------------------- JUMPConfiguration
---- mypackage
---------------- myExtendingEditablePlugIn
The JUMPConfiguration class should be modified changing the line where
the EditablePlugIn is declared:
private EditablePlugIn editablePlugIn = new EditablePlugIn(editingPlugIn);
to
private EditablePlugIn editablePlugIn = new
myExtendingEditablePlugIn(editingPlugIn);
This JUMPConfiguration class will occult the one that's inside the
saig.jar. When the classloader loads this class, will use your modified
one instead the core JUMPConfiguration class if you change your startup
file as I pointed in my last mail.
Give it a try and tell us if everything is ok.
Regards,
Giovanni Virdis escribió:
Hi Sergio,
thanks for your fastest replay. I have another question:
You say that another possibility it's to add an
additional .jar to the distribution that contains the modified classes. I must create a new jar that contains only the class that extends a JUMPConfiguration class?
I would have to create a new project with one single class and after create a jar file?
How I can do?
Thanks Giovanni
-----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di [EMAIL PROTECTED]
Inviato: martedì 6 maggio 2008 12.15
A: [email protected]
Oggetto: Resumen de Kosmo, Vol 25, Envío 6
Envie los mensajes para la lista Kosmo a
[email protected]
Para subscribirse o anular su subscripción a través de WEB
http://lists.saig.es/mailman/listinfo/kosmo
O por correo electrónico, enviando un mensaje con el texto "help" en
el asunto (subject) o en el cuerpo a:
[EMAIL PROTECTED]
Puede contactar con el responsable de la lista escribiendo a:
[EMAIL PROTECTED]
Si responde a algún contenido de este mensaje, por favor, edite la
linea del asunto (subject) para que el texto sea mas especifico que:
"Re: Contents of Kosmo digest...". Ademas, por favor, incluya en la
respuesta solo aquellas partes del mensaje a las que esta
respondiendo.
Asuntos del día:
1. Re: Extension (Sergio Baños Calvo)
2. Re: sobre cr (Giuseppe Aruta)
----------------------------------------------------------------------
Message: 1
Date: Tue, 06 May 2008 11:32:33 +0200
From: Sergio Baños Calvo <[EMAIL PROTECTED]>
Subject: Re: [Kosmo] Extension
To: Lista de Kosmo <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Good morning, Giovanni.
The extension mechanism that is implemented in Kosmo allows to
incorporate new functionalities to the core base, but it can't replace
the funcionality that is already present at core without modifying it
(in general). You can modify the JUMPConfiguration class and change the
tools that are loaded into the program by modifying its contents.
Another possibility that we have used in some projects it's to add an
additional .jar to the distribution that contains the modified classes
(e.g.: the new JUMPConfiguration and your extending EditablePlugIn) and
change the .bat/.sh launch file to take it into account. E.g.:
SET PATH=..\dlls;%PATH%
start.\jre\bin\javaw -Djava.library.path="..\dlls;" -cp
.;./myclasses.jar;./saig.jar -Xmx800M
com.vividsolutions.jump.workbench.JUMPWorkbench -plug-in-directory ./ext
Note that the myclasses.jar must be declared before the saig.jar to
occult the common classes and use the defined at myclasses.jar.
Regards,
Giovanni Virdis escribió:
Good morning,
I have a question
I am working with kosmo and I have made some extension, but I have not
understood if it is possible to manage kosmo without to modify the
original project (saig-core) and only using the extensions. For
example, I want to extends the class "EditablePlugIn" with my class,
and I want that for some users it is not possible to execute the
modification of the layer.
I must directly modify the class "EditablePlugIn "so as to inhibit its
operations or I can make all by means of one my class?
If I succeed to manage all through the extensions also changing
version of kosmo in future I must not have problems or mistake?
How I can add my class for the modification of the layer in the
relative menu to the layer replacing the original class
"EditablePlugIn" without to modify the code of the project (saig-core) ?
Thanks
Giovanni
------------------------------------------------------------------------
_______________________________________________
Kosmo mailing list
[email protected]
http://lists.saig.es/mailman/listinfo/kosmo
_______________________________________________
Kosmo mailing list
[email protected]
http://lists.saig.es/mailman/listinfo/kosmo