mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
pattern configurations: don't find one-class pattern for method configuration (IDEA-152733)
This commit is contained in:
+7
@@ -87,6 +87,13 @@ public abstract class AbstractPatternBasedConfigurationProducer<T extends Module
|
||||
collectContextElements(dataContext, true, false, classes, new PsiElementProcessor.CollectElements<PsiElement>());
|
||||
}
|
||||
if (Comparing.equal(classes, patterns)) {
|
||||
if (patterns.size() == 1) {
|
||||
final String pattern = patterns.iterator().next();
|
||||
if (!pattern.contains(",")) {
|
||||
final PsiMethod method = PsiTreeUtil.getParentOfType(CommonDataKeys.PSI_ELEMENT.getData(dataContext), PsiMethod.class);
|
||||
return method != null && isTestMethod(false, method);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user