Split codeQL.previewQueryHelp command
This commit is contained in:
@@ -476,6 +476,14 @@
|
||||
"command": "codeQL.previewQueryHelp",
|
||||
"title": "CodeQL: Preview Query Help"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.previewQueryHelpContextExplorer",
|
||||
"title": "CodeQL: Preview Query Help"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.previewQueryHelpContextEditor",
|
||||
"title": "CodeQL: Preview Query Help"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.quickQuery",
|
||||
"title": "CodeQL: Quick Query"
|
||||
@@ -1122,7 +1130,7 @@
|
||||
"when": "resourceExtname == .qlref"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.previewQueryHelp",
|
||||
"command": "codeQL.previewQueryHelpContextExplorer",
|
||||
"group": "9_qlCommands",
|
||||
"when": "resourceExtname == .qhelp && isWorkspaceTrusted"
|
||||
}
|
||||
@@ -1208,6 +1216,14 @@
|
||||
"command": "codeQL.previewQueryHelp",
|
||||
"when": "resourceExtname == .qhelp && isWorkspaceTrusted"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.previewQueryHelpContextEditor",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.previewQueryHelpContextExplorer",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.setCurrentDatabase",
|
||||
"when": "false"
|
||||
@@ -1519,7 +1535,7 @@
|
||||
"when": "resourceExtname == .qlref"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.previewQueryHelp",
|
||||
"command": "codeQL.previewQueryHelpContextEditor",
|
||||
"when": "resourceExtname == .qhelp && isWorkspaceTrusted"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -115,6 +115,10 @@ export type QueryEditorCommands = {
|
||||
selectedQuery: Uri,
|
||||
) => Promise<void>;
|
||||
"codeQL.previewQueryHelp": (selectedQuery: Uri) => Promise<void>;
|
||||
"codeQL.previewQueryHelpContextEditor": (selectedQuery: Uri) => Promise<void>;
|
||||
"codeQL.previewQueryHelpContextExplorer": (
|
||||
selectedQuery: Uri,
|
||||
) => Promise<void>;
|
||||
};
|
||||
|
||||
// Commands used for running local queries
|
||||
|
||||
@@ -38,6 +38,20 @@ export function getQueryEditorCommands({
|
||||
qhelpTmpDir,
|
||||
selectedQuery,
|
||||
),
|
||||
"codeQL.previewQueryHelpContextEditor": async (selectedQuery: Uri) =>
|
||||
await previewQueryHelp(
|
||||
commandManager,
|
||||
cliServer,
|
||||
qhelpTmpDir,
|
||||
selectedQuery,
|
||||
),
|
||||
"codeQL.previewQueryHelpContextExplorer": async (selectedQuery: Uri) =>
|
||||
await previewQueryHelp(
|
||||
commandManager,
|
||||
cliServer,
|
||||
qhelpTmpDir,
|
||||
selectedQuery,
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user