org.eclipse.xtext.scoping.impl.MultimapBasedSelectable Java Examples
The following examples show how to use
org.eclipse.xtext.scoping.impl.MultimapBasedSelectable.
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: XbaseImportedNamespaceScopeProvider.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected ISelectable internalGetAllDescriptions(final Resource resource) { Iterable<EObject> allContents = new Iterable<EObject>(){ @Override public Iterator<EObject> iterator() { return EcoreUtil.getAllContents(resource, false); } }; Iterable<IEObjectDescription> allDescriptions = Scopes.scopedElementsFor(allContents, qualifiedNameProvider); return new MultimapBasedSelectable(allDescriptions); }
Example #2
Source File: XImportSectionNamespaceScopeProvider.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected ISelectable internalGetAllDescriptions(final Resource resource) { Iterable<EObject> allContents = new Iterable<EObject>(){ @Override public Iterator<EObject> iterator() { return EcoreUtil.getAllContents(resource, false); } }; Iterable<IEObjectDescription> allDescriptions = Scopes.scopedElementsFor(allContents, qualifiedNameProvider); return new MultimapBasedSelectable(allDescriptions); }
Example #3
Source File: XtendImportedNamespaceScopeProvider.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Override protected ISelectable internalGetAllDescriptions(final Resource resource) { List<IEObjectDescription> descriptions = Lists.newArrayList(); for (EObject content: resource.getContents()) { if (content instanceof JvmDeclaredType) { JvmDeclaredType type = (JvmDeclaredType) content; if (!Strings.isEmpty(type.getIdentifier())) { doGetAllDescriptions(type, descriptions); } } } return new MultimapBasedSelectable(descriptions); }
Example #4
Source File: SARLImportedNamespaceScopeProvider.java From sarl with Apache License 2.0 | 5 votes |
@Override protected ISelectable internalGetAllDescriptions(final Resource resource) { final List<IEObjectDescription> descriptions = Lists.newArrayList(); for (final EObject content: resource.getContents()) { if (content instanceof JvmDeclaredType) { // Begin fixing of issue #356. final JvmDeclaredType type = (JvmDeclaredType) content; if (!Strings.isNullOrEmpty(type.getIdentifier())) { // End of fixing doGetAllDescriptions(type, descriptions); } } } return new MultimapBasedSelectable(descriptions); }