use of org.eclipse.xtext.xbase.scoping.batch.StaticFeatureDescriptionWithTypeLiteralReceiver in project xtext-eclipse by eclipse.
the class XbaseContentProposalPriorities method adjustCrossReferencePriority.
@Override
public void adjustCrossReferencePriority(final ICompletionProposal proposal, final String prefix) {
if ((proposal instanceof ConfigurableCompletionProposal)) {
Object _additionalData = ((ConfigurableCompletionProposal) proposal).getAdditionalData(XbaseProposalProvider.DESCRIPTION_KEY);
final Object desc = _additionalData;
boolean _matched = false;
if (desc instanceof SimpleIdentifiableElementDescription) {
if (((!Objects.equal(((ConfigurableCompletionProposal) proposal).getReplacementString(), "this")) && (!Objects.equal(((ConfigurableCompletionProposal) proposal).getReplacementString(), "super")))) {
_matched = true;
this.adjustPriority(proposal, prefix, 570);
return;
}
}
if (!_matched) {
if (desc instanceof StaticFeatureDescriptionWithTypeLiteralReceiver) {
_matched = true;
this.adjustPriority(proposal, prefix, 560);
}
}
if (!_matched) {
if (desc instanceof IIdentifiableElementDescription) {
_matched = true;
JvmIdentifiableElement _elementOrProxy = ((IIdentifiableElementDescription) desc).getElementOrProxy();
boolean _matched_1 = false;
if (_elementOrProxy instanceof JvmField) {
_matched_1 = true;
this.adjustPriority(proposal, prefix, 550);
return;
}
if (!_matched_1) {
if (_elementOrProxy instanceof JvmExecutable) {
_matched_1 = true;
this.adjustPriority(proposal, prefix, 520);
return;
}
}
}
}
}
super.adjustCrossReferencePriority(proposal, prefix);
}
Aggregations