Text syntax for domain models

we have domain models described in some XML format. Given the domain models, I want to generate tools that will help testing / domain experts express data in text (and then in the domain’s test structure). IDE support is required (IDEA or eclipse).

let's say i have this pseudo-model

User
fn string 120 chars mandatory
ln string 120 chars mandatory
address not-mandatory

Address
street mandatory
city mandatory

Typical use case:

user opens the IDE
creates a new file
when content assist invoked, should give options 'user', 'address' etc

If I choose user, furthur ctrl-space should give 'fn', 'ln', 'address' as options. 

I know this can be done with xtext or jetbrains mps etc. But I want to understand which technology provides the following requirements.

  • (, , ..). . , / , , ( ).
  • "", ( ), , .
  • xml, text .
  • - java/ groovy.

ex,

user {
fn : Tom
ln : Jill 
hobby : movies
}

, "", , .

dsl/toolkit. , ?

+4
1

, xtext jetbrains mps .. , .

, Xtext , ( ) XML XML.

  • (, , ..). . , / , , ( ).

, XML, .

EMF EMF Java XSD , Xtext XML , XSD, Xtext, ( Xtext IDefaultResourceDescriptionStrategy). , Xtext .. DSL , XML.

  1. "", ( ), , .
  2. xml, text .

EMF URI , , Ecore, , XML http:// ://( - , ) URI URI.

  1. - java/groovy.

, Xbase ( Xtend), .

( : itemis, Xtext)

0

Source: https://habr.com/ru/post/1652642/


All Articles