Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
general
stups
ProB 2 Jupyter Kernel
Commits
f5e74fb7
Commit
f5e74fb7
authored
Sep 09, 2020
by
dgelessus
Browse files
Also recognize special machine names without .mch in error highlighting
parent
78af527d
Pipeline
#46164
passed with stage
in 4 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/prob2/jupyter/ProBKernel.java
View file @
f5e74fb7
...
...
@@ -627,10 +627,13 @@ public final class ProBKernel extends BaseKernel {
if
(
filePath
.
toString
().
isEmpty
())
{
return
Optional
.
ofNullable
(
contextSourceLines
);
}
else
{
final
String
fileName
=
filePath
.
getFileName
().
toString
();
if
(
fileName
.
equals
(
DEFAULT_MACHINE_NAME
+
".mch"
))
{
String
fileName
=
filePath
.
getFileName
().
toString
();
if
(
fileName
.
endsWith
(
".mch"
))
{
fileName
=
fileName
.
substring
(
0
,
fileName
.
length
()
-
4
);
}
if
(
fileName
.
equals
(
DEFAULT_MACHINE_NAME
))
{
return
Optional
.
of
(
Arrays
.
asList
(
DEFAULT_MACHINE_SOURCE_CODE
.
split
(
"\n"
)));
}
else
if
(
fileName
.
equals
(
LOAD_CELL_MACHINE_NAME
+
".mch"
))
{
}
else
if
(
fileName
.
equals
(
LOAD_CELL_MACHINE_NAME
))
{
if
(
currentCellSourceCode
==
null
)
{
return
Optional
.
empty
();
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment