mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Extensible comment injector API: fix name
This commit is contained in:
+1
-1
@@ -307,7 +307,7 @@ public class ConcatenationInjector implements ConcatenationAwareInjector {
|
||||
PsiElement anchor = owner.getFirstChild() instanceof PsiComment?
|
||||
(owner.getModifierList() != null? owner.getModifierList() : owner.getTypeElement()) : owner;
|
||||
if (anchor == null) return true;
|
||||
BaseInjection injection = mySupport.findInjectionComment(anchor, causeRef);
|
||||
BaseInjection injection = mySupport.findCommentInjection(anchor, causeRef);
|
||||
return injection == null || processCommentInjectionInner(owner, causeRef.get(), injection);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public abstract class AbstractLanguageInjectionSupport extends LanguageInjection
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BaseInjection findInjectionComment(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef) {
|
||||
public BaseInjection findCommentInjection(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef) {
|
||||
return InjectorUtils.findCommentInjection(host, "comment", commentRef);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class CommentLanguageInjector implements MultiHostInjector {
|
||||
if (support == myInjectorSupport && applicableFound) continue;
|
||||
applicableFound = true;
|
||||
|
||||
BaseInjection injection = support.findInjectionComment(host, null);
|
||||
BaseInjection injection = support.findCommentInjection(host, null);
|
||||
if (injection == null) continue;
|
||||
if (!InjectorUtils.registerInjectionSimple(host, injection, support, registrar)) continue;
|
||||
return;
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public abstract class LanguageInjectionSupport {
|
||||
public abstract boolean useDefaultInjector(PsiLanguageInjectionHost host);
|
||||
|
||||
@Nullable
|
||||
public abstract BaseInjection findInjectionComment(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef);
|
||||
public abstract BaseInjection findCommentInjection(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef);
|
||||
|
||||
public abstract boolean addInjectionInPlace(final Language language, final PsiLanguageInjectionHost psiElement);
|
||||
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ public class XmlLanguageInjectionSupport extends AbstractLanguageInjectionSuppor
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BaseInjection findInjectionComment(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef) {
|
||||
public BaseInjection findCommentInjection(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef) {
|
||||
if (host instanceof XmlAttributeValue) return null;
|
||||
return InjectorUtils.findCommentInjection(host instanceof XmlText ? host.getParent() : host, getId(), commentRef);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user