Search in sources :

Example 6 with DomEvent

use of com.intellij.util.xml.events.DomEvent in project intellij-community by JetBrains.

the class SimpleValuesIncrementalUpdateTest method testAttrXmlEmptyUri.

public void testAttrXmlEmptyUri() throws Throwable {
    final MyElement element = createElement("<a xmlns=\"foo\"><ns-child attr=\"239\"/></a>", MyElement.class);
    getDomManager().getDomFileDescription(element.getXmlElement()).registerNamespacePolicy("foo", "foo");
    final GenericAttributeValue<String> attr = element.getNsChild().getAttr();
    attr.getXmlTag().setAttribute("attr", "42");
    putExpected(new DomEvent(element.getNsChild(), false));
    assertResultsAndClear();
}
Also used : DomEvent(com.intellij.util.xml.events.DomEvent)

Example 7 with DomEvent

use of com.intellij.util.xml.events.DomEvent in project intellij-community by JetBrains.

the class IncrementalUpdateEventsTest method testRemove3.

public void testRemove3() {
    deleteTag(3);
    putExpected(new DomEvent(myElement, false));
    assertResultsAndClear();
}
Also used : DomEvent(com.intellij.util.xml.events.DomEvent)

Example 8 with DomEvent

use of com.intellij.util.xml.events.DomEvent in project intellij-community by JetBrains.

the class IncrementalUpdateEventsTest method testAdd2.

public void testAdd2() {
    addChildElementTag(2);
    putExpected(new DomEvent(myElement, false));
    assertResultsAndClear();
}
Also used : DomEvent(com.intellij.util.xml.events.DomEvent)

Example 9 with DomEvent

use of com.intellij.util.xml.events.DomEvent in project intellij-community by JetBrains.

the class IncrementalUpdateEventsTest method testAdd3.

public void testAdd3() {
    addChildElementTag(3);
    putExpected(new DomEvent(myElement, false));
    assertResultsAndClear();
}
Also used : DomEvent(com.intellij.util.xml.events.DomEvent)

Example 10 with DomEvent

use of com.intellij.util.xml.events.DomEvent in project intellij-community by JetBrains.

the class IncrementalUpdateEventsTest method testAdd4.

public void testAdd4() {
    final XmlTag tag = myElement.getXmlTag();
    tag.addAfter(createTag("<child-element/>"), tag.getSubTags()[3]);
    putExpected(new DomEvent(myElement, false));
    assertResultsAndClear();
}
Also used : XmlTag(com.intellij.psi.xml.XmlTag) DomEvent(com.intellij.util.xml.events.DomEvent)

Aggregations

DomEvent (com.intellij.util.xml.events.DomEvent)48 XmlTag (com.intellij.psi.xml.XmlTag)24 Result (com.intellij.openapi.application.Result)7 WriteCommandAction (com.intellij.openapi.command.WriteCommandAction)7 XmlFile (com.intellij.psi.xml.XmlFile)4 VirtualFile (com.intellij.openapi.vfs.VirtualFile)3 DomElement (com.intellij.util.xml.DomElement)3 Document (com.intellij.openapi.editor.Document)2 XmlAttribute (com.intellij.psi.xml.XmlAttribute)2 IncorrectOperationException (com.intellij.util.IncorrectOperationException)2 DomSupportEnabled (com.intellij.ide.highlighter.DomSupportEnabled)1 VirtualFileWithId (com.intellij.openapi.vfs.VirtualFileWithId)1 ObjectStubTree (com.intellij.psi.stubs.ObjectStubTree)1 FileStub (com.intellij.util.xml.stubs.FileStub)1 ArrayList (java.util.ArrayList)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1