You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/12/09 16:19:35 UTC

[sling-whiteboard] 15/18: Cleanups: remove sample actions, rename to vscode-htl

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/vscode-htl
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git

commit 79c3311447665d2bf5b21f3b996ee282e9aebb3a
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Thu Dec 9 13:47:44 2021 +0100

    Cleanups: remove sample actions, rename to vscode-htl
---
 vscode-htl/CHANGELOG.md      |  6 +-----
 vscode-htl/README.md         |  6 +-----
 vscode-htl/package-lock.json |  4 ++--
 vscode-htl/package.json      | 18 +++---------------
 vscode-htl/src/extension.ts  | 22 ++--------------------
 5 files changed, 9 insertions(+), 47 deletions(-)

diff --git a/vscode-htl/CHANGELOG.md b/vscode-htl/CHANGELOG.md
index 4495165..8ea2651 100644
--- a/vscode-htl/CHANGELOG.md
+++ b/vscode-htl/CHANGELOG.md
@@ -1,9 +1,5 @@
 # Change Log
 
-All notable changes to the "vscode-hello" extension will be documented in this file.
-
-Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
-
 ## [Unreleased]
 
-- Initial release
\ No newline at end of file
+- Initial release, providing basic auto-completion
\ No newline at end of file
diff --git a/vscode-htl/README.md b/vscode-htl/README.md
index 4247555..c75293e 100644
--- a/vscode-htl/README.md
+++ b/vscode-htl/README.md
@@ -1,7 +1,3 @@
 # Visual Studio code extension for HTL
 
-TODO:
-- provide completions based on default script bindings
-- provide completions based on known types of script bindings (SlingHttpServletRequest, Resource)
-- provide completions for objects inferred from data-sly-use.$IDENTIFIER
-- provide completions for objects provided by data-sly-repeat and friends (first/last/etc)
\ No newline at end of file
+Provides basic auto-completions.
\ No newline at end of file
diff --git a/vscode-htl/package-lock.json b/vscode-htl/package-lock.json
index 1d3c707..4efbebd 100644
--- a/vscode-htl/package-lock.json
+++ b/vscode-htl/package-lock.json
@@ -1,11 +1,11 @@
 {
-  "name": "vscode-hello",
+  "name": "vscode-htl",
   "version": "0.0.1",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
-      "name": "vscode-hello",
+      "name": "vscode-htl",
       "version": "0.0.1",
       "dependencies": {
         "node-html-parser": "^5.1.0"
diff --git a/vscode-htl/package.json b/vscode-htl/package.json
index 2dfbbb9..95942db 100644
--- a/vscode-htl/package.json
+++ b/vscode-htl/package.json
@@ -1,7 +1,7 @@
 {
-  "name": "vscode-hello",
-  "displayName": "vscode-hello",
-  "description": "",
+  "name": "vscode-htl",
+  "displayName": "HTL extension for Visual Studio Code",
+  "description": "Extension that provides auto-completion for HTL template files.",
   "version": "0.0.1",
   "engines": {
     "vscode": "^1.62.0"
@@ -10,22 +10,10 @@
     "Other"
   ],
   "activationEvents": [
-    "onCommand:vscode-hello.helloWorld",
-    "onCommand:vscode-hello.now",
     "onLanguage:html"
   ],
   "main": "./out/extension.js",
   "contributes": {
-    "commands": [
-      {
-        "command": "vscode-hello.helloWorld",
-        "title": "Hello, world"
-      },
-      {
-        "command": "vscode-hello.now",
-        "title": "Current time"
-      }
-    ],
     "html": {
       "customData": [
         "./data/htl.json"
diff --git a/vscode-htl/src/extension.ts b/vscode-htl/src/extension.ts
index 2e7bae5..dea883e 100644
--- a/vscode-htl/src/extension.ts
+++ b/vscode-htl/src/extension.ts
@@ -6,27 +6,9 @@ import { HtlCompletionItemProvider } from './htlCompletionItemProvider';
 // this method is called when your extension is activated
 // your extension is activated the very first time the command is executed
 export function activate(context: vscode.ExtensionContext) {
-	
-	// Use the console to output diagnostic information (console.log) and errors (console.error)
-	// This line of code will only be executed once when your extension is activated
-	console.log('Congratulations, your extension "vscode-hello" is now active!');
-
-	// The command has been defined in the package.json file
-	// Now provide the implementation of the command with registerCommand
-	// The commandId parameter must match the command field in package.json
-	let helloWorld = vscode.commands.registerCommand('vscode-hello.helloWorld', () => {
-		vscode.window.showErrorMessage('Hello VS Code');
-	});
-
-	let now = vscode.commands.registerCommand('vscode-hello.now', () => {
-		vscode.window.showWarningMessage(new Date().toISOString());
-	});
-
-	context.subscriptions.push(helloWorld, now);
-
 	let completionsPath = vscode.Uri.joinPath(context.extensionUri, "data");
-
-	vscode.languages.registerCompletionItemProvider('html', new HtlCompletionItemProvider(completionsPath));
+	let disposable = vscode.languages.registerCompletionItemProvider('html', new HtlCompletionItemProvider(completionsPath));
+	context.subscriptions.push(disposable);
 }
 
 // this method is called when your extension is deactivated