Search in sources :

Example 1 with CollapseTagIntention

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

the class CollapseTagTest method testAvailable.

public void testAvailable() throws Exception {
    PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<a>    <caret>   </a>");
    assertTrue(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file));
}
Also used : CollapseTagIntention(com.intellij.xml.util.CollapseTagIntention) PsiFile(com.intellij.psi.PsiFile)

Example 2 with CollapseTagIntention

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

the class CollapseTagTest method testAlreadyCollapsed.

public void testAlreadyCollapsed() throws Exception {
    PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<a/>");
    assertFalse(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file));
}
Also used : CollapseTagIntention(com.intellij.xml.util.CollapseTagIntention) PsiFile(com.intellij.psi.PsiFile)

Example 3 with CollapseTagIntention

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

the class CollapseTagTest method testNotAvailable.

public void testNotAvailable() throws Exception {
    PsiFile file = myFixture.configureByText(XmlFileType.INSTANCE, "<a>    <caret>   <b/> </a>");
    assertFalse(new CollapseTagIntention().isAvailable(getProject(), myFixture.getEditor(), file));
}
Also used : CollapseTagIntention(com.intellij.xml.util.CollapseTagIntention) PsiFile(com.intellij.psi.PsiFile)

Aggregations

PsiFile (com.intellij.psi.PsiFile)3 CollapseTagIntention (com.intellij.xml.util.CollapseTagIntention)3