public class Storage2UriMapperImpl extends java.lang.Object implements IStorage2UriMapperExtension
Constructor and Description |
---|
Storage2UriMapperImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.core.resources.IStorage> |
getAllEntries(org.eclipse.core.resources.IContainer container) |
IStorage2UriMapperContribution |
getContribution()
Public for testing purpose
|
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 no valid URI exists. |
protected org.eclipse.core.resources.IWorkspaceRoot |
getWorkspaceRoot() |
void |
initializeCache() |
protected boolean |
isHandled(org.eclipse.core.resources.IFolder folder)
Return
true if the folder should be traversed. |
boolean |
isValidUri(org.eclipse.emf.common.util.URI uri,
org.eclipse.core.resources.IStorage storage) |
void |
setContribution(IStorage2UriMapperContribution contribution)
Public for testing purpose
|
void |
setUriValidator(UriValidator uriValidator) |
public final void setUriValidator(UriValidator uriValidator)
public void setContribution(IStorage2UriMapperContribution contribution)
public IStorage2UriMapperContribution getContribution()
public void initializeCache()
initializeCache
in interface IStorage2UriMapperExtension
public java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.core.resources.IStorage> getAllEntries(org.eclipse.core.resources.IContainer container)
getAllEntries
in interface IStorage2UriMapper
protected boolean isHandled(org.eclipse.core.resources.IFolder folder)
true
if the folder should be traversed. False
otherwise.
Defaults to true
for all folders.true
if the folder should be traversed. False
otherwise.public java.lang.Iterable<Pair<org.eclipse.core.resources.IStorage,org.eclipse.core.resources.IProject>> getStorages(org.eclipse.emf.common.util.URI uri)
IStorage2UriMapper
IStorage
associated with one IProject
but
in the case that the same external class folder or jar is referenced in
multiple projects multiple IStorage
s are returned.getStorages
in interface IStorage2UriMapper
uri
- the URI
. May not be null
.null
.protected org.eclipse.core.resources.IWorkspaceRoot getWorkspaceRoot()
public org.eclipse.emf.common.util.URI getUri(org.eclipse.core.resources.IStorage storage)
IStorage2UriMapper
IStorage
or null
if no valid URI exists.getUri
in interface IStorage2UriMapper
IStorage
or null
.public boolean isValidUri(org.eclipse.emf.common.util.URI uri, org.eclipse.core.resources.IStorage storage)