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
b6c4a4e6
Unverified
Commit
b6c4a4e6
authored
May 28, 2020
by
yann300
Committed by
GitHub
May 28, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2845 from ethereum/fix#2836
Make sure to highlight using internal path
parents
ecdd1fbd
34b73c11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
sourceHighlighter.js
src/app/editor/sourceHighlighter.js
+2
-1
fileManager.js
src/app/files/fileManager.js
+5
-2
remixDProvider.js
src/app/files/remixDProvider.js
+8
-0
No files found.
src/app/editor/sourceHighlighter.js
View file @
b6c4a4e6
...
...
@@ -39,8 +39,9 @@ class SourceHighlighter {
this
.
source
=
null
if
(
lineColumnPos
)
{
this
.
source
=
filePath
if
(
this
.
_deps
.
config
.
get
(
'currentFile'
)
!==
this
.
source
)
{
if
(
this
.
_deps
.
fileManager
.
currentFile
(
)
!==
this
.
source
)
{
await
this
.
_deps
.
fileManager
.
open
(
this
.
source
)
this
.
source
=
this
.
_deps
.
fileManager
.
currentFile
()
}
const
css
=
csjs
`
...
...
src/app/files/fileManager.js
View file @
b6c4a4e6
...
...
@@ -432,13 +432,16 @@ class FileManager extends Plugin {
openFile
(
file
)
{
const
_openFile
=
(
file
)
=>
{
this
.
saveCurrentFile
()
const
provider
=
this
.
fileProviderOf
(
file
)
if
(
!
provider
)
return
console
.
error
(
`no provider for
${
file
}
`
)
file
=
provider
.
getPathFromUrl
(
file
)
||
file
// in case an external URL is given as input, we resolve it to the right internal path
this
.
_deps
.
config
.
set
(
'currentFile'
,
file
)
this
.
openedFiles
[
file
]
=
file
this
.
fileProviderOf
(
file
)
.
get
(
file
,
(
error
,
content
)
=>
{
provider
.
get
(
file
,
(
error
,
content
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
}
else
{
if
(
this
.
fileProviderOf
(
file
)
.
isReadOnly
(
file
))
{
if
(
provider
.
isReadOnly
(
file
))
{
this
.
editor
.
openReadOnly
(
file
,
content
)
}
else
{
this
.
editor
.
open
(
file
,
content
)
...
...
src/app/files/remixDProvider.js
View file @
b6c4a4e6
...
...
@@ -89,6 +89,14 @@ module.exports = class RemixDProvider {
return
cb
(
null
,
result
)
}
getNormalizedName
(
path
)
{
return
path
}
getPathFromUrl
(
path
)
{
return
path
}
get
(
path
,
cb
)
{
var
unprefixedpath
=
this
.
removePrefix
(
path
)
this
.
_remixd
.
call
(
'sharedfolder'
,
'get'
,
{
path
:
unprefixedpath
},
(
error
,
file
)
=>
{
...
...
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