Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • develop
  • release
  • v0.x
  • v2.1.0
  • v2.2.0
5 results

Target

Select target project
  • general/stups/b_language_extension
1 result
Select Git revision
  • develop
  • release
  • v0.x
  • v2.1.0
  • v2.2.0
5 results
Show changes
Commits on Source (15)
......@@ -3,6 +3,6 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
# Change Log
## [0.0.1]
## 0.0.1
- first prototype version
## [0.0.2]
## 0.0.2
- option to add cutom path
## [0.0.4]
## 0.0.4
- fixed bug in the package.json file leading to unnoticed server crash
- added feedback when using an unreachable path
- added feedback when using a old version of proB
## [0.1.0]
## 0.1.0
- added more sound auto compeltion
- added WD cheks
- added strict checks
## [0.1.1]
## 0.1.1
- fixed issue where path was semi hard coded
## [0.2.0]
## 0.2.0
- recognizes correct file ending (.mch; .def; .imp; .ref; .sys)
- no longer activates extension on normal text documents
## [0.3.0]
## 0.3.0
- added option for performance feedback
- implemented 'info' as feedback type
## [0.5.0]
## 0.5.0
- added syntax highlighting
## [0.5.1]
## 0.5.1
- minor fixes
## [0.5.2]
## 0.5.2
- media fixes
## [0.5.3]
## 0.5.3
- reworked error messages to be more managable
## [0.6.0]
## 0.6.0
- added snippets
- improved error feedback for failing call to probcli
......@@ -69,48 +69,61 @@
- _error.json will now dumpend in a /tmp/ folder
## [1.0.0]
## 1.0.0
- switched to Java Server and will be able to access ProB Kernel library.
- server has no debug option and output
## [1.0.1]
## 1.0.1
- debug mode is now disabled by default
- debug console will now behave more reasonable behavior
- updated server version to take care of windows and mac problems
## [1.1.1]
## 1.1.1
- fixed bug where problems from sub machines where shown in the main machine
- added a opical feedback when an evaluation is finished
- added .rmch file extensions (still pretty much a prototype regarding coloring)
- added file icons to identify files which can be processed by this plugin, note that icon themes are exclusive, selecting the new theme will disable all other themes: https://github.com/microsoft/vscode/issues/14662
## [1.1.2]
## 1.1.2
- fixed bug where for longer outputs from probcli the system would not return causing a deadlook
## [2.0.0]
## 2.0.0
- keyword support for new proB features: REAL, real, floor, ceiling
- now uses prob2_kernel library instead of calling prob_cli direc; leads to noticable performance gain after initial warm up
## [2.0.1]
## 2.0.1
- bug fix regarding completion
- stability improvements
## [2.0.2]
## 2.0.2
- bug fixed that were introduced by not properly rebasing server branches
- brought back notifcation when evaluation is done
## [2.0.4]
## 2.0.4
- dependencies updated
## 2.1.0
- Updated to ProB 1.12.1
- Now requires VSCode 1.67
- Optimized dependencies
## 2.2.0 (not released yet)
- Updated to ProB 1.13.0
- Updated keywords for B rules machines
- Changed settings prefixes from `languageServer` and `common` to `prob` - this will reset existing settings, but avoids conflicts with other extensions
- Fixed and expanded snippets for B relation/function operators
\ No newline at end of file
# b-language-extension README
Compiler support for B via ProB. You don't need your own version of proB. This plugin comes with one packed. You can however provide a proB version on your own, but be cautious; This can lead to unexpected and untested behavior.
In order to change prob_cli versions you need to make the change in the settings and restart the extension (open and close vscode).
Compiler support for B via ProB. You don't need your own version of ProB. This plugin comes with one packed.
You can, however, provide your own ProB command-line version (aka probcli), but be cautious; this can lead to unexpected and untested behavior.
In order to change the probcli version you need to make the change in the settings and restart the extension (open and close vscode).
## Features
......@@ -11,7 +11,7 @@ In order to change prob_cli versions you need to make the change in the settings
## Requirements
- Java v.8 or higher. By default java home is considerd to be accessible by typing 'java' in terminal/powershell
- Java v.8 or higher. By default Java home is considerd to be accessible by typing 'java' in terminal/powershell
## Extension Settings
......@@ -29,20 +29,26 @@ This extension contributes the following settings:
- please open an issue at https://github.com/hhu-stups/prob-issues/issues
## Server
The language server can be found here https://github.com/SeeBasTStick/b-language-server.
The language server can be found here https://github.com/hhu-stups/b-language-extension.
## Installation on VSCodium
You can also install the plugin in [VSCodium](https://vscodium.com) by downloading the artefact (b-language-extension-\<VERSION>.vsix) and typing
codium --install-extension b-language-extension-\<VERSION>.vsix
## Future plans
- Quickfix support aká Code Completion
- Quickfix support aka Code Completion
- Definition provider
## Release Notes
### 2.0.4
- fixed dependency warnings
### 2.2.0
- Updated to ProB 1.13.0
- Updated keywords for B rules machines
- Changed settings prefixes from `languageServer` and `common` to `prob` - this will reset existing settings, but avoids conflicts with other extensions
- Fixed and expanded snippets for B relation/function operators
## Acknowledgements
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
"name": "b-language-extension",
"displayName": "B/ProB Language Support",
"description": "Compiler and language support for B via ProB",
"version": "2.1.0",
"version": "2.2.0",
"publisher": "SeeBasTStick",
"icon": "media/prob2-ui.png",
"author": "Sebastian Stock",
......@@ -30,9 +30,9 @@
"contributes": {
"configuration": {
"type": "object",
"title": "Configuration",
"title": "ProB Language Extension",
"properties": {
"languageServer.proBHome": {
"prob.proBHome": {
"id": "1",
"title": "ProB Home",
"scope": "application",
......@@ -40,45 +40,45 @@
"default": "DEFAULT",
"description": "Path to ProB directory. Use 'DEFAULT' to access the shipped version."
},
"languageServer.wdChecks": {
"prob.wdChecks": {
"id": "2",
"title": "WD Checks",
"scope": "application",
"type": "boolean",
"default": true,
"description": "Option for WD Checks"
"description": "Option for WD checks"
},
"languageServer.strictChecks": {
"prob.strictChecks": {
"id": "3",
"title": "Strict Checks",
"scope": "application",
"type": "boolean",
"default": true,
"description": "Option for stricter Checks"
"description": "Option for stricter checks"
},
"languageServer.performanceHints": {
"prob.performanceHints": {
"id": "4",
"title": "Performance Hints",
"scope": "application",
"type": "boolean",
"default": true,
"description": "Option for performance-related Hints"
"description": "Option for performance-related hints"
},
"languageServer.debugMode": {
"prob.debugMode": {
"id": "5",
"title": "Debug Mode",
"scope": "application",
"type": "boolean",
"default": false,
"description": "Option for enabeling (extensiv) debug messages"
"description": "Option for enabling (extensive) debug messages"
},
"common.javaHome": {
"prob.javaHome": {
"id": "6",
"title": "Java Home",
"scope": "application",
"type": "string",
"default": "java",
"description": "points to the java sdk responsible for executing the server"
"description": "Points to the java executable responsible for executing the language server"
}
}
},
......
......@@ -119,7 +119,7 @@
},
"B: -->>": {
"prefix": "funcTotalSurjection",
"body": ">->"
"body": "-->>"
},
"B: >->>": {
"prefix": "funcTotalBijection",
......@@ -131,11 +131,31 @@
},
"B: >+>": {
"prefix": "funcPartialInjection",
"body": ">+>"
},
"B: +->>": {
"prefix": "funcPartialSurjection",
"body": "+->>"
},
"B: >+>>": {
"prefix": "funcBijection",
"prefix": "funcPartialBijection",
"body": ">+>>"
},
"B: <->": {
"prefix": "relation",
"body": "<->"
},
"B: <<->": {
"prefix": "relationTotal",
"body": "<<->"
},
"B: <->>": {
"prefix": "relationSurjective",
"body": "<->>"
},
"B: <<->>": {
"prefix": "relationTotalSurjective",
"body": "<<->>"
}
}
}
\ No newline at end of file
......@@ -110,7 +110,7 @@
},
"B: -->>": {
"prefix": "funcTotalSurjection",
"body": ">->"
"body": "-->>"
},
"B: >->>": {
"prefix": "funcTotalBijection",
......@@ -122,11 +122,31 @@
},
"B: >+>": {
"prefix": "funcPartialInjection",
"body": ">+>"
},
"B: +->>": {
"prefix": "funcPartialSurjection",
"body": "+->>"
},
"B: >+>>": {
"prefix": "funcBijection",
"prefix": "funcPartialBijection",
"body": ">+>>"
},
"B: <->": {
"prefix": "relation",
"body": "<->"
},
"B: <<->": {
"prefix": "relationTotal",
"body": "<<->"
},
"B: <->>": {
"prefix": "relationSurjective",
"body": "<->>"
},
"B: <<->>": {
"prefix": "relationTotalSurjective",
"body": "<<->>"
}
}
}
\ No newline at end of file
......@@ -20,12 +20,12 @@ import { spawn } from 'child_process';
let client: LanguageClient;
let debugChannle: OutputChannel = null;
let debugChannel: OutputChannel = null;
export function activate(context: ExtensionContext) {
const serverHome = context.asAbsolutePath("b-language-server-all.jar")
const javaHome: string = workspace.getConfiguration("common").get("javaHome")
const javaHome: string = workspace.getConfiguration("prob").get("javaHome")
let prc = spawn(javaHome, ['-jar', serverHome])
......@@ -51,8 +51,8 @@ export function activate(context: ExtensionContext) {
}
if (debugChannle == null) {
debugChannle = window.createOutputChannel("ProB language server")
if (debugChannel == null) {
debugChannel = window.createOutputChannel("ProB language server")
}
......@@ -64,12 +64,12 @@ export function activate(context: ExtensionContext) {
// Notify the server about file changes to '.clientrc files contained in the workspace
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')
},
outputChannel: debugChannle,
outputChannel: debugChannel,
}
// Create the language client and start the client.
client = new LanguageClient('languageServer', 'languageServer', serverOptions, clientOptions)
client = new LanguageClient('probls', 'ProB Language Server', serverOptions, clientOptions)
let item = window.createStatusBarItem(StatusBarAlignment.Right, Number.MIN_VALUE);
......@@ -78,26 +78,26 @@ export function activate(context: ExtensionContext) {
client.start();
const debugMode: Boolean = workspace.getConfiguration("languageServer").get("debugMode")
const debugMode: Boolean = workspace.getConfiguration("prob").get("debugMode")
if (!debugMode) {
debugChannle.hide()
debugChannel.hide()
} else {
debugChannle.show()
debugChannel.show()
}
window.onDidOpenTerminal(() => {
showDebugMessages(debugChannle)
showDebugMessages(debugChannel)
})
})
}
function showDebugMessages(debugChannle: OutputChannel) {
const debugMode: Boolean = workspace.getConfiguration("languageServer").get("debugMode")
function showDebugMessages(debugChannel: OutputChannel) {
const debugMode: Boolean = workspace.getConfiguration("prob").get("debugMode")
if (debugMode) {
debugChannle.show()
debugChannel.show()
}
}
......@@ -118,7 +118,3 @@ function toggleItem(editor: TextEditor, item) {
item.hide();
}
}
......@@ -313,7 +313,7 @@
"preferences": {
"patterns": [
{
"match": "(?x)\n\\b(GOAL|SCOPE|SET_PREF_\\w*|FORCE_SYMMETRY_\\w*|GOAL|ANIMATION_FUNCTION_DEFAULT\n|VISB_JSON_FILE|CUSTOM_GRAPH_EDGES|CUSTOM_GRAPH_NODES|HEURISTIC_FUNCTION|ANIMATION_FUNCTION[0-9]*|ANIMATION_IMG\\w*\n|ANIMATION_STR\\w*|ASSERT_(LTL|CTL)\\w*)\\b",
"match": "(?x)\n\\b(GOAL|SCOPE|SET_PREF_\\w*|FORCE_SYMMETRY_\\w*|GOAL|ANIMATION_FUNCTION_DEFAULT\n|VISB_JSON_FILE|VISB_SVG_FILE|VISB_SVG_BOX|VISB_SVG_CONTENTS\\w*|VISB_SVG_OBJECTS\\w*|VISB_SVG_HOVERS\\w*|VISB_SVG_UPDATES\\w*|VISB_SVG_EVENTS\\w*|CUSTOM_GRAPH|CUSTOM_GRAPH_EDGES|CUSTOM_GRAPH_NODES|HEURISTIC_FUNCTION|ANIMATION_FUNCTION[0-9]*|ANIMATION_IMG\\w*\n|ANIMATION_STR\\w*|ASSERT_(LTL|CTL)\\w*)\\b",
"name": "entity.other.attribute-name.classicalb"
}
]
......
......@@ -137,7 +137,7 @@
"machineclauses": {
"patterns": [
{
"match": "(?x)\n\\b(INITIALI(Z|S)ATION|ASSERTIONS|OPERATIONS|SEES|PROMOTES|USES\n|INCLUDES|IMPORTS|REFINES|EXTENDS|INVARIANT|CONCRETE_VARIABLES\n|ABSTRACT_VARIABLES|VARIABLES|PROPERTIES|CONSTANTS|ABSTRACT_CONSTANTS\n|CONCRETE_CONSTANTS|CONSTRAINTS|SETS|DEFINITIONS|VALUES)\\b",
"match": "(?x)\n\\b(INITIALI(Z|S)ATION|ASSERTIONS|OPERATIONS|SEES|PROMOTES|USES\n|INCLUDES|IMPORTS|REFINES|EXTENDS|REFERENCES|INVARIANT|CONCRETE_VARIABLES\n|ABSTRACT_VARIABLES|VARIABLES|PROPERTIES|CONSTANTS|ABSTRACT_CONSTANTS\n|CONCRETE_CONSTANTS|CONSTRAINTS|SETS|DEFINITIONS|VALUES)\\b",
"name": "storage.type.clause.rmchAddOn"
}
]
......@@ -145,7 +145,7 @@
"keyword_control": {
"patterns": [
{
"match": "(?x)\n\\b(skip|BE|DO|VARIANT|ELSIF|THEN|ELSE|EITHER|CASE|SELECT\n|ASSERT|WHERE|OR|OF|IN|BODY|GOAL|RULEID|WHEN|COUNTEREXAMPLE|TYPE|VALUE|EXPECT|STRING_FORMAT|DEPENDS_ON_RULE|ERROR_TYPE|ERROR_TYPES|PRECONDITION|POSTCONDITION|DUMMY_VALUE)\\b",
"match": "(?x)\n\\b(skip|BE|DO|VARIANT|ELSIF|THEN|ELSE|EITHER|CASE|SELECT\n|ASSERT|WHERE|OR|OF|IN|BODY|GOAL|DEPENDS_ON_RULE|DEPENDS_ON_COMPUTATION|ACTIVATION|REPLACES|ERROR_TYPES|CLASSIFICATION|RULEID|TAGS|BODY|EXPECT|ERROR_TYPE|COUNTEREXAMPLE|DEFINE|TYPE|DUMMY_VALUE|VALUE|PRECONDITION|POSTCONDITION)\\b",
"name": "keyword.control.rmchAddOn"
}
]
......@@ -268,7 +268,7 @@
"control_blocks": {
"patterns": [
{
"begin": "(?x)\n\\b(BEGIN|PRE|SELECT|ANY|LET|VAR|ASSERT|WHILE|IF|CHOICE|CASE|EITHER|IN)\\b",
"begin": "(?x)\n\\b(BEGIN|PRE|SELECT|ANY|LET|VAR|ASSERT|WHILE|FOR|DO|IF|CHOICE|CASE|EITHER|IN)\\b",
"beginCaptures": {
"0": {
"name": "keyword.control.rmchAddOn"
......@@ -346,7 +346,7 @@
"preferences": {
"patterns": [
{
"match": "(?x)\n\\b(GOAL|SET_PREF_\\w*|FORCE_SYMMETRY_\\w*|GOAL|ANIMATION_FUNCTION_DEFAULT\n|HEURISTIC_FUNCTION|ANIMATION_FUNCTION[0-9]*|ANIMATION_IMG\\w*\n|ANIMATION_STR\\w*|ASSERT_(LTL|CTL)\\w*)\\b",
"match": "(?x)\n\\b(GOAL|SET_PREF_\\w*|FORCE_SYMMETRY_\\w*|GOAL|ANIMATION_FUNCTION_DEFAULT\n|HEURISTIC_FUNCTION|ANIMATION_FUNCTION[0-9]*|ANIMATION_IMG\\w*\n|ANIMATION_STR\\w*|ASSERT_(LTL|CTL)\\w*|SUCCEEDED_RULE(?:_ERROR_TYPE)?|GET_RULE_COUNTEREXAMPLES|FAILED_RULE(?:_ERROR_TYPE|_ALL_ERROR_TYPES)?|NOT_CHECKED_RULE|DISABLED_RULE|STRING_FORMAT)\\b",
"name": "entity.other.attribute-name.rmchAddOn"
}
]
......