content: package oscfg.diagram.view.factories;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import org.eclipse.core.runtime.IAdaptable;
  import org.eclipse.emf.ecore.EObject;
  import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
  import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
  import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
  import org.eclipse.gmf.runtime.notation.NotationFactory;
  import org.eclipse.gmf.runtime.notation.View;
  
  import oscfg.diagram.edit.parts.CallbackFunctionEditPart;
  import oscfg.diagram.edit.parts.CallbackFunctionNameEditPart;
  import oscfg.diagram.part.OscfgVisualIDRegistry;
  
  /**
   * @generated
   */
  public class CallbackFunctionViewFactory extends AbstractShapeViewFactory {
  
  	/**
  	 * @generated
  	 */
  	protected List createStyles(View view) {
  		List styles = new ArrayList();
  		styles.add(NotationFactory.eINSTANCE.createShapeStyle());
  		return styles;
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void decorateView(View containerView, View view,
  			IAdaptable semanticAdapter, String semanticHint, int index,
  			boolean persisted) {
  		if (semanticHint == null) {
  			semanticHint = OscfgVisualIDRegistry
  					.getType(CallbackFunctionEditPart.VISUAL_ID);
  			view.setType(semanticHint);
  		}
  		super.decorateView(containerView, view, semanticAdapter, semanticHint,
  				index, persisted);
  		IAdaptable eObjectAdapter = null;
  		EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
  		if (eObject != null) {
  			eObjectAdapter = new EObjectAdapter(eObject);
  		}
  		getViewService().createNode(
  				eObjectAdapter,
  				view,
  				OscfgVisualIDRegistry
  						.getType(CallbackFunctionNameEditPart.VISUAL_ID),
  				ViewUtil.APPEND, true, getPreferencesHint());
  	}
  }
  