[udig-devel] PropertyService tutorial
marco bazzoni
bazzoni.marco at gmail.com
Sun Mar 9 06:33:01 PDT 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20080309/d738bb90/attachment.html
More information about the udig-devel
mailing list