Tutorial of Eclipse Model Development

Eclipse Model Development

EMF
Introduction to EMF
  • Create an Ecore model with classes and attributes.
  • Generate Java code using GenModel.
  • Run and create a model instance.
Loading and Serializing EMF Models
  • Register EPackage and XMI extension.
  • Save model to EMF resource.
  • Load model using ResourceSet.
Notification in EMF Models
  • Object Notification: Use AdapterImpl to listen to specific object changes.
  • Content Notification: Use EContentAdapter to listen to changes in the entire model.
CONSUMING an EMF MODEL in UR ECLIPSE UI - PART 1
  • Add a TreeViewer to your view.
  • Adapt ItemProviderFactory using AdapterFactoryContentProvider and AdapterFactoryLabelProvider.
  • Run to display the model in the TreeViewer.
CONSUMING an EMF MODEL in UR ECLIPSE UI - PART 2(Using the Editing Domain and Command Stack )
  • EMF enables undo/redo operations.
  • Changes are tracked within an editor/view scope.
  • Commands like AddCommand handle actions
CONSUMING an EMF MODEL in UR ECLIPSE UI - PART 3(Using the Properties View )
  • Register Viewer as Selection Provider.
  • Attach ExtendedPropertySheetPage via getAdapter().
  • Use AdapterFactoryContentProvider() for properties.
CONSUMING an EMF MODEL in UR ECLIPSE UI - PART 4( Using CNF to show EMF Model )
  • Create a CommonNavigator view.
  • Define content and label providers.
  • Link providers with navigator.viewer.
CONSUMING an EMF MODEL in UR ECLIPSE UI - PART 5( Enabling Context Menu based New Child Descriptors )
  • Create a context menu for TreeViewer.
  • Add actions for new child and sibling.
  • Right-click to see options.
CONSUMING an EMF MODEL in UR ECLIPSE UI - PART 6(Displaying EMF Model on a TableViewer)
  • Extend ItemProvider for TableViewer support.
  • Implement ITableItemLabelProvider for custom columns.
  • Integrate with TableViewer in a new plugin.
Customizing EMF Forms Editor using View Model-2
  • Add a table control linked to a list in the EMF model.
  • Link domain model reference to the table.
  • Add and edit columns with customization options
Form Editors2(Master Details Block)
  • Add a table control linked to a list in the EMF model.
  • Link domain model reference to the table.
  • Add and edit columns with customization options