package brn.gui.linktable.diagram.custom.edit.parts;

import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;

import brn.gui.linktable.diagram.edit.parts.LinkTableLinkEditPart;
import brn.gui.linktable.diagram.part.ModelVisualIDRegistry;

public class ModelEditPartFactory extends
  brn.gui.linktable.diagram.edit.parts.ModelEditPartFactory {

  public EditPart createEditPart(EditPart context, Object model) {
    if (model instanceof View) {
      View view = (View) model;
      int viewVisualID = ModelVisualIDRegistry.getVisualID(view);
      switch (viewVisualID) {
      case LinkTableLinkEditPart.VISUAL_ID:
        return new LinkTableLinkEditPartEx(view);
      }
    }
    return super.createEditPart(context, model);
  }

}
