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
7955dbee
Commit
7955dbee
authored
Jun 03, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear offsetToLineColumn cache when new compilation arrives
parent
10395b85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
app.js
src/app.js
+5
-5
offsetToLineColumnConverter.js
src/lib/offsetToLineColumnConverter.js
+4
-2
No files found.
src/app.js
View file @
7955dbee
...
@@ -263,10 +263,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -263,10 +263,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
return
'Are you sure you want to leave?'
return
'Are you sure you want to leave?'
}
}
let
appStore
=
new
EntityStore
(
'module'
,
'name'
)
const
appManager
=
new
RemixAppManager
(
appStore
)
registry
.
put
({
api
:
appManager
,
name
:
'appmanager'
})
registry
.
put
({
api
:
msg
=>
self
.
_components
.
mainview
.
logHtmlMessage
(
msg
),
name
:
'logCallback'
})
registry
.
put
({
api
:
msg
=>
self
.
_components
.
mainview
.
logHtmlMessage
(
msg
),
name
:
'logCallback'
})
// helper for converting offset to line/column
// helper for converting offset to line/column
var
offsetToLineColumnConverter
=
new
OffsetToLineColumnConverter
()
var
offsetToLineColumnConverter
=
new
OffsetToLineColumnConverter
(
appManager
)
registry
.
put
({
api
:
offsetToLineColumnConverter
,
name
:
'offsettolinecolumnconverter'
})
registry
.
put
({
api
:
offsetToLineColumnConverter
,
name
:
'offsettolinecolumnconverter'
})
// json structure for hosting the last compilattion result
// json structure for hosting the last compilattion result
...
@@ -318,10 +322,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -318,10 +322,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// TODO: There are still a lot of dep between mainview and filemanager
// TODO: There are still a lot of dep between mainview and filemanager
let
appStore
=
new
EntityStore
(
'module'
,
'name'
)
const
appManager
=
new
RemixAppManager
(
appStore
)
registry
.
put
({
api
:
appManager
,
name
:
'appmanager'
})
// ----------------- file manager ----------------------------
// ----------------- file manager ----------------------------
self
.
_components
.
fileManager
=
new
FileManager
()
self
.
_components
.
fileManager
=
new
FileManager
()
const
fileManager
=
self
.
_components
.
fileManager
const
fileManager
=
self
.
_components
.
fileManager
...
...
src/lib/offsetToLineColumnConverter.js
View file @
7955dbee
'use strict'
'use strict'
var
SourceMappingDecoder
=
require
(
'remix-lib'
).
SourceMappingDecoder
var
SourceMappingDecoder
=
require
(
'remix-lib'
).
SourceMappingDecoder
function
offsetToColumnConverter
()
{
function
offsetToColumnConverter
(
appManager
)
{
this
.
lineBreakPositionsByContent
=
{}
this
.
lineBreakPositionsByContent
=
{}
this
.
sourceMappingDecoder
=
new
SourceMappingDecoder
()
this
.
sourceMappingDecoder
=
new
SourceMappingDecoder
()
// we don't listen anymore on compilation result for clearing the cache
appManager
.
data
.
proxy
.
event
.
register
(
'sendCompilationResult'
,
()
=>
{
this
.
clear
()
})
}
}
offsetToColumnConverter
.
prototype
.
offsetToLineColumn
=
function
(
rawLocation
,
file
,
sources
,
asts
)
{
offsetToColumnConverter
.
prototype
.
offsetToLineColumn
=
function
(
rawLocation
,
file
,
sources
,
asts
)
{
...
...
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