[udig-devel] Adding a feature to a layer won't result in an
EventType.EDIT_EVENT
Jesse Eichar
jeichar at refractions.net
Tue Dec 18 10:08:54 PST 2007
Hi I didn't give very good instructions that's probably the problem.
What you needed to do is import the plugin into your workspace. So
Import>Existing Project. Then choose the import project from archive
(I can't remember the exact name of the option). Once in your
workspace you have to add the plugin to the Run Configuration. Then
(hopefully) it will work.
Jesse
On 18-Dec-07, at 7:42 AM, tony.roth at GMX.de wrote:
> Thanks for your help and for your plugin. The code is as ours except
> we don't use the intercepter extension for adding a listener: We do
> it directly where we create the layer.
>
> Our problem: we weren't able to run your plugin. We added it to a
> new rc12sdk copy, started udig and the action was / is in the
> context menu (so, we know that the plugin is accepted) but when
> activating the action we get a classnotfoundexception.
>
> Somehow I feel like a complete novice but I recompiled your plugin,
> created a jar file and so on but neither me nor a colleague got it
> fixed. The bundle is found and used but the classes cannot be found.
> The same with your plugin for Piebe de Vries.
>
> Perhaps I should wait till 2008 and then start again with all this
> stuff :-)
>
> !ENTRY org.eclipse.osgi 2 0 2007-12-18 16:30:09.984
> !MESSAGE The activator scraps.Activator for bundle scraps is invalid
> !STACK 0
> org.osgi.framework.BundleException: The activator scraps.Activator
> for bundle scraps is invalid
> at
> org
> .eclipse
> .osgi
> .framework
> .internal
> .core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal.core.BundleContextImpl.start(BundleContextImpl.java:970)
> at
> org
> .eclipse
> .osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
> 346)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
> 400)
> at
> org
> .eclipse
> .osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
> 234)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .osgi
> .RegistryStrategyOSGI
> .createExecutableExtension(RegistryStrategyOSGI.java:160)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:
> 788)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .ConfigurationElement
> .createExecutableExtension(ConfigurationElement.java:243)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .ConfigurationElementHandle
> .createExecutableExtension(ConfigurationElementHandle.java:51)
> at
> net
> .refractions.udig.ui.operations.OpAction.getOperation(OpAction.java:
> 115)
> at net.refractions.udig.ui.operations.OpAction
> $RunJob.run(OpAction.java:193)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.lang.ClassNotFoundException: scraps.Activator
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
> at
> org
> .eclipse
> .osgi
> .internal
> .baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
> at
> org
> .eclipse
> .osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
> 227)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal
> .core.AbstractBundle.loadBundleActivator(AbstractBundle.java:134)
> ... 13 more
> Root exception:
> java.lang.ClassNotFoundException: scraps.Activator
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
> at
> org
> .eclipse
> .osgi
> .internal
> .baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
> at
> org
> .eclipse
> .osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
> 227)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal
> .core.AbstractBundle.loadBundleActivator(AbstractBundle.java:134)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal.core.BundleContextImpl.start(BundleContextImpl.java:970)
> at
> org
> .eclipse
> .osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
> 346)
> at
> org
> .eclipse
> .osgi
> .framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
> 400)
> at
> org
> .eclipse
> .osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:
> 234)
> at
> org
> .eclipse
> .osgi
> .framework
> .internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .osgi
> .RegistryStrategyOSGI
> .createExecutableExtension(RegistryStrategyOSGI.java:160)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:
> 788)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .ConfigurationElement
> .createExecutableExtension(ConfigurationElement.java:243)
> at
> org
> .eclipse
> .core
> .internal
> .registry
> .ConfigurationElementHandle
> .createExecutableExtension(ConfigurationElementHandle.java:51)
> at
> net
> .refractions.udig.ui.operations.OpAction.getOperation(OpAction.java:
> 115)
> at net.refractions.udig.ui.operations.OpAction
> $RunJob.run(OpAction.java:193)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> !ENTRY net.refractions.udig.ui 1 0 2007-12-18 16:30:10.015
> !MESSAGE
> !STACK 0
> java.lang.NullPointerException
> at net.refractions.udig.ui.operations.OpAction
> $RunJob.run(OpAction.java:194)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
>
> -----udig-devel-bounces at lists.refractions.net schrieb: -----
>
>
>
> So same goes for you tony. I've attached a zip file with a plugin
> that contains an operations that can be run if you right click on a
> project. It will create a Map using the code you gave me. When I
> add polygons to the layer using the polygon tool it works just fine
> and the other extension in the plugin reports each event just fine.
>
> If you can modify the plugin so it shows your error please do so and
> I'll fix the bug.
>
>
> Jesse
>
> On 17-Dec-07, at 4:45 AM, tony.roth at GMX.de wrote:
>
>> // we never save a project or reuse it.
>> Project udigProject =
>> ProjectPlugin.getPlugin().getProjectRegistry().getDefaultProject();
>> Map map =
>> ProjectFactory.eINSTANCE.createMap(udigProject,"myMap",new
>> ArrayList<Layer>());
>> ..
>> // creating temporary resource / layer with:
>> CatalogPlugin
>> .getDefault
>> ().getLocalCatalog().createTemporaryResource(myFeatureType);
>> ...
>> map
>> .sendCommandSync
>> (BasicCommandFactory.getInstance().createAddManyLayers(layerList));
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20071218/f1849ab2/attachment-0001.html
More information about the udig-devel
mailing list