use of org.eclipse.xtext.ui.editor.outline.impl.EStructuralFeatureNode in project xtext-eclipse by eclipse.
the class OutlineNodeTest method testStateAccess.
@Test
public void testStateAccess() {
DocumentRootNode rootNode = createRootNode();
EObjectNode parentNode = new EObjectNode(parentElement, rootNode, (ImageDescriptor) null, "parent", false);
EStructuralFeatureNode featureNode = new EStructuralFeatureNode(parentElement, OutlineTestPackage.Literals.ELEMENT__XREFS, parentNode, (ImageDescriptor) null, "eClassifiers", true);
IUnitOfWork<Boolean, EObject> work = new IUnitOfWork<Boolean, EObject>() {
@Override
public Boolean exec(EObject state) throws Exception {
return state != null;
}
};
assertTrue(rootNode.readOnly(work));
assertTrue(parentNode.readOnly(work));
assertTrue(featureNode.readOnly(work));
}
Aggregations