diff --git a/.vscode/settings.json b/.vscode/settings.json index ed0c728..a4e4286 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "cSpell.enabled": true, "cSpell.words": [ - "cgedebug", + "castleDebug", "cnoc", "FPCDIR", "fpcsrc", diff --git a/README.md b/README.md index 665b440..733b490 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The extension helps developing Castle Game Engine (CGE) applications: * Simplifies the setup as much as possible by providing: * the ability to automatically configure compilation, build, run and clean the game/application without writing any tasks.json file - * the ability to automatically configure debug by choosing `cgedebug` \(it uses [Free Pascal (fpc) Debugger](https://marketplace.visualstudio.com/items?itemName=CNOC.fpdebug) extension underneath\) without writing any launch.json file + * the ability to automatically configure debug by choosing `castleDebug` \(it uses [Free Pascal (fpc) Debugger](https://marketplace.visualstudio.com/items?itemName=CNOC.fpdebug) extension underneath\) without writing any launch.json file * Pascal Language Server (pasls) automatic configuration system * code completion (e.g. `Ctrl` + `Space`) thanks to Pascal Language Server * current file procedure list (`Ctrl` + `Shift` + `O`): @@ -73,7 +73,7 @@ This extension contributes the following settings: ## Known Issues This the first extension release so we lack some features: -* `cgedebug`/`fpDebug` doesn't work on macOS. +* `castleDebug`/`fpDebug` doesn't work on macOS. * The extension doesn't work in _restricted_ mode. You need to _trust_ the folder. * The extension doesn't support workspaces with multiple folders, where one of them is CGE project. * Show documentation (generated by PasDoc) as a popup in VS Code. diff --git a/package.json b/package.json index b159b55..bd21c22 100644 --- a/package.json +++ b/package.json @@ -48,41 +48,41 @@ ], "debuggers": [ { - "type": "cgedebug" + "type": "castleDebug" } ], "commands": [ { - "command": "castle-engine.compileGame", - "title": "Compile Game (CGE)" + "command": "castle-engine.compile", + "title": "Compile (Castle Game Engine)" }, { - "command": "castle-engine.runGame", - "title": "Run Game (CGE)" + "command": "castle-engine.run", + "title": "Run (Castle Game Engine)" }, { - "command": "castle-engine.cleanGame", - "title": "Clean Game (CGE)" + "command": "castle-engine.clean", + "title": "Clean (Castle Game Engine)" }, { "command": "castle-engine.showBuildModeSelectionInStatusBar", - "title": "Select Build Mode (CGE)" + "title": "Select Build Mode (Castle Game Engine)" }, { "command": "castle-engine.openWorkspaceInCastleEditor", - "title": "Open In Castle Editor (CGE)" + "title": "Open In Castle Editor (Castle Game Engine)" }, { "command": "castle-engine.validateAndOpenSettings", - "title": "Validate and open settings" + "title": "Validate and Open Settings" }, { - "command": "castle-engine.searchInCGEApiReference", - "title": "Search in Api Reference (CGE)" + "command": "castle-engine.searchInApiReference", + "title": "Search in Api Reference (Castle Game Engine)" }, { - "command": "castle-engine.backInCGEApiReference", - "title": "Go back in Api Reference (CGE)" + "command": "castle-engine.backInApiReference", + "title": "Go Back in Api Reference (Castle Game Engine)" } ], "configuration": { @@ -122,7 +122,7 @@ "menus": { "webview/context": [ { - "command": "castle-engine.backInCGEApiReference", + "command": "castle-engine.backInApiReference", "when": "webviewId == 'cge_api_reference'" } ] @@ -152,18 +152,18 @@ ], "keybindings": [ { - "command": "castle-engine.compileGame", + "command": "castle-engine.compile", "key": "ctrl+f9", "mac": "cmd+f9", "when": "editorTextFocus" }, { - "command": "castle-engine.runGame", + "command": "castle-engine.run", "key": "shift+f9", "when": "editorTextFocus" }, { - "command": "castle-engine.searchInCGEApiReference", + "command": "castle-engine.searchInApiReference", "key": "ctrl+f1", "mac": "cmd+f1", "when": "editorTextFocus" diff --git a/src/castleConfiguration.js b/src/castleConfiguration.js index 527c85a..d275d26 100644 --- a/src/castleConfiguration.js +++ b/src/castleConfiguration.js @@ -28,14 +28,14 @@ class CastleConfiguration { this.recompilationNeeded = true; this._commandId = { showBuildModes: 'castle-engine.showBuildModeSelectionInStatusBar', - compileGame: 'castle-engine.compileGame', - runGame: 'castle-engine.runGame', - cleanGame: 'castle-engine.cleanGame', - debugGame: 'workbench.action.debug.start', + compile: 'castle-engine.compile', + run: 'castle-engine.run', + clean: 'castle-engine.clean', + debug: 'workbench.action.debug.start', openInCastleEditor: 'castle-engine.openWorkspaceInCastleEditor', validateAndOpenSettings: 'castle-engine.validateAndOpenSettings', - searchInCGEApiReference: 'castle-engine.searchInCGEApiReference', - backInCGEApiReference: 'castle-engine.backInCGEApiReference' + searchInApiReference: 'castle-engine.searchInApiReference', + backInApiReference: 'castle-engine.backInApiReference' }; this._buildToolPath = ''; this._enginePath = ''; diff --git a/src/castleDebugProvider.js b/src/castleDebugProvider.js index c55a301..44a11bc 100644 --- a/src/castleDebugProvider.js +++ b/src/castleDebugProvider.js @@ -3,13 +3,13 @@ const castleExec = require('./castleExec.js'); const castleConfiguration = require('./castleConfiguration.js'); /** - * Castle Debug Provider that uses fpDebug to start debug session without - * configuration. Just choose "cgedebug" after hiting F5. + * Castle Debug Provider that uses fpDebug to start debug session without + * configuration. Just choose "castleDebug" after hitting F5. */ class CastleDebugProvider { /** - * @param {castleConfiguration.CastleConfiguration} castleConfig + * @param {castleConfiguration.CastleConfiguration} castleConfig */ constructor(castleConfig) { this._castleConfig = castleConfig; @@ -25,13 +25,13 @@ class CastleDebugProvider { if ((config.type == undefined) && (config.request == undefined) && (config.name == undefined)) { - // this._castleConfig.buildToolPath can be changed when - // debug configuration provider is created and + // this._castleConfig.buildToolPath can be changed when + // debug configuration provider is created and // new configuration can be not valid when buildToolPath === '' if (this._castleConfig.buildToolPath === '') return undefined; // abort launch - config.type = 'fpDebug'; // cgedebug is used only as alias for fpDebug + config.type = 'fpDebug'; // castleDebug is used only as alias for fpDebug config.name = 'Debug CGE Game with fpDebug'; config.request = 'launch'; let executableName = await castleExec.executeFileAndReturnValue(this._castleConfig.buildToolPath, ['output', 'executable-name']); @@ -75,14 +75,14 @@ class CastleDebugProvider { } /** - * This function does nothing but must be defined to show cgedebug outside Pascal files e.g. after open folder in vscode. - * @param {undefined | WorkspaceFolder} folder - * @param {CancellationToken} token + * This function does nothing but must be defined to show castleDebug outside Pascal files e.g. after open folder in vscode. + * @param {undefined | WorkspaceFolder} folder + * @param {CancellationToken} token */ provideDebugConfigurations(folder, token) { console.log('provideDebugConfigurations - START'); console.log('provideDebugConfigurations - STOP'); - } + } } module.exports = CastleDebugProvider; \ No newline at end of file diff --git a/src/castlePlugin.js b/src/castlePlugin.js index 661a204..1dbdd42 100644 --- a/src/castlePlugin.js +++ b/src/castlePlugin.js @@ -116,21 +116,21 @@ class CastlePlugin { } if (this._taskCommandsRegistered === false) { - this._disposableCompileGame = vscode.commands.registerCommand(this._castleConfig.commandId.compileGame, () => { - vscode.tasks.executeTask(this._castleTaskProvider.compileGameTask); + this._disposableCompile = vscode.commands.registerCommand(this._castleConfig.commandId.compile, () => { + vscode.tasks.executeTask(this._castleTaskProvider.compileTask); }); - this._context.subscriptions.push(this._disposableCompileGame); + this._context.subscriptions.push(this._disposableCompile); - this._disposableRunGame = vscode.commands.registerCommand(this._castleConfig.commandId.runGame, () => { + this._disposableRun = vscode.commands.registerCommand(this._castleConfig.commandId.run, () => { this._castleTaskProvider.updateCastleTasks(); - vscode.tasks.executeTask(this._castleTaskProvider.runGameTask); + vscode.tasks.executeTask(this._castleTaskProvider.runTask); }); - this._context.subscriptions.push(this._disposableRunGame); + this._context.subscriptions.push(this._disposableRun); - this._disposableCleanGame = vscode.commands.registerCommand(this._castleConfig.commandId.cleanGame, () => { - vscode.tasks.executeTask(this._castleTaskProvider.cleanGameTask); + this._disposableClean = vscode.commands.registerCommand(this._castleConfig.commandId.clean, () => { + vscode.tasks.executeTask(this._castleTaskProvider.cleanTask); }); - this._context.subscriptions.push(this._disposableCleanGame); + this._context.subscriptions.push(this._disposableClean); this._taskCommandsRegistered = true; } @@ -138,14 +138,14 @@ class CastlePlugin { else { if (this._taskCommandsRegistered === true) { // when there is no build tool availble - this._disposableCompileGame.dispose(); - this._disposableCompileGame = null; + this._disposableCompile.dispose(); + this._disposableCompile = null; - this._disposableRunGame.dispose(); - this._disposableCompileGame = null; + this._disposableRun.dispose(); + this._disposableRun = null; - this._disposableCleanGame.dispose(); - this._disposableCleanGame = null; + this._disposableClean.dispose(); + this._disposableClean = null; this._taskCommandsRegistered = false; } @@ -176,7 +176,7 @@ class CastlePlugin { updateSearchInApiReferenceCommands() { if (this._searchInApiReferenceCommandsRegistered === false) { - this._disposableSearchInApiReference = vscode.commands.registerCommand(this._castleConfig.commandId.searchInCGEApiReference, () => { + this._disposableSearchInApiReference = vscode.commands.registerCommand(this._castleConfig.commandId.searchInApiReference, () => { let wordToSearch = ''; const editor = vscode.window.activeTextEditor; if (editor) { @@ -216,7 +216,7 @@ class CastlePlugin { margin: 0; padding: 0; } - #cgeApiReferenceFrame { + #ApiReferenceFrame { height: 100%; width: 100%; border: none; @@ -240,17 +240,17 @@ class CastlePlugin { } }); -