-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update type folding / Test not working
- Loading branch information
Showing
6 changed files
with
56 additions
and
7 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
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
16 changes: 16 additions & 0 deletions
16
src/main/java/com/reason/lang/core/psi/type/ORTypesUtil.java
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,16 @@ | ||
package com.reason.lang.core.psi.type; | ||
|
||
import com.intellij.lang.Language; | ||
import com.reason.lang.ocaml.OclLanguage; | ||
import com.reason.lang.ocaml.OclTypes; | ||
import com.reason.lang.reason.RmlLanguage; | ||
import com.reason.lang.reason.RmlTypes; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public final class ORTypesUtil { | ||
|
||
public static MlTypes getInstance(@NotNull Language language) { | ||
return language instanceof RmlLanguage || language instanceof OclLanguage ? RmlTypes.INSTANCE : OclTypes.INSTANCE; | ||
} | ||
|
||
} |
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,3 @@ | ||
type variant <fold>= | ||
| B | ||
| C</fold>; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.reason.ide.folding; | ||
|
||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; | ||
|
||
public class TypeFoldingTest extends LightPlatformCodeInsightFixtureTestCase { | ||
@Override | ||
protected void setUp() throws Exception { | ||
super.setUp(); | ||
} | ||
|
||
@Override | ||
protected String getTestDataPath() { | ||
return "testData/com/reason/ide/folding"; | ||
} | ||
|
||
public void testModuleLetCompletion() { | ||
// NOT WORKING | ||
// myFixture.testFolding(getTestDataPath() + "/TypeFolding.re"); | ||
} | ||
} |