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
ebbebb41
Commit
ebbebb41
authored
Aug 12, 2021
by
lianahus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added save to the action (wip)
parent
4e9299bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
plugin-manager-component.js
.../remix-ide/src/app/components/plugin-manager-component.js
+7
-6
No files found.
apps/remix-ide/src/app/components/plugin-manager-component.js
View file @
ebbebb41
...
...
@@ -105,10 +105,10 @@ class PluginManagerComponent extends ViewPlugin {
async
registerFlattener
(
event
)
{
if
(
!
this
.
appManager
.
isActive
(
'solidity'
))
{
await
this
.
appManager
.
activatePlugin
(
'solidity'
)
}
const
compiledSuccessfully
=
await
this
.
call
(
'solidity'
,
'compileFile'
,
event
)
const
reporCompileIssue
=
()
=>
{
const
reporCompileIssue
=
async
()
=>
{
this
.
call
(
'fileManager'
,
'open'
,
event
.
path
[
0
])
addToolTip
(
'Cannot flatten the file. Please make sure it is compiling successfully.'
)
this
.
call
(
'menuicons'
,
'select'
,
'solidity'
)
await
this
.
call
(
'menuicons'
,
'select'
,
'solidity'
)
}
setTimeout
(
async
()
=>
{
if
(
compiledSuccessfully
)
{
...
...
@@ -116,8 +116,9 @@ class PluginManagerComponent extends ViewPlugin {
if
(
!
res
)
{
reporCompileIssue
()
}
else
{
this
.
call
(
'menuicons'
,
'select'
,
'flattener1'
)
await
this
.
call
(
'flattener1'
,
'flatten'
,
res
)
await
this
.
call
(
'menuicons'
,
'select'
,
'flattener1'
)
const
path
=
await
this
.
call
(
'flattener1'
,
'flattenAndSave'
,
res
)
await
this
.
call
(
'fileManager'
,
'open'
,
path
)
}
}
else
{
reporCompileIssue
()
...
...
@@ -125,8 +126,8 @@ class PluginManagerComponent extends ViewPlugin {
},
1000
)
}
onActivation
()
{
this
.
call
(
'filePanel'
,
'registerContextMenuItem'
,
{
async
onActivation
()
{
await
this
.
call
(
'filePanel'
,
'registerContextMenuItem'
,
{
id
:
'pluginManager'
,
name
:
'registerFlattener'
,
label
:
'Flatten'
,
...
...
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