mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
removed ugly dirty unsafe hacks
This commit is contained in:
@@ -37,7 +37,7 @@ public class PyConfigurationInjector extends PyInjectorBase {
|
||||
public void getLanguagesToInject(@NotNull MultiHostRegistrar registrar, @NotNull PsiElement context) {
|
||||
final PyInjectionUtil.InjectionResult result = registerInjection(registrar, context);
|
||||
if (!result.isStrict()) {
|
||||
InjectorUtils.putInjectedFileUserData(registrar, InjectedLanguageUtil.FRANKENSTEIN_INJECTION, Boolean.TRUE);
|
||||
InjectorUtils.putInjectedFileUserData(context, getInjectedLanguage(context), InjectedLanguageUtil.FRANKENSTEIN_INJECTION, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ public class PyTemporaryInjector extends PyInjectorBase {
|
||||
final PyInjectionUtil.InjectionResult result = registerInjection(registrar, context);
|
||||
if (result.isInjected()) {
|
||||
final TemporaryPlacesRegistry registry = TemporaryPlacesRegistry.getInstance(context.getProject());
|
||||
InjectorUtils.registerSupport(registry.getLanguageInjectionSupport(), false, registrar);
|
||||
InjectorUtils.registerSupport(registry.getLanguageInjectionSupport(), false, context, getInjectedLanguage(context));
|
||||
if (!result.isStrict()) {
|
||||
InjectorUtils.putInjectedFileUserData(registrar, InjectedLanguageUtil.FRANKENSTEIN_INJECTION, Boolean.TRUE);
|
||||
InjectorUtils.putInjectedFileUserData(context, getInjectedLanguage(context), InjectedLanguageUtil.FRANKENSTEIN_INJECTION, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user