use of com.google.idea.blaze.base.model.primitives.GenericBlazeRules in project intellij by bazelbuild.
the class RuleNameHeuristicTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
super.initTest(applicationServices, projectServices);
ExtensionPointImpl<TestTargetHeuristic> ep = registerExtensionPoint(TestTargetHeuristic.EP_NAME, TestTargetHeuristic.class);
ep.registerExtension(new TargetNameHeuristic());
ExtensionPointImpl<Kind.Provider> kindProvider = registerExtensionPoint(Kind.Provider.EP_NAME, Kind.Provider.class);
kindProvider.registerExtension(new GenericBlazeRules());
applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
}
use of com.google.idea.blaze.base.model.primitives.GenericBlazeRules in project intellij by bazelbuild.
the class BlazeBuildTargetSharderTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
registerExtensionPoint(BuildFlagsProvider.EP_NAME, BuildFlagsProvider.class);
registerExtensionPoint(BuildBatchingService.EP_NAME, BuildBatchingService.class).registerExtension(fakeBuildBatchingService, testDisposable);
registerExtensionPoint(TargetShardSizeLimit.EP_NAME, TargetShardSizeLimit.class).registerExtension(OptionalInt::empty, testDisposable);
registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class).registerExtension(new FakeBlazeSyncPlugin(), testDisposable);
registerExtensionPoint(Kind.Provider.EP_NAME, Kind.Provider.class).registerExtension(new GenericBlazeRules(), testDisposable);
registerExtensionPoint(BlazeConsoleLineProcessorProvider.EP_NAME, BlazeConsoleLineProcessorProvider.class).registerExtension(new GeneralProvider(), testDisposable);
applicationServices.register(ExperimentService.class, mockExperimentService);
applicationServices.register(ExternalTaskProvider.class, fakeWildCardTargetExpanderExternalTaskProvider);
applicationServices.register(PrefetchService.class, new FakePrefetchService());
applicationServices.register(FileOperationProvider.class, new FakeFileOperationProvider());
applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
projectServices.register(BlazeImportSettingsManager.class, new BlazeImportSettingsManager(getProject()));
}
use of com.google.idea.blaze.base.model.primitives.GenericBlazeRules in project intellij by bazelbuild.
the class TransitiveDependencyMapTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
super.initTest(applicationServices, projectServices);
ExtensionPointImpl<Kind.Provider> ep = registerExtensionPoint(Kind.Provider.EP_NAME, Kind.Provider.class);
ep.registerExtension(new GenericBlazeRules());
applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
targetMap = buildTargetMap();
projectServices.register(BlazeProjectDataManager.class, new MockBlazeProjectDataManager(MockBlazeProjectDataBuilder.builder(workspaceRoot).setTargetMap(targetMap).build()));
projectServices.register(TransitiveDependencyMap.class, new TransitiveDependencyMap(project));
transitiveDependencyMap = TransitiveDependencyMap.getInstance(project);
}
use of com.google.idea.blaze.base.model.primitives.GenericBlazeRules in project intellij by bazelbuild.
the class BlazeAndroidWorkspaceImporterTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
experimentService = new MockExperimentService();
applicationServices.register(ExperimentService.class, experimentService);
BlazeExecutor blazeExecutor = new MockBlazeExecutor();
applicationServices.register(BlazeExecutor.class, blazeExecutor);
projectServices.register(BlazeImportSettingsManager.class, new BlazeImportSettingsManager(project));
BlazeImportSettingsManager.getInstance(getProject()).setImportSettings(DUMMY_IMPORT_SETTINGS);
MockFileOperationProvider mockFileOperationProvider = new MockFileOperationProvider();
applicationServices.register(FileOperationProvider.class, mockFileOperationProvider);
ExtensionPointImpl<Provider> targetKindEp = registerExtensionPoint(Provider.EP_NAME, Provider.class);
targetKindEp.registerExtension(new AndroidBlazeRules());
targetKindEp.registerExtension(new JavaBlazeRules());
targetKindEp.registerExtension(new GenericBlazeRules());
applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
retentionFilterEp = registerExtensionPoint(GeneratedResourceRetentionFilter.EP_NAME, GeneratedResourceRetentionFilter.class);
context = BlazeContext.create();
context.addOutputSink(IssueOutput.class, errorCollector);
registerExtensionPoint(BlazeJavaSyncAugmenter.EP_NAME, BlazeJavaSyncAugmenter.class);
registerExtensionPoint(EmptyLibraryFilterSettings.EP_NAME, EmptyLibraryFilterSettings.class);
// For importJavaWorkspace.
applicationServices.register(JavaSourcePackageReader.class, new JavaSourcePackageReader() {
@Nullable
@Override
public String getDeclaredPackageOfJavaFile(BlazeContext context, ArtifactLocationDecoder artifactLocationDecoder, SourceArtifact sourceArtifact) {
return null;
}
});
applicationServices.register(PackageManifestReader.class, new PackageManifestReader());
applicationServices.register(PrefetchService.class, new MockPrefetchService());
registerExtensionPoint(JavaLikeLanguage.EP_NAME, JavaLikeLanguage.class).registerExtension(new JavaLikeLanguage.Java());
applicationServices.register(RemoteArtifactPrefetcher.class, new MockRemoteArtifactPrefetcher());
}
use of com.google.idea.blaze.base.model.primitives.GenericBlazeRules in project intellij by bazelbuild.
the class BuildEventProtocolOutputReaderTest method initTest.
@Override
protected void initTest(Container applicationServices, Container projectServices) {
super.initTest(applicationServices, projectServices);
ExtensionPointImpl<Kind.Provider> ep = registerExtensionPoint(Kind.Provider.EP_NAME, Kind.Provider.class);
ep.registerExtension(new GenericBlazeRules());
applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
ExtensionPointImpl<OutputArtifactParser> parserEp = registerExtensionPoint(OutputArtifactParser.EP_NAME, OutputArtifactParser.class);
parserEp.registerExtension(new OutputArtifactParser.LocalFileParser());
}
Aggregations