View projection-essence.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum Style { | |
none, selected, highlighted | |
} | |
export abstract class Element { | |
abstract style(): Style; | |
} | |
export class ProjectedVertex extends Element { | |
id: number; |
View model-essence.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Point { x: number; y: number; } | |
export class Vertex { id: number; position: Point; toIds: number[]; } | |
export class Model { vertices: Vertex[]; } |
View DomainModelExtensions.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nl.dslmeinte.xtext.examples.domainmodel.services | |
import nl.dslmeinte.xtext.examples.domainmodel.domainModel.Entity | |
import nl.dslmeinte.xtext.examples.domainmodel.domainModel.Reference | |
import nl.dslmeinte.xtext.examples.domainmodel.domainModel.Attribute | |
import nl.dslmeinte.xtext.examples.domainmodel.domainModel.StructuralFeature | |
/** | |
* Extensions for model elements of a domain model. | |
* Usage in Xtend files: |
View DomainModel.xtext
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Grammar taken from the Xtext 1.0.x Domainmodel example | |
* and enhanced with path expressions: see . | |
*/ | |
grammar nl.dslmeinte.xtext.examples.domainmodel.DomainModel with org.eclipse.xtext.common.Terminals | |
generate domainModel "http://www.dslmeinte.nl/xtext/examples/DomainModel" | |
DomainModel: |