Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Xcore 2.14 vs Workspace vs. standalone
Xcore 2.14 vs Workspace vs. standalone [message #1792060] Tue, 10 July 2018 16:29 Go to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
Hi,

i try to evaluate the xcore and emf maven plugins karsten is producing right now.
i am getting the following validation message on a minimal sample model

[ERROR] ERROR:The feature 'modelDirectory' of 'Model' contains a bad value. The path '/xcore-maven-example/src/main/java-gen' must contain at least two valid segments to denote a workspace folder;  (file:/home/dietrich/git/xcore-maven-example/src/main/resources/model.xcore line : 3 column : null)
@GenModel(
    bundleManifest="false",
    modelDirectory="/xcore-maven-example/src/main/java-gen",
    complianceLevel="8.0"
)
package sample.model

class User {
    String name

    op String sayHello(User user) {
        "Hello " + user.name
    }
}



@Ed any idea? should this validation be executed in standalone mode at all?


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792063 is a reply to message #1792060] Tue, 10 July 2018 16:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
Here is an example

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792067 is a reply to message #1792063] Tue, 10 July 2018 18:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29653
Registered: July 2009
Senior Member
This is produced by org.eclipse.emf.codegen.ecore.genmodel.util.GenModelValidator.validatePath_WellFormedPath(String, DiagnosticChain, Map<Object, Object>) and it's been this way for a long time. Of course I don't know why the validator is being called. Is something going to try to generate this model standalone?
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792069 is a reply to message #1792067] Tue, 10 July 2018 18:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
yes. my code does that and people that use the xtext maven (or gradle plugin) to generate java from xcore do that too.
problem was not there in 2.12. the validator has a @since 2.14


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792070 is a reply to message #1792069] Tue, 10 July 2018 18:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
in the last version that is at maven central (2.12) there is no such validation method

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792072 is a reply to message #1792069] Tue, 10 July 2018 19:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6111
Registered: July 2009
Senior Member
Hi

I found quite a few latent bugs like this once the OCL builder started (optionally) validating *.ecore and *.uml; the new EAnnotationValidators are the cause.

Xtext is often quite enthusiastic at validating so this is probably an Xtext rather than OCL tooling 'improvement'.

I recall difficulties ensuring that the standalone registrations were correct, but I think that enough of the problems were fixed to make it useable. https://bugs.eclipse.org/bugs/show_bug.cgi?id=528869 references some relevant difficulties.

See also org.eclipse.ocl.examples.xtext.tests.TestUtil.initializeEcoreEAnnotationValidators() and https://bugs.eclipse.org/bugs/show_bug.cgi?id=528371

Regards

Ed Willink
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792073 is a reply to message #1792072] Tue, 10 July 2018 19:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
the validation was introduced with the path edatatype with https://github.com/eclipse/emf/commit/9a4b553ffbf1a2fe60cd1660231f82bab7177afc

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792074 is a reply to message #1792073] Tue, 10 July 2018 19:36 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
created https://bugs.eclipse.org/bugs/show_bug.cgi?id=536883

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[EMF Validation] No maintainer of project?
Next Topic:[xcore][xtend]
Goto Forum:
  


Current Time: Fri Nov 16 11:40:21 GMT 2018

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

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

Back to the top