QmlDesigner: Add SCXML wizard to QDS

The wizard is only active if the plugin is actually enabled.

Task-number: QDS-10507
Change-Id: I0a41deaa22745db90c3ec04a35109694a2fbc79c
Reviewed-by: Unseon Ryu <unseon.ryu@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2023-08-29 16:59:25 +02:00
parent 3e0ae7951d
commit 61827510c0
2 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" ?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" name="%{Name}">
</scxml>

View File

@@ -0,0 +1,66 @@
{
"version": 1,
"supportedProjectTypes": [ ],
"id": "F.Scxml",
"category": "O.Model",
"trDescription": "Creates a new empty state chart.",
"trDisplayName": "State Chart",
"trDisplayCategory": "Modeling",
"iconText": "scxml",
"platformIndependent": true,
"enabled": "%{JS: value('Plugins').indexOf('ScxmlEditor') >= 0}",
"options":
[
{ "key": "TargetPath", "value": "%{JS: Util.fileName(value('Location') + '/' + value('FileName'), Util.preferredSuffix('application/scxml+xml'))}" },
{ "key": "FileName", "value": "%{Name}" }
],
"pages" :
[
{
"trDisplayName": "State Chart Name and Location",
"trShortTitle": "Location",
"typeId": "Fields",
"data":
[
{
"name": "Name",
"trDisplayName": "State chart name:",
"mandatory": true,
"type": "LineEdit"
},
{
"name": "Location",
"trDisplayName": "Location:",
"type": "PathChooser",
"isComplete": "%{JS: value('Location') === '' || !Util.exists(value('TargetPath'))}",
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators(value('TargetPath'))}\" exists in the filesystem.",
"data":
{
"kind": "directory",
"basePath": "%{InitialPath}",
"path": "%{InitialPath}"
}
}
]
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators" :
[
{
"typeId": "File",
"data":
{
"source": "file.scxml",
"target": "%{TargetPath}",
"openInEditor": true
}
}
]
}