mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-30 08:57:08 +02:00
EVENT_BEFORE_HOVER for Query and DCS
added triggering EVENT_BEFORE_HOVER in "Query" and "DCS" modes
This commit is contained in:
parent
63aaeb2a43
commit
dd7eb96fcf
@ -524,7 +524,31 @@ define([], function () {
|
||||
}
|
||||
},
|
||||
hoverProvider: {
|
||||
provideHover: () => {}
|
||||
provideHover: function (model, position) {
|
||||
|
||||
if (!ctrlPressed) {
|
||||
|
||||
if (generateBeforeHoverEvent) {
|
||||
let bsl = new bslHelper(model, position);
|
||||
let token = bsl.getLastToken();
|
||||
let params = {
|
||||
word: model.getWordAtPosition(position),
|
||||
token: token,
|
||||
line: position.lineNumber,
|
||||
column: position.column
|
||||
}
|
||||
sendEvent('EVENT_BEFORE_HOVER', params);
|
||||
}
|
||||
|
||||
let bsl = new bslHelper(model, position);
|
||||
return bsl.getHover();
|
||||
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
formatProvider: {
|
||||
provideDocumentFormattingEdits: () => {}
|
||||
@ -565,7 +589,31 @@ define([], function () {
|
||||
}
|
||||
},
|
||||
hoverProvider: {
|
||||
provideHover: () => {}
|
||||
provideHover: function (model, position) {
|
||||
|
||||
if (!ctrlPressed) {
|
||||
|
||||
if (generateBeforeHoverEvent) {
|
||||
let bsl = new bslHelper(model, position);
|
||||
let token = bsl.getLastToken();
|
||||
let params = {
|
||||
word: model.getWordAtPosition(position),
|
||||
token: token,
|
||||
line: position.lineNumber,
|
||||
column: position.column
|
||||
}
|
||||
sendEvent('EVENT_BEFORE_HOVER', params);
|
||||
}
|
||||
|
||||
let bsl = new bslHelper(model, position);
|
||||
return bsl.getHover();
|
||||
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
formatProvider: {
|
||||
provideDocumentFormattingEdits: () => {}
|
||||
|
BIN
src/src.zip
BIN
src/src.zip
Binary file not shown.
Loading…
Reference in New Issue
Block a user