title: How to delay modificactions to the resource tree when it is locked
body: <p>I'm getting the exception:</p>
  
  <blockquote>
    <p>org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.</p>
  </blockquote>
  
  <p>After some searching I found out, that this comes from the fact that I am trying to add markers to a file. I'm doing this, when I am notified of a file change. So when my modification code is called the workspace is still in the middle of the notifying process and does not allow modifications to the resource tree.</p>
  
  <p>How can I save markers so that I can add them to the file later or what would be another way to delay this changes?</p>