List of usage examples for org.eclipse.jdt.internal.core Openable canBeRemovedFromCache
public boolean canBeRemovedFromCache()
From source file:com.codenvy.ide.ext.java.server.internal.core.ElementCache.java
License:Open Source License
/** * Returns true if the element is successfully closed and * removed from the cache, otherwise false. * * <p>NOTE: this triggers an external removal of this element * by closing the element.//from w w w. j a v a2s. c o m */ protected boolean close(LRUCacheEntry entry) { Openable element = (Openable) entry.key; try { if (!element.canBeRemovedFromCache()) { return false; } else { element.close(); return true; } } catch (JavaModelException npe) { return false; } }