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
188d4fd7
Commit
188d4fd7
authored
May 31, 2016
by
Dave Hoover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract noise to editor.hasFile; And a couple fixes
parent
41df6899
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
compiler.js
src/app/compiler.js
+4
-4
editor.js
src/app/editor.js
+3
-0
renderer.js
src/app/renderer.js
+1
-1
No files found.
src/app/compiler.js
View file @
188d4fd7
...
@@ -45,7 +45,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
...
@@ -45,7 +45,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
gatherImports
(
files
,
missingInputs
,
function
(
input
,
error
)
{
gatherImports
(
files
,
missingInputs
,
function
(
input
,
error
)
{
outputField
.
empty
();
outputField
.
empty
();
if
(
input
===
null
)
{
if
(
input
===
null
)
{
render
.
error
(
error
);
render
er
.
error
(
error
);
}
else
{
}
else
{
var
optimize
=
queryParams
.
get
().
optimize
;
var
optimize
=
queryParams
.
get
().
optimize
;
compileJSON
(
input
,
optimize
?
1
:
0
);
compileJSON
(
input
,
optimize
?
1
:
0
);
...
@@ -122,7 +122,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
...
@@ -122,7 +122,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
}
}
if
(
missingInputs
!==
undefined
&&
missingInputs
.
length
>
0
)
if
(
missingInputs
!==
undefined
&&
missingInputs
.
length
>
0
)
this
.
compile
(
missingInputs
);
compile
(
missingInputs
);
else
if
(
noFatalErrors
&&
!
hidingRHP
())
else
if
(
noFatalErrors
&&
!
hidingRHP
())
renderer
.
contracts
(
data
,
editor
.
getValue
());
renderer
.
contracts
(
data
,
editor
.
getValue
());
}
}
...
@@ -171,10 +171,10 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
...
@@ -171,10 +171,10 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
while
(
importHints
.
length
>
0
)
{
while
(
importHints
.
length
>
0
)
{
var
m
=
importHints
.
pop
();
var
m
=
importHints
.
pop
();
if
(
m
in
files
)
continue
;
if
(
m
in
files
)
continue
;
if
(
editor
.
getFiles
().
indexOf
(
utils
.
fileKey
(
m
))
!==
-
1
)
{
if
(
editor
.
hasFile
(
m
)
)
{
files
[
m
]
=
window
.
localStorage
[
utils
.
fileKey
(
m
)];
files
[
m
]
=
window
.
localStorage
[
utils
.
fileKey
(
m
)];
reloop
=
true
;
reloop
=
true
;
}
else
if
(
m
.
startsWith
(
'./'
)
&&
editor
.
getFiles
().
indexOf
(
utils
.
fileKey
(
m
.
slice
(
2
)))
!==
-
1
)
{
}
else
if
(
m
.
startsWith
(
'./'
)
&&
editor
.
hasFile
(
m
.
slice
(
2
))
)
{
files
[
m
]
=
window
.
localStorage
[
utils
.
fileKey
(
m
.
slice
(
2
))];
files
[
m
]
=
window
.
localStorage
[
utils
.
fileKey
(
m
.
slice
(
2
))];
reloop
=
true
;
reloop
=
true
;
}
else
if
(
m
in
cachedRemoteFiles
)
{
}
else
if
(
m
in
cachedRemoteFiles
)
{
...
...
src/app/editor.js
View file @
188d4fd7
...
@@ -38,7 +38,10 @@ function Editor(loadingFromGist) {
...
@@ -38,7 +38,10 @@ function Editor(loadingFromGist) {
this
.
resetSession
=
function
()
{
this
.
resetSession
=
function
()
{
editor
.
setSession
(
sessions
[
SOL_CACHE_FILE
]
);
editor
.
setSession
(
sessions
[
SOL_CACHE_FILE
]
);
editor
.
focus
();
editor
.
focus
();
};
this
.
hasFile
=
function
(
name
)
{
return
this
.
getFiles
().
indexOf
(
utils
.
fileKey
(
name
))
!==
-
1
};
};
this
.
getFiles
=
function
()
{
this
.
getFiles
=
function
()
{
...
...
src/app/renderer.js
View file @
188d4fd7
...
@@ -66,7 +66,7 @@ function Renderer(web3, editor, compiler, updateFiles) {
...
@@ -66,7 +66,7 @@ function Renderer(web3, editor, compiler, updateFiles) {
});
});
}
}
$error
.
click
(
function
(
ev
){
$error
.
click
(
function
(
ev
){
if
(
errFile
!=
''
&&
errFile
!=
editor
.
getCacheFile
()
&&
editor
.
getFiles
().
indexOf
(
utils
.
fileKey
(
errFile
))
!==
-
1
)
{
if
(
errFile
!=
''
&&
errFile
!=
editor
.
getCacheFile
()
&&
editor
.
hasFile
(
errFile
)
)
{
// Switch to file
// Switch to file
editor
.
setCacheFile
(
errFile
);
editor
.
setCacheFile
(
errFile
);
updateFiles
();
updateFiles
();
...
...
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