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

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

import brn.gui.fwdgraph.diagram.part.ModelVisualIDRegistry;

public class ModelEditPartFactory extends
  brn.gui.fwdgraph.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 FwdNodeEditPart.VISUAL_ID:
//        return new FwdNodeEditPart(view);
      case FwdLinkEditPart.VISUAL_ID:
        return new FwdLinkEditPart(view);
      }
    }
    return super.createEditPart(context, model);
  }

}
