Skip to content

Commit 441b1f9

Browse files
authored
Merge pull request #128 from edgardmessias/rework_changes
Rework open changes and open files (Close #86)
2 parents fbabc36 + 5363f22 commit 441b1f9

File tree

9 files changed

+410
-56
lines changed

9 files changed

+410
-56
lines changed

icons/dark/open-change.svg

Lines changed: 1 addition & 0 deletions
Loading

icons/dark/open-file.svg

Lines changed: 1 addition & 0 deletions
Loading

icons/light/open-change.svg

Lines changed: 1 addition & 0 deletions
Loading

icons/light/open-file.svg

Lines changed: 3 additions & 0 deletions
Loading

package.json

Lines changed: 91 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,35 @@
8484
"category": "SVN"
8585
},
8686
{
87-
"command": "svn.openDiffHead",
88-
"title": "Diff Changes HEAD",
87+
"command": "svn.openChangeBase",
88+
"title": "Open Changes with BASE",
89+
"category": "SVN",
90+
"icon": {
91+
"light": "icons/light/open-change.svg",
92+
"dark": "icons/dark/open-change.svg"
93+
}
94+
},
95+
{
96+
"command": "svn.openChangeHead",
97+
"title": "Open Changes with HEAD",
98+
"category": "SVN",
99+
"icon": {
100+
"light": "icons/light/open-change.svg",
101+
"dark": "icons/dark/open-change.svg"
102+
}
103+
},
104+
{
105+
"command": "svn.openFile",
106+
"title": "Open File",
107+
"category": "SVN",
108+
"icon": {
109+
"light": "icons/light/open-file.svg",
110+
"dark": "icons/dark/open-file.svg"
111+
}
112+
},
113+
{
114+
"command": "svn.openHEADFile",
115+
"title": "Open File (HEAD)",
89116
"category": "SVN"
90117
},
91118
{
@@ -134,7 +161,24 @@
134161
}
135162
],
136163
"menus": {
137-
"commandPalette": [],
164+
"commandPalette": [
165+
{
166+
"command": "svn.openFile",
167+
"when": "config.svn.enabled"
168+
},
169+
{
170+
"command": "svn.openHEADFile",
171+
"when": "config.svn.enabled"
172+
},
173+
{
174+
"command": "svn.openChangeBase",
175+
"when": "config.svn.enabled"
176+
},
177+
{
178+
"command": "svn.openChangeHead",
179+
"when": "config.svn.enabled"
180+
}
181+
],
138182
"scm/title": [
139183
{
140184
"command": "svn.refresh",
@@ -176,6 +220,30 @@
176220
"config.svn.enabled && scmProvider == svn && scmResourceGroup == unversioned",
177221
"group": "1_modification"
178222
},
223+
{
224+
"command": "svn.openFile",
225+
"when":
226+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != external",
227+
"group": "navigation"
228+
},
229+
{
230+
"command": "svn.openHEADFile",
231+
"when":
232+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
233+
"group": "navigation"
234+
},
235+
{
236+
"command": "svn.openChangeBase",
237+
"when":
238+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
239+
"group": "navigation"
240+
},
241+
{
242+
"command": "svn.openChangeHead",
243+
"when":
244+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
245+
"group": "navigation"
246+
},
179247
{
180248
"command": "svn.addChangelist",
181249
"when":
@@ -206,12 +274,6 @@
206274
"scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
207275
"group": "1_modification"
208276
},
209-
{
210-
"command": "svn.openDiffHead",
211-
"when":
212-
"scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
213-
"group": "navigation"
214-
},
215277
{
216278
"command": "svn.revert",
217279
"when":
@@ -225,7 +287,26 @@
225287
"group": "2_modification"
226288
}
227289
],
228-
"editor/title": []
290+
"editor/title": [
291+
{
292+
"command": "svn.openFile",
293+
"group": "navigation",
294+
"when":
295+
"config.svn.enabled && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff"
296+
},
297+
{
298+
"command": "svn.openChangeBase",
299+
"group": "navigation",
300+
"when":
301+
"config.svn.enabled && !isInDiffEditor && resourceScheme == file"
302+
},
303+
{
304+
"command": "svn.openChangeHead",
305+
"group": "navigation",
306+
"when":
307+
"config.svn.enabled && !isInDiffEditor && resourceScheme == file"
308+
}
309+
]
229310
},
230311
"configuration": {
231312
"title": "Svn",

0 commit comments

Comments
 (0)