package jetbrains.mps.tool.environment;

/*Generated by MPS */

import jetbrains.mps.annotations.GeneratedClass;
import jetbrains.mps.core.platform.Platform;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.project.Project;
import java.io.File;

/**
 * Base implementation class for {@link jetbrains.mps.tool.environment.Environment } without project handling or reference count, with mostly no-op or {@link java.lang.UnsupportedOperationException } implementations.
 */
@GeneratedClass(node = "r:2876f1ee-0b45-4db5-8c09-0682cdee5c67(jetbrains.mps.tool.environment)/1831019415300225349", model = "r:2876f1ee-0b45-4db5-8c09-0682cdee5c67(jetbrains.mps.tool.environment)")
public abstract class AbstractEnvironment implements Environment {
  private final Platform myPlatform;

  protected AbstractEnvironment(Platform mpsPlatform) {
    myPlatform = mpsPlatform;
  }

  @Override
  public Platform getPlatform() {
    return myPlatform;
  }

  @NotNull
  @Override
  public Project createEmptyProject() {
    throw new UnsupportedOperationException();
  }

  @NotNull
  @Override
  public Project createProject(@NotNull ProjectStrategy strategy) {
    throw new UnsupportedOperationException();
  }

  @NotNull
  @Override
  public Project openProject(@NotNull File projectFile) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void closeProject(@NotNull Project project) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void dispose() {
    // no-op, nothing to do here as we didn't allocate anything
  }

  @Override
  public void flushAllEvents() {
    // no-op, (a) no idea what this method is supposed to do anyway (b) this environment can't do anything about whatever events.
  }
}
