public class PlatformElementUtil extends Object
Constructor and Description |
---|
PlatformElementUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
adaptAs(Object object,
Class<T> clazz)
Tries and adapt the given object to an instance of the given class.
|
static org.eclipse.core.resources.IFile |
findFile(org.eclipse.compare.ITypedElement element)
Try and determine the resource of the given element.
|
public static org.eclipse.core.resources.IFile findFile(org.eclipse.compare.ITypedElement element)
element
- The element for which we need an IResource
.element
if we could find it, null
otherwise.public static <T> T adaptAs(Object object, Class<T> clazz)
T
- Type to which we need to adapt object.object
- The object we need to coerce to a given Class
.clazz
- Class to which we are to adapt object.null
if not.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.