Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
ef674daa
Commit
ef674daa
authored
Oct 15, 2015
by
chriseth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render errors from other files correctly.
parent
929cbdbf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
index.html
index.html
+14
-5
No files found.
index.html
View file @
ef674daa
...
...
@@ -655,7 +655,7 @@
var
detailsOpen
=
{};
function
errortype
(
message
)
{
return
message
.
match
(
/^
[
0-9:
]
* Warning: /
)
?
'warning'
:
'error'
;
return
message
.
match
(
/^
.*:
[
0-9
]
*:
[
0-9
]
* Warning: /
)
?
'warning'
:
'error'
;
}
var
renderError
=
function
(
message
)
{
...
...
@@ -663,10 +663,12 @@
var
$pre
=
$
(
"<pre />"
).
text
(
message
);
var
$error
=
$
(
'<div class="sol '
+
type
+
'"><div class="close"><i class="fa fa-close"></i></div></div>'
).
prepend
(
$pre
);
$
(
'#output'
).
append
(
$error
);
var
err
=
message
.
match
(
/^:
([
0-9
]
*
)
:
([
0-9
]
*
)
/
);
if
(
err
&&
err
.
length
)
{
var
errLine
=
parseInt
(
err
[
1
],
10
)
-
1
;
var
errCol
=
err
[
2
]
?
parseInt
(
err
[
2
],
10
)
:
0
;
var
err
=
message
.
match
(
/^
([^
:
]
*
)
:
([
0-9
]
*
)
:
(([
0-9
]
*
)
:
)?
/
);
if
(
err
)
{
var
errFile
=
err
[
1
];
var
errLine
=
parseInt
(
err
[
2
],
10
)
-
1
;
var
errCol
=
err
[
4
]
?
parseInt
(
err
[
4
],
10
)
:
0
;
if
(
errFile
==
''
||
errFile
==
fileNameFromKey
(
SOL_CACHE_FILE
))
{
sourceAnnotations
[
sourceAnnotations
.
length
]
=
{
row
:
errLine
,
column
:
errCol
,
...
...
@@ -674,7 +676,14 @@
type
:
type
};
editor
.
getSession
().
setAnnotations
(
sourceAnnotations
);
}
$error
.
click
(
function
(
ev
){
if
(
errFile
!=
''
&&
errFile
!=
fileNameFromKey
(
SOL_CACHE_FILE
)
&&
getFiles
().
indexOf
(
fileKey
(
errFile
))
!==
-
1
)
{
// Switch to file
SOL_CACHE_FILE
=
fileKey
(
errFile
);
updateFiles
();
//@TODO could show some error icon in files with errors
}
editor
.
focus
();
editor
.
gotoLine
(
errLine
+
1
,
errCol
-
1
,
true
);
});
...
...
Write
Preview
Markdown
is supported
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