forked from Skydev0h/intellij-solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'intellij-solidity-master'
# Conflicts: # gradle.properties # src/main/kotlin/me/serce/solidity/ide/highlighter.kt
- Loading branch information
Showing
25 changed files
with
210 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
*.ipr | ||
*.iws | ||
gen | ||
lib | ||
/lib | ||
.sandbox | ||
.DS_Store | ||
/out/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version=[2.3.10-TL-0.9-SNAPSHOT | ||
version=2.3.11-TL-0.9-SNAPSHOT | ||
group=me.serce | ||
kotlin_version=1.6.21 | ||
sentry_version=1.6.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/resources/fileTemplates/internal/Solidity Contract Interface.sol.ft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.0; | ||
|
||
interface ${NAME} { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/fileTemplates/internal/Solidity Contract Interface.sol.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
Empty Solidity smart contract interface. | ||
</body> | ||
</html> |
3 changes: 2 additions & 1 deletion
3
src/main/resources/fileTemplates/internal/Solidity Contract.sol.ft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.0; | ||
|
||
contract ${NAME} { | ||
function ${NAME}(){ | ||
constructor(){ | ||
|
||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/main/resources/fileTemplates/internal/Solidity Library.sol.ft
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.0; | ||
|
||
library ${NAME} { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/test/kotlin/me/serce/solidity/lang/core/resolve/SolImportResolveFoundryTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package me.serce.solidity.lang.core.resolve | ||
|
||
import me.serce.solidity.lang.psi.SolNamedElement | ||
|
||
class SolImportResolveFoundryTest : SolResolveTestBase() { | ||
|
||
fun testImportPathResolveFoundryRemappings() { | ||
val testcases = arrayListOf<Pair<String, String>>( | ||
Pair("lib/forge-std/src/Test.sol","contracts/ImportUsageFoundryStd.sol"), | ||
Pair("lib/solmate/src/tokens/ERC721.sol","contracts/ImportUsageFoundrySolmate.sol"), | ||
Pair("lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol","contracts/ImportUsageFoundryOpenzeppelin.sol"), | ||
); | ||
testcases.forEach { (targetFile, contractFile) -> | ||
val file1 = myFixture.configureByFile(targetFile) | ||
myFixture.configureByFile("remappings.txt") | ||
myFixture.configureByFile(contractFile) | ||
val (refElement) = findElementAndDataInEditor<SolNamedElement>("^") | ||
val resolved = checkNotNull(refElement.reference?.resolve()) { | ||
"Failed to resolve ${refElement.text}" | ||
} | ||
assertEquals(file1.name, resolved.containingFile.name) | ||
} | ||
} | ||
|
||
override fun getTestDataPath() = "src/test/resources/fixtures/importRemappings/" | ||
} |
Oops, something went wrong.