package com.intellij.pom.xml.impl.events;

import com.intellij.pom.PomModel;
import com.intellij.pom.event.PomModelEvent;
import com.intellij.pom.xml.XmlAspect;
import com.intellij.pom.xml.XmlChangeVisitor;
import com.intellij.pom.xml.events.XmlDocumentChanged;
import com.intellij.pom.xml.impl.XmlAspectChangeSetImpl;
import com.intellij.psi.xml.XmlDocument;
import com.intellij.psi.xml.XmlFile;

public class XmlDocumentChangedImpl implements XmlDocumentChanged {
  private XmlDocument myDocument;

  public XmlDocumentChangedImpl(XmlDocument document) {
    assert document != null;
    myDocument = document;
  }

  public XmlDocument getDocument() {
    return myDocument;
  }

  public static PomModelEvent createXmlDocumentChanged(PomModel source, XmlDocument document) {
    final PomModelEvent event = new PomModelEvent(source);
    final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(source, (XmlFile)document.getParent());
    xmlAspectChangeSet.add(new XmlDocumentChangedImpl(document));
    event.registerChangeSet(source.getModelAspect(XmlAspect.class), xmlAspectChangeSet);
    return event;
  }

  public String toString() {
    return "Xml document changed";
  }

  public void accept(XmlChangeVisitor visitor) {
    visitor.visitDocumentChanged(this);
  }
}

@@ -389,16 +389,63 @@
 XmlFile;
+%0Aimport com.intellij.openapi.diagnostic.Logger;
 %0A%0Apublic
@@ -506,16 +506,132 @@
 anged %7B%0A
+  private static final Logger LOG = Logger.getInstance(%22#com.intellij.pom.xml.impl.events.XmlDocumentChangedImpl%22);%0A
   privat
@@ -721,15 +721,23 @@
     
+LOG.
 assert
- 
+True(
 docu
@@ -748,16 +748,17 @@
  != null
+)
 ;%0A    my

assert changed to LOG.assertTrue