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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
{
"version": 1,
"supportedProjectTypes": [ "UNKNOWN_PROJECT" ],
"id": "G.Git",
"category": "T.Import",
"trDescription": "Clones a Git repository and tries to load the contained project.",
"trDisplayName": "Git Clone",
"trDisplayCategory": "Import Project",
"icon": "icon.png",
"enabled": "%{JS: value('Plugins').indexOf('Git') >= 0}",
"options":
[
{ "key": "vcsId", "value": "G.Git" },
{ "key": "vcsName", "value": "%{JS: Vcs.displayName('%{vcsId}')}" },
{ "key": "SR", "value": "%{JS: '%{Repo}'.replace(/[.]git$/, '') }"},
{ "key": "defaultDir", "value": "%{JS: '%{SR}'.substr('%{SR}'.lastIndexOf('/') + 1).replace(/[.]/g, '-') }"},
{ "key": "branchArg", "value": "%{JS: '%{Branch}' ? '--branch' : '' }" },
{ "key": "TargetPath", "value": "%{Path}/%{Dir}" }
],
"pages":
[
{
"trDisplayName": "Configuration",
"trShortTitle": "Configuration",
"trSubTitle": "Please configure <b>%{vcsName}</b> now.",
"typeId": "VcsConfiguration",
"enabled": "%{JS: !Vcs.isConfigured('%{vcsId}')}",
"data": { "vcsId": "%{vcsId}" }
},
{
"trDisplayName": "Location",
"trShortTitle": "Location",
"trSubTitle": "Specify repository URL, branch, checkout directory, and path.",
"typeId": "Fields",
"data" :
[
{
"name": "Repo",
"trDisplayName": "Repository:",
"type": "LineEdit",
"isComplete": "%{JS: Vcs.isValidRepoUrl('%{vcsId}', '%{Repo}')}",
"trIncompleteMessage": "Repository URL is not valid",
"data":
{
"historyId": "Git.RemoteUrls"
}
},
{
"name": "Branch",
"trDisplayName": "Branch:",
"type": "LineEdit",
"mandatory": false,
"data":
{
"trPlaceholder": "<default branch>"
}
},
{
"name": "Sp1",
"type": "Spacer",
"data": { "factor": 2 }
},
{
"name": "Path",
"trDisplayName": "Path:",
"type": "PathChooser",
"data":
{
"kind": "existingDirectory",
"basePath": "%{InitialPath}",
"path": "%{InitialPath}"
}
},
{
"name": "Dir",
"trDisplayName": "Directory:",
"type": "LineEdit",
"isComplete": "%{JS: '%{Dir}' === '' || !Util.exists('%{TargetPath}')}",
"trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
"data":
{
"trText": "%{defaultDir}"
}
},
{
"name": "Sp2",
"type": "Spacer",
"data": { "factor": 2 }
},
{
"name": "Recursive",
"trDisplayName": "Recursive",
"trToolTip": "Recursively initialize submodules.",
"type": "CheckBox",
"data":
{
"checkedValue": "--recursive",
"uncheckedValue": ""
}
}
]
},
{
"trDisplayName": "Checkout",
"trShortTitle": "Checkout",
"typeId": "VcsCommand",
"data" :
{
"vcsId": "%{vcsId}",
"trRunMessage": "Running Git clone...",
"repository": "%{Repo}",
"baseDirectory": "%{Path}",
"checkoutName": "%{Dir}",
"extraArguments": [ "%{Recursive}", "%{branchArg}", "%{Branch}" ]
}
}
],
"generators":
[
{
"typeId": "Scanner",
"data": {
"subdirectoryPatterns": [ "^src$" ]
}
}
]
}
|