Cleanup evicted name environments
This commit is contained in:
@@ -97,7 +97,13 @@ public final class CompilationUnitCache implements DocumentContentProvider {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
this.projectToDocs = CacheBuilder.newBuilder().build();
|
this.projectToDocs = CacheBuilder.newBuilder().build();
|
||||||
this.lookupEnvCache = CacheBuilder.newBuilder().build();
|
this.lookupEnvCache = CacheBuilder.newBuilder().removalListener(new RemovalListener<URI, Tuple2<List<Classpath>, INameEnvironmentWithProgress>>() {
|
||||||
|
@Override
|
||||||
|
public void onRemoval(RemovalNotification<URI, Tuple2<List<Classpath>, INameEnvironmentWithProgress>> notification) {
|
||||||
|
notification.getValue().getT2().cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
}).build();
|
||||||
|
|
||||||
this.documentService = server == null ? null : server.getTextDocumentService();
|
this.documentService = server == null ? null : server.getTextDocumentService();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user