org.eclipse.xtext.ui.resource
Interface IStorage2UriMapper

All Known Implementing Classes:
Storage2UriMapperImpl, Storage2UriMapperJavaImpl

public interface IStorage2UriMapper

A bi directional mapping service that allows to find the EMF URI for an IStorage and vice versa.

Author:
Sven Efftinge - Initial contribution and API

Method Summary
 java.lang.Iterable<Pair<org.eclipse.core.resources.IStorage,org.eclipse.core.resources.IProject>> getStorages(org.eclipse.emf.common.util.URI uri)
          Find the storages that can be mapped to the given URI.
 org.eclipse.emf.common.util.URI getUri(org.eclipse.core.resources.IStorage storage)
          Returns the URI for the given IStorage or null if not valid URI exists.
 

Method Detail

getStorages

java.lang.Iterable<Pair<org.eclipse.core.resources.IStorage,org.eclipse.core.resources.IProject>> getStorages(org.eclipse.emf.common.util.URI uri)
Find the storages that can be mapped to the given URI. It will typically be only one IStorage associated with one IProject but in the case that the same external class folder or jar is referenced in multiple projects multiple IStorages are returned.

Parameters:
uri - the URI. May not be null.
Returns:
IStorages corresponding to the given URI. Never null.

getUri

org.eclipse.emf.common.util.URI getUri(org.eclipse.core.resources.IStorage storage)
Returns the URI for the given IStorage or null if not valid URI exists.

Returns:
returns the URI for the given IStorage or null.