private Map<String, IRuntime> getServerRuntimes(IProjectFacetVersion facetVersion) { Set<org.eclipse.wst.common.project.facet.core.runtime.IRuntime> runtimesSet; if (facetVersion == null) { runtimesSet = RuntimeManager.getRuntimes(); } else { runtimesSet = RuntimeManager.getRuntimes(Collections.singleton(facetVersion)); } Map<String, IRuntime> runtimesMap = new LinkedHashMap<>(); for (org.eclipse.wst.common.project.facet.core.runtime.IRuntime r : runtimesSet) { IRuntime serverRuntime = FacetUtil.getRuntime(r); if (serverRuntime != null) { runtimesMap.put(r.getLocalizedName(), serverRuntime); } } return runtimesMap; }