Changeset 2285 for trunk/autoquest-ui-core
- Timestamp:
- 09/30/19 16:29:01 (5 years ago)
- Location:
- trunk/autoquest-ui-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-core/pom.xml
r2179 r2285 66 66 </dependency> 67 67 <dependency> 68 <groupId>de.ugoe.cs.autoquest</groupId> 69 <artifactId>autoquest-plugin-core</artifactId> 70 <version>${project.parent.version}</version> 71 </dependency> 72 <dependency> 68 73 <groupId>net.sf.jung</groupId> 69 74 <artifactId>jung-visualization</artifactId> -
trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/misc/CMDload.java
r927 r2285 15 15 package de.ugoe.cs.autoquest.commands.misc; 16 16 17 import java.io.File; 17 18 import java.io.FileInputStream; 18 19 import java.io.IOException; 19 20 import java.io.ObjectInputStream; 21 import java.io.ObjectStreamClass; 20 22 import java.util.List; 21 23 24 import de.ugoe.cs.autoquest.plugin.AutoQUESTPlugin; 25 import de.ugoe.cs.autoquest.plugin.PluginLoader; 22 26 import de.ugoe.cs.util.console.Command; 27 import de.ugoe.cs.util.console.CommandExecuter; 23 28 import de.ugoe.cs.util.console.Console; 24 29 import de.ugoe.cs.util.console.GlobalDataContainer; … … 48 53 } 49 54 50 FileInputStream fis = null; 55 final PluginLoader pluginLoader = new PluginLoader(new File("lib")); 56 pluginLoader.load(); 57 58 FileInputStream fis = null; 51 59 ObjectInputStream in = null; 52 60 try { 53 61 fis = new FileInputStream(filename); 54 in = new ObjectInputStream(fis); 62 in = new ObjectInputStream(fis) { 63 @Override 64 protected Class<?> resolveClass(ObjectStreamClass clazz) 65 throws IOException, ClassNotFoundException 66 { 67 try { 68 return this.getClass().getClassLoader().loadClass(clazz.getName()); 69 } 70 catch (Exception e) { 71 for (AutoQUESTPlugin plugin : pluginLoader.getPlugins()) { 72 try { 73 return plugin.getClass().getClassLoader().loadClass(clazz.getName()); 74 } 75 catch (Exception e2) { 76 // ignore and try next 77 } 78 } 79 } 80 81 throw new ClassNotFoundException("could not load class " + clazz.getName() + 82 " neither from normal class loader nor from " + 83 "plug in class loaders"); 84 } 85 }; 55 86 in.readObject(); 56 87 in.close();
Note: See TracChangeset
for help on using the changeset viewer.