use of org.elixir_lang.sdk.ElixirSdkType in project intellij-elixir by KronicDeth.
the class ParsingTestCase method registerElixirSdkType.
@NotNull
protected ElixirSdkType registerElixirSdkType() {
registerExtensionPoint(com.intellij.openapi.projectRoots.SdkType.EP_NAME, com.intellij.openapi.projectRoots.SdkType.class);
registerExtension(com.intellij.openapi.projectRoots.SdkType.EP_NAME, new ElixirSdkType());
ElixirSdkType elixirSdkType = ElixirSdkType.getInstance();
assertNotNull(elixirSdkType);
return elixirSdkType;
}
use of org.elixir_lang.sdk.ElixirSdkType in project intellij-elixir by KronicDeth.
the class ParsingTestCase method setProjectSdkFromSdkHome.
private void setProjectSdkFromSdkHome(@NotNull String sdkHome) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
MessageBus messageBus = messageBus();
registerProjectFileIndex(messageBus);
ProjectRootManager projectRootManager = registerProjectRootManager();
assertTrue(pathIsValidSdkHome(sdkHome));
registerExtensionPoint(OrderRootType.EP_NAME, OrderRootType.class);
registerExtension(OrderRootType.EP_NAME, new JavadocOrderRootType());
getApplication().addComponent(VirtualFileManager.class, new VirtualFileManagerImpl(new VirtualFileSystem[] { new MockLocalFileSystem() }, messageBus));
ProjectJdkTable projectJdkTable = new ProjectJdkTableImpl();
registerApplicationService(ProjectJdkTable.class, projectJdkTable);
registerExtensionPoint(com.intellij.openapi.projectRoots.SdkType.EP_NAME, com.intellij.openapi.projectRoots.SdkType.class);
registerExtension(com.intellij.openapi.projectRoots.SdkType.EP_NAME, new ElixirSdkType());
Sdk sdk = ElixirSdkType.createMockSdk(sdkHome, elixirSdkRelease());
projectJdkTable.addJdk(sdk);
ExtensionsArea area = Extensions.getArea(myProject);
registerExtensionPoint(area, ProjectExtension.EP_NAME, ProjectExtension.class);
registerExtensionPoint(FilePropertyPusher.EP_NAME, FilePropertyPusher.class);
myProject.addComponent(PushedFilePropertiesUpdater.class, new PushedFilePropertiesUpdaterImpl(myProject));
projectRootManager.setProjectSdk(sdk);
}
Aggregations