Revision: 4704
          http://sourceforge.net/p/jump-pilot/code/4704
Author:   edso
Date:     2015-12-27 18:32:34 +0000 (Sun, 27 Dec 2015)
Log Message:
-----------
move plugin initialization into the error handling. just in case.

Modified Paths:
--------------
    core/trunk/src/de/latlon/deejump/wfs/WFSExtension.java

Modified: core/trunk/src/de/latlon/deejump/wfs/WFSExtension.java
===================================================================
--- core/trunk/src/de/latlon/deejump/wfs/WFSExtension.java      2015-12-27 
18:30:41 UTC (rev 4703)
+++ core/trunk/src/de/latlon/deejump/wfs/WFSExtension.java      2015-12-27 
18:32:34 UTC (rev 4704)
@@ -23,7 +23,7 @@
 public class WFSExtension extends Extension {
   private static String msg = "Disabled because deegree2-core is missing. Try 
OJ PLUS!";
   private static boolean disabled = false;
-  
+
   public String getName() {
     return "WFS(-T) 1.0/1.1 Extension (Lat/Lon)";
   }
@@ -37,18 +37,19 @@
   }
 
   public void configure(PlugInContext context) throws Exception {
+    // we use our classloader as we should have been instantiated by the 
plugin classloader
+    ClassLoader pluginLoader = getClass().getClassLoader();
     // only install WFS in PLUS, where the lib/wfs.plus/*.jar are packaged in
     try {
-      Class.forName("org.deegree.ogcwebservices.wfs.WFService", false, this
-          .getClass().getClassLoader());
+      Class.forName("org.deegree.ogcwebservices.wfs.WFService", false, 
pluginLoader);
+      
+      new WFSPlugIn().initialize(context);
+      new UpdateWFSLayerPlugIn().initialize(context);
     } catch (ClassNotFoundException e) {
       disabled = true;
-      context.getWorkbenchFrame().log( msg );
+      context.getWorkbenchFrame().log(msg);
       return;
     }
-
-    new WFSPlugIn().initialize(context);
-    new UpdateWFSLayerPlugIn().initialize(context);
   }
 
 }


------------------------------------------------------------------------------
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to