use of com.google.idea.blaze.base.projectview.ProjectViewSet in project intellij by bazelbuild.
the class BlazeAndroidLiteSyncPluginTest method testAndroidLanguageAvailable.
@Test
public void testAndroidLanguageAvailable() {
ProjectViewSet projectViewSet = ProjectViewSet.builder().add(ProjectView.builder().add(ScalarSection.builder(WorkspaceTypeSection.KEY).set(WorkspaceType.JAVA)).add(ListSection.builder(AdditionalLanguagesSection.KEY).add(LanguageClass.ANDROID)).build()).build();
WorkspaceLanguageSettings workspaceLanguageSettings = LanguageSupport.createWorkspaceLanguageSettings(projectViewSet);
errorCollector.assertNoIssues();
assertThat(workspaceLanguageSettings).isEqualTo(new WorkspaceLanguageSettings(WorkspaceType.JAVA, ImmutableSet.of(LanguageClass.ANDROID, LanguageClass.GENERIC, LanguageClass.JAVA)));
}
use of com.google.idea.blaze.base.projectview.ProjectViewSet in project intellij by bazelbuild.
the class BlazeJavascriptSyncPluginTest method testJavascriptWorkspaceTypeUnavailableForCommunityEdition.
@Test
public void testJavascriptWorkspaceTypeUnavailableForCommunityEdition() {
TestUtils.setPlatformPrefix(testDisposable, PlatformUtils.IDEA_CE_PREFIX);
ProjectViewSet projectViewSet = ProjectViewSet.builder().add(ProjectView.builder().add(ScalarSection.builder(WorkspaceTypeSection.KEY).set(WorkspaceType.JAVASCRIPT)).build()).build();
WorkspaceLanguageSettings workspaceLanguageSettings = LanguageSupport.createWorkspaceLanguageSettings(projectViewSet);
LanguageSupport.validateLanguageSettings(context, workspaceLanguageSettings);
errorCollector.assertIssues("Workspace type 'javascript' is not supported by this plugin");
}
use of com.google.idea.blaze.base.projectview.ProjectViewSet in project intellij by bazelbuild.
the class BlazeTypescriptSyncPluginTest method testTypescriptLanguageAvailableInUltimateEdition.
@Test
public void testTypescriptLanguageAvailableInUltimateEdition() {
TestUtils.setPlatformPrefix(testDisposable, PlatformUtils.IDEA_PREFIX);
ProjectViewSet projectViewSet = ProjectViewSet.builder().add(ProjectView.builder().add(ScalarSection.builder(WorkspaceTypeSection.KEY).set(WorkspaceType.JAVA)).add(ListSection.builder(AdditionalLanguagesSection.KEY).add(LanguageClass.TYPESCRIPT)).build()).build();
WorkspaceLanguageSettings workspaceLanguageSettings = LanguageSupport.createWorkspaceLanguageSettings(projectViewSet);
errorCollector.assertNoIssues();
assertThat(workspaceLanguageSettings).isEqualTo(new WorkspaceLanguageSettings(WorkspaceType.JAVA, ImmutableSet.of(LanguageClass.TYPESCRIPT, LanguageClass.GENERIC, LanguageClass.JAVA)));
}
use of com.google.idea.blaze.base.projectview.ProjectViewSet in project intellij by bazelbuild.
the class FastBuildServiceImpl method generateBuildParameters.
private FastBuildParameters generateBuildParameters(String blazeBinaryPath, List<String> userBlazeFlags) {
ProjectViewSet projectViewSet = projectViewManager.getProjectViewSet();
List<String> projectBlazeFlags = BlazeFlags.blazeFlags(project, projectViewSet, BlazeCommandName.BUILD, BlazeInvocationContext.NonSync);
return FastBuildParameters.builder().setBlazeBinary(blazeBinaryPath).addBlazeFlags(projectBlazeFlags).addBlazeFlags(userBlazeFlags).build();
}
Aggregations