Changeset 149:bec178c2bb59
- Timestamp:
- 08/10/2008 10:37:49 PM
(4 months ago)
- Author:
- marc@f1.local
- branch:
- default
- Message:
fix for #93
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r145 |
r149 |
|
| 254 | 254 | |
|---|
| 255 | 255 | public void addExtensionsDirectory(File path) { |
|---|
| | 256 | |
|---|
| 256 | 257 | if (path.exists()) { |
|---|
| 257 | 258 | |
|---|
| … | … | |
| 312 | 313 | Manifest m = new Manifest(new BufferedInputStream(new FileInputStream(j))); |
|---|
| 313 | 314 | String aa = (String) m.getMainAttributes().get(new Attributes.Name("Field-RedirectionPath")); |
|---|
| 314 | | if (aa != null) { |
|---|
| | 315 | System.out.println(aa+" "+j); |
|---|
| | 316 | if (aa.endsWith("**")) { |
|---|
| | 317 | |
|---|
| | 318 | System.out.println(" adding wildcard path "); |
|---|
| | 319 | |
|---|
| | 320 | File dir = new File(aa.replace("**", "")); |
|---|
| | 321 | if (dir.exists()) { |
|---|
| | 322 | String[] ll = dir.list(new FilenameFilter() { |
|---|
| | 323 | |
|---|
| | 324 | public boolean accept(File dir, String name) { |
|---|
| | 325 | return name.endsWith(".jar"); |
|---|
| | 326 | } |
|---|
| | 327 | }); |
|---|
| | 328 | for (String l : ll) { |
|---|
| | 329 | |
|---|
| | 330 | System.out.println(" dir is :"+dir+" "+l); |
|---|
| | 331 | |
|---|
| | 332 | String fp = new File(dir.getAbsolutePath()+"/"+l).getAbsolutePath(); |
|---|
| | 333 | |
|---|
| | 334 | URL url = new URL("file://" + fp + (fp.endsWith(".jar") ? "" : "/")); |
|---|
| | 335 | |
|---|
| | 336 | System.out.println(" adding url <"+url+">"); |
|---|
| | 337 | loader.addURL(url); |
|---|
| | 338 | |
|---|
| | 339 | extendedClassPaths.add(fp); |
|---|
| | 340 | } |
|---|
| | 341 | } else { |
|---|
| | 342 | System.err.println(" warning: wildcard path <" + path + "> is not a directory or does not exist "); |
|---|
| | 343 | } |
|---|
| | 344 | } else if (aa != null) { |
|---|
| 315 | 345 | for (String a : aa.split(":")) { |
|---|
| 316 | 346 | a = a.trim(); |
|---|
| … | … | |
| 319 | 349 | |
|---|
| 320 | 350 | if (!new File(fp).exists()) { |
|---|
| 321 | | System.err.println(" warning, path <" + new File(fp).getAbsolutePath() + ">added to classpath through Field-RedirectionPath inside extension "+j+" doesn't exist"); |
|---|
| | 351 | System.err.println(" warning, path <" + new File(fp).getAbsolutePath() + ">added to classpath through Field-RedirectionPath inside extension " + j + " doesn't exist"); |
|---|
| 322 | 352 | } |
|---|
| 323 | 353 | URL url = new URL("file://" + fp + (fp.endsWith(".jar") ? "" : "/")); |
|---|
| 324 | | |
|---|
| | 354 | |
|---|
| 325 | 355 | loader.addURL(url); |
|---|
| 326 | 356 | |
|---|
| … | … | |
| 393 | 423 | trampoline = this; |
|---|
| 394 | 424 | |
|---|
| 395 | | |
|---|
| 396 | 425 | String exceptions = SystemProperties.getProperty("trampolineExceptions", null); |
|---|
| 397 | | ignored = new String[] {"java.", "javax.", "sun.", "com.apple", "apple.", "field.namespace", "field.math", "field.launch.", "org.objectweb", "com.sun", "org.xml", "org.w3c", "$Prox", "main", "field.util.BetterWeak", "field.misc.ANSIColorUtils", "ch.rand", "org.python", "org.apache" }; |
|---|
| 398 | | |
|---|
| 399 | | if (exceptions!=null) |
|---|
| 400 | | { |
|---|
| 401 | | |
|---|
| | 426 | ignored = new String[] { "java.", "javax.", "sun.", "com.apple", "apple.", "field.namespace", "field.math", "field.launch.", "org.objectweb", "com.sun", "org.xml", "org.w3c", "$Prox", "main", "field.util.BetterWeak", "field.misc.ANSIColorUtils", "ch.rand", "org.python", "org.apache.batik" }; |
|---|
| | 427 | |
|---|
| | 428 | if (exceptions != null) { |
|---|
| | 429 | |
|---|
| 402 | 430 | ArrayList a = new ArrayList(Arrays.asList(ignored)); |
|---|
| 403 | 431 | a.addAll(Arrays.asList(exceptions.split(":"))); |
|---|
| … | … | |
| 418 | 446 | String extensionsDir = SystemProperties.getProperty("extensions.dir", "../../../../extensions/"); |
|---|
| 419 | 447 | Trampoline2.trampoline.addExtensionsDirectory(new File(extensionsDir)); |
|---|
| 420 | | |
|---|
| | 448 | |
|---|
| 421 | 449 | try { |
|---|
| 422 | 450 | final Class c = (loader.loadClass(classToLaunch)); |
|---|
| … | … | |
| 444 | 472 | try { |
|---|
| 445 | 473 | |
|---|
| 446 | | System.out.println(" we are in thread <"+Thread.currentThread()+">"); |
|---|
| | 474 | System.out.println(" we are in thread <" + Thread.currentThread() + ">"); |
|---|
| 447 | 475 | Launcher.getLauncher().mainThread = Thread.currentThread(); |
|---|
| 448 | 476 | printInfo(); |
|---|
| r147 |
r149 |
|
| 118 | 118 | return; |
|---|
| 119 | 119 | |
|---|
| 120 | | GLComponentWindow.getCurrentWindow(RootComponent.this).transformMouseEvent(arg0); |
|---|
| | 120 | //GLComponentWindow.getCurrentWindow(RootComponent.this).transformMouseEvent(arg0); |
|---|
| 121 | 121 | |
|---|
| 122 | 122 | RootComponent.this.handleResize(currentResize, dx, dy, arg0.getX(), arg0.getY()); |
|---|
| 123 | 123 | |
|---|
| 124 | | GLComponentWindow.getCurrentWindow(RootComponent.this).untransformMouseEvent(arg0); |
|---|
| | 124 | //GLComponentWindow.getCurrentWindow(RootComponent.this).untransformMouseEvent(arg0); |
|---|
| 125 | 125 | // need to rexpress lx in light |
|---|
| 126 | 126 | // of the potentially new |
|---|
| … | … | |
| 133 | 133 | lastX = (mv.x) - (lx2 - lx); |
|---|
| 134 | 134 | lastY = (mv.y) - (ly2 - ly); |
|---|
| 135 | | |
|---|
| | 135 | |
|---|
| 136 | 136 | GLComponentWindow.getCurrentWindow(RootComponent.this).transformMouseEvent(arg0); |
|---|
| 137 | 137 | |
|---|