Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » CompleteOCL parser problem
CompleteOCL parser problem [message #1001801] Thu, 17 January 2013 11:51
Fa Za is currently offline Fa ZaFriend
Messages: 235
Registered: March 2010
Senior Member
Hi all,
I try to use to atl query to generate a very simple text form a parsed OCL document
conforms to CompleteOCLCST metamodel proposed by OCL MDT community.
I use this Java Parser
package Parser;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.ocl.examples.pivot.model.OCLstdlib;
import org.eclipse.ocl.examples.xtext.completeocl.CompleteOCLStandaloneSetup;
import org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcoreStandaloneSetup;

public class Parser {

	public static void main(String[] args) throws IOException {

		ResourceSet resourceSet = new ResourceSetImpl();
		Resource resource = resourceSet.createResource(URI.createURI(args[0]));
		Resource resourceAsXmi = resourceSet.createResource(URI.createURI(args[0]+".xmi"));


an XMI file is generated.
when I use ATL transformation, An error is generated which is
Error loading platform:/resource/CompleteOCL/Test.xmi: The class 'VisitableCS' is not a valid classifier

Note: the problem is in the java parser, and I don't find how can I extend it to generate an appropriate xmi file.
if someone wants to help me, I am truly grateful because I spent a lot of time to try to extend this parser but I don't find anything Sad
Best regards,
Fy Za
Previous Topic:[Announce] Eclipse OCL 4.0.2 (Juno) SR2 RC1 is now available
Next Topic:Accessing parent
Goto Forum:

Current Time: Mon May 28 10:09:31 GMT 2018

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

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

Back to the top