Search in sources :

Example 1 with IOutlineTreeStructureProvider

use of org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider in project xtext-eclipse by eclipse.

the class OutlineNodeTest method createRootNode.

protected DocumentRootNode createRootNode() {
    XtextDocument document = get(XtextDocument.class);
    document.setInput(resource);
    IOutlineTreeStructureProvider treeStructureProvider = new IOutlineTreeStructureProvider() {

        @Override
        public void createChildren(IOutlineNode parentNode, EObject modelElement) {
            new EObjectNode(child0Element, parentNode, (ImageDescriptor) null, "child", false);
        }
    };
    DocumentRootNode rootNode = new DocumentRootNode((ImageDescriptor) null, "root", document, treeStructureProvider);
    return rootNode;
}
Also used : IOutlineTreeStructureProvider(org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider) DocumentRootNode(org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode) EObject(org.eclipse.emf.ecore.EObject) XtextDocument(org.eclipse.xtext.ui.editor.model.XtextDocument) EObjectNode(org.eclipse.xtext.ui.editor.outline.impl.EObjectNode) IOutlineNode(org.eclipse.xtext.ui.editor.outline.IOutlineNode)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)1 XtextDocument (org.eclipse.xtext.ui.editor.model.XtextDocument)1 IOutlineNode (org.eclipse.xtext.ui.editor.outline.IOutlineNode)1 DocumentRootNode (org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode)1 EObjectNode (org.eclipse.xtext.ui.editor.outline.impl.EObjectNode)1 IOutlineTreeStructureProvider (org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider)1