use of com.intellij.pom.PomModel in project intellij-community by JetBrains.
the class XmlDocumentImpl method addInternal.
@Override
public TreeElement addInternal(final TreeElement first, final ASTNode last, final ASTNode anchor, final Boolean before) {
final PomModel model = PomManager.getModel(getProject());
final XmlAspect aspect = model.getModelAspect(XmlAspect.class);
final TreeElement[] holder = new TreeElement[1];
try {
model.runTransaction(new PomTransactionBase(this, aspect) {
@Override
public PomModelEvent runInner() {
holder[0] = XmlDocumentImpl.super.addInternal(first, last, anchor, before);
return XmlDocumentChangedImpl.createXmlDocumentChanged(model, XmlDocumentImpl.this);
}
});
} catch (IncorrectOperationException ignored) {
}
return holder[0];
}
use of com.intellij.pom.PomModel in project intellij-community by JetBrains.
the class XmlDocumentImpl method replaceChildInternal.
@Override
public void replaceChildInternal(@NotNull final ASTNode child, @NotNull final TreeElement newElement) {
final PomModel model = PomManager.getModel(getProject());
final XmlAspect aspect = model.getModelAspect(XmlAspect.class);
try {
model.runTransaction(new PomTransactionBase(this, aspect) {
@Override
public PomModelEvent runInner() {
XmlDocumentImpl.super.replaceChildInternal(child, newElement);
return XmlDocumentChangedImpl.createXmlDocumentChanged(model, XmlDocumentImpl.this);
}
});
} catch (IncorrectOperationException ignored) {
}
}
Aggregations