diff --git a/.vscodeignore b/.vscodeignore index f5759a0..3c7d9d9 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -6,7 +6,6 @@ src/** .prettierrc CONTRIBUTING.md CONVENTIONS.MD -LICENSE **/tsconfig.json **/eslint.config.mjs **/*.map diff --git a/README.md b/README.md index 8f78b57..68f0af4 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,18 @@ features *Go to Definition* for elements and semantic model validation. ## Configuration -- `turtle.languageServerSettings.activateEmbeddedLanguageServer` (boolean, default: `true`) +- `semantic-models.languageServerSettings.activateEmbeddedLanguageServer` (boolean, default: `true`) - When enabled, the extension starts the SAMM language server process. When disabled, an external language server must be started manually. -- `turtle.languageServerSettings.automaticUpdateCheck` (boolean, default: `true`) +- `semantic-models.languageServerSettings.automaticUpdateCheck` (boolean, default: `true`) - Automatically check for updates to the SAMM language server and notify when a new version is available. -- `turtle.languageServerSettings.sammCliPath` (string) +- `semantic-models.languageServerSettings.sammCliPath` (string) - Path to the SAMM CLI executable or JAR file to use as the language server. Can be downloaded or selected using the 'Select SAMM CLI Executable' command. -- `turtle.languageServerSettings.serverPort` (number, default: `1846`) +- `semantic-models.languageServerSettings.serverPort` (number, default: `1846`) - TCP port used to connect to the SAMM language server. -- `turtle.languageServerSettings.traceLevel` (string, default: `off`) +- `semantic-models.languageServerSettings.traceLevel` (string, default: `off`) - Controls the verbosity of Language Server Protocol (LSP) tracing. Options: `off`, `messages`, `verbose`. -Use the command `Turtle: Select SAMM CLI Executable` to choose either: +Use the command `Semantic Models: Select SAMM CLI Executable` to choose either: - one of the latest SAMM CLI GitHub releases, or - a custom executable path from your local file system. @@ -31,7 +31,7 @@ Use the command `Turtle: Select SAMM CLI Executable` to choose either: - Fast validation while typing from the regular Turtle parser diagnostics provided by the server (appear in the editor and `Problems`). - Full Aspect validation from the server for model-level issues (results shown in notifications and status bar). - Manual validation command: - - `Turtle: Validate Document Now` + - `Semantic Models: Validate Document Now` ## Running the Server and Extension Together @@ -62,15 +62,15 @@ When each validation runs: - On type: fast syntax feedback only. - On save: heavy Aspect validation for Turtle documents. -- Manual: `Turtle: Validate Document Now` for the active Turtle document. +- Manual: `Semantic Models: Validate Document Now` for the active Turtle document. ## Commands -- `Turtle: Validate Document Now` +- `Semantic Models: Validate Document Now` - Sends a server request for the active Turtle document. -- `Turtle: Select SAMM CLI Executable` +- `Semantic Models: Select SAMM CLI Executable` - Opens a quick pick with the latest ten GitHub releases and a custom-path option. -- `Turtle: Restart Language Server Connection` +- `Semantic Models: Restart Language Server Connection` - Restarts the language server and reconnects the client. ## UX During Long-Running Validation @@ -102,7 +102,7 @@ Use [samples/org.eclipse.esmf.test/1.0.0/Aspect.ttl](samples/org.eclipse.esmf.te Manual check: 1. Open an Aspect model file. -2. Run `Turtle: Validate document now`. +2. Run `Semantic Models: Validate Document Now`. 3. Wait for validation to complete. 4. Confirm that validation results are displayed in a notification. diff --git a/package-lock.json b/package-lock.json index 6a2d563..04c2e22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "turtle", + "name": "semantic-models", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "turtle", + "name": "semantic-models", "version": "0.0.1", "license": "MPL-2.0", "dependencies": { diff --git a/package.json b/package.json index 85bf30e..dfafcdb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "turtle", + "name": "semantic-models", "displayName": "Semantic Models", "description": "Support for RDF/Turtle documents, including SAMM Aspect Models", "version": "0.0.1", @@ -26,19 +26,19 @@ "contributes": { "commands": [ { - "command": "turtle.validateDocumentNow", + "command": "semantic-models.validateDocumentNow", "title": "Validate Document Now", - "category": "Turtle" + "category": "Semantic Models" }, { - "command": "turtle.restartLanguageServices", + "command": "semantic-models.restartLanguageServices", "title": "Restart Language Server Connection", - "category": "Turtle" + "category": "Semantic Models" }, { - "command": "turtle.selectSammCliExecutable", + "command": "semantic-models.selectSammCliExecutable", "title": "Select SAMM CLI Executable", - "category": "Turtle" + "category": "Semantic Models" } ], "languages": [ @@ -60,31 +60,31 @@ "type": "object", "description": "Configuration settings for the Semantic Models extension.", "properties": { - "turtle.languageServerSettings.activateEmbeddedLanguageServer": { + "semantic-models.languageServerSettings.activateEmbeddedLanguageServer": { "type": "boolean", "default": true, "description": "When enabled, the extension starts the SAMM language server using the executable configured below. When disabled, an external language server must be started manually.", "order": 0 }, - "turtle.languageServerSettings.automaticUpdateCheck": { + "semantic-models.languageServerSettings.automaticUpdateCheck": { "type": "boolean", "default": true, "description": "Automatically check for updates to the SAMM language server and notify when a new version is available.", "order": 1 }, - "turtle.languageServerSettings.sammCliPath": { + "semantic-models.languageServerSettings.sammCliPath": { "type": "string", "default": "", "description": "Path to the SAMM CLI executable or JAR file to use as the language server. Can be downloaded or selected using the 'Select SAMM CLI Executable' command.", "order": 2 }, - "turtle.languageServerSettings.serverPort": { + "semantic-models.languageServerSettings.serverPort": { "type": "number", "default": 1846, "description": "TCP port used to connect to the SAMM language server.", "order": 3 }, - "turtle.languageServerSettings.traceLevel": { + "semantic-models.languageServerSettings.traceLevel": { "type": "string", "enum": [ "off", @@ -110,7 +110,7 @@ "menus": { "editor/context": [ { - "command": "turtle.validateDocumentNow", + "command": "semantic-models.validateDocumentNow", "when": "resourceLangId == turtle", "group": "1_modification" } @@ -118,7 +118,7 @@ }, "walkthroughs": [ { - "id": "turtle-getting-started", + "id": "semantic-models-getting-started", "title": "Getting Started with the Semantic Models Extension", "description": "Learn how to use the Semantic Models extension to edit and validate your RDF/Turtle files, including SAMM Aspect Models.\nThis walkthrough will guide you through the key features of the extension, including validating your RDF/Turtle files and SAMM Aspect Models using the integrated language server.", "steps": [ diff --git a/src/aspectValidation.ts b/src/aspectValidation.ts index 9dbf802..377c354 100644 --- a/src/aspectValidation.ts +++ b/src/aspectValidation.ts @@ -15,7 +15,7 @@ import * as vscode from 'vscode'; import type { ExtensionLogger } from './outputChannel'; export const VALIDATE_DOCUMENT_REQUEST = 'turtle/aspectValidation/validateDocument'; -export const VALIDATE_DOCUMENT_COMMAND = 'turtle.validateDocumentNow'; +export const VALIDATE_DOCUMENT_COMMAND = 'semantic-models.validateDocumentNow'; const STATUS_MESSAGE_TIMEOUT_MS = 5000; export type AspectValidationTrigger = 'manual' | 'save'; diff --git a/src/extension.ts b/src/extension.ts index 8bc4388..19f9098 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -19,9 +19,9 @@ import { TurtleExtensionSettings } from './settings'; import { TurtleLanguageClient } from './languageClient'; import type { ExtensionLogger } from './outputChannel'; -const SELECT_EXECUTABLE_COMMAND = 'turtle.selectSammCliExecutable'; +const SELECT_EXECUTABLE_COMMAND = 'semantic-models.selectSammCliExecutable'; const SELECT_EXECUTABLE_TITLE = 'Select SAMM CLI Executable'; -const RESTART_LANGUAGE_SERVICES_COMMAND = 'turtle.restartLanguageServices'; +const RESTART_LANGUAGE_SERVICES_COMMAND = 'semantic-models.restartLanguageServices'; let settings: TurtleExtensionSettings; let languageServer: TurtleLanguageServer | undefined; @@ -52,7 +52,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise { await queueLanguageServicesRestart('Manual restart command'); }), vscode.workspace.onDidChangeConfiguration((e: vscode.ConfigurationChangeEvent) => { - if (e.affectsConfiguration('turtle.languageServerSettings')) { + if (e.affectsConfiguration('semantic-models.languageServerSettings')) { void queueLanguageServicesRestart('Configuration change detected'); } }) @@ -86,7 +86,7 @@ function queueLanguageServicesRestart(reason: string): Promise { if (selection === 'Configure SAMM CLI Executable') { void selectSammCliExecutable(); } else if (selection === 'Check Extension Settings') { - void vscode.commands.executeCommand('workbench.action.openSettings', 'turtle.languageServerSettings'); + void vscode.commands.executeCommand('workbench.action.openSettings', 'semantic-models.languageServerSettings'); } }); @@ -241,8 +241,8 @@ async function promptForCustomExecutablePath(): Promise { canSelectFiles: true, canSelectFolders: false, canSelectMany: false, - openLabel: 'Use this executable / jar', - title: 'Select SAMM CLI executable / jar', + openLabel: 'Use this executable / JAR', + title: 'Select SAMM CLI executable / JAR', }); return selection?.[0]?.fsPath; diff --git a/src/settings.ts b/src/settings.ts index 94da736..5d9930a 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -16,31 +16,31 @@ import * as vscode from 'vscode'; export class TurtleExtensionSettings { isEmbeddedLanguageServerStartEnabled(): boolean { - return vscode.workspace.getConfiguration('turtle.languageServerSettings').get('activateEmbeddedLanguageServer', true); + return vscode.workspace.getConfiguration('semantic-models.languageServerSettings').get('activateEmbeddedLanguageServer', true); } async setEmbeddedLanguageServerStartEnabled(enabled: boolean): Promise { - await vscode.workspace.getConfiguration('turtle.languageServerSettings').update('activateEmbeddedLanguageServer', enabled, vscode.ConfigurationTarget.Global); + await vscode.workspace.getConfiguration('semantic-models.languageServerSettings').update('activateEmbeddedLanguageServer', enabled, vscode.ConfigurationTarget.Global); } getSammCliPath(): string { - return vscode.workspace.getConfiguration('turtle.languageServerSettings').get('sammCliPath', ''); + return vscode.workspace.getConfiguration('semantic-models.languageServerSettings').get('sammCliPath', ''); } async setSammCliPath(path: string): Promise { - await vscode.workspace.getConfiguration('turtle.languageServerSettings').update('sammCliPath', path, vscode.ConfigurationTarget.Global); + await vscode.workspace.getConfiguration('semantic-models.languageServerSettings').update('sammCliPath', path, vscode.ConfigurationTarget.Global); } sammCliAutoUpdateIsEnabled(): boolean { - return vscode.workspace.getConfiguration('turtle.languageServerSettings').get('automaticUpdateCheck', true); + return vscode.workspace.getConfiguration('semantic-models.languageServerSettings').get('automaticUpdateCheck', true); } getSammCliLspServerPort(): number { - return vscode.workspace.getConfiguration('turtle.languageServerSettings').get('serverPort', 1846); + return vscode.workspace.getConfiguration('semantic-models.languageServerSettings').get('serverPort', 1846); } getLanguageClientTraceLevel(): 'off' | 'messages' | 'verbose' { - return vscode.workspace.getConfiguration('turtle.languageServerSettings').get<'off' | 'messages' | 'verbose'>('traceLevel', 'off'); + return vscode.workspace.getConfiguration('semantic-models.languageServerSettings').get<'off' | 'messages' | 'verbose'>('traceLevel', 'off'); } }