mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not search ZenCodingGenerators for invalid context (EA-73274)
This commit is contained in:
@@ -66,6 +66,9 @@ public class ZenCodingTemplate extends CustomLiveTemplateBase {
|
||||
|
||||
@Nullable
|
||||
public static ZenCodingGenerator findApplicableDefaultGenerator(@NotNull PsiElement context, boolean wrapping) {
|
||||
if (!context.isValid()) {
|
||||
return null;
|
||||
}
|
||||
for (ZenCodingGenerator generator : ZenCodingGenerator.getInstances()) {
|
||||
if (generator.isMyContext(context, wrapping) && generator.isAppliedByDefault(context)) {
|
||||
return generator;
|
||||
|
||||
Reference in New Issue
Block a user