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
0d53c3b6
Unverified
Commit
0d53c3b6
authored
Aug 23, 2021
by
bunsenstraat
Committed by
GitHub
Aug 23, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into fixlogicentry
parents
57ff4973
ca6f594d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
10 deletions
+62
-10
app.js
apps/remix-ide/src/app.js
+3
-3
compile-tab.js
apps/remix-ide/src/app/tabs/compile-tab.js
+8
-2
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+28
-5
remixAppManager.js
apps/remix-ide/src/remixAppManager.js
+23
-0
No files found.
apps/remix-ide/src/app.js
View file @
0d53c3b6
...
...
@@ -357,8 +357,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
landingPage
,
hiddenPanel
,
sidePanel
,
pluginManagerComponent
,
filePanel
,
pluginManagerComponent
,
settings
])
...
...
@@ -482,8 +482,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
await
appManager
.
activatePlugin
([
'sidePanel'
])
// activating host plugin separately
await
appManager
.
activatePlugin
([
'home'
])
await
appManager
.
activatePlugin
([
'settings'
])
await
appManager
.
activatePlugin
([
'hiddenPanel'
,
'
pluginManager'
,
'filePanel'
,
'contextualListener'
,
'terminal'
,
'blockchain
'
,
'fetchAndCompile'
,
'contentImport'
])
await
appManager
.
activatePlugin
([
'hiddenPanel'
,
'
filePanel'
,
'pluginManager'
,
'contextualListener'
,
'terminal
'
,
'fetchAndCompile'
,
'contentImport'
])
await
appManager
.
registerContextMenuItems
()
// Set workspace after initial activation
if
(
Array
.
isArray
(
workspace
))
{
appManager
.
activatePlugin
(
workspace
).
then
(
async
()
=>
{
...
...
apps/remix-ide/src/app/tabs/compile-tab.js
View file @
0d53c3b6
...
...
@@ -340,11 +340,17 @@ class CompileTab extends ViewPlugin {
})
}
compileFile
(
event
)
{
// Returns if the compilation was successfull
async
compileFile
(
event
)
{
if
(
event
.
path
.
length
>
0
)
{
this
.
compileTabLogic
.
compileFile
(
event
.
path
[
0
])
try
{
return
await
this
.
compileTabLogic
.
compileFile
(
event
.
path
[
0
])
}
catch
(
error
)
{
return
false
}
}
return
false
}
onDeactivation
()
{
this
.
editor
.
event
.
unregister
(
'contentChanged'
)
...
...
apps/remix-ide/src/app/tabs/test-tab.js
View file @
0d53c3b6
...
...
@@ -14,7 +14,7 @@ const TestTabLogic = require('./testTab/testTab')
const
profile
=
{
name
:
'solidityUnitTesting'
,
displayName
:
'Solidity unit testing'
,
methods
:
[
'testFromPath'
,
'testFromSource'
],
methods
:
[
'testFromPath'
,
'testFromSource'
,
'setTestFolderPath'
],
events
:
[],
icon
:
'assets/img/unitTesting.webp'
,
description
:
'Fast tool to generate unit tests for your contracts'
,
...
...
@@ -51,6 +51,21 @@ module.exports = class TestTab extends ViewPlugin {
onActivationInternal
()
{
this
.
testTabLogic
=
new
TestTabLogic
(
this
.
fileManager
)
this
.
listenToEvents
()
this
.
call
(
'filePanel'
,
'registerContextMenuItem'
,
{
id
:
'solidityUnitTesting'
,
name
:
'setTestFolderPath'
,
label
:
'Set path for Unit Testing'
,
type
:
[
'folder'
],
extension
:
[],
path
:
[],
pattern
:
[]
})
}
async
setTestFolderPath
(
event
)
{
if
(
event
.
path
.
length
>
0
)
{
await
this
.
setCurrentPath
(
event
.
path
[
0
])
}
}
onDeactivation
()
{
...
...
@@ -77,10 +92,7 @@ module.exports = class TestTab extends ViewPlugin {
})
this
.
on
(
'filePanel'
,
'setWorkspace'
,
async
()
=>
{
this
.
testTabLogic
.
setCurrentPath
(
this
.
defaultPath
)
this
.
inputPath
.
value
=
this
.
defaultPath
this
.
updateDirList
(
this
.
defaultPath
)
await
this
.
updateForNewCurrent
()
this
.
setCurrentPath
(
this
.
defaultPath
)
})
this
.
fileManager
.
events
.
on
(
'noFileSelected'
,
()
=>
{
...
...
@@ -405,6 +417,17 @@ module.exports = class TestTab extends ViewPlugin {
return
this
.
testFromSource
(
fileContent
,
path
)
}
/**
* Changes the current path of Unit Testing Plugin
* @param path - the path from where UT plugin takes _test.sol files to run
*/
async
setCurrentPath
(
path
)
{
this
.
testTabLogic
.
setCurrentPath
(
path
)
this
.
inputPath
.
value
=
path
this
.
updateDirList
(
path
)
await
this
.
updateForNewCurrent
()
}
/*
Test is not associated with the UI
*/
...
...
apps/remix-ide/src/remixAppManager.js
View file @
0d53c3b6
...
...
@@ -133,6 +133,29 @@ export class RemixAppManager extends PluginManager {
return
new
IframePlugin
(
plugin
)
})
}
async
registerContextMenuItems
()
{
await
this
.
call
(
'filePanel'
,
'registerContextMenuItem'
,
{
id
:
'flattener'
,
name
:
'flattenFileCustomAction'
,
label
:
'Flatten'
,
type
:
[],
extension
:
[
'.sol'
],
path
:
[],
pattern
:
[],
sticky
:
true
})
await
this
.
call
(
'filePanel'
,
'registerContextMenuItem'
,
{
id
:
'optimism-compiler'
,
name
:
'compileCustomAction'
,
label
:
'Compile with Optimism'
,
type
:
[],
extension
:
[
'.sol'
],
path
:
[],
pattern
:
[],
sticky
:
true
})
}
}
/** @class Reference loaders.
...
...
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