Neeraj, I've attached 4 more patches to IMPERIUS-2 issue. Yet related to classloading, and some cleanup in manifest and build.properties files
-----Message d'origine----- De : Neeraj Joshi [mailto:[EMAIL PROTECTED] Envoyé : vendredi 18 janvier 2008 20:58 À : imperius-dev@incubator.apache.org Objet : RE: Eclipse Editor for SPL checked in Hi Erik, Thanks yet again, that fixed the issue. I just have a question regarding the changes in the ACPLParserMap. In the catch clause you are trying to load the class again using the current Thread's class loader. Why isn't the current thread's class loader the default one? What classloader is used in the try block? Thanks Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others. -- Groucho Marx" http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Erik Bengtson" <[EMAIL PROTECTED]> 01/17/2008 05:33 PM Please respond to imperius-dev@incubator.apache.org To <imperius-dev@incubator.apache.org> cc Subject RE: Eclipse Editor for SPL checked in You are right, same issue again. Patches added to JIRA. For a fully understanding: Eclipse run with claspath A: Current thread context is classpath A-> no access Plugin splcore has classpath B -> this can access classes in D Plugin splcoreeditor has classpath C -> this can access classes in B and D Plugin antlr has classpath D -> no access Plugin javasplcore has classpath E -> this can access classes in B The user project has the SPL files and the custom jar in its path. When the Eclipse SPL Editor runs, it runs on classpath A, thus loading classes from plugins or user projects wont work. For this reason, when running the ANTLR parser you need to change the context classloader with a custom URL classloader that's built upon the user project dependencies and splcore classpath. The classpath C is set as parent for the custom URL classloader to be able to resolve splcore classes when running/compiling the policy. -----Message d'origine----- De : Neeraj Joshi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 17 janvier 2008 21:05Y À : imperius-dev@incubator.apache.org Objet : RE: Eclipse Editor for SPL checked in Hey Eric, Thanks for the fix. The antlr problem got resolved with that. However, there is another classloader issue now related to the customexpressions. If you do Project -> Properties -> Policy / Add Custom jar -> Apply A jar with custom expression classes gets added to the project classpath and ACPLParserMap is updated with the new expressions When an expression defined in the jar is added to the policy in the editor the validation fails (symbol not defined). As the splcore is now a seperate bundle I think its a classloader issue is at play again. Any ideas? Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others. -- Groucho Marx" http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Erik Bengtson" <[EMAIL PROTECTED]> 01/17/2008 01:19 PM Please respond to imperius-dev@incubator.apache.org To <imperius-dev@incubator.apache.org> cc Subject RE: Eclipse Editor for SPL checked in Neeraj, Another way -----Message d'origine----- De : Erik Bengtson [mailto:[EMAIL PROTECTED] Envoyé : jeudi 17 janvier 2008 19:15 À : imperius-dev@incubator.apache.org Objet : RE: Eclipse Editor for SPL checked in Neeraj, Fix attached to IMPERIUS-2. The problem was with the classloader used by antlr, the current thread classloader, that does not have access to the ASTWithLineNumber. -----Message d'origine----- De : Neeraj Joshi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 17 janvier 2008 15:24 À : imperius-dev@incubator.apache.org Objet : Re: Eclipse Editor for SPL checked in Hey Eric, Actually I am having trouble with the original antlr plugin itself..I used the one found here http://antlreclipse.sourceforge.net/ Which plugin did you use? The way I found out that antlr libraries arn't getting imported is when you try to author a policy : no outline shows up in the outline view , no errors appear if you write invalid syntax and stuff like drop down list of anchor class properties doesn't appear... Thanks Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others. -- Groucho Marx" http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Erik Bengtson" <[EMAIL PROTECTED]> 01/17/2008 02:10 AM Please respond to imperius-dev@incubator.apache.org To "Imperius" <imperius-dev@incubator.apache.org> cc Subject Re: Eclipse Editor for SPL checked in Neeraj, This is necessary for development only. If you install the original antlr plugin, it should work. -- BlackBerry® from Mobistar --- -----Original Message----- From: Neeraj Joshi <[EMAIL PROTECTED]> Date: Wed, 16 Jan 2008 17:43:19 To:imperius-dev@incubator.apache.org Subject: RE: Eclipse Editor for SPL checked in Hey Eric, That seemed to do the trick...but that implies that the user would have to follow similar steps to get the Editor operational (Generate a plugin from antlr.jar) Any ideas how to make the user's life easier? Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others." http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Erik Bengtson" <[EMAIL PROTECTED]> 01/16/2008 03:24 PM Please respond to imperius-dev@incubator.apache.org To <imperius-dev@incubator.apache.org> cc Subject RE: Eclipse Editor for SPL checked in Neeraj, Create a Plugin from the antlr jar. In Eclipse there is a wizard called "Plugin from existing jar archives". Regards, -----Message d'origine----- De : Neeraj Joshi [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 janvier 2008 21:04 À : imperius-dev@incubator.apache.org Objet : RE: Eclipse Editor for SPL checked in Hi Erik, Thank you for the patches, this makes things much cleaner. I am having some trouble with the new plugins basically the antlr libraries are not getting imported correctly. When I do SPLEditor -> Run as -> Open Run dialog and validate plugins I see for the splcore bundle some errors like [Missing Constraint: Import Package: antlr] for all of the Import packages within the Manifest. I tried adding a Require-Bundle for org.antlr but that didn't seem to help... Other error that I fixed was that within the spleditorcore and javasplextension plugin the Bundle-ClassPath had to be changed from the jar to '.' Did you encounter issues importing antlr? any suggestions on what I can try out? Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others." http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Erik Bengtson" <[EMAIL PROTECTED]> 01/15/2008 04:51 PM Please respond to imperius-dev@incubator.apache.org To <imperius-dev@incubator.apache.org> cc Subject RE: Eclipse Editor for SPL checked in Hi, Patches added to JIRA IMPERIUS-2, allows creating valid eclipse plugins, and all jars are valid osgi bundles. With this configuration, the user eclipse plugin installation instructions would be: Build projects with maven Copy built jars to <ECLIPSE_DIR>/plugins Install ANTLR eclipse plugin in <ECLIPSE_DIR>/plugins Erik -----Message d'origine----- De : Neeraj Joshi [mailto:[EMAIL PROTECTED] Envoyé : mardi 15 janvier 2008 8:13 À : imperius-dev@incubator.apache.org Objet : Eclipse Editor for SPL checked in Hi All, I have checked in the editor code. I have also updated the website with instructions to build and use the editor. Let me know if you face any problems. Thanks Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others." http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~