org.eclipse.xtext.scoping.impl.FilteringScope Java Examples
The following examples show how to use
org.eclipse.xtext.scoping.impl.FilteringScope.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtendImportingTypesProposalProvider.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Override protected ConfigurableCompletionProposal.IReplacementTextApplier createTextApplier(final ContentAssistContext context, final IScope typeScope, final IQualifiedNameConverter qualifiedNameConverter, final IValueConverter<String> valueConverter) { final Predicate<IEObjectDescription> _function = (IEObjectDescription it) -> { QualifiedName _name = it.getName(); return (!Objects.equal(_name, XtendImportedNamespaceScopeProvider.OLD_DATA_ANNOTATION)); }; final FilteringScope scope = new FilteringScope(typeScope, _function); return super.createTextApplier(context, scope, qualifiedNameConverter, valueConverter); }
Example #2
Source File: STextGlobalScopeProvider.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected IScope filterPropertiesOfLibrary(Resource context, EReference reference, Predicate<IEObjectDescription> filter) { return new FilteringScope(libraryScope.getScope(context, reference, filter), new Predicate<IEObjectDescription>() { @Override public boolean apply(IEObjectDescription input) { return input.getEClass() != TypesPackage.Literals.PROPERTY; } }); }