List of usage examples for org.eclipse.jdt.internal.core Openable close
public void close() throws JavaModelException
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 a 2 s . co 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; } }