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
761b3584
Commit
761b3584
authored
Mar 29, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move part of rhpAPI to plugin API
parent
2f45b733
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
18 deletions
+33
-18
app.js
src/app.js
+6
-12
righthand-panel.js
src/app/panels/righthand-panel.js
+1
-1
pluginAPI.js
src/app/plugin/pluginAPI.js
+24
-3
pluginManager.js
src/app/plugin/pluginManager.js
+2
-2
No files found.
src/app.js
View file @
761b3584
...
@@ -44,6 +44,7 @@ var BasicReadOnlyExplorer = require('./app/files/basicReadOnlyExplorer')
...
@@ -44,6 +44,7 @@ var BasicReadOnlyExplorer = require('./app/files/basicReadOnlyExplorer')
var
NotPersistedExplorer
=
require
(
'./app/files/NotPersistedExplorer'
)
var
NotPersistedExplorer
=
require
(
'./app/files/NotPersistedExplorer'
)
var
toolTip
=
require
(
'./app/ui/tooltip'
)
var
toolTip
=
require
(
'./app/ui/tooltip'
)
var
CommandInterpreter
=
require
(
'./lib/cmdInterpreter'
)
var
CommandInterpreter
=
require
(
'./lib/cmdInterpreter'
)
var
PluginAPI
=
require
(
'./app/plugin/pluginAPI'
)
var
styleGuide
=
require
(
'./app/ui/styles-guide/theme-chooser'
)
var
styleGuide
=
require
(
'./app/ui/styles-guide/theme-chooser'
)
var
styles
=
styleGuide
.
chooser
()
var
styles
=
styleGuide
.
chooser
()
...
@@ -780,17 +781,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -780,17 +781,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
},
},
newAccount
:
(
pass
,
cb
)
=>
{
newAccount
:
(
pass
,
cb
)
=>
{
udapp
.
newAccount
(
pass
,
cb
)
udapp
.
newAccount
(
pass
,
cb
)
},
setConfig
:
(
mod
,
path
,
content
,
cb
)
=>
{
self
.
_api
.
filesProviders
[
'config'
].
set
(
mod
+
'/'
+
path
,
content
)
cb
()
},
getConfig
:
(
mod
,
path
,
cb
)
=>
{
cb
(
null
,
self
.
_api
.
filesProviders
[
'config'
].
get
(
mod
+
'/'
+
path
))
},
removeConfig
:
(
mod
,
path
,
cb
)
=>
{
cb
(
null
,
self
.
_api
.
filesProviders
[
'config'
].
remove
(
mod
+
'/'
+
path
))
if
(
cb
)
cb
()
}
}
}
}
var
rhpEvents
=
{
var
rhpEvents
=
{
...
@@ -800,7 +790,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -800,7 +790,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
editor
:
editor
.
event
,
editor
:
editor
.
event
,
staticAnalysis
:
staticanalysis
.
event
staticAnalysis
:
staticanalysis
.
event
}
}
self
.
_components
.
righthandpanel
=
new
RighthandPanel
(
rhpAPI
,
rhpEvents
)
var
rhpOpts
=
{
pluginAPI
:
new
PluginAPI
(
self
,
compiler
)
}
self
.
_components
.
righthandpanel
=
new
RighthandPanel
(
rhpAPI
,
rhpEvents
,
rhpOpts
)
self
.
_view
.
rightpanel
.
appendChild
(
self
.
_components
.
righthandpanel
.
render
())
self
.
_view
.
rightpanel
.
appendChild
(
self
.
_components
.
righthandpanel
.
render
())
self
.
_components
.
righthandpanel
.
init
()
self
.
_components
.
righthandpanel
.
init
()
self
.
_components
.
righthandpanel
.
event
.
register
(
'resize'
,
delta
=>
self
.
_adjustLayout
(
'right'
,
delta
))
self
.
_components
.
righthandpanel
.
event
.
register
(
'resize'
,
delta
=>
self
.
_adjustLayout
(
'right'
,
delta
))
...
...
src/app/panels/righthand-panel.js
View file @
761b3584
...
@@ -63,7 +63,7 @@ function RighthandPanel (appAPI = {}, events = {}, opts = {}) {
...
@@ -63,7 +63,7 @@ function RighthandPanel (appAPI = {}, events = {}, opts = {}) {
this
.
_view
.
tabbedMenu
.
addTab
(
'Support'
,
'supportView'
,
optionViews
.
querySelector
(
'#supportView'
))
this
.
_view
.
tabbedMenu
.
addTab
(
'Support'
,
'supportView'
,
optionViews
.
querySelector
(
'#supportView'
))
this
.
_view
.
tabbedMenu
.
selectTabByTitle
(
'Compile'
)
this
.
_view
.
tabbedMenu
.
selectTabByTitle
(
'Compile'
)
self
.
pluginManager
=
new
PluginManager
(
app
API
,
events
)
self
.
pluginManager
=
new
PluginManager
(
opts
.
plugin
API
,
events
)
events
.
rhp
.
register
(
'plugin-loadRequest'
,
(
json
)
=>
{
events
.
rhp
.
register
(
'plugin-loadRequest'
,
(
json
)
=>
{
var
tab
=
new
PluginTab
(
appAPI
,
events
,
json
)
var
tab
=
new
PluginTab
(
appAPI
,
events
,
json
)
var
content
=
tab
.
render
()
var
content
=
tab
.
render
()
...
...
src/app/plugin/pluginAPI.js
View file @
761b3584
'use strict'
'use strict'
/*
module
.
exports
=
{
Defines available API. `key` / `type`
*/
module
.
exports
=
(
app
,
compiler
)
=>
{
return
{
config
:
{
setConfig
:
(
mod
,
path
,
content
,
cb
)
=>
{
app
.
_api
.
filesProviders
[
'config'
].
set
(
mod
+
'/'
+
path
,
content
)
cb
()
},
getConfig
:
(
mod
,
path
,
cb
)
=>
{
cb
(
null
,
app
.
_api
.
filesProviders
[
'config'
].
get
(
mod
+
'/'
+
path
))
},
removeConfig
:
(
mod
,
path
,
cb
)
=>
{
cb
(
null
,
app
.
_api
.
filesProviders
[
'config'
].
remove
(
mod
+
'/'
+
path
))
if
(
cb
)
cb
()
}
},
compiler
:
{
getCompilationResult
:
()
=>
{
return
compiler
.
lastCompilationResult
}
}
}
}
}
src/app/plugin/pluginManager.js
View file @
761b3584
...
@@ -72,7 +72,7 @@ class PluginManager {
...
@@ -72,7 +72,7 @@ class PluginManager {
this
.
inFocus
=
tabName
this
.
inFocus
=
tabName
this
.
post
(
tabName
,
JSON
.
stringify
({
this
.
post
(
tabName
,
JSON
.
stringify
({
type
:
'compilationData'
,
type
:
'compilationData'
,
value
:
api
.
getCompilationResult
()
value
:
api
.
compiler
.
getCompilationResult
()
}))
}))
}
}
})
})
...
@@ -93,7 +93,7 @@ class PluginManager {
...
@@ -93,7 +93,7 @@ class PluginManager {
data
.
arguments
.
push
((
error
,
result
)
=>
{
data
.
arguments
.
push
((
error
,
result
)
=>
{
response
(
data
.
type
,
data
.
id
,
error
,
result
)
response
(
data
.
type
,
data
.
id
,
error
,
result
)
})
})
api
[
data
.
type
].
apply
({},
data
.
arguments
)
api
[
data
.
key
][
data
.
type
].
apply
({},
data
.
arguments
)
}
}
}
}
},
false
)
},
false
)
...
...
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