Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
B Language Extension
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
B Language Extension
Commits
9e8eba93
Commit
9e8eba93
authored
Jun 22, 2020
by
SeeBasTStick
Browse files
Options
Downloads
Patches
Plain Diff
bug fix regarding wrongly shown bug
parent
d023c2d0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+7
-1
7 additions, 1 deletion
CHANGELOG.md
README.md
+6
-1
6 additions, 1 deletion
README.md
server/src/server.ts
+25
-8
25 additions, 8 deletions
server/src/server.ts
with
38 additions
and
10 deletions
CHANGELOG.md
+
7
−
1
View file @
9e8eba93
...
@@ -72,3 +72,9 @@
...
@@ -72,3 +72,9 @@
## [0.6.3]
## [0.6.3]
-
fixed recognition of failing probcli
-
fixed recognition of failing probcli
## [0.6.4]
-
fixed bug where sometimes changes lead to wrong represantation of mistakes
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
+
6
−
1
View file @
9e8eba93
...
@@ -105,3 +105,8 @@ Please note that user settings overwrite workspace settings.
...
@@ -105,3 +105,8 @@ Please note that user settings overwrite workspace settings.
### 0.6.3
### 0.6.3
-
fixed recognition of failing probcli
-
fixed recognition of failing probcli
### 0.6.4
-
fixed bug where sometimes changes lead to wrong represantation of mistakes
\ No newline at end of file
This diff is collapsed.
Click to expand it.
server/src/server.ts
+
25
−
8
View file @
9e8eba93
...
@@ -160,6 +160,13 @@ documents.onDidSave(change => {
...
@@ -160,6 +160,13 @@ documents.onDidSave(change => {
validateTextDocument
(
change
.
document
)
validateTextDocument
(
change
.
document
)
})
})
documents
.
onDidChangeContent
(
change
=>
{
// validateTextDocument(change.document);
});
async
function
validateTextDocument
(
textDocument
:
TextDocument
):
Promise
<
void
>
{
async
function
validateTextDocument
(
textDocument
:
TextDocument
):
Promise
<
void
>
{
let
settings
=
await
getDocumentSettings
(
textDocument
.
uri
)
// Waiting for correct setting; otherwise allways default
let
settings
=
await
getDocumentSettings
(
textDocument
.
uri
)
// Waiting for correct setting; otherwise allways default
...
@@ -176,8 +183,9 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
...
@@ -176,8 +183,9 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
fs
.
mkdirSync
(
errorDic
);
fs
.
mkdirSync
(
errorDic
);
}
}
fs
.
writeFile
(
errorPath
,
""
,
()
=>
{
})
//Insure a clean error file
fs
.
writeFile
(
errorPath
,
""
,
()
=>
{
})
//Insure a clean error file
//fs.writeFileSync(errorPath,"",{encoding:'utf8',flag:'w'})
let
command
:
string
=
getCommand
(
URI
.
parse
(
textDocument
.
uri
).
path
,
errorPath
,
settings
)
let
command
:
string
=
getCommand
(
URI
.
parse
(
textDocument
.
uri
).
path
,
errorPath
,
settings
)
// console.log(command)
// console.log(command)
if
(
correctPath
(
settings
.
probHome
))
{
if
(
correctPath
(
settings
.
probHome
))
{
...
@@ -186,7 +194,8 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
...
@@ -186,7 +194,8 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
errorMap
.
then
(
function
(
result
:
Map
<
string
,
Set
<
NDJSON
>>
)
{
errorMap
.
then
(
function
(
result
:
Map
<
string
,
Set
<
NDJSON
>>
)
{
let
diagnostics
:
Array
<
Diagnostic
>
=
new
Array
()
let
diagnostics
:
Array
<
Diagnostic
>
=
new
Array
()
if
(
result
.
size
!=
0
)
{
for
(
let
entry
of
result
)
{
for
(
let
entry
of
result
)
{
if
(
entry
[
0
]
==
textDocument
.
uri
)
{
if
(
entry
[
0
]
==
textDocument
.
uri
)
{
diagnostics
=
matchErrors
(
entry
[
1
],
textDocument
)
diagnostics
=
matchErrors
(
entry
[
1
],
textDocument
)
...
@@ -195,6 +204,10 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
...
@@ -195,6 +204,10 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
}
}
connection
.
sendDiagnostics
({
uri
:
entry
[
0
],
diagnostics
});
connection
.
sendDiagnostics
({
uri
:
entry
[
0
],
diagnostics
});
}
}
}
else
{
connection
.
sendDiagnostics
({
uri
:
textDocument
.
uri
,
diagnostics
});
}
},
function
(
err
)
{
},
function
(
err
)
{
connection
.
sendNotification
(
"
parse_error_prob
"
,
"
there are things wrong with the parse results
"
+
err
)
connection
.
sendNotification
(
"
parse_error_prob
"
,
"
there are things wrong with the parse results
"
+
err
)
...
@@ -210,6 +223,9 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
...
@@ -210,6 +223,9 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
})
})
}
}
fs
.
writeFile
(
errorPath
,
""
,
()
=>
{
})
//Insure a clean error file
}
}
...
@@ -271,6 +287,7 @@ connection.onCompletion(
...
@@ -271,6 +287,7 @@ connection.onCompletion(
//Can be used to enrich completion with more infos
//Can be used to enrich completion with more infos
connection
.
onCompletionResolve
(
connection
.
onCompletionResolve
(
(
item
:
CompletionItem
)
=>
{
return
item
})
(
item
:
CompletionItem
)
=>
{
return
item
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment