MavenServerConnector (@NotNull Project project, @NotNull String multimoduleDirectory, @NotNull Sdk jdk) { MavenServerConnector connector; synchronized (myMultimoduleDirToConnectorMap) { connector = myMultimoduleDirToConnectorMap.get(multimoduleDirectory); if (connector != null) return connector; connector = findCompatibleConnector(project, jdk, multimoduleDirectory); if (connector != null) { MavenLog.LOG.debug("[connector] use existing connector for " + connector); connector.addMultimoduleDir(multimoduleDirectory); } else { connector = registerNewConnector(project, jdk, multimoduleDirectory); } myMultimoduleDirToConnectorMap.put(multimoduleDirectory, connector); } return connector; }