Skip to content

Commit

Permalink
fix(metamodel) Add defaults back, useful for the model builder
Browse files Browse the repository at this point in the history
Signed-off-by: jeromesimeon <[email protected]>
  • Loading branch information
jeromesimeon committed Jul 16, 2021
1 parent 0fa6720 commit 46a0cee
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/concerto/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ concept Identified {
}

concept IdenfiedBy extends Identified {
o String name
o String name
}

@FormEditor("defaultSubclass","concerto.metamodel.ConceptDeclaration")
Expand All @@ -61,7 +61,7 @@ abstract concept ClassDeclaration {
o Boolean isAbstract default=false
// TODO use regex /^(?!null|true|false)(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*/u
@FormEditor("title", "name")
o String name // regex=/^(?!null|true|false)(\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\S|\\u200C|\\u200D)*$/
o String name default="className" // regex=/^(?!null|true|false)(\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\S|\\u200C|\\u200D)*$/
o Identified identified optional
@FormEditor("title", "parentType")
o TypeIdentifier superType optional
Expand Down Expand Up @@ -111,11 +111,11 @@ abstract concept FieldDeclaration {
// TODO Allow regex modifiers e.g. //ui
// regex /^(?!null|true|false)(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\pLm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*/u
// This regex is an approximation of what the parser accepts without using unicode character classes
o String name // regex=/^(?!null|true|false)(\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\S|\\u200C|\\u200D)*$/
o String name default="fieldName" // regex=/^(?!null|true|false)(\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\w|\\d|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\S|\\u200C|\\u200D)*$/
@FormEditor("title", "isArray?")
o Boolean isArray
o Boolean isArray default=false
@FormEditor("title", "isOptional?")
o Boolean isOptional
o Boolean isOptional default=false
@FormEditor("hide", true)
o Decorator[] decorators optional
}
Expand Down Expand Up @@ -201,8 +201,7 @@ concept ImportType extends Import {
}

concept ModelFile {
@FormEditor("hide", true)
o String namespace
o String namespace default="my.namespace"
@FormEditor("hide", true)
o Import[] imports optional
@FormEditor("title", "classes")
Expand Down

0 comments on commit 46a0cee

Please sign in to comment.