External JAR works with Java Application, not Acceleo Plugin [message #1782856] |
Fri, 02 March 2018 14:39 |
Frank Poppen Messages: 21 Registered: February 2018 |
Junior Member |
|
|
I built an Acceleo-Wrapper around my ANTLR4 generated parser everything works fine using the Java Application runner.
It does not work with the Acceleo Plug-in Application though. I receive an error that suggests that the accoring JAR for ANTLR is not found.
My code is antlrServicesPackage
package antlrServicesPackage;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.tree.*;
public class antlrServices {
public String parse(String toBeParsed){
CharStream input = new ANTLRInputStream("G: Reaction(Input,Output) within [0,33]ms.");
multicLexer lexer = new multicLexer(input);
CommonTokenStream tokens = new CommonTokenStream(lexer);
multicParser parser = new multicParser(tokens);
ParseTree tree = parser.multicTop();
return toBeParsed.concat(tree.toStringTree(parser).concat(toBeParsed.concat("_test1")));
}
}
My wrapper is:
[comment encoding = Cp1252 /]
[module multicAntlr4ParserModule('[url]http://www.eclipse.org/uml2/5.0.0/UML[/url]', '[url]http://www.eclipse.org/papyrus/sysml/1.4/SysML[/url]')/]
[query public parse(arg0 : String) : String
= invoke('antlrServicesPackage.antlrServices', 'parse(java.lang.String)', Sequence{arg0})
/]
To make this work, I added to the CLASSPATH : 'antlr-4.7.1-complete.jar'
As I said it works fine with Java Application as runtime environment.
Where do I need to add 'antlr-4.7.1-complete.jar' so that it also works with the Acceleo Plugin-in. If I change to this in my configuration I get the message:
An internal error occurred during: "Launching PlugIn".
org/antlr/v4/runtime/CharStream
[Updated on: Fri, 02 March 2018 14:42] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04207 seconds