-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/kieler/klighd-vscode
- Loading branch information
Showing
54 changed files
with
1,569 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Test Type Generation from Schemas | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- schema/ | ||
|
||
jobs: | ||
build-pydantic: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
id: checkout_repository | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: schema | ||
fetch-depth: 1 | ||
- name: Install datamodel-code-generator | ||
id: install_code_generator | ||
run: | | ||
python -m venv ls-env | ||
source ls-env/bin/activate | ||
pip install datamodel-code-generator | ||
- name: Generate Pydantic types | ||
id: generate_pydantic_types | ||
run: | | ||
source ls-env/bin/activate | ||
datamodel-codegen --input schema/ --input-file-type jsonschema --output GEN/ --use-default |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@kieler/klighd-cli", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Standalone web view for klighd-core diagrams", | ||
"author": "KIELER <[email protected]>", | ||
"license": "EPL-2.0", | ||
|
@@ -31,7 +31,7 @@ | |
"socket": "node ./lib/main.js --ls_port=5007" | ||
}, | ||
"dependencies": { | ||
"@kieler/klighd-core": "^0.5.0", | ||
"@kieler/klighd-core": "^0.6.0", | ||
"buffer": "^6.0.3", | ||
"commander": "^8.1.0", | ||
"crypto-browserify": "^3.12.0", | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "klighd-vscode", | ||
"displayName": "KLighD Diagrams", | ||
"description": "KLighD diagram support for Visual Studio Code", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"publisher": "kieler", | ||
"author": "KIELER <[email protected]>", | ||
"icon": "icon.png", | ||
|
@@ -152,8 +152,8 @@ | |
"scripts": { | ||
"clean": "rimraf dist klighd-vscode.vsix", | ||
"lint": "eslint .", | ||
"build": "webpack --mode development --devtool eval-source-map", | ||
"watch": "webpack --watch --mode development --devtool eval-source-map", | ||
"build": "webpack --mode production --devtool false", | ||
"watch": "webpack --watch --mode development", | ||
"package": "vsce package --yarn --baseImagesUrl https://github.com/kieler/klighd-vscode/raw/HEAD/applications/klighd-vscode -o klighd-vscode.vsix", | ||
"predistribute": "yarn run package", | ||
"distribute": "yarn run distribute:vsce && yarn run distribute:ovsx", | ||
|
@@ -177,7 +177,7 @@ | |
"webpack-cli": "^5.1.4" | ||
}, | ||
"dependencies": { | ||
"@kieler/klighd-core": "^0.5.0", | ||
"@kieler/klighd-core": "^0.6.0", | ||
"inversify": "^6.0.2", | ||
"nanoid": "^3.1.23", | ||
"reflect-metadata": "^0.2.1", | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@kieler/klighd-core", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Core KLighD diagram visualization with Sprotty", | ||
"author": "KIELER <[email protected]>", | ||
"license": "EPL-2.0", | ||
|
@@ -24,13 +24,15 @@ | |
"publish:next": "yarn publish --new-version \"$(semver $npm_package_version -i minor)-next.$(git rev-parse --short HEAD)\" --tag next --no-git-tag-version" | ||
}, | ||
"dependencies": { | ||
"@kieler/klighd-interactive": "^0.5.0", | ||
"@kieler/klighd-interactive": "^0.6.0", | ||
"@types/file-saver": "^2.0.7", | ||
"elkjs": "^0.8.2", | ||
"feather-icons": "^4.29.1", | ||
"file-saver": "^2.0.5", | ||
"inversify": "^6.0.2", | ||
"snabbdom": "^3.5.1", | ||
"sprotty": "^1.3.0", | ||
"sprotty-elk": "^1.3.0", | ||
"sprotty-protocol": "^1.3.0" | ||
}, | ||
"devDependencies": { | ||
|
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,41 @@ | ||
/* | ||
* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient | ||
* | ||
* http://rtsys.informatik.uni-kiel.de/kieler | ||
* | ||
* Copyright 2024 by | ||
* + Kiel University | ||
* + Department of Computer Science | ||
* + Real-Time and Embedded Systems Group | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
import { LayoutOptions } from 'elkjs' | ||
import { DefaultLayoutConfigurator } from 'sprotty-elk' | ||
import { SModelElement, SModelIndex } from 'sprotty-protocol' | ||
|
||
/** | ||
* This layout configurator copies all layout options from the KGraph element's properties. | ||
*/ | ||
export class KielerLayoutConfigurator extends DefaultLayoutConfigurator { | ||
override apply(element: SModelElement, _index: SModelIndex): LayoutOptions | undefined { | ||
// Only apply to elements with properties. | ||
if ((element as any).properties === undefined) { | ||
return undefined | ||
} | ||
const properties = (element as any).properties as Record<string, unknown> | ||
|
||
// map properties to layout options and stringify values | ||
const layoutOptions: LayoutOptions = {} | ||
Object.entries(properties).forEach(([key, value]) => { | ||
layoutOptions[key] = JSON.stringify(value) | ||
}) | ||
|
||
return layoutOptions | ||
} | ||
} |
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
Oops, something went wrong.