mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[jpa] assertExpensiveOperationsAreAllowed added to JpaConfigurationModel
GitOrigin-RevId: 96f418773167e45d8a5dd344a18668c811507b3e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d6a4423730
commit
15547da573
@@ -45,11 +45,6 @@ public class XmlEnumeratedValueReferenceProvider<T extends PsiElement> extends P
|
||||
if (XmlSchemaTagsProcessor.PROCESSING_FLAG.get() != null || context.get(SUPPRESS) != null) {
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") PsiElement host = getHost((T)element);
|
||||
if (host instanceof PsiLanguageInjectionHost && InjectedLanguageUtil.hasInjections((PsiLanguageInjectionHost)host)) {
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
if (XmlHighlightVisitor.skipValidation(element)) {
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
@@ -61,16 +56,22 @@ public class XmlEnumeratedValueReferenceProvider<T extends PsiElement> extends P
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") final Object descriptor = getDescriptor((T)element);
|
||||
if (descriptor instanceof XmlEnumerationDescriptor enumerationDescriptor) {
|
||||
if (!(descriptor instanceof XmlEnumerationDescriptor enumerationDescriptor)) {
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
if (enumerationDescriptor.isFixed() || enumerationDescriptor.isEnumerated((XmlElement)element)) {
|
||||
//noinspection unchecked
|
||||
return enumerationDescriptor.getValueReferences((XmlElement)element, unquotedValue);
|
||||
}
|
||||
else if (unquotedValue.equals(enumerationDescriptor.getDefaultValue())) { // todo case insensitive
|
||||
return ContainerUtil.map2Array(enumerationDescriptor.getValueReferences((XmlElement)element, unquotedValue), PsiReference.class,
|
||||
reference -> PsiDelegateReference.createSoft(reference, true));
|
||||
}
|
||||
@SuppressWarnings("unchecked") PsiElement host = getHost((T)element);
|
||||
if (host instanceof PsiLanguageInjectionHost && InjectedLanguageUtil.hasInjections((PsiLanguageInjectionHost)host)) {
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
if (enumerationDescriptor.isFixed() || enumerationDescriptor.isEnumerated((XmlElement)element)) {
|
||||
//noinspection unchecked
|
||||
return enumerationDescriptor.getValueReferences((XmlElement)element, unquotedValue);
|
||||
}
|
||||
else if (unquotedValue.equals(enumerationDescriptor.getDefaultValue())) { // todo case insensitive
|
||||
return ContainerUtil.map2Array(enumerationDescriptor.getValueReferences((XmlElement)element, unquotedValue), PsiReference.class,
|
||||
reference -> PsiDelegateReference.createSoft(reference, true));
|
||||
}
|
||||
return PsiReference.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user