boolean (Artifact a) { // method is called from different threads, so we have to copy the reference so ensure there is no race conditions. MavenWorkspaceMap map = myWorkspaceMap; if (map == null) return false; MavenWorkspaceMap.Data resolved = map.findFileAndOriginalId(Maven3ModelConverter.createMavenId(a)); if (resolved == null) return false; a.setResolved(true); a.setFile(resolved.getFile(a.getType())); a.selectVersion(resolved.originalId.getVersion()); return true; }