Skip to content

Commit

Permalink
Added submenues (#184)
Browse files Browse the repository at this point in the history
* Added submenu
Added editor title commands

* Handle internal processes
  • Loading branch information
fr43nk authored Nov 21, 2024
1 parent db3d15e commit 6c104d4
Show file tree
Hide file tree
Showing 7 changed files with 353 additions and 178 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[![CodeFactor](https://www.codefactor.io/repository/github/openningia/vscode-clearcase/badge)](https://www.codefactor.io/repository/github/openningia/vscode-clearcase)
[![.github/workflows/publish.yml](https://github.com/OpenNingia/vscode-clearcase/actions/workflows/publish.yml/badge.svg)](https://github.com/OpenNingia/vscode-clearcase/actions/workflows/publish.yml)
[![Test on master](https://github.com/OpenNingia/vscode-clearcase/actions/workflows/integrate_test.yml/badge.svg)](https://github.com/OpenNingia/vscode-clearcase/actions/workflows/integrate_test.yml)
![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/OpenNingia.vscode-clearcase)
![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/OpenNingia.vscode-clearcase)

# VS Code ClearCase

Expand Down
127 changes: 103 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-clearcase",
"displayName": "Unofficial ClearCase SCM Commands",
"description": "Unofficial support for IBM Rational ClearCase most common commands",
"version": "5.0.0",
"version": "5.1.0-beta.1",
"publisher": "OpenNingia",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -47,7 +47,8 @@
{
"command": "extension.ccHijack",
"title": "Hijack",
"category": "Clearcase"
"category": "Clearcase",
"icon": "$(go-to-editing-session)"
},
{
"command": "extension.ccUndoHijack",
Expand Down Expand Up @@ -76,7 +77,8 @@
{
"command": "extension.ccVersionTree",
"title": "Version Tree",
"category": "Clearcase"
"category": "Clearcase",
"icon": "$(type-hierarchy-sub)"
},
{
"command": "extension.ccComparePrevious",
Expand All @@ -86,7 +88,7 @@
},
{
"command": "extension.ccCompareWithVersion",
"title": "Compare with version",
"title": "Compare with version ...",
"category": "Clearcase",
"icon": "$(diff-single)"
},
Expand Down Expand Up @@ -159,7 +161,8 @@
{
"command": "extension.ccAnnotate",
"title": "Annotate",
"category": "Clearcase"
"category": "Clearcase",
"icon": "$(comment)"
},
{
"command": "extension.ccSelectActv",
Expand All @@ -184,6 +187,18 @@
"icon": "$(add)"
}
],
"submenus": [
{
"id": "vscode-clearcase.explorer_context_submenu",
"icon": "$(source-control)",
"label": "Clearcase"
},
{
"id": "vscode-clearcase.editor_context_submenu",
"icon": "$(source-control)",
"label": "Clearcase"
}
],
"menus": {
"commandPalette": [
{
Expand All @@ -192,23 +207,23 @@
},
{
"command": "extension.ccCheckout",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects && resourcePath not in vscode-clearcase:CheckedoutObjects"
},
{
"command": "extension.ccCheckin",
"when": "vscode-clearcase:enabled && resourcePath in vscode-clearcase:CheckedoutObjects"
},
{
"command": "extension.ccVersionTree",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccComparePrevious",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccCompareWithVersion",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccUndoCheckout",
Expand All @@ -224,7 +239,7 @@
},
{
"command": "extension.ccItemProperties",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccUpdateView",
Expand All @@ -236,41 +251,52 @@
},
{
"command": "extension.ccUpdateFile",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccAnnotate",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects && resourcePath not in vscode-clearcase:HijackedObjects && resourcePath not in vscode-clearcase:CheckedoutObjects"
},
{
"command": "extension.ccSelectActv",
"when": "vscode-clearcase:enabled"
},
{
"command": "extension.ccMkElement",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath in vscode-clearcase:ViewPrivateObjects"
}
],
"explorer/context": [
{
"submenu": "vscode-clearcase.explorer_context_submenu",
"group": "clearcase"
}
],
"vscode-clearcase.explorer_context_submenu": [
{
"command": "extension.ccUpdateFile",
"group": "cc@10",
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView"
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccMkElement",
"group": "cc@5",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccCompareWithVersion",
"group": "cc@5",
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccVersionTree",
"group": "cc@12",
"when": "vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects && resourcePath not in vscode-clearcase:HijackedObjects"
},
{
"command": "extension.ccCheckout",
"group": "cc@2",
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:CheckedoutObjects"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccItemProperties",
Expand All @@ -290,15 +316,68 @@
{
"command": "extension.ccHijack",
"group": "cc@5",
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:HijackedObjects"
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:HijackedObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccUndoHijack",
"group": "cc@5",
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath in vscode-clearcase:HijackedObjects"
}
],
"editor/title": [
{
"command": "extension.ccAnnotate",
"group": "navigation@100",
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:HijackedObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccCompareWithVersion",
"group": "navigation@101",
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccCheckout",
"group": "navigation@102",
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccCheckin",
"group": "navigation@103",
"when": "vscode-clearcase:enabled && resourcePath in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccUndoCheckout",
"group": "navigation@104",
"when": "vscode-clearcase:enabled && resourcePath in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccHijack",
"group": "navigation@105",
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath not in vscode-clearcase:HijackedObjects && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccUndoHijack",
"group": "navigation@106",
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath in vscode-clearcase:HijackedObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccMkElement",
"group": "navigation@107",
"when": "vscode-clearcase:enabled && resourcePath in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
},
{
"command": "extension.ccVersionTree",
"group": "navigation@108",
"when": "editorTextFocus && !inOutput && vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects && vscode-clearcase:editor == true"
}
],
"editor/context": [
{
"submenu": "vscode-clearcase.editor_context_submenu",
"group": "clearcase"
}
],
"vscode-clearcase.editor_context_submenu": [
{
"command": "extension.ccUndoCheckout",
"group": "cc@4",
Expand All @@ -325,9 +404,9 @@
"when": "vscode-clearcase:enabled && !vscode-clearcase:DynView && resourcePath not in vscode-clearcase:CheckedoutObjects && resourcePath in vscode-clearcase:HijackedObjects"
},
{
"command": "extension.ccComparePrevious",
"command": "extension.ccCompareWithVersion",
"group": "cc@5",
"when": "editorTextFocus && !inOutput && vscode-clearcase:enabled"
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccVersionTree",
Expand Down Expand Up @@ -409,9 +488,9 @@
"group": "cc_file"
},
{
"command": "extension.ccComparePrevious",
"when": "scmProvider == cc && scmResourceGroup != cc_untracked && vscode-clearcase:enabled",
"group": "cc_file"
"command": "extension.ccCompareWithVersion",
"group": "cc_file",
"when": "vscode-clearcase:enabled && resourcePath not in vscode-clearcase:ViewPrivateObjects"
},
{
"command": "extension.ccVersionTree",
Expand Down Expand Up @@ -530,7 +609,7 @@
},
"vscode-clearcase.annotation.showAnnotationCodeLens": {
"type": "boolean",
"default": true,
"default": false,
"markdownDescription": "Enable the 'Toggle Annotate' code lens.",
"order": 20
},
Expand Down
Loading

0 comments on commit 6c104d4

Please sign in to comment.