use of com.intellij.openapi.roots.impl.libraries.LibraryImpl in project intellij-community by JetBrains.
the class LibraryProjectStructureElement method getSourceOrThis.
@NotNull
private Library getSourceOrThis() {
final InvocationHandler invocationHandler = Proxy.isProxyClass(myLibrary.getClass()) ? Proxy.getInvocationHandler(myLibrary) : null;
final Library realLibrary = invocationHandler instanceof ModuleEditor.ProxyDelegateAccessor ? (Library) ((ModuleEditor.ProxyDelegateAccessor) invocationHandler).getDelegate() : myLibrary;
final Library source = realLibrary instanceof LibraryImpl ? ((LibraryImpl) realLibrary).getSource() : null;
return source != null ? source : myLibrary;
}
Aggregations