mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more logging
This commit is contained in:
@@ -149,7 +149,11 @@ public class RefFieldImpl extends RefJavaElementImpl implements RefField {
|
||||
public String getExternalName() {
|
||||
return ReadAction.compute(() -> {
|
||||
UField uField = getUastElement();
|
||||
return uField != null ? PsiFormatUtil.getExternalName((PsiModifierListOwner)uField.getJavaPsi()) : null;
|
||||
LOG.info("uast field for RefField = " + uField);
|
||||
if (uField == null) return null;
|
||||
PsiModifierListOwner psi = (PsiModifierListOwner)uField.getJavaPsi();
|
||||
LOG.info("java field for RefField = " + psi);
|
||||
return PsiFormatUtil.getExternalName(psi);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+12
-8
@@ -36,15 +36,19 @@ public class SmartRefElementPointerImpl implements SmartRefElementPointer {
|
||||
private final String myType;
|
||||
|
||||
public SmartRefElementPointerImpl(RefEntity ref, boolean isPersistent) {
|
||||
myIsPersistent = isPersistent;
|
||||
myRefElement = ref;
|
||||
myFQName = ref.getExternalName();
|
||||
myType = ref.getRefManager().getType(ref);
|
||||
LOG.assertTrue(myFQName != null, "Name: " + ref.getName() +
|
||||
", qName: " + ref.getQualifiedName() +
|
||||
"; type: " + myType +
|
||||
(ref instanceof RefElement ? ("; containing file: " + getContainingFileName((RefElement)ref)) : ""));
|
||||
myIsPersistent = isPersistent;
|
||||
myRefElement = ref;
|
||||
myFQName = ref.getExternalName();
|
||||
myType = ref.getRefManager().getType(ref);
|
||||
if (myFQName == null) {
|
||||
boolean psiExists = ref instanceof RefElement && ((RefElement)ref).getPsiElement() != null;
|
||||
LOG.error("Name: " + ref.getName() +
|
||||
", qName: " + ref.getQualifiedName() +
|
||||
"; type: " + myType +
|
||||
"; psi exists: " + psiExists +
|
||||
(ref instanceof RefElement ? ("; containing file: " + getContainingFileName((RefElement)ref)) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SmartRefElementPointerImpl(Element jDomElement) {
|
||||
|
||||
Reference in New Issue
Block a user