package jetbrains.mps.ide.findusages.model.holders;

/*Generated by MPS */

import jetbrains.mps.annotations.GeneratedClass;
import javax.swing.Icon;
import org.jdom.Element;
import jetbrains.mps.project.Project;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.findusages.CantLoadSomethingException;
import jetbrains.mps.ide.findusages.CantSaveSomethingException;

@GeneratedClass(node = "r:6d26b589-14c5-496e-9d2b-5c71b3a15e5d(jetbrains.mps.ide.findusages.model.holders)/8568892084424437680", model = "r:6d26b589-14c5-496e-9d2b-5c71b3a15e5d(jetbrains.mps.ide.findusages.model.holders)")
public class VoidHolder implements IHolder {
  private String myCaption = "<void>";
  private Icon myIcon = null;
  public VoidHolder(Element element, Project project) {
    throw new UnsupportedOperationException();
  }
  public VoidHolder(String caption, Icon icon) {
    myCaption = caption;
    myIcon = icon;
  }
  public VoidHolder() {
  }
  @Override
  public Object getObject() {
    throw new UnsupportedOperationException();
  }
  @Override
  @NotNull
  public String getCaption() {
    return myCaption;
  }
  public Icon getIcon() {
    return myIcon;
  }
  @Override
  public void read(Element element, Project project) throws CantLoadSomethingException {
    throw new CantLoadSomethingException("VoidHolder is not loadable");
  }
  @Override
  public void write(Element element, Project project) throws CantSaveSomethingException {
    throw new CantSaveSomethingException("VoidHolder is not saveable");
  }
}
