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
b8dabed8
Unverified
Commit
b8dabed8
authored
Nov 23, 2020
by
yann300
Committed by
GitHub
Nov 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #601 from ethereum/addPluginApi
FileManager: emit fileSaved and fileAdded
parents
887e76e9
5b2dc6c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
fileManager.js
apps/remix-ide/src/app/files/fileManager.js
+5
-1
No files found.
apps/remix-ide/src/app/files/fileManager.js
View file @
b8dabed8
...
...
@@ -158,7 +158,9 @@ class FileManager extends Plugin {
await
this
.
_handleIsFile
(
path
,
`Cannot write file
${
path
}
`
)
return
await
this
.
setFileContent
(
path
,
data
)
}
else
{
return
await
this
.
setFileContent
(
path
,
data
)
const
ret
=
await
this
.
setFileContent
(
path
,
data
)
this
.
emit
(
'fileAdded'
,
path
)
return
ret
}
}
...
...
@@ -396,6 +398,7 @@ class FileManager extends Plugin {
provider
.
set
(
path
,
content
,
(
error
)
=>
{
if
(
error
)
reject
(
error
)
this
.
syncEditor
(
path
)
this
.
emit
(
'fileSaved'
,
path
)
resolve
(
true
)
})
})
...
...
@@ -528,6 +531,7 @@ class FileManager extends Plugin {
var
provider
=
this
.
fileProviderOf
(
currentFile
)
if
(
provider
)
{
provider
.
set
(
currentFile
,
input
)
this
.
emit
(
'fileSaved'
,
currentFile
)
}
else
{
console
.
log
(
'cannot save '
+
currentFile
+
'. Does not belong to any explorer'
)
}
...
...
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