use of com.intellij.util.xml.stubs.model.Foo in project intellij-community by JetBrains.
the class DomStubUsingTest method testAccessingPsi.
public void testAccessingPsi() {
DomFileElement<Foo> element = prepare("foo.xml", Foo.class);
assertNotNull(element.getXmlElement());
XmlTag tag = element.getRootTag();
assertNotNull(tag);
Foo foo = element.getRootElement();
assertNotNull(foo.getXmlTag());
Bar bar = foo.getBars().get(0);
assertNotNull(bar.getXmlElement());
XmlAttribute attribute = bar.getString().getXmlAttribute();
assertNotNull(attribute);
}
use of com.intellij.util.xml.stubs.model.Foo in project intellij-community by JetBrains.
the class DomStubUsingTest method testStubbedElementUndefineNotExisting.
public void testStubbedElementUndefineNotExisting() {
final DomFileElement<Foo> fileElement = prepare("foo.xml", Foo.class);
final Bar bar = fileElement.getRootElement().getBars().get(0);
assertUndefine(bar);
}
use of com.intellij.util.xml.stubs.model.Foo in project intellij-community by JetBrains.
the class DomStubUsingTest method testConverters.
public void testConverters() {
DomFileElement<Foo> element = prepare("converters.xml", Foo.class);
Bar bar = element.getRootElement().getBars().get(0);
PsiClass value = bar.getClazz().getValue();
assertNotNull(value);
assertEquals("java.lang.String", value.getQualifiedName());
assertFalse(element.getFile().getNode().isParsed());
}
Aggregations