<?xml version="1.0" encoding="UTF-8"?>
<merge:options 
  indent="  "  
  braceStyle="matching"  
  redirect="Gen"
  block="\s*@\s*generated\s*NOT\s*\n"
  noImport="\s*//\s*import\s+([\w.*]*)\s*;\s*\n"
  xmlns:merge="http://www.eclipse.org/org/eclipse/emf/codegen/jmerge/Options">

<!-- Tabbed Standard

  indent="&#x9;"  
  braceStyle="standard"  

-->

    <!-- this accepts both new and old style markup. -->

    <merge:dictionaryPattern
      name="modelMembers" 
      select="Member/getComment" 
      match="\s*@\s*(model)"/>

    <merge:dictionaryPattern
      name="generatedUnmodifiableMembers" 
      select="Member/getComment" 
      match="\s*@\s*(gen)erated\s*(This field/method[^\n]*)*\n"/>

    <merge:dictionaryPattern
      name="generatedModifiableMembers" 
      select="Member/getComment" 
      match="\s*@\s*generated\s*(modifiable)\s*\n"/>

    <!-- This is like the above, but for backward compatibility -->
    <merge:dictionaryPattern
      name="generatedLastGenMembers" 
      select="Member/getComment" 
      match="\s*@\s*(lastgen).*\n"/>

    <merge:dictionaryPattern
      name="orderedMembers" 
      select="Member/getComment" 
      match="\s*@\s*(ordered)\s*\n"/>

    <merge:pull 
      sourceGet="Member/getFlags"
      targetMarkup="^gen$"
      targetPut="Member/setFlags"/>

<!-- 
    <merge:pull 
      sourceMarkup="^modifiable$"
      sourceGet="Member/getComment"
      targetMarkup="^gen$"
      targetPut="Member/setComment"/>
-->

    <merge:pull 
      sourceMarkup="^modifiable$"
      sourceGet="Member/getComment"
      sourceTransfer="(\s*&lt;!--\s*begin-user-doc.*?end-user-doc\s*-->\s*)\n"
      targetMarkup="^modifiable$"
      targetPut="Member/setComment"/>

    <merge:pull 
      sourceMarkup="^gen$"
      sourceGet="Member/getComment"
      sourceTransfer="(\s*&lt;!--\s*begin-user-doc.*?end-user-doc\s*-->\s*)\n"
      targetMarkup="^gen$"
      targetPut="Member/setComment"/>

    <merge:pull 
      sourceMarkup="^gen$"
      sourceGet="Type/getComment"
      sourceTransfer="(\s*&lt;!--\s*begin-user-doc.*?end-user-doc\s*-->\s*)\n"
      targetMarkup="^modifiable$"
      targetPut="Type/setComment"/>

    <merge:pull 
      sourceGet="Initializer/getBody"
      targetMarkup="^gen$"
      targetPut="Initializer/setBody"/>

    <merge:pull 
      sourceGet="Type/getSuperclass"
      targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
      targetPut="Type/setSuperclass"/>

    <merge:pull 
      sourceGet="Type/getSuperInterfaces"
      sourceTransfer="(\s*@\s*extends|\s*@\s*implements)(.*?)\n"
      targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
      targetPut="Type/addSuperInterface"/>

    <merge:pull 
      sourceGet="Field/getType"
      targetMarkup="^gen$"
      targetPut="Field/setType"/>
    <merge:pull 
      sourceGet="Field/getInitializer"
      targetMarkup="^gen$"
      targetPut="Field/setInitializer"/>

    <merge:pull 
      sourceGet="Method/getBody"
      targetMarkup="^gen$"
      targetPut="Method/setBody"/>
    <merge:pull 
      sourceGet="Method/getReturnType"
      targetMarkup="^gen$|^model$"
      targetPut="Method/setReturnType"/>
    <merge:pull 
      sourceGet="Method/getExceptions"
      targetMarkup="^gen$"
      targetPut="Method/addException"/>

    <merge:sweep markup="^gen$" select="Member"/>
    <merge:sweep markup="^org.eclipse.emf.ecore.EMetaObject$" select="Import"/>
    <merge:sweep markup="^org.eclipse.emf.ecore.impl.EMetaObjectImpl$" select="Import"/>
    <merge:sweep markup="^org.eclipse.emf.ecore.util.EObjectCompositeEList$" select="Import"/>
    <merge:sweep markup="^org.eclipse.emf.ecore.util.EObjectCompositeWithInverseEList$" select="Import"/>

    <merge:sort markup="^ordered$" select="Member"/>

<!-- Basic Rules

    <merge:pull 
      sourceGet="CompilationUnit/getHeader"
      targetPut="CompilationUnit/setHeader"/>

    <merge:pull 
      sourceGet="Package/getName"
      targetPut="Package/setName"/>

    <merge:pull 
      sourceGet="Member/getFlags"
      targetPut="Member/setFlags"/>
    <merge:pull 
      sourceGet="Member/getComment"
      targetPut="Member/setComment"/>

    <merge:pull 
      sourceGet="Type/getSuperclass"
      targetPut="Type/setSuperclass"/>
    <merge:pull 
      sourceGet="Type/getSuperInterfaces"
      targetPut="Type/addSuperInterface"/>

    <merge:pull 
      sourceGet="Initializer/getBody"
      targetPut="Initializer/setBody"/>

    <merge:pull 
      sourceGet="Field/getType"
      targetPut="Field/setType"/>
    <merge:pull 
      sourceGet="Field/getInitializer"
      targetPut="Field/setInitializer"/>

    <merge:pull 
      sourceGet="Method/getBody"
      targetPut="Method/setBody"/>
    <merge:pull 
      sourceGet="Method/getReturnType"
      targetPut="Method/setReturnType"/>
    <merge:pull 
      sourceGet="Method/getExceptions"
      targetPut="Method/addException"/>
-->

</merge:options>
