Search in sources :

Example 1 with TempDirectoryProviderImpl

use of com.google.idea.blaze.base.io.TempDirectoryProviderImpl in project intellij by bazelbuild.

the class BlazeJavaRunProfileStateTest method initTest.

@Override
protected void initTest(Container applicationServices, Container projectServices) {
    projectServices.register(BlazeImportSettingsManager.class, new BlazeImportSettingsManager(project));
    BlazeImportSettingsManager.getInstance(getProject()).setImportSettings(DUMMY_IMPORT_SETTINGS);
    ExperimentService experimentService = new MockExperimentService();
    applicationServices.register(ExperimentService.class, experimentService);
    applicationServices.register(BlazeUserSettings.class, new BlazeUserSettings());
    applicationServices.register(TempDirectoryProvider.class, new TempDirectoryProviderImpl());
    applicationServices.register(FileOperationProvider.class, new FakeFileOperationProvider());
    ExtensionPointImpl<Kind.Provider> kindProviderEp = registerExtensionPoint(Kind.Provider.EP_NAME, Kind.Provider.class);
    kindProviderEp.registerExtension(new GenericBlazeRules(), testDisposable);
    kindProviderEp.registerExtension(new JavaBlazeRules(), testDisposable);
    applicationServices.register(Kind.ApplicationState.class, new Kind.ApplicationState());
    projectServices.register(FastBuildService.class, new DisabledFastBuildService());
    projectServices.register(ProjectViewManager.class, new MockProjectViewManager());
    ExtensionPointImpl<TargetFinder> targetFinderEp = registerExtensionPoint(TargetFinder.EP_NAME, TargetFinder.class);
    targetFinderEp.registerExtension(new MockTargetFinder(), testDisposable);
    ExtensionPointImpl<JavaLikeLanguage> javaLikeEp = registerExtensionPoint(JavaLikeLanguage.EP_NAME, JavaLikeLanguage.class);
    javaLikeEp.registerExtension(new JavaLikeLanguage.Java(), testDisposable);
    registerExtensionPoint(BuildFlagsProvider.EP_NAME, BuildFlagsProvider.class);
    ExtensionPointImpl<BlazeCommandRunConfigurationHandlerProvider> handlerProviderEp = registerExtensionPoint(BlazeCommandRunConfigurationHandlerProvider.EP_NAME, BlazeCommandRunConfigurationHandlerProvider.class);
    handlerProviderEp.registerExtension(new BlazeJavaRunConfigurationHandlerProvider(), testDisposable);
    handlerProviderEp.registerExtension(new BlazeCommandGenericRunConfigurationHandlerProvider(), testDisposable);
    registerExtensionPoint(HotSwapCommandBuilder.EP_NAME, HotSwapCommandBuilder.class);
    configuration = new BlazeCommandRunConfigurationType().getFactory().createTemplateConfiguration(project);
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) JavaBlazeRules(com.google.idea.blaze.java.JavaBlazeRules) BlazeCommandRunConfigurationType(com.google.idea.blaze.base.run.BlazeCommandRunConfigurationType) Kind(com.google.idea.blaze.base.model.primitives.Kind) TempDirectoryProviderImpl(com.google.idea.blaze.base.io.TempDirectoryProviderImpl) BlazeImportSettingsManager(com.google.idea.blaze.base.settings.BlazeImportSettingsManager) JavaLikeLanguage(com.google.idea.blaze.java.sync.source.JavaLikeLanguage) BlazeCommandRunConfigurationHandlerProvider(com.google.idea.blaze.base.run.confighandler.BlazeCommandRunConfigurationHandlerProvider) GenericBlazeRules(com.google.idea.blaze.base.model.primitives.GenericBlazeRules) BuildFlagsProvider(com.google.idea.blaze.base.command.BuildFlagsProvider) BuildSystemProvider(com.google.idea.blaze.base.bazel.BuildSystemProvider) FileOperationProvider(com.google.idea.blaze.base.io.FileOperationProvider) FakeBuildSystemProvider(com.google.idea.blaze.base.bazel.FakeBuildSystemProvider) TempDirectoryProvider(com.google.idea.blaze.base.io.TempDirectoryProvider) BlazeCommandRunConfigurationHandlerProvider(com.google.idea.blaze.base.run.confighandler.BlazeCommandRunConfigurationHandlerProvider) BlazeCommandGenericRunConfigurationHandlerProvider(com.google.idea.blaze.base.run.confighandler.BlazeCommandGenericRunConfigurationHandlerProvider) BlazeCommandGenericRunConfigurationHandlerProvider(com.google.idea.blaze.base.run.confighandler.BlazeCommandGenericRunConfigurationHandlerProvider) TargetFinder(com.google.idea.blaze.base.run.targetfinder.TargetFinder) BlazeUserSettings(com.google.idea.blaze.base.settings.BlazeUserSettings) ExperimentService(com.google.idea.common.experiments.ExperimentService) MockExperimentService(com.google.idea.common.experiments.MockExperimentService)

Aggregations

BuildSystemProvider (com.google.idea.blaze.base.bazel.BuildSystemProvider)1 FakeBuildSystemProvider (com.google.idea.blaze.base.bazel.FakeBuildSystemProvider)1 BuildFlagsProvider (com.google.idea.blaze.base.command.BuildFlagsProvider)1 FileOperationProvider (com.google.idea.blaze.base.io.FileOperationProvider)1 TempDirectoryProvider (com.google.idea.blaze.base.io.TempDirectoryProvider)1 TempDirectoryProviderImpl (com.google.idea.blaze.base.io.TempDirectoryProviderImpl)1 GenericBlazeRules (com.google.idea.blaze.base.model.primitives.GenericBlazeRules)1 Kind (com.google.idea.blaze.base.model.primitives.Kind)1 BlazeCommandRunConfigurationType (com.google.idea.blaze.base.run.BlazeCommandRunConfigurationType)1 BlazeCommandGenericRunConfigurationHandlerProvider (com.google.idea.blaze.base.run.confighandler.BlazeCommandGenericRunConfigurationHandlerProvider)1 BlazeCommandRunConfigurationHandlerProvider (com.google.idea.blaze.base.run.confighandler.BlazeCommandRunConfigurationHandlerProvider)1 TargetFinder (com.google.idea.blaze.base.run.targetfinder.TargetFinder)1 BlazeImportSettingsManager (com.google.idea.blaze.base.settings.BlazeImportSettingsManager)1 BlazeUserSettings (com.google.idea.blaze.base.settings.BlazeUserSettings)1 JavaBlazeRules (com.google.idea.blaze.java.JavaBlazeRules)1 JavaLikeLanguage (com.google.idea.blaze.java.sync.source.JavaLikeLanguage)1 ExperimentService (com.google.idea.common.experiments.ExperimentService)1 MockExperimentService (com.google.idea.common.experiments.MockExperimentService)1