Skip to main content



      Home
Home » Modeling » EMF » Xcore 2.14 vs Workspace vs. standalone
Xcore 2.14 vs Workspace vs. standalone [message #1792060] Tue, 10 July 2018 12:29 Go to next message
Eclipse UserFriend
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?
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792063 is a reply to message #1792060] Tue, 10 July 2018 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Here is an example
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792067 is a reply to message #1792063] Tue, 10 July 2018 14:35 Go to previous messageGo to next message
Eclipse UserFriend
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 14:44 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792070 is a reply to message #1792069] Tue, 10 July 2018 14:57 Go to previous messageGo to next message
Eclipse UserFriend
in the last version that is at maven central (2.12) there is no such validation method
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792072 is a reply to message #1792069] Tue, 10 July 2018 15:03 Go to previous messageGo to next message
Eclipse UserFriend
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 15:28 Go to previous messageGo to next message
Eclipse UserFriend
the validation was introduced with the path edatatype with https://github.com/eclipse/emf/commit/9a4b553ffbf1a2fe60cd1660231f82bab7177afc
Re: Xcore 2.14 vs Workspace vs. standalone [message #1792074 is a reply to message #1792073] Tue, 10 July 2018 15:36 Go to previous message
Eclipse UserFriend
created https://bugs.eclipse.org/bugs/show_bug.cgi?id=536883
Previous Topic:[EMF Validation] No maintainer of project?
Next Topic:[xcore][xtend]
Goto Forum:
  


Current Time: Sun Jul 27 02:20:02 EDT 2025

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

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

Back to the top