Java Code Examples for org.eclipse.xtext.resource.IResourceDescription#getExportedObjectsByObject()

The following examples show how to use org.eclipse.xtext.resource.IResourceDescription#getExportedObjectsByObject() . 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: ResourceDescriptionsData.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Iterable<IEObjectDescription> getExportedObjectsByObject(EObject object) {
	URI resourceURI = EcoreUtil2.getPlatformResourceOrNormalizedURI(object).trimFragment();
	IResourceDescription description = getResourceDescription(resourceURI);
	if (description == null)
		return Collections.emptyList();
	return description.getExportedObjectsByObject(object);
}
 
Example 2
Source File: AbstractContainer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Iterable<IEObjectDescription> getExportedObjectsByObject(final EObject object) {
	URI resourceURI = EcoreUtil2.getPlatformResourceOrNormalizedURI(object).trimFragment();
	IResourceDescription description = getResourceDescription(resourceURI);
	if (description == null)
		return Collections.emptyList();
	return description.getExportedObjectsByObject(object);
}