Package org.eclipse.handly.model
Interface IElementHandleFactory
public interface IElementHandleFactory
Provides a generic way to create
IElement handles. An instance of
IElementHandleFactory for a model can usually be obtained via
the model's context by
context.get(IElementHandleFactory.class).
Note that, despite having a dependency on IResource, this interface can
safely be used even when org.eclipse.core.resources bundle is not
available. This is based on the "outward impression" of late resolution of
symbolic references a JVM must provide according to the JVMS.
-
Method Summary
Modifier and TypeMethodDescriptioncreateFromHandleMemento(String memento) Returns the element handle created from the given handle memento that was generated byElements.getHandleMemento(IElement).createFromResourceHandle(org.eclipse.core.resources.IResource resource) Returns the handle of the element corresponding to the given resource.
-
Method Details
-
createFromHandleMemento
Returns the element handle created from the given handle memento that was generated byElements.getHandleMemento(IElement).- Parameters:
memento- a handle memento (may benull)- Returns:
- the element handle created from the given memento,
or
nullif unable to create an element handle from the given memento
-
createFromResourceHandle
Returns the handle of the element corresponding to the given resource.- Parameters:
resource- a resource handle (may benull)- Returns:
- the handle of the element corresponding to the given resource,
or
nullif unable to associate the given resource with an element
-