- Failable<Module> result = repository.getModule(input.getModuleName(), updateListener);
- if(result instanceof Failure) {
- Failure failure = (Failure)result;
- setAnnotations(Arrays.asList(failure.errors));
- }
- else if(result == DoesNotExist.INSTANCE)
- setAnnotations(Collections.<CompilationError>emptyList());
- else
- setAnnotations(Arrays.asList(result.getResult().getWarnings()));
+ ForkJoinPool.commonPool().submit(() -> {
+ if (!connected)
+ return;
+ Failable<Module> result = repository.getModule(input.getModuleName(), updateListener);
+ if(result instanceof Failure) {
+ Failure failure = (Failure)result;
+ setAnnotations(Arrays.asList(failure.errors));
+ }
+ else if(result == DoesNotExist.INSTANCE)
+ setAnnotations(Collections.<CompilationError>emptyList());
+ else
+ setAnnotations(Arrays.asList(result.getResult().getWarnings()));
+ });