aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/templates/wizards/files/modeling/wizard.json
blob: 2f8cff689a1ce41d7205007135fbe3d9a25003fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
    "version": 1,
    "supportedProjectTypes": [ ],
    "id": "SA.Model",
    "category": "O.Model",
    "trDescription": "Creates a new empty model with an empty diagram.",
    "trDisplayName": "Model",
    "trDisplayCategory": "Modeling",
    "iconText": "qmodel",
    "platformIndependent": true,
    "enabled": "%{JS: [ %{Plugins} ].indexOf('ModelEditor') >= 0}",

    "options":
    [
        { "key": "TargetPath", "value": "%{JS: Util.fileName('%{Location}/%{FileName}', '%{JS: Util.preferredSuffix('text/vnd.qtcreator.model')}')}" },
        { "key": "FileName", "value": "%{JS: Modeling.elementNameToFileName('%{Name}')}" }
    ],

    "pages" :
    [
        {
            "trDisplayName": "Model Name and Location",
            "trShortTitle": "Location",
            "typeId": "Fields",
            "data":
            [
                {
                    "name": "Name",
                    "trDisplayName": "Model 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.qmodel",
                "target": "%{TargetPath}",
                "openInEditor": true,
                "options":
                [
                    { "key": "UUID1", "value": "%{UUID}", "evaluate": true },
                    { "key": "UUID2", "value": "%{UUID}", "evaluate": true },
                    { "key": "UUID3", "value": "%{UUID}", "evaluate": true }
                ]
            }
        }
    ]
}