Skip to content

Commit 068b34b

Browse files
committed
Adds settings migration support
1 parent 5328e56 commit 068b34b

File tree

2 files changed

+209
-76
lines changed

2 files changed

+209
-76
lines changed

package.json

Lines changed: 81 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -516,14 +516,10 @@
516516
"gitlens.advanced.menus": {
517517
"type": "object",
518518
"default": {
519-
"explorerContext": {
520-
"fileDiff": true,
521-
"history": true,
522-
"remote": true
523-
},
524519
"editorContext": {
525520
"blame": true,
526521
"copy": true,
522+
"details": true,
527523
"fileDiff": true,
528524
"history": true,
529525
"lineDiff": true,
@@ -533,44 +529,29 @@
533529
"blame": true,
534530
"fileDiff": true,
535531
"history": true,
532+
"remote": true,
536533
"status": true
537534
},
538535
"editorTitleContext": {
539536
"blame": true,
540537
"fileDiff": true,
541538
"history": true,
542539
"remote": true
540+
},
541+
"explorerContext": {
542+
"fileDiff": true,
543+
"history": true,
544+
"remote": true
543545
}
544546
},
545547
"description": "Specifies which commands will be added to which menus",
546548
"properties": {
547-
"explorerContext": {
548-
"type": "object",
549-
"default": {
550-
"fileDiff": true,
551-
"history": true,
552-
"remote": true
553-
},
554-
"properties": {
555-
"fileDiff": {
556-
"type": "boolean",
557-
"default": true
558-
},
559-
"history": {
560-
"type": "boolean",
561-
"default": true
562-
},
563-
"remote": {
564-
"type": "boolean",
565-
"default": true
566-
}
567-
}
568-
},
569549
"editorContext": {
570550
"type": "object",
571551
"default": {
572552
"blame": true,
573553
"copy": true,
554+
"details": true,
574555
"fileDiff": true,
575556
"history": true,
576557
"lineDiff": true,
@@ -613,6 +594,7 @@
613594
"blame": true,
614595
"fileDiff": true,
615596
"history": true,
597+
"remote": true,
616598
"status": true
617599
},
618600
"properties": {
@@ -628,6 +610,10 @@
628610
"type": "boolean",
629611
"default": true
630612
},
613+
"remote": {
614+
"type": "boolean",
615+
"default": true
616+
},
631617
"status": {
632618
"type": "boolean",
633619
"default": true
@@ -660,6 +646,28 @@
660646
"default": true
661647
}
662648
}
649+
},
650+
"explorerContext": {
651+
"type": "object",
652+
"default": {
653+
"fileDiff": true,
654+
"history": true,
655+
"remote": true
656+
},
657+
"properties": {
658+
"fileDiff": {
659+
"type": "boolean",
660+
"default": true
661+
},
662+
"history": {
663+
"type": "boolean",
664+
"default": true
665+
},
666+
"remote": {
667+
"type": "boolean",
668+
"default": true
669+
}
670+
}
663671
}
664672
}
665673
},
@@ -977,26 +985,56 @@
977985
"when": "gitlens:enabled"
978986
}
979987
],
980-
"explorer/context": [
988+
"editor/context": [
981989
{
982990
"command": "gitlens.openFileInRemote",
983-
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote",
991+
"when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote",
984992
"group": "navigation@100"
985993
},
986994
{
987-
"command": "gitlens.diffWithPrevious",
988-
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
995+
"command": "gitlens.diffLineWithPrevious",
996+
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
989997
"group": "1_gitlens@1"
990998
},
991999
{
992-
"command": "gitlens.diffWithWorking",
993-
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
1000+
"command": "gitlens.diffLineWithWorking",
1001+
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
9941002
"group": "1_gitlens@2"
9951003
},
9961004
{
997-
"command": "gitlens.showQuickFileHistory",
998-
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history",
1005+
"command": "gitlens.showQuickCommitFileDetails",
1006+
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details",
1007+
"group": "1_gitlens@3"
1008+
},
1009+
{
1010+
"command": "gitlens.diffWithPrevious",
1011+
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
9991012
"group": "1_gitlens_1@1"
1013+
},
1014+
{
1015+
"command": "gitlens.diffWithWorking",
1016+
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
1017+
"group": "1_gitlens_1@2"
1018+
},
1019+
{
1020+
"command": "gitlens.showQuickFileHistory",
1021+
"when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history",
1022+
"group": "3_gitlens@1"
1023+
},
1024+
{
1025+
"command": "gitlens.toggleFileBlame",
1026+
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame",
1027+
"group": "3_gitlens@2"
1028+
},
1029+
{
1030+
"command": "gitlens.copyShaToClipboard",
1031+
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
1032+
"group": "9_gitlens@1"
1033+
},
1034+
{
1035+
"command": "gitlens.copyMessageToClipboard",
1036+
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
1037+
"group": "9_gitlens@2"
10001038
}
10011039
],
10021040
"editor/title": [
@@ -1068,56 +1106,26 @@
10681106
"group": "1_gitlens_2@2"
10691107
}
10701108
],
1071-
"editor/context": [
1109+
"explorer/context": [
10721110
{
10731111
"command": "gitlens.openFileInRemote",
1074-
"when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote",
1112+
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote",
10751113
"group": "navigation@100"
10761114
},
1077-
{
1078-
"command": "gitlens.diffLineWithPrevious",
1079-
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
1080-
"group": "1_gitlens@1"
1081-
},
1082-
{
1083-
"command": "gitlens.diffLineWithWorking",
1084-
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
1085-
"group": "1_gitlens@2"
1086-
},
1087-
{
1088-
"command": "gitlens.showQuickCommitFileDetails",
1089-
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details",
1090-
"group": "1_gitlens@3"
1091-
},
10921115
{
10931116
"command": "gitlens.diffWithPrevious",
1094-
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
1095-
"group": "1_gitlens_1@1"
1117+
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
1118+
"group": "1_gitlens@1"
10961119
},
10971120
{
10981121
"command": "gitlens.diffWithWorking",
1099-
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
1100-
"group": "1_gitlens_1@2"
1122+
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
1123+
"group": "1_gitlens@2"
11011124
},
11021125
{
11031126
"command": "gitlens.showQuickFileHistory",
1104-
"when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history",
1105-
"group": "3_gitlens@1"
1106-
},
1107-
{
1108-
"command": "gitlens.toggleFileBlame",
1109-
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame",
1110-
"group": "3_gitlens@2"
1111-
},
1112-
{
1113-
"command": "gitlens.copyShaToClipboard",
1114-
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
1115-
"group": "9_gitlens@1"
1116-
},
1117-
{
1118-
"command": "gitlens.copyMessageToClipboard",
1119-
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
1120-
"group": "9_gitlens@2"
1127+
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history",
1128+
"group": "1_gitlens_1@1"
11211129
}
11221130
]
11231131
},

0 commit comments

Comments
 (0)