Package org.eclipse.handly.model
Interface IElementHandleFactory
-
public interface IElementHandleFactory
Provides a generic way to createIElement
handles. An instance ofIElementHandleFactory
for a model can usually be obtained via the model'scontext
bycontext.get(IElementHandleFactory.class)
.Note that, despite having a dependency on
IResource
, this interface can safely be used even whenorg.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IElement
createFromHandleMemento(java.lang.String memento)
Returns the element handle created from the given handle memento that was generated byElements.getHandleMemento(IElement)
.IElement
createFromResourceHandle(org.eclipse.core.resources.IResource resource)
Returns the handle of the element corresponding to the given resource.
-
-
-
Method Detail
-
createFromHandleMemento
IElement createFromHandleMemento(java.lang.String memento)
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
null
if unable to create an element handle from the given memento
-
createFromResourceHandle
IElement createFromResourceHandle(org.eclipse.core.resources.IResource resource)
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
null
if unable to associate the given resource with an element
-
-