Search in sources :

Example 1 with ErrorCollector

use of com.google.idea.blaze.base.scope.ErrorCollector in project intellij by bazelbuild.

the class ProjectViewParserTest method initTest.

@Override
protected void initTest(@NotNull Container applicationServices, @NotNull Container projectServices) {
    super.initTest(applicationServices, projectServices);
    context = new BlazeContext();
    errorCollector = new ErrorCollector();
    context.addOutputSink(IssueOutput.class, errorCollector);
    projectViewParser = new ProjectViewParser(context, new WorkspacePathResolverImpl(workspaceRoot));
    projectViewStorageManager = new MockProjectViewStorageManager();
    applicationServices.register(ProjectViewStorageManager.class, projectViewStorageManager);
    applicationServices.register(ExperimentService.class, new MockExperimentService());
    registerExtensionPoint(BlazeSyncPlugin.EP_NAME, BlazeSyncPlugin.class);
}
Also used : MockExperimentService(com.google.idea.common.experiments.MockExperimentService) BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) WorkspacePathResolverImpl(com.google.idea.blaze.base.sync.workspace.WorkspacePathResolverImpl) ErrorCollector(com.google.idea.blaze.base.scope.ErrorCollector)

Example 2 with ErrorCollector

use of com.google.idea.blaze.base.scope.ErrorCollector in project intellij by bazelbuild.

the class BlazeSyncIntegrationTestCase method doSetup.

@Before
public void doSetup() throws Exception {
    thisClassDisposable = Disposer.newDisposable();
    projectViewManager = new MockProjectViewManager(getProject(), thisClassDisposable);
    new MockBlazeVcsHandler(thisClassDisposable);
    blazeInfoData = new MockBlazeInfoRunner();
    blazeIdeInterface = new MockBlazeIdeInterface();
    eventLogger = new MockEventLoggingService(thisClassDisposable);
    moduleMocker = new ProjectModuleMocker(getProject(), thisClassDisposable);
    registerApplicationService(BlazeInfoRunner.class, blazeInfoData);
    registerApplicationService(BlazeIdeInterface.class, blazeIdeInterface);
    errorCollector = new ErrorCollector();
    context = new BlazeContext();
    context.addOutputSink(IssueOutput.class, errorCollector);
    fileSystem.createDirectory(projectDataDirectory.getPath() + "/.blaze/modules");
    blazeInfoData.setResults(ImmutableMap.<String, String>builder().put(BlazeInfo.blazeBinKey(Blaze.getBuildSystem(getProject())), BLAZE_BIN).put(BlazeInfo.blazeGenfilesKey(Blaze.getBuildSystem(getProject())), BLAZE_GENFILES).put(BlazeInfo.EXECUTION_ROOT_KEY, EXECUTION_ROOT).put(BlazeInfo.OUTPUT_BASE_KEY, OUTPUT_BASE).put(BlazeInfo.OUTPUT_PATH_KEY, OUTPUT_PATH).put(BlazeInfo.PACKAGE_PATH_KEY, workspaceRoot.toString()).build());
}
Also used : MockProjectViewManager(com.google.idea.blaze.base.MockProjectViewManager) BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) MockEventLoggingService(com.google.idea.blaze.base.MockEventLoggingService) ErrorCollector(com.google.idea.blaze.base.scope.ErrorCollector) Before(org.junit.Before)

Aggregations

BlazeContext (com.google.idea.blaze.base.scope.BlazeContext)2 ErrorCollector (com.google.idea.blaze.base.scope.ErrorCollector)2 MockEventLoggingService (com.google.idea.blaze.base.MockEventLoggingService)1 MockProjectViewManager (com.google.idea.blaze.base.MockProjectViewManager)1 WorkspacePathResolverImpl (com.google.idea.blaze.base.sync.workspace.WorkspacePathResolverImpl)1 MockExperimentService (com.google.idea.common.experiments.MockExperimentService)1 Before (org.junit.Before)1