Field

Changeset 149:bec178c2bb59

Show
Ignore:
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
  • development/java/field/bytecode/protect/Trampoline2.java

    r145 r149  
    254254 
    255255        public void addExtensionsDirectory(File path) { 
     256 
    256257                if (path.exists()) { 
    257258 
     
    312313                                        Manifest m = new Manifest(new BufferedInputStream(new FileInputStream(j))); 
    313314                                        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) { 
    315345                                                for (String a : aa.split(":")) { 
    316346                                                        a = a.trim(); 
     
    319349 
    320350                                                                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"); 
    322352                                                                } 
    323353                                                                URL url = new URL("file://" + fp + (fp.endsWith(".jar") ? "" : "/")); 
    324                                                                  
     354 
    325355                                                                loader.addURL(url); 
    326356 
     
    393423                trampoline = this; 
    394424 
    395                  
    396425                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 
    402430                        ArrayList a = new ArrayList(Arrays.asList(ignored)); 
    403431                        a.addAll(Arrays.asList(exceptions.split(":"))); 
     
    418446                String extensionsDir = SystemProperties.getProperty("extensions.dir", "../../../../extensions/"); 
    419447                Trampoline2.trampoline.addExtensionsDirectory(new File(extensionsDir)); 
    420                  
     448 
    421449                try { 
    422450                        final Class c = (loader.loadClass(classToLaunch)); 
     
    444472                                        try { 
    445473 
    446                                                 System.out.println(" we are in thread <"+Thread.currentThread()+">"); 
     474                                                System.out.println(" we are in thread <" + Thread.currentThread() + ">"); 
    447475                                                Launcher.getLauncher().mainThread = Thread.currentThread(); 
    448476                                                printInfo(); 
  • development/java/field/core/windowing/components/RootComponent.java

    r147 r149  
    118118                                return; 
    119119 
    120                         GLComponentWindow.getCurrentWindow(RootComponent.this).transformMouseEvent(arg0); 
     120                        //GLComponentWindow.getCurrentWindow(RootComponent.this).transformMouseEvent(arg0); 
    121121 
    122122                        RootComponent.this.handleResize(currentResize, dx, dy, arg0.getX(), arg0.getY()); 
    123123 
    124                         GLComponentWindow.getCurrentWindow(RootComponent.this).untransformMouseEvent(arg0); 
     124                        //GLComponentWindow.getCurrentWindow(RootComponent.this).untransformMouseEvent(arg0); 
    125125                        // need to rexpress lx in light 
    126126                        // of the potentially new 
     
    133133                        lastX = (mv.x) - (lx2 - lx); 
    134134                        lastY = (mv.y) - (ly2 - ly); 
    135                          
     135 
    136136                        GLComponentWindow.getCurrentWindow(RootComponent.this).transformMouseEvent(arg0); 
    137137