/* * generated by Xtext */ package it.xsemantics.example.fj.ui.outline; import it.xsemantics.example.fj.fj.*; import it.xsemantics.example.fj.fj.Class; import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider; import org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode; /** * customization of the default outline structure * */ public class FJOutlineTreeProvider extends DefaultOutlineTreeProvider { protected void _createChildren(DocumentRootNode parentNode, Program program) { for (Class c : program.getClasses()) { createNode(parentNode, c); } if (program.getMain() != null) createNode(parentNode, program.getMain()); } /** * Don't show children of typed elements so to avoid showing the type of a * field as a child (we're using our custom label provider anyway) */ protected boolean _isLeaf(TypedElement o) { return true; } protected boolean _isLeaf(Method o) { return true; } protected boolean _isLeaf(Expression o) { return true; } }