Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Fixing Issue 284
Browse files Browse the repository at this point in the history
This commit fixes #284
  • Loading branch information
jthoene committed Aug 23, 2019
1 parent 415a36a commit 5270f46
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,12 @@ class SolidityQuickfixProvider extends ExpressionsQuickfixProvider {
acceptor.accept(issue, 'Add default solidity pragma', 'Add solidity pragma ' + solcVersion + '.', null,
new ISemanticModification() {
override apply(EObject element, IModificationContext context) throws Exception {
if (element instanceof SourceUnit) {
element.fixPragmaSolidityDirective
} else if (element.eContainer instanceof SourceUnit) {
(element.eContainer as SourceUnit).fixPragmaSolidityDirective
if (element.eContainer instanceof SourceUnit) {
val sourceUnit = element.eContainer as SourceUnit
val pragma = createPragmaSolidityDirective => [
version = solcVersion
]
sourceUnit.pragma += pragma
}
}
})
Expand Down

0 comments on commit 5270f46

Please sign in to comment.