Search in sources :

Example 6 with XmlAspectChangeSetImpl

use of com.intellij.pom.xml.impl.XmlAspectChangeSetImpl in project intellij-community by JetBrains.

the class XmlDocumentChangedImpl method createXmlDocumentChanged.

public static PomModelEvent createXmlDocumentChanged(PomModel source, XmlDocument document) {
    final PomModelEvent event = new PomModelEvent(source);
    XmlFile xmlFile = PsiTreeUtil.getParentOfType(document, XmlFile.class);
    final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(source, xmlFile);
    xmlAspectChangeSet.add(new XmlDocumentChangedImpl(document));
    event.registerChangeSet(source.getModelAspect(XmlAspect.class), xmlAspectChangeSet);
    return event;
}
Also used : XmlAspectChangeSetImpl(com.intellij.pom.xml.impl.XmlAspectChangeSetImpl) XmlFile(com.intellij.psi.xml.XmlFile) XmlAspect(com.intellij.pom.xml.XmlAspect) PomModelEvent(com.intellij.pom.event.PomModelEvent)

Example 7 with XmlAspectChangeSetImpl

use of com.intellij.pom.xml.impl.XmlAspectChangeSetImpl in project intellij-community by JetBrains.

the class XmlTagNameChangedImpl method createXmlTagNameChanged.

public static PomModelEvent createXmlTagNameChanged(PomModel model, XmlTag tag, String oldName) {
    final PomModelEvent event = new PomModelEvent(model);
    final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(model, PsiTreeUtil.getParentOfType(tag, XmlFile.class));
    xmlAspectChangeSet.add(new XmlTagNameChangedImpl(tag, oldName));
    event.registerChangeSet(model.getModelAspect(XmlAspect.class), xmlAspectChangeSet);
    return event;
}
Also used : XmlAspectChangeSetImpl(com.intellij.pom.xml.impl.XmlAspectChangeSetImpl) XmlFile(com.intellij.psi.xml.XmlFile) XmlAspect(com.intellij.pom.xml.XmlAspect) PomModelEvent(com.intellij.pom.event.PomModelEvent)

Aggregations

PomModelEvent (com.intellij.pom.event.PomModelEvent)7 XmlAspect (com.intellij.pom.xml.XmlAspect)7 XmlAspectChangeSetImpl (com.intellij.pom.xml.impl.XmlAspectChangeSetImpl)7 XmlFile (com.intellij.psi.xml.XmlFile)5 ASTNode (com.intellij.lang.ASTNode)1 PomModel (com.intellij.pom.PomModel)1 PomTransactionBase (com.intellij.pom.impl.PomTransactionBase)1 XmlChangeSet (com.intellij.pom.xml.XmlChangeSet)1 XmlChange (com.intellij.pom.xml.events.XmlChange)1 XmlAttributeSetImpl (com.intellij.pom.xml.impl.events.XmlAttributeSetImpl)1