@Override
  protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor)
      throws CoreException {
    if (kind == AUTO_BUILD || kind == INCREMENTAL_BUILD) {
      ChangeDetector visitor =
          new ChangeDetector(genmodelProvider.getGeneratorModelPath(getProject()));
      getDelta(getProject()).accept(visitor);
      if (visitor.isChangeFound()) {
        getProject()
            .accept(
                new IResourceVisitor() {

                  @Override
                  public boolean visit(IResource resource) throws CoreException {
                    final String extension = resource.getFileExtension();
                    if ("vql".equals(extension)) {
                      resource.touch(new NullProgressMonitor());
                    }
                    return false;
                  }
                });
      }
    }
    return null;
  }
  @Before
  public void inContext() throws IOException {
    changeDetector = mock(ChangeDetector.class);
    when(changeDetector.findChangedFiles()).thenThrow(new IOException());

    changeDetector.clear();

    testDetector = new StubTestDetector();
    core = createCore(changeDetector, testDetector);
  }
 /** Update once, report severity change. */
 public Change severityChange() {
   return severity.change();
 }
 /** Update once, report manifest presence. */
 public Change manifestChange() {
   return manifest.change();
 }