Skip to content

Commit 33e8db0

Browse files
committed
Full rework for open changes and open files (Close #86);
1 parent e210a9e commit 33e8db0

File tree

9 files changed

+414
-57
lines changed

9 files changed

+414
-57
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
{
@@ -124,7 +151,24 @@
124151
}
125152
],
126153
"menus": {
127-
"commandPalette": [],
154+
"commandPalette": [
155+
{
156+
"command": "svn.openFile",
157+
"when": "config.svn.enabled"
158+
},
159+
{
160+
"command": "svn.openHEADFile",
161+
"when": "config.svn.enabled"
162+
},
163+
{
164+
"command": "svn.openChangeBase",
165+
"when": "config.svn.enabled"
166+
},
167+
{
168+
"command": "svn.openChangeHead",
169+
"when": "config.svn.enabled"
170+
}
171+
],
128172
"scm/title": [
129173
{
130174
"command": "svn.refresh",
@@ -158,6 +202,30 @@
158202
"config.svn.enabled && scmProvider == svn && scmResourceGroup == unversioned",
159203
"group": "1_modification"
160204
},
205+
{
206+
"command": "svn.openFile",
207+
"when":
208+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != external",
209+
"group": "navigation"
210+
},
211+
{
212+
"command": "svn.openHEADFile",
213+
"when":
214+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
215+
"group": "navigation"
216+
},
217+
{
218+
"command": "svn.openChangeBase",
219+
"when":
220+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
221+
"group": "navigation"
222+
},
223+
{
224+
"command": "svn.openChangeHead",
225+
"when":
226+
"config.svn.enabled && scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
227+
"group": "navigation"
228+
},
161229
{
162230
"command": "svn.addChangelist",
163231
"when":
@@ -188,12 +256,6 @@
188256
"scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
189257
"group": "1_modification"
190258
},
191-
{
192-
"command": "svn.openDiffHead",
193-
"when":
194-
"scmProvider == svn && scmResourceGroup != unversioned && scmResourceGroup != external",
195-
"group": "navigation"
196-
},
197259
{
198260
"command": "svn.revert",
199261
"when":
@@ -207,7 +269,26 @@
207269
"group": "2_modification"
208270
}
209271
],
210-
"editor/title": []
272+
"editor/title": [
273+
{
274+
"command": "svn.openFile",
275+
"group": "navigation",
276+
"when":
277+
"config.svn.enabled && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff"
278+
},
279+
{
280+
"command": "svn.openChangeBase",
281+
"group": "navigation",
282+
"when":
283+
"config.svn.enabled && !isInDiffEditor && resourceScheme == file"
284+
},
285+
{
286+
"command": "svn.openChangeHead",
287+
"group": "navigation",
288+
"when":
289+
"config.svn.enabled && !isInDiffEditor && resourceScheme == file"
290+
}
291+
]
211292
},
212293
"configuration": {
213294
"title": "Svn",

0 commit comments

Comments
 (0)