/* * generated by Xtext */ package org.applause.lang.ui.outline; import java.util.List; import org.applause.lang.applauseDsl.Constant; import org.applause.lang.applauseDsl.ContentProvider; import org.applause.lang.applauseDsl.SectionCell; import org.applause.lang.applauseDsl.SectionedView; import org.applause.lang.applauseDsl.View; import org.applause.lang.applauseDsl.ViewSection; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.ui.editor.outline.transformer.AbstractDeclarativeSemanticModelTransformer; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; /** * customization of the default outline structure * */ public class ApplauseDslTransformer extends AbstractDeclarativeSemanticModelTransformer { public List<EObject> getChildren(View obj) { return NO_CHILDREN; } public List<EObject> getChildren(ContentProvider obj) { return NO_CHILDREN; } public List<EObject> getChildren(SectionCell obj) { return NO_CHILDREN; } public List<EObject> getChildren(Constant obj) { return NO_CHILDREN; } public List<EObject> getChildren(ViewSection obj) { return Lists.newArrayList(Iterables.filter(obj.getCells(), EObject.class)); } public List<EObject> getChildren(SectionedView obj) { return Lists.newArrayList(Iterables.filter(obj.getSections(), EObject.class)); } }