Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » External JAR works with Java Application, not Acceleo Plugin(External JAR works with Java Application, not Acceleo Plugin)
External JAR works with Java Application, not Acceleo Plugin [message #1782856] Fri, 02 March 2018 14:39 Go to next message
Frank Poppen is currently offline Frank PoppenFriend
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][/url]', '[url][/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".

[Updated on: Fri, 02 March 2018 14:42]

Report message to a moderator

Re: External JAR works with Java Application, not Acceleo Plugin [message #1782858 is a reply to message #1782856] Fri, 02 March 2018 14:55 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7637
Registered: July 2009
Senior Member

As you have already been told, the Acceleo Plugin launch does not work with recent versions of Eclipse. If you want to use obsolete software you need to become sufficiently expert to fix your own problems.

ANTLR 4 is not wisely used within Eclipse so you are mixing newer with older technologies; always a dangerous thing to do.

My guess is that you are on the verge of discovering the difficulties of running multiple concurrent ANTLRs. See Your problem is therefore more likely that you need to uninstall conflicting Eclipse components such as Xtext, ATL, Epsilon, ....

Once you discover the solution please share it so that others may benefit.


Ed Willink

Previous Topic:Is Accello mature enough for a productive environment?
Next Topic:unable get SysML stereotypes
Goto Forum:

Current Time: Mon Dec 11 18:06:13 GMT 2023

Powered by FUDForum. Page generated in 0.01446 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top