Skip to content

Commit

Permalink
additional actions and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddykasp committed Oct 10, 2024
1 parent 48c49db commit 402df1a
Show file tree
Hide file tree
Showing 27 changed files with 685 additions and 142 deletions.
24 changes: 24 additions & 0 deletions schema/klighd/SKGraphSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
}
},
"default": { "width": 0.0, "height": 0.0 }
},
"position": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"default": { "x": 0.0, "y": 0.0 }
}
}

Expand All @@ -76,6 +88,18 @@
},
"revision": {
"type": "number"
},
"children": {
"type": "array",
"required": ["items"],
"items": [
{
"$ref": "#/definitions/SModelElement"
}
],
"default": [],
"minItems": 1,
"maxItems": 1
}
}
},
Expand Down
141 changes: 141 additions & 0 deletions schema/klighd/ValuedSynthesisOption.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/ValuedSynthesisOption.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ValuedSynthesisOption",
"type": "object",
"required": ["synthesisOption", "currentValue"],
"properties": {
"synthesisOption": {
"anyOf": [
{"$ref": "#/definitions/checkSynthesisOption"},
{"$ref": "#/definitions/choiceSynthesisOption"},
{"$ref": "#/definitions/rangeSynthesisOption"},
{"$ref": "#/definitions/textSynthesisOption"},
{"$ref": "#/definitions/separatorSynthesisOption"},
{"$ref": "#/definitions/categorySynthesisOption"}
]
},
"currentValue": {
"type": ["string", "number", "boolean"]
}
},
"definitions": {
"SynthesisOption": {
"type": "object",
"required": ["id", "name", "type", "sourceHash", "initialValue"],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "number",
"enum": [0, 1, 2, 3, 4, 5]
},
"updateAction": {
"type": "string"
},
"category": {
"$ref": "#/definitions/categorySynthesisOption"
},
"sourceHash": {
"type": "string"
},
"initialValue": {}
}
},
"checkSynthesisOption": {
"allOf": [{"$ref": "#/definitions/SynthesisOption"}],
"properties": {
"type": {
"type": "number",
"enum": [0]
},
"initialValue": {
"type": "boolean"
}
}
},
"choiceSynthesisOption": {
"allOf": [{"$ref": "#/definitions/SynthesisOption"}],
"required": ["values"],
"properties": {
"type": {
"type": "number",
"enum": [1]
},
"initialValue": {
"type": "string"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"rangeSynthesisOption": {
"allOf": [{"$ref": "#/definitions/SynthesisOption"}],
"required": ["range", "stepSize"],
"properties": {
"type": {
"type": "number",
"enum": [2]
},
"initialValue": {
"type": "number"
},
"range": {
"type": "object",
"properties": {
"first": {
"type": "number"
},
"second": {
"type": "number"
}
}
},
"stepSize": {
"type": "number"
}
}
},
"textSynthesisOption": {
"allOf": [{"$ref": "#/definitions/SynthesisOption"}],
"properties": {
"type": {
"type": "number",
"enum": [3]
},
"initialValue": {
"type": "string"
}
}
},
"separatorSynthesisOption": {
"allOf": [{"$ref": "#/definitions/SynthesisOption"}],
"properties": {
"type": {
"type": "number",
"enum": [4]
}
}
},
"categorySynthesisOption": {
"allOf": [{"$ref": "#/definitions/SynthesisOption"}],
"properties": {
"type": {
"type": "number",
"enum": [5]
},
"initialValue": {
"type": "boolean"
}
}
}
}
}
34 changes: 34 additions & 0 deletions schema/klighd/actions/checkImages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/checkImages.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "checkImages",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind", "images"],
"properties": {
"kind": {
"type": "string",
"enum": ["checkImages"]
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/image"
}
}
},
"definitions": {
"image": {
"type": "object",
"required": ["bundleName", "imagePath"],
"properties": {
"bundleName": {
"type": "string"
},
"imagePath": {
"type": "string"
}
}
}
}
}
37 changes: 37 additions & 0 deletions schema/klighd/actions/checkedImages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/checkedImages.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "checkedImages",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind", "notCached", "responseId"],
"properties": {
"kind": {
"type": "string",
"enum": ["checkedImages"]
},
"notCached": {
"type": "array",
"items": {
"$ref": "#/definitions/notCachedImage"
}
},
"responseId": {
"type": "string"
}
},
"definitions": {
"notCachedImage": {
"type": "object",
"required": ["k", "v"],
"properties": {
"k": {
"type": "string"
},
"v": {
"type": "string"
}
}
}
}
}
26 changes: 26 additions & 0 deletions schema/klighd/actions/performAction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/performAction.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "performAction",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/actions/action.json"}],
"required": ["kind", "actionId", "kGraphElementId", "kRenderingId", "revision"],
"properties": {
"kind": {
"type": "string",
"enum": ["performAction"]
},
"actionId": {
"type": "string"
},
"kGraphElementId": {
"type": "string"
},
"kRenderingId": {
"type": "string"
},
"revision": {
"type": "number"
}
}
}
14 changes: 14 additions & 0 deletions schema/klighd/actions/refreshDiagram.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/refreshDiagram.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "refreshDiagram",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind"],
"properties": {
"kind": {
"type": "string",
"enum": ["refreshDiagram"]
}
}
}
14 changes: 14 additions & 0 deletions schema/klighd/actions/refreshLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/refreshLayout.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "refreshLayout",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind"],
"properties": {
"kind": {
"type": "string",
"enum": ["refreshLayout"]
}
}
}
17 changes: 17 additions & 0 deletions schema/klighd/actions/requestDiagramPiece.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/requestDiagramPiece.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "requestDiagramPiece",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind", "modelElementId"],
"properties": {
"kind": {
"type": "string",
"enum": ["requestDiagramPiece"]
},
"modelElementId": {
"type": "string"
}
}
}
17 changes: 17 additions & 0 deletions schema/klighd/actions/setDiagramPiece.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/setDiagramPiece.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "setDiagramPiece",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind", "diagramPiece"],
"properties": {
"kind": {
"type": "string",
"enum": ["setDiagramPiece"]
},
"diagramPiece": {
"$ref": "/kieler/klighd-vscode/tree/main/schema/klighd/SKGraphSchema.json#/definitions/SKNode"
}
}
}
17 changes: 17 additions & 0 deletions schema/klighd/actions/setSynthesis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$id": "https://github.com/kieler/klighd-vscode/tree/main/schema/klighd/actions/setSynthesis.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "setSynthesis",
"type": "object",
"allOf": [{"$ref": "/kieler/klighd-vscode/tree/main/schema/sprotty/action.json"}],
"required": ["kind", "id"],
"properties": {
"kind": {
"type": "string",
"enum": ["setSynthesis"]
},
"id": {
"type": "string"
}
}
}
Loading

0 comments on commit 402df1a

Please sign in to comment.