Skip to content

Commit

Permalink
fixing tests for 2023.2
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Aug 19, 2023
1 parent 68eaec0 commit 3b57d57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package com.intellij.plugins.haxe.lang.parser;

import com.intellij.core.CoreInjectedLanguageManager;
import com.intellij.lang.LanguageASTFactory;
import com.intellij.lang.LanguageParserDefinitions;
import com.intellij.lang.injection.InjectedLanguageManager;
Expand Down Expand Up @@ -61,17 +62,16 @@ protected void setUp() throws Exception {

// Work around @NotNull bug down in the test fixture. Since no InjectedLanguageManager
// was registered, null was passed to a @NotNull function. This affected testSimple().
registerExtensionPoint(getExtensionArea(myProject), MockMultiHostInjector.MULTIHOST_INJECTOR_EP_NAME, MockMultiHostInjector.class);
registerExtensionPoint(getExtensionArea(getProject()), MockMultiHostInjector.MULTIHOST_INJECTOR_EP_NAME, MockMultiHostInjector.class);
registerExtensionPoint(getExtensionArea(null), RegexLanguageInjector.EXTENSION_POINT_NAME,
RegexLanguageInjector.class); // Might as well use the real one.
registerInjectedLanguageManager();
// End workaround.
}

private void registerInjectedLanguageManager() {
InjectedLanguageManagerImpl manager = new InjectedLanguageManagerImpl(myProject);
myProject.registerService(DumbService.class, MockDumbService.class);
myProject.registerService(InjectedLanguageManager.class, manager);
getProject().registerService(DumbService.class, MockDumbService.class);
getProject().registerService(InjectedLanguageManager.class, CoreInjectedLanguageManager.class);
}

private <T> void registerMetadataParser() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ConditionalCompilationTest() {
}

private void setDefines(String defines) {
myProject.putUserData(HaxeConditionalExpression.DEFINES_KEY, defines);
getProject().putUserData(HaxeConditionalExpression.DEFINES_KEY, defines);
}

@Test
Expand Down

0 comments on commit 3b57d57

Please sign in to comment.