[udig-devel] PropertyService tutorial
Jody Garnett
jgarnett at refractions.net
Sun Mar 9 21:00:51 PDT 2008
It looks like we did not provide enough information on the wiki for you
to successfully run this example, I have updated the page with an
example file:
- http://udig.refractions.net/confluence/display/DEV/2+Training+Materials
I have also organized the page a bit so intro materials occurs before
advanced material.
Jody
> Hi all,
> I'm trying to use the PropertyService sample. I created a new plug-in
> with all the classes exported from the SVN. I'm developing on a Linux
> Ubuntu with jdk5 and udig-1.1-RC14-sdk.
>
> I create an action to start and test the service like this, but
> nothing happens:
> public class AddServiceAction implements IWorkbenchWindowActionDelegate {
> ...
> public void run(IAction action) {
> try {
> //build the url to the properties file
> URL properties = PropertyServiceActivator
> .getDefault().getBundle()
> .getEntry("propertyService.properties");
> properties = FileLocator.toFileURL(properties);
>
> //get the service factory
> IServiceFactory factory = CatalogPlugin.getDefault()
> .getServiceFactory();
>
> //create the service
> List<IService> services = factory.createService(properties);
> for(IService service :services) {
> CatalogPlugin.getDefault().getLocalCatalog().add
> (service);
> }
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
>
> ...
>
> }
>
> Debugging I see that no service is created by the factory. Can
> somebody help me?
>
>
> --
> Marco Bazzoni
> http://www.thebaz.it
> ------------------------------------------------------------------------
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
More information about the udig-devel
mailing list