Search in sources :

Example 1 with XmlChange

use of com.intellij.pom.xml.events.XmlChange in project intellij-community by JetBrains.

the class XmlTextImpl method createEvent.

private PomModelEvent createEvent(final XmlChange... events) {
    final PomModelEvent event = new PomModelEvent(PomManager.getModel(getProject()));
    final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(PomManager.getModel(getProject()), (XmlFile) getContainingFile());
    for (XmlChange xmlChange : events) {
        xmlAspectChangeSet.add(xmlChange);
    }
    event.registerChangeSet(PomManager.getModel(getProject()).getModelAspect(XmlAspect.class), xmlAspectChangeSet);
    return event;
}
Also used : XmlAspectChangeSetImpl(com.intellij.pom.xml.impl.XmlAspectChangeSetImpl) XmlChange(com.intellij.pom.xml.events.XmlChange) XmlAspect(com.intellij.pom.xml.XmlAspect) PomModelEvent(com.intellij.pom.event.PomModelEvent)

Example 2 with XmlChange

use of com.intellij.pom.xml.events.XmlChange in project intellij-community by JetBrains.

the class XmlAspectChangeSetImpl method toString.

@Override
public String toString() {
    final StringBuilder buffer = new StringBuilder();
    final Iterator<XmlChange> iterator = myChanges.iterator();
    while (iterator.hasNext()) {
        XmlChange xmlChange = iterator.next();
        buffer.append("(");
        buffer.append(xmlChange);
        buffer.append(")");
        if (iterator.hasNext())
            buffer.append(", ");
    }
    return buffer.toString();
}
Also used : XmlChange(com.intellij.pom.xml.events.XmlChange)

Aggregations

XmlChange (com.intellij.pom.xml.events.XmlChange)2 PomModelEvent (com.intellij.pom.event.PomModelEvent)1 XmlAspect (com.intellij.pom.xml.XmlAspect)1 XmlAspectChangeSetImpl (com.intellij.pom.xml.impl.XmlAspectChangeSetImpl)1