package com.intellij.codeInsight.problems;

import com.intellij.openapi.compiler.CompileScope;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.problems.WolfTheProblemSolver;import com.intellij.ide.projectView.ProjectViewNode;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;

/**
 * @author cdr
 */
public class MockWolfTheProblemSolver extends WolfTheProblemSolver {

  public boolean isProblemFile(VirtualFile virtualFile) {
    return false;
  }

  public ProblemUpdateTransaction startUpdatingProblemsInScope(CompileScope compileScope) {
    return null;
  }

  public ProblemUpdateTransaction startUpdatingProblemsInScope(VirtualFile virtualFile) {
    return null;
  }

  public Collection<VirtualFile> getProblemFiles() {
    return null;
  }

  public boolean hasProblemFilesUnder(ProjectViewNode scope) {
    return false;
  }

  public void addProblemListener(ProblemListener listener) {

  }

  public void removeProblemListener(ProblemListener listener) {

  }

  public void projectOpened() {

  }

  public void projectClosed() {

  }

  @NonNls
  @NotNull
  public String getComponentName() {
    return "mockwolf";
  }

  public void initComponent() {

  }

  public void disposeComponent() {

  }
}

@@ -88,16 +88,70 @@
 eScope;%0A
+import com.intellij.openapi.compiler.CompilerMessage;%0A
 import c
@@ -237,16 +237,55 @@
 mSolver;
+%0Aimport com.intellij.problems.Problem;%0A
 import c
@@ -825,35 +825,231 @@
 ) %7B%0A    return n
-ull
+ew ProblemUpdateTransaction() %7B%0A      public void addProblem(Problem problem) %7B%0A%0A      %7D%0A%0A      public void addProblem(CompilerMessage message) %7B%0A%0A      %7D%0A%0A      public void commit() %7B%0A%0A      %7D%0A    %7D
 ;%0A  %7D%0A%0A  public 

fix NPE