package com.intellij.localVcs;

import com.intellij.openapi.components.ProjectComponent;
import com.intellij.openapi.localVcs.LocalVcsItemsLocker;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.AbstractVcs;
import com.intellij.openapi.vcs.changes.ChangeProvider;
import com.intellij.openapi.vcs.checkin.CheckinEnvironment;

public class MockAbstractVcs extends AbstractVcs implements ProjectComponent {
  private boolean myMarkExternalChangesAsCurrent = false;
  private LocalVcsItemsLocker myUpToDateRevisionProvider;
  private CheckinEnvironment myCheckinEnvironment;

  public MockAbstractVcs(Project project){
    super(project);
  }

  public CheckinEnvironment getCheckinEnvironment() {
    return myCheckinEnvironment;
  }

  public String getName() {
    return "mock";
  }

  public String getDisplayName() {
    return "mock";
  }

  public Configurable getConfigurable() {
    return null;
  }

  public void projectClosed() {
  }

  public void projectOpened() {
  }

  public String getComponentName() {
    return "mock";
  }

  public void initComponent() { }

  public void disposeComponent() {
  }

  public ChangeProvider getChangeProvider() {
    return null;
  }

  public boolean markExternalChangesAsUpToDate() {
    return myMarkExternalChangesAsCurrent ;
  }

  public void setMarkExternalChangesAsCurrent(boolean value){
    myMarkExternalChangesAsCurrent = value;
  }

  public void setUpToDateRevisionProvider(LocalVcsItemsLocker upToDateRevisionProvider) {
    myUpToDateRevisionProvider = upToDateRevisionProvider;
  }

  public LocalVcsItemsLocker getItemsLocker() {
    return myUpToDateRevisionProvider;
  }

  public void setCheckinEnvironment(CheckinEnvironment ce) {
    myCheckinEnvironment = ce;
  }
}

@@ -280,16 +280,74 @@
 actVcs;%0A
+import com.intellij.openapi.vcs.CommittedChangesProvider;%0A
 import c
@@ -386,32 +386,32 @@
 ChangeProvider;%0A
-
 import com.intel
@@ -700,16 +700,79 @@
 ronment;
+%0A  private CommittedChangesProvider myCommittedChangesProvider;
 %0A%0A  publ
@@ -883,24 +883,24 @@
 ronment() %7B%0A
-
     return m
@@ -921,24 +921,134 @@
 nment;%0A  %7D%0A%0A
+  public CommittedChangesProvider getCommittedChangesProvider() %7B%0A    return myCommittedChangesProvider;%0A  %7D%0A%0A
   public Str
@@ -2040,11 +2040,176 @@
  ce;%0A  %7D
+%0A%0A  public void setCommittedChangesProvider(final CommittedChangesProvider committedChangesProvider) %7B%0A    myCommittedChangesProvider = committedChangesProvider;%0A  %7D
 %0A%7D%0A

test framework for committed changes cache (initial)