Good morning Giovanni.
1) In order to load a plugin without using an extension (very useful in
the develop fase) you should use the workbench-properties.xml. The
content of the file should be like this:
<workbench>
<plug-in>org.saig.myplugins.MyPlugIn</plug-in>
</workbench>
You must change also the program arguments at Eclipse by adding the
option -properties:
-plug-in-directory "D:\extensiones" -properties "workbench-properties.xml"
In your case, to use this for loading a tool, you should create an empty
plugin that only installs the tool at its initialize() method (as it's
done in the extension install method).
2) What do you mean with "level"? Do you mean "layer" instead? If it's
layer, currently there is no possibility to do this directly. You should
change/extend the RemoveSelectedLayersPlugIn class and change its
enablecheck to take into account this feature.
Regards,
Giovanni Virdis escribió:
Good morning,
thanks for the help that you have given to me. Now it works all correctly.
I have two questions:
- How I can load my button in the toolbar to the start without add it like
extension from the menù? I must modify the file workbench-properties.xml?
- Is possible load a level and not to allow the elimination of these to the
user?
Like always thanks for the help
Giovanni
-----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di [EMAIL PROTECTED]
Inviato: martedì 29 aprile 2008 8.16
A: [email protected]
Oggetto: Resumen de Kosmo, Vol 24, Envío 38
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: Error (Sergio Baños Calvo)
2. R: Resumen de Kosmo, Vol 24, Envío 37 (Giovanni Virdis)
3. Re: R: Resumen de Kosmo, Vol 24, Envío 37 (Extending the
drawPolygon tool) (Sergio Baños Calvo)
4. Re: Kosmos y GPS Garmin (Francisco)
5. Re: sobre creacion de extensiones (Francisco)
----------------------------------------------------------------------
Message: 1
Date: Mon, 28 Apr 2008 12:03:43 +0200
From: Sergio Baños Calvo <[EMAIL PROTECTED]>
Subject: Re: [Kosmo] Error
To: Lista de Kosmo <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Good morning again, Giovanni.
Look at the previous mail that I've send to you and change your code.
Anyway, the error that you're taking it's caused because with the
newInstance() method it's calling a parameterless constructor, and your
class doesn't have any.
Regards,
Giovanni Virdis escribió:
The error comes generated in the class PlugInManager in the method
* private * * void * loadPlugInClasses( List plugInClasses ) * throws
* Exception {
* for * ( Iterator i = plugInClasses.iterator(); i.hasNext(); ) {
Class plugInClass = (Class) i.next();
PlugIn plugIn = (PlugIn) plugInClass.newInstance();
plugIn.initialize( * new * PlugInContext( context , * null
* , * null * , * null * , * null * ));
}
}
The line that generates the error is that one evidenced
My class
* public * * class * DisegnaPoligonoPlugIn * extends * DrawPolygonTool
* implements * PlugIn
* public * * class * DisegnaPoligonoExtension * extends * Extension
Perhaps I would have to manage the button in an other way?
------------------------------------------------------------------------
_______________________________________________
Kosmo mailing list
[email protected]
http://lists.saig.es/mailman/listinfo/kosmo
--
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: [EMAIL PROTECTED]
_______________________________________________
Kosmo mailing list
[email protected]
http://lists.saig.es/mailman/listinfo/kosmo