use of org.eclipse.xtend.ide.common.outline.IXtendOutlineContext in project xtext-xtend by eclipse.
the class AbstractXtendOutlineTreeBuilder method buildMembers.
protected void buildMembers(final JvmDeclaredType inferredType, final JvmDeclaredType baseType, @Extension final IXtendOutlineContext context) {
EList<JvmMember> _members = inferredType.getMembers();
for (final JvmMember member : _members) {
boolean _isProcessed = context.isProcessed(member);
boolean _not = (!_isProcessed);
if (_not) {
if ((member instanceof JvmDeclaredType)) {
boolean _isShowInherited = context.isShowInherited();
if (_isShowInherited) {
final IXtendOutlineContext typeContext = context.newContext();
final EObject sourceElement = this._iXtendJvmAssociations.getPrimarySourceElement(member);
if ((sourceElement instanceof XtendTypeDeclaration)) {
this.buildType(sourceElement, typeContext);
} else {
this.buildJvmType(((JvmDeclaredType) member), typeContext);
}
} else {
this.buildJvmType(((JvmDeclaredType) member), context);
}
} else {
if ((member instanceof JvmFeature)) {
boolean _skipFeature = this.skipFeature(((JvmFeature) member));
boolean _not_1 = (!_skipFeature);
if (_not_1) {
final IXtendOutlineContext featureContext = this.buildFeature(baseType, ((JvmFeature) member), member, context);
final Consumer<JvmGenericType> _function = (JvmGenericType it) -> {
this.buildJvmType(it, featureContext.newContext());
};
((JvmFeature) member).getLocalClasses().forEach(_function);
}
}
}
context.markAsProcessed(member);
}
}
boolean _isShowInherited_1 = context.isShowInherited();
if (_isShowInherited_1) {
this.buildInheritedMembers(inferredType, context);
}
}
use of org.eclipse.xtend.ide.common.outline.IXtendOutlineContext in project xtext-xtend by eclipse.
the class AbstractXtendOutlineTreeBuilder method buildJvmType.
protected void buildJvmType(final JvmDeclaredType typeElement, final IXtendOutlineContext context) {
final IXtendOutlineContext jvmTypeContext = this.xtendOutlineNodeBuilder.buildXtendNode(typeElement, context);
boolean _isProcessed = jvmTypeContext.isProcessed(typeElement);
boolean _not = (!_isProcessed);
if (_not) {
jvmTypeContext.markAsProcessed(typeElement);
this.buildMembers(typeElement, typeElement, jvmTypeContext);
}
}
use of org.eclipse.xtend.ide.common.outline.IXtendOutlineContext in project xtext-xtend by eclipse.
the class XtendOutlineSourceTreeBuilder method buildLocalClasses.
protected void buildLocalClasses(final JvmFeature jvmFeature, final IXtendOutlineContext context) {
boolean _isEmpty = jvmFeature.getLocalClasses().isEmpty();
boolean _not = (!_isEmpty);
if (_not) {
EList<JvmGenericType> _localClasses = jvmFeature.getLocalClasses();
for (final JvmGenericType jvmGenericType : _localClasses) {
{
final IXtendOutlineContext typeContext = context.newContext();
Set<EObject> _sourceElements = this._iXtendJvmAssociations.getSourceElements(jvmGenericType);
for (final EObject sourceElement : _sourceElements) {
this.buildType(sourceElement, typeContext);
}
}
}
}
}
use of org.eclipse.xtend.ide.common.outline.IXtendOutlineContext in project xtext-xtend by eclipse.
the class AbstractMultiModeOutlineTreeProvider method internalCreateChildren.
@Override
public void internalCreateChildren(DocumentRootNode parentNode, EObject modelElement) {
IXtendOutlineContext context = newContext(parentNode);
xtendOutlineTreeBuilder.build(modelElement, context);
}
use of org.eclipse.xtend.ide.common.outline.IXtendOutlineContext in project xtext-xtend by eclipse.
the class AbstractMultiModeOutlineTreeProvider method internalCreateChildren.
@Override
protected void internalCreateChildren(IOutlineNode parentNode, EObject modelElement) {
IXtendOutlineContext context = newContext(parentNode);
xtendOutlineTreeBuilder.build(modelElement, context);
}
Aggregations