Skip to content

Commit

Permalink
Adds settings migration support
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Jun 7, 2017
1 parent 5328e56 commit 068b34b
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 76 deletions.
154 changes: 81 additions & 73 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,10 @@
"gitlens.advanced.menus": {
"type": "object",
"default": {
"explorerContext": {
"fileDiff": true,
"history": true,
"remote": true
},
"editorContext": {
"blame": true,
"copy": true,
"details": true,
"fileDiff": true,
"history": true,
"lineDiff": true,
Expand All @@ -533,44 +529,29 @@
"blame": true,
"fileDiff": true,
"history": true,
"remote": true,
"status": true
},
"editorTitleContext": {
"blame": true,
"fileDiff": true,
"history": true,
"remote": true
},
"explorerContext": {
"fileDiff": true,
"history": true,
"remote": true
}
},
"description": "Specifies which commands will be added to which menus",
"properties": {
"explorerContext": {
"type": "object",
"default": {
"fileDiff": true,
"history": true,
"remote": true
},
"properties": {
"fileDiff": {
"type": "boolean",
"default": true
},
"history": {
"type": "boolean",
"default": true
},
"remote": {
"type": "boolean",
"default": true
}
}
},
"editorContext": {
"type": "object",
"default": {
"blame": true,
"copy": true,
"details": true,
"fileDiff": true,
"history": true,
"lineDiff": true,
Expand Down Expand Up @@ -613,6 +594,7 @@
"blame": true,
"fileDiff": true,
"history": true,
"remote": true,
"status": true
},
"properties": {
Expand All @@ -628,6 +610,10 @@
"type": "boolean",
"default": true
},
"remote": {
"type": "boolean",
"default": true
},
"status": {
"type": "boolean",
"default": true
Expand Down Expand Up @@ -660,6 +646,28 @@
"default": true
}
}
},
"explorerContext": {
"type": "object",
"default": {
"fileDiff": true,
"history": true,
"remote": true
},
"properties": {
"fileDiff": {
"type": "boolean",
"default": true
},
"history": {
"type": "boolean",
"default": true
},
"remote": {
"type": "boolean",
"default": true
}
}
}
}
},
Expand Down Expand Up @@ -977,26 +985,56 @@
"when": "gitlens:enabled"
}
],
"explorer/context": [
"editor/context": [
{
"command": "gitlens.openFileInRemote",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote",
"when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote",
"group": "navigation@100"
},
{
"command": "gitlens.diffWithPrevious",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
"command": "gitlens.diffLineWithPrevious",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
"group": "1_gitlens@1"
},
{
"command": "gitlens.diffWithWorking",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
"command": "gitlens.diffLineWithWorking",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
"group": "1_gitlens@2"
},
{
"command": "gitlens.showQuickFileHistory",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history",
"command": "gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details",
"group": "1_gitlens@3"
},
{
"command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@1"
},
{
"command": "gitlens.diffWithWorking",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@2"
},
{
"command": "gitlens.showQuickFileHistory",
"when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history",
"group": "3_gitlens@1"
},
{
"command": "gitlens.toggleFileBlame",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame",
"group": "3_gitlens@2"
},
{
"command": "gitlens.copyShaToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@1"
},
{
"command": "gitlens.copyMessageToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@2"
}
],
"editor/title": [
Expand Down Expand Up @@ -1068,56 +1106,26 @@
"group": "1_gitlens_2@2"
}
],
"editor/context": [
"explorer/context": [
{
"command": "gitlens.openFileInRemote",
"when": "editorTextFocus && gitlens:isTracked && gitlens:hasRemotes && config.gitlens.advanced.menus.editorContext.remote",
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote",
"group": "navigation@100"
},
{
"command": "gitlens.diffLineWithPrevious",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
"group": "1_gitlens@1"
},
{
"command": "gitlens.diffLineWithWorking",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.lineDiff",
"group": "1_gitlens@2"
},
{
"command": "gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.details",
"group": "1_gitlens@3"
},
{
"command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@1"
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
"group": "1_gitlens@1"
},
{
"command": "gitlens.diffWithWorking",
"when": "editorTextFocus && gitlens:isTracked && config.gitlens.advanced.menus.editorContext.fileDiff",
"group": "1_gitlens_1@2"
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.fileDiff",
"group": "1_gitlens@2"
},
{
"command": "gitlens.showQuickFileHistory",
"when": "gitlens:isTracked && config.gitlens.advanced.menus.editorContext.history",
"group": "3_gitlens@1"
},
{
"command": "gitlens.toggleFileBlame",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.blame",
"group": "3_gitlens@2"
},
{
"command": "gitlens.copyShaToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@1"
},
{
"command": "gitlens.copyMessageToClipboard",
"when": "editorTextFocus && gitlens:isBlameable && config.gitlens.advanced.menus.editorContext.copy",
"group": "9_gitlens@2"
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.history",
"group": "1_gitlens_1@1"
}
]
},
Expand Down
Loading

0 comments on commit 068b34b

Please sign in to comment.