frontend spec by workspace instead
This commit is contained in:
+4
-3
@@ -8,7 +8,7 @@ import java.util.Optional;
|
||||
|
||||
public class FrontendRegistryService {
|
||||
private static final FrontendSpec[] FRONTEND_SPECS = {
|
||||
PBSDefinitions.PBS,
|
||||
PBSDefinitions.PBS,
|
||||
};
|
||||
|
||||
private static final Map<String, FrontendSpec> FRONTENDS = new HashMap<>();
|
||||
@@ -17,7 +17,8 @@ public class FrontendRegistryService {
|
||||
for (final var frontendSpec : FRONTEND_SPECS) {
|
||||
FRONTENDS.put(frontendSpec.getLanguageId(), frontendSpec);
|
||||
}
|
||||
if (FRONTENDS.size() != FRONTEND_SPECS.length) throw new IllegalStateException("Duplicate frontend specs found");
|
||||
if (FRONTENDS.size() != FRONTEND_SPECS.length)
|
||||
throw new IllegalStateException("Duplicate frontend specs found");
|
||||
}
|
||||
|
||||
public static FrontendSpec getDefaultFrontendSpec() {
|
||||
@@ -27,4 +28,4 @@ public class FrontendRegistryService {
|
||||
public static Optional<FrontendSpec> getFrontendSpec(final String languageId) {
|
||||
return Optional.ofNullable(FRONTENDS.get(languageId));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user