<?xml version="1.0" encoding="UTF-8"?>
<merge:options 
  indent="  "  
  braceStyle="matching"  
  xmlns:merge="http://www.eclipse.org/org/eclipse/emf/codegen/jmerge/Options">

  <!-- 
  This test shows some advanced rules for annotations.  It is important to highlight
  that these rules may not be suitable for real applications, though.  The problem here 
  is that the DictionaryPattern identifies annotations by their name, without further 
  analysis of the package in which the corresponding AnnotationType is defined.
  
  In other words, a complete solution would need to distinguish the annotations
  com.example.annotations.Foo and org.example.annotations.Foo.  At this moment
  JMerger cannot make such a distinction.
  
  This example implements the following strategy (keep in mind that 'source' corresponds
  to the new version while 'target' is the existing file, probably modified
  by the developer):
  
  - Annotations of the form @AnnotationUpdate in the target are updated with the 
  contents from the @AnnotationUpdate annotations in the source
  
  - Any annotation from the source that is not available in the target is simply 
  added to the target
  
  - Any annotation that only exists in the target is commented out
  -->

  <!--
  This dictionary pattern is used to identify all annotations of the form
  @AnnotationUpdate
  --> 
  <merge:dictionaryPattern
    name="Update" 
    select="Annotation/getName" 
    match="@.*Annotation(Update)"/>

  <!--
  With this pull rule, the contents of @AnnotationUpdate in the target is 
  replaced by the contents of the @AnnotationUpdate in the source.
  -->
  <merge:pull 
    sourceGet="Annotation/getContents"
    targetMarkup="^Update$"
    targetPut="Annotation/setContents"/>

  <!--
  With this sweep rule, any annotation in the target that is not available in the 
  source is commented out. 
  -->
  <merge:sweep select="Annotation" action="comment"/>
</merge:options>
