Skip to content

Commit

Permalink
Update extension to serve the textual editor for .ros model files
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-nhg committed Aug 1, 2024
1 parent a398514 commit f0232ce
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ros1",
"displayName": "ros1",
"description": "ros1 language support",
"name": "ros",
"displayName": "ros",
"description": "ros language support",
"version": "0.0.0",
"publisher": "ipa-nhg",
"repository": {
"type": "git",
"url": "https://github.com/ipa-nhg/vscode-ros1tooling"
"url": "https://github.com/ipa-nhg/vscode-rostooling"
},
"engines": {
"vscode": "^1.49.0"
Expand All @@ -15,27 +15,27 @@
"Programming Languages"
],
"activationEvents": [
"onLanguage:ros1"
"onLanguage:ros"
],
"main": "out/extension.js",
"contributes": {
"languages": [
{
"id": "ros1",
"id": "ros",
"aliases": [
"ros1"
"ros"
],
"extensions": [
".ros1"
".ros"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "ros1",
"scopeName": "source.ros1",
"path": "./syntaxes/ros1.tmLanguage.json"
"language": "ros",
"scopeName": "source.ros",
"path": "./syntaxes/ros.tmLanguage.json"
}
]
},
Expand All @@ -45,7 +45,7 @@
"watch": "tsc -w -p .",
"update-vscode": "node ./node_modules/vscode/bin/install",
"build-viewer": "webpack --mode=production --config ./src/urdf/webpack.config.js",
"antlr4ts": "antlr4ts -visitor src/parser/DebugInternalros1components.g",
"antlr4ts": "antlr4ts -visitor src/parser/DebugInternalroscomponents.g",
"build": "tsc -p ."
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function activate(context: ExtensionContext) {
};

let clientOptions: LanguageClientOptions = {
documentSelector: ['ros1'],
documentSelector: ['ros'],
synchronize: {
fileEvents: workspace.createFileSystemWatcher('**/*.*')
}
Expand All @@ -53,14 +53,14 @@ export function activate(context: ExtensionContext) {

var disposable = lc.start();
/**
var disposable2 =commands.registerCommand("ros1.a.proxy", async () => {
var disposable2 =commands.registerCommand("ros.a.proxy", async () => {
let activeEditor = window.activeTextEditor;
if (!activeEditor || !activeEditor.document || activeEditor.document.languageId !== 'ros1') {
if (!activeEditor || !activeEditor.document || activeEditor.document.languageId !== 'ros') {
return;
}
if (activeEditor.document.uri instanceof Uri) {
commands.executeCommand("ros1.a", activeEditor.document.uri.toString());
commands.executeCommand("ros.a", activeEditor.document.uri.toString());
}
})*/

Expand Down
12 changes: 6 additions & 6 deletions syntaxes/ros.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "ros1DSL",
"scopeName": "source.ros1",
"name": "rosDSL",
"scopeName": "source.ros",
"fileTypes": [
"ros1"
"ros"
],
"patterns": [
{
Expand All @@ -16,17 +16,17 @@
"repository": {
"keywords": {
"patterns": [{
"name": "keyword.control.ros1",
"name": "keyword.control.ros",
"match": "\\b(msgs|message)\\b"
}]
},
"strings": {
"name": "string.quoted.double.ros1",
"name": "string.quoted.double.ros",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.ros1",
"name": "constant.character.escape.ros",
"match": "\\\\."
}
]
Expand Down

0 comments on commit f0232ce

Please sign in to comment.