DataContext () { Component referenceComponent; if (myReferenceComponent == null) { referenceComponent = IdeFocusManager.getInstance(myManager.myProject).getFocusOwner(); myReferenceComponent = new WeakReference<>(referenceComponent); } else { referenceComponent = SoftReference.dereference(myReferenceComponent); if (referenceComponent == null || ! referenceComponent.isShowing()) referenceComponent = myHint.getComponent(); } return DataManager.getInstance().getDataContext(referenceComponent); }