summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-07-13 15:10:21 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-07-14 11:41:05 +0000
commit25b9989749801cc78d7cf673cc198c9f9f20ec39 (patch)
tree729985102a7f94ad6a008e99ac54e8e10a53487f /share
parent72cf0d4a3b70c1fd8bba06d1b379cf1aeae47a2b (diff)
downloadqt-creator-25b9989749801cc78d7cf673cc198c9f9f20ec39.tar.gz
Add wizard and mime type for SCXML
This allows us to easily add scxml files to a qmake project. Change-Id: I2b5b21683f3e76062e6858fb8d0bceaa699a5569 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/templates/wizards/files/scxml/file.scxml3
-rw-r--r--share/qtcreator/templates/wizards/files/scxml/wizard.json66
2 files changed, 69 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/files/scxml/file.scxml b/share/qtcreator/templates/wizards/files/scxml/file.scxml
new file mode 100644
index 0000000000..960867a73f
--- /dev/null
+++ b/share/qtcreator/templates/wizards/files/scxml/file.scxml
@@ -0,0 +1,3 @@
+<?xml version="1.0" ?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" name="%{Name}">
+</scxml>
diff --git a/share/qtcreator/templates/wizards/files/scxml/wizard.json b/share/qtcreator/templates/wizards/files/scxml/wizard.json
new file mode 100644
index 0000000000..263fa53074
--- /dev/null
+++ b/share/qtcreator/templates/wizards/files/scxml/wizard.json
@@ -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",
+ "platformIndependent": true,
+ "icon": "../../global/genericfilewizard.png",
+ "enabled": "%{JS: [ %{Plugins} ].indexOf('QtSupport') >= 0}",
+
+ "options":
+ [
+ { "key": "TargetPath", "value": "%{JS: Util.fileName('%{Location}/%{FileName}', '%{JS: 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: '%{Location}' === '' || !Util.exists('%{TargetPath}')}",
+ "trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
+ "data":
+ {
+ "kind": "existingDirectory",
+ "basePath": "%{InitialPath}",
+ "path": "%{InitialPath}"
+ }
+ }
+ ]
+ },
+ {
+ "trDisplayName": "Project Management",
+ "trShortTitle": "Summary",
+ "typeId": "Summary"
+ }
+ ],
+ "generators" :
+ [
+ {
+ "typeId": "File",
+ "data":
+ {
+ "source": "file.scxml",
+ "target": "%{TargetPath}",
+ "openInEditor": true
+ }
+ }
+ ]
+}