Search in sources :

Example 1 with BallerinaSdkType

use of org.ballerinalang.plugins.idea.sdk.BallerinaSdkType in project ballerina by ballerina-lang.

the class BallerinaCodeInsightFixtureTestCase method createMockSdk.

@NotNull
private static Sdk createMockSdk(@NotNull String version) {
    String homePath = new File(getTestDataPath("mockSdk-") + version + "/").getAbsolutePath();
    BallerinaSdkType sdkType = BallerinaSdkType.getInstance();
    ProjectJdkImpl sdk = new ProjectJdkImpl("Ballerina " + version, sdkType, homePath, version);
    sdkType.setupSdkPaths(sdk);
    sdk.setVersionString(version);
    return sdk;
}
Also used : BallerinaSdkType(org.ballerinalang.plugins.idea.sdk.BallerinaSdkType) ProjectJdkImpl(com.intellij.openapi.projectRoots.impl.ProjectJdkImpl) File(java.io.File) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ProjectJdkImpl (com.intellij.openapi.projectRoots.impl.ProjectJdkImpl)1 File (java.io.File)1 BallerinaSdkType (org.ballerinalang.plugins.idea.sdk.BallerinaSdkType)1 NotNull (org.jetbrains.annotations.NotNull)1