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
34b73c11
Commit
34b73c11
authored
May 19, 2020
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure to highlight using internal path
parent
ecdd1fbd
Show 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 @
34b73c11
...
@@ -39,8 +39,9 @@ class SourceHighlighter {
...
@@ -39,8 +39,9 @@ class SourceHighlighter {
this
.
source
=
null
this
.
source
=
null
if
(
lineColumnPos
)
{
if
(
lineColumnPos
)
{
this
.
source
=
filePath
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
)
await
this
.
_deps
.
fileManager
.
open
(
this
.
source
)
this
.
source
=
this
.
_deps
.
fileManager
.
currentFile
()
}
}
const
css
=
csjs
`
const
css
=
csjs
`
...
...
src/app/files/fileManager.js
View file @
34b73c11
...
@@ -432,13 +432,16 @@ class FileManager extends Plugin {
...
@@ -432,13 +432,16 @@ class FileManager extends Plugin {
openFile
(
file
)
{
openFile
(
file
)
{
const
_openFile
=
(
file
)
=>
{
const
_openFile
=
(
file
)
=>
{
this
.
saveCurrentFile
()
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
.
_deps
.
config
.
set
(
'currentFile'
,
file
)
this
.
openedFiles
[
file
]
=
file
this
.
openedFiles
[
file
]
=
file
this
.
fileProviderOf
(
file
)
.
get
(
file
,
(
error
,
content
)
=>
{
provider
.
get
(
file
,
(
error
,
content
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
else
{
}
else
{
if
(
this
.
fileProviderOf
(
file
)
.
isReadOnly
(
file
))
{
if
(
provider
.
isReadOnly
(
file
))
{
this
.
editor
.
openReadOnly
(
file
,
content
)
this
.
editor
.
openReadOnly
(
file
,
content
)
}
else
{
}
else
{
this
.
editor
.
open
(
file
,
content
)
this
.
editor
.
open
(
file
,
content
)
...
...
src/app/files/remixDProvider.js
View file @
34b73c11
...
@@ -89,6 +89,14 @@ module.exports = class RemixDProvider {
...
@@ -89,6 +89,14 @@ module.exports = class RemixDProvider {
return
cb
(
null
,
result
)
return
cb
(
null
,
result
)
}
}
getNormalizedName
(
path
)
{
return
path
}
getPathFromUrl
(
path
)
{
return
path
}
get
(
path
,
cb
)
{
get
(
path
,
cb
)
{
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
unprefixedpath
=
this
.
removePrefix
(
path
)
this
.
_remixd
.
call
(
'sharedfolder'
,
'get'
,
{
path
:
unprefixedpath
},
(
error
,
file
)
=>
{
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