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
3397b639
Unverified
Commit
3397b639
authored
May 31, 2021
by
yann300
Committed by
GitHub
May 31, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1232 from ethereum/activatehat
fixes for deactivating hardhat
parents
3a96a09d
8d02d6c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
remixd-handle.js
apps/remix-ide/src/app/files/remixd-handle.js
+7
-8
No files found.
apps/remix-ide/src/app/files/remixd-handle.js
View file @
3397b639
...
@@ -31,17 +31,17 @@ const profile = {
...
@@ -31,17 +31,17 @@ const profile = {
}
}
export
class
RemixdHandle
extends
WebsocketPlugin
{
export
class
RemixdHandle
extends
WebsocketPlugin
{
constructor
(
locahostProvider
,
appManager
)
{
constructor
(
loca
l
hostProvider
,
appManager
)
{
super
(
profile
)
super
(
profile
)
this
.
loca
hostProvider
=
loca
hostProvider
this
.
loca
lhostProvider
=
local
hostProvider
this
.
appManager
=
appManager
this
.
appManager
=
appManager
}
}
deactivate
()
{
deactivate
()
{
if
(
super
.
socket
)
super
.
deactivate
()
if
(
super
.
socket
)
super
.
deactivate
()
// this.appManager.deactivatePlugin('git') // plugin call doesn't work.. see issue https://github.com/ethereum/remix-plugin/issues/342
// this.appManager.deactivatePlugin('git') // plugin call doesn't work.. see issue https://github.com/ethereum/remix-plugin/issues/342
this
.
appManager
.
deactivatePlugin
(
'hardhat'
)
if
(
this
.
appManager
.
actives
.
includes
(
'hardhat'
))
this
.
appManager
.
deactivatePlugin
(
'hardhat'
)
this
.
locahostProvider
.
close
((
error
)
=>
{
this
.
loca
l
hostProvider
.
close
((
error
)
=>
{
if
(
error
)
console
.
log
(
error
)
if
(
error
)
console
.
log
(
error
)
})
})
}
}
...
@@ -53,7 +53,6 @@ export class RemixdHandle extends WebsocketPlugin {
...
@@ -53,7 +53,6 @@ export class RemixdHandle extends WebsocketPlugin {
async
canceled
()
{
async
canceled
()
{
// await this.appManager.deactivatePlugin('git') // plugin call doesn't work.. see issue https://github.com/ethereum/remix-plugin/issues/342
// await this.appManager.deactivatePlugin('git') // plugin call doesn't work.. see issue https://github.com/ethereum/remix-plugin/issues/342
await
this
.
appManager
.
deactivatePlugin
(
'remixd'
)
await
this
.
appManager
.
deactivatePlugin
(
'remixd'
)
await
this
.
appManager
.
deactivatePlugin
(
'hardhat'
)
}
}
/**
/**
...
@@ -83,11 +82,11 @@ export class RemixdHandle extends WebsocketPlugin {
...
@@ -83,11 +82,11 @@ export class RemixdHandle extends WebsocketPlugin {
this
.
canceled
()
this
.
canceled
()
}
}
},
3000
)
},
3000
)
this
.
locahostProvider
.
init
(()
=>
{})
this
.
loca
l
hostProvider
.
init
(()
=>
{})
this
.
call
(
'manager'
,
'activatePlugin'
,
'hardhat'
)
this
.
call
(
'manager'
,
'activatePlugin'
,
'hardhat'
)
}
}
}
}
if
(
this
.
locahostProvider
.
isConnected
())
{
if
(
this
.
loca
l
hostProvider
.
isConnected
())
{
this
.
deactivate
()
this
.
deactivate
()
}
else
if
(
!
isElectron
())
{
}
else
if
(
!
isElectron
())
{
// warn the user only if he/she is in the browser context
// warn the user only if he/she is in the browser context
...
@@ -98,7 +97,7 @@ export class RemixdHandle extends WebsocketPlugin {
...
@@ -98,7 +97,7 @@ export class RemixdHandle extends WebsocketPlugin {
label
:
'Connect'
,
label
:
'Connect'
,
fn
:
()
=>
{
fn
:
()
=>
{
try
{
try
{
this
.
locahostProvider
.
preInit
()
this
.
loca
l
hostProvider
.
preInit
()
super
.
activate
()
super
.
activate
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
!
this
.
socket
||
(
this
.
socket
&&
this
.
socket
.
readyState
===
3
))
{
// 3 means connection closed
if
(
!
this
.
socket
||
(
this
.
socket
&&
this
.
socket
.
readyState
===
3
))
{
// 3 means connection closed
...
...
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