Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF OCL Example cannot find org.eclipse.emf.ecore.codegen.ecore templates
EMF OCL Example cannot find org.eclipse.emf.ecore.codegen.ecore templates [message #1783858] Mon, 19 March 2018 15:52 Go to next message
Bruce Trask is currently offline Bruce TraskFriend
Messages: 58
Registered: July 2009
Member
Hello,

I was following along with https://www.eclipse.org/articles/article.php?file=Article-EMF-Codegen-with-OCL/index.html

and when running it I get the following error:

Errors occurred during the build.
Errors running builder 'JET Builder' on project 'org.eclipse.ocl.examples.codegen'.
The file 'Class.javajet' cannot be read in 'model/Class.javajet' at line 1 column 258
The file 'Class.javajet' cannot be read in 'model/Class.javajet' at line 1 column 258
The file 'Class.javajet' cannot be read in 'model/Class.javajet' at line 1 column 258
The file 'Class.javajet' cannot be read in 'model/Class.javajet' at line 1 column 258

with the offending line being in the example's Class.javajet which is supposed to include the jet file from the org.eclipse.emf.codegen.ecore package:

<%@ jet package="org.eclipse.ocl.examples.codegen.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.eclipse.emf.ecore.*" class="Class" version="$Id$" %>
<% final String oclNsURI = "http://www.eclipse.org/ocl/examples/OCL"; %>
<%@ include file="Class.javajet"%>

Questions: How does JET know where to find these base templates contained in org.eclipse.emf.codegen.ecore? What is the standard way to provide the include path to JET to find the eclipse base jet templates? Perhaps this is no longer supported. Or do I have to supply an absolute or relative path to their location?

Or am I missing something on this?

Regards,
Bruce

[Updated on: Mon, 19 March 2018 16:08]

Report message to a moderator

Re: EMF OCL Example cannot find org.eclipse.emf.ecore.codegen.ecore templates [message #1783860 is a reply to message #1783858] Mon, 19 March 2018 16:18 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6037
Registered: July 2009
Senior Member
Hi

You will see that the article starts with a "This page is deprecated and may contain some information that is no longer relevant or accurate." which is all that I could achieve to retract it.

JET has always been a bit magic and was a real pain to maintain. The OCL *.javajet died a couple of years before anyone noticed. Very recently a significant fix makes JavaJet file name resolution much more consistent. Unfortunately the fix was not quite right, so Photon M6 is a step backwards, but is remedied by the latest EMF N-build.

All of that is irrelevant since you should follow the OCLinEcore / Complete OCL / Validation tutorials in the OCL documentation, taking care to use either the old Classic Ecore/UML OCL without UI or CG or the new Unified Pivot-based OCL with Xtext UI and Java CG.

Regards

Ed Willink

Previous Topic:[CDO] Way to open and close repository thanks to an admin repository
Next Topic:RCP how to make TreeViewer non editable
Goto Forum:
  


Current Time: Thu Sep 20 10:59:58 GMT 2018

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

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

Back to the top