use of org.eclipse.xtend.lib.macro.declaration.MutableElement in project xtext-xtend by eclipse.
the class AssociatorImpl method setPrimarySourceElement.
@Override
public void setPrimarySourceElement(final MutableElement javaElement, final Element sourceElement) {
final Element primarySourceElement = this.unit.getTracability().getPrimarySourceElement(sourceElement);
EObject _switchResult = null;
boolean _matched = false;
if (primarySourceElement instanceof TypeReferenceImpl) {
_matched = true;
_switchResult = ((TypeReferenceImpl) primarySourceElement).getSource();
}
if (!_matched) {
if (primarySourceElement instanceof AbstractElementImpl) {
_matched = true;
_switchResult = ((AbstractElementImpl<?>) primarySourceElement).getDelegate();
}
}
final EObject delegate = _switchResult;
this.unit.getJvmModelAssociator().associate(delegate, ((AbstractElementImpl<?>) javaElement).getDelegate());
}
Aggregations