Search in sources :

Example 21 with PomModelEvent

use of com.intellij.pom.event.PomModelEvent 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)21 XmlAspect (com.intellij.pom.xml.XmlAspect)17 PomTransactionBase (com.intellij.pom.impl.PomTransactionBase)13 PomModel (com.intellij.pom.PomModel)12 IncorrectOperationException (com.intellij.util.IncorrectOperationException)9 ASTNode (com.intellij.lang.ASTNode)7 XmlAspectChangeSetImpl (com.intellij.pom.xml.impl.XmlAspectChangeSetImpl)7 XmlFile (com.intellij.psi.xml.XmlFile)5 TreeChangeEvent (com.intellij.pom.tree.events.TreeChangeEvent)2 IElementType (com.intellij.psi.tree.IElementType)2 EmptyProgressIndicator (com.intellij.openapi.progress.EmptyProgressIndicator)1 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)1 TextRange (com.intellij.openapi.util.TextRange)1 PomModelAspect (com.intellij.pom.PomModelAspect)1 PomTransaction (com.intellij.pom.PomTransaction)1 PomModelListener (com.intellij.pom.event.PomModelListener)1 TreeAspect (com.intellij.pom.tree.TreeAspect)1 TreeAspectEvent (com.intellij.pom.tree.TreeAspectEvent)1 TreeChangeEventImpl (com.intellij.pom.tree.events.impl.TreeChangeEventImpl)1 XmlChangeSet (com.intellij.pom.xml.XmlChangeSet)1