Merge pull request #2360 from github/nora/move-language-support

Move language support files
This commit is contained in:
Nora
2023-04-24 11:17:57 +02:00
committed by GitHub
5 changed files with 18 additions and 13 deletions

View File

@@ -36,7 +36,11 @@ import {
QueryHistoryConfigListener,
QueryServerConfigListener,
} from "./config";
import { install } from "./languageSupport";
import {
install,
spawnIdeServer,
getQueryEditorCommands,
} from "./language-support";
import { DatabaseManager } from "./local-databases";
import { DatabaseUI } from "./local-databases-ui";
import {
@@ -72,7 +76,6 @@ import {
getErrorMessage,
getErrorStack,
} from "./pure/helpers-pure";
import { spawnIdeServer } from "./ide-server";
import { ResultsView } from "./interface";
import { WebviewReveal } from "./interface-utils";
import {
@@ -118,7 +121,6 @@ import {
} from "./common/commands";
import { LocalQueries } from "./local-queries";
import { getAstCfgCommands } from "./ast-cfg-commands";
import { getQueryEditorCommands } from "./query-editor";
import { App } from "./common/app";
import { registerCommandWithErrorHandling } from "./common/vscode/commands";
import { DebuggerUI } from "./debugger/debugger-ui";

View File

@@ -1,8 +1,8 @@
import { ProgressLocation, window } from "vscode";
import { StreamInfo } from "vscode-languageclient/node";
import { shouldDebugIdeServer, spawnServer } from "./cli";
import { QueryServerConfig } from "./config";
import { ideServerLogger } from "./common";
import { shouldDebugIdeServer, spawnServer } from "../cli";
import { QueryServerConfig } from "../config";
import { ideServerLogger } from "../common";
/**
* Managing the language server for CodeQL.

View File

@@ -0,0 +1,3 @@
export * from "./ide-server";
export * from "./language-support";
export * from "./query-editor";

View File

@@ -12,7 +12,7 @@ import { languages, IndentAction, OnEnterRule } from "vscode";
*/
export function install() {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const langConfig = require("../language-configuration.json");
const langConfig = require("../../language-configuration.json");
// setLanguageConfiguration requires a regexp for the wordpattern, not a string
langConfig.wordPattern = new RegExp(langConfig.wordPattern);
langConfig.onEnterRules = onEnterRules;

View File

@@ -1,11 +1,11 @@
import { Uri, window } from "vscode";
import { CodeQLCliServer } from "./cli";
import { QueryRunner } from "./query-server";
import { CodeQLCliServer } from "../cli";
import { QueryRunner } from "../query-server";
import { basename, join } from "path";
import { getErrorMessage } from "./pure/helpers-pure";
import { redactableError } from "./pure/errors";
import { showAndLogExceptionWithTelemetry } from "./helpers";
import { AppCommandManager, QueryEditorCommands } from "./common/commands";
import { getErrorMessage } from "../pure/helpers-pure";
import { redactableError } from "../pure/errors";
import { showAndLogExceptionWithTelemetry } from "../helpers";
import { AppCommandManager, QueryEditorCommands } from "../common/commands";
type QueryEditorOptions = {
commandManager: AppCommandManager;