-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use YAML-based grammar for our models (#28)
* New examples, + moving old examples around * Does not work good enough yet, but it work enough to keep going * Implemented testing for new language * GmodelFactory refactor, serailizer broken, fixing that first * Rewrote serializer, now dynamic and works with Yaml * GModel-factory now works with new lang * Extension should be working with new language * Fix error about character needing to be non-negative caused by '-1' * Fix errors by using a specific chevrotain version - Downgrade from 10.5.0 to 10.4.2 as it does not work for our YAML lang -- Chevrotain/chevrotain@v10.4.2...v10.5.0 -- Main extension: Chevrotain/chevrotain#1917 * To get it working on my machine * readme update for license * fixing tests * Improve stability of cross-updates and fix edge structure - Ensure edges (relationships) are created between nodes (entities) -- Ensure node entity matches expected relationship entity - Improve stability of cross-updates -- Ensure 'save' does an implicit 'update' of the internal structure -- Ensure update only updates text editor when it was opened -- Only do full textual updates to avoid merging issues -- Let UI react to updates, not only on save -- Debounce model update for form editor - Minors -- Adapt grammar to better reflect semantic element (instead of 'for') -- Always serialize properties in same order * Update example files and fix IDs for GLSP server for better update * Extend protocol with client id and improve update mechanism - Use open/close as lifecycle methods for clients - Let extension startup early to handle non-textual editors * Fixed wrong use of name vs name_val when showing and synching the model. * Added missing name property on Order entity. * Initial gitpod setup. * Added yarn test in build action. * Refactored test build part into seperate action and added in feature build only (for now). * Disabled test action for now, since it doesn't seem to work on GitHub easily. * Refactored serializer so indentation and characters used are in constants. Updated/added some comments. Updated model-service-impl so have more specific console/promise messages and added some comments. --------- Co-authored-by: Özcan Seker <ozcan@x-breeze.com> Co-authored-by: Harmen Wessels <harmen@x-breeze.com> Co-authored-by: Harmen Wessels <97173058+harmen-xb@users.noreply.github.com>
- Loading branch information
1 parent
6cf2f43
commit 1a3ce57
Showing
150 changed files
with
5,021 additions
and
1,889 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: test | ||
description: 'Test CrossModel' | ||
|
||
runs: # windows-2019 # is needed because the Setup Python task does not work with ubuntu | ||
using: 'composite' | ||
steps: | ||
- name: Yarn test | ||
uses: Amadevus/pwsh-script@v2.0.3 | ||
with: | ||
script: | | ||
yarn test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
name: feature | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
push: | ||
branches: | ||
- feature/* | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-2019 # is needed because the Setup Python task does not work with ubuntu | ||
steps: | ||
# Checkout the code. | ||
- name: check out # is needed to read the files on the root folder of the repo | ||
uses: actions/checkout@v3 | ||
# Use the build-addin action. | ||
- uses: ./.github/actions/build | ||
# Checkout the code. | ||
- name: check out # is needed to read the files on the root folder of the repo | ||
uses: actions/checkout@v3 | ||
# Use the build action. | ||
- uses: ./.github/actions/build | ||
# Use the test action. | ||
# - uses: ./.github/actions/test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This configuration file was automatically generated by Gitpod. | ||
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) | ||
# and commit this file to your remote git repository to share the goodness with others. | ||
|
||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
|
||
# To have the dependencies for Theia installed execute the following commands in the GitPod workspace once: | ||
# sudo apt-get install libsecret-1-dev libxkbfile-dev | ||
# nvm install 16.20.0 | ||
# pyenv install -s 3.11.4 | ||
# pyenv global 3.11.4 | ||
|
||
tasks: | ||
- init: yarn install && yarn run build | ||
command: yarn run watch | ||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node' | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
"version": "0.2.0", | ||
"configurations": [ | ||
|
||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/cross-model-project-example/systemA/entities/Aantal.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
entity Aantal { | ||
description := "Test description"; | ||
attributes { | ||
nope := 'Float'; | ||
test123456 := 'Bool'; | ||
test3 := 'Float'; | ||
test4 := 'Char'; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/cross-model-project-example/systemA/entities/Klant.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
entity Klant { | ||
description := "test123"; | ||
attributes { | ||
werk := 'Float'; | ||
test49999912somsdit := 'Char'; | ||
wat111234 := 'Varchar'; | ||
hall1123 := 'Integer'; | ||
ditwerktdusnietaltijd := 'test1234'; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
examples/cross-model-project-example/systemA/entities/Order.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
entity Order { | ||
description := "Orders geplaatst door de klant"; | ||
attributes { | ||
test49999912somsdit := 'Varchar'; | ||
werk := 'Integer'; | ||
wat111234 := 'Varchar'; | ||
hall1123 := 'Integer'; | ||
ditwerktdusnietaltijd := 'test1234'; | ||
empty_attribute5 := 'Float'; | ||
empty_attribute6 := 'Float'; | ||
empty_attribute7 := 'Float'; | ||
empty_attribute8 := 'Float'; | ||
empty_attribute9 := 'Float'; | ||
empty_attribute10 := 'Float'; | ||
empty_attribute11 := 'Float'; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/cross-model-project-example/systemA/entities/Product.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
entity Product { | ||
description := "Producten die verkocht worden"; | ||
attributes { | ||
test1 := 'test2'; | ||
test2 := 'test3'; | ||
test3 := 'test'; | ||
test4 := 'test'; | ||
test5 := 'test'; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/cross-model-project-example/systemA/relationships/AantalToProduct.relationship.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
relationship AantalToProduct { | ||
source := Aantal; | ||
target := Product ; | ||
type := 1:1; | ||
properties { | ||
|
||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/cross-model-project-example/systemA/relationships/AantalToProduct0.relationship.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
relationship AantalToProduct0 { | ||
source := Aantal; | ||
target := Product; | ||
type := 1:1; | ||
properties { | ||
|
||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/cross-model-project-example/systemA/relationships/KlantToOrder.relationship.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
relationship KlantToOrder { | ||
source := Klant; | ||
target := Order; | ||
type := 1:1; | ||
properties { | ||
|
||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/cross-model-project-example/systemA/relationships/KlantToOrder0.relationship.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
relationship KlantToOrder0 { | ||
source := Klant; | ||
target := Order; | ||
type := 1:1; | ||
properties { | ||
|
||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/cross-model-project-example/systemA/relationships/OrderToAantal.relationship.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
relationship OrderToAantal { | ||
source := Order; | ||
target := Aantal; | ||
type := 1:1; | ||
properties { | ||
|
||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/cross-model-project-example/systemA/relationships/OrderToProduct.relationship.cm
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
relationship OrderToProduct { | ||
source := Order; | ||
target := Product; | ||
type := 1:1; | ||
properties { | ||
|
||
} | ||
} |
Oops, something went wrong.