private EditPart getPartForElement ( Object modelElement ) { if ( modelElement instanceof ReteGraph ) { return new DiagramEditPart ( ) ; } if ( modelElement instanceof BaseVertex ) { return new VertexEditPart ( ) ; } if ( modelElement instanceof Connection ) { return new ConnectionEditPart ( ) ; } DroolsEclipsePlugin . log ( new Exception ( "Can't create part for model element: " + ( ( modelElement != null ) ? modelElement . getClass ( ) . getName ( ) : "null" ) ) ) ; return null ; }
Maps object to EditPart .