public class ClasspathUtil extends Object
Modifier and Type | Method and Description |
---|---|
static org.eclipse.jdt.core.IClasspathEntry |
createClasspathEntry(String variable,
String path)
Obtains the
IClasspathEntry of the input variable and path. |
static Object[] |
getChildren(org.eclipse.jdt.core.IJarEntryResource jarEntryResource)
Obtains the children of the
IJarEntryResource . |
static Object[] |
getChildren(org.eclipse.jdt.core.IJavaElement javaElement)
Obtains the children of the
IJavaElement . |
static Object[] |
getChildren(org.eclipse.core.resources.IResource resource)
Obtains the children of the
IResource . |
static Object[] |
getChildren(Object parent)
Obtains the children of the input parent.
|
static String |
getClassName(org.eclipse.jdt.core.IJavaElement javaElement)
Obtains the class name of the input
IJavaElement . |
static String |
getClassPathLocation(org.eclipse.core.runtime.IPath path)
Obtains the location on the class path for the input
IPath . |
static String |
getClassPathLocation(String fullPath)
Obtains the location on the class path for the input full path.
|
static Object[] |
getDescendants(Object item)
Deprecated.
|
static Object |
getSpecificProject(org.eclipse.core.resources.IProject project)
Obtains the specific project, being either
IJavaProject of the
input IProject or the input IProject . |
static void |
loadDescendants(Object item,
List<Object> descendants)
Loads the descendants of the input item.
|
static Class<?> |
loadPluginClass(String className)
Loads the
Class from the plug-in class path. |
static Class<?> |
loadProjectClass(org.eclipse.core.resources.IProject project,
String className)
Loads the
Class from the IProject class path. |
static void |
openClasspathResource(String resourcePath,
AbstractOfficeFloorEditor<?,?> editor)
Opens the class path resource.
|
static void |
openEditor(AbstractOfficeFloorEditor<?,?> editor,
org.eclipse.core.resources.IFile file)
Opens the editor for the
IFile . |
public static Class<?> loadProjectClass(org.eclipse.core.resources.IProject project, String className) throws ClassNotFoundException
Class
from the IProject
class path.project
- IProject
.className
- Class name.Class
.ClassNotFoundException
- If Class
not found.public static Class<?> loadPluginClass(String className) throws ClassNotFoundException
Class
from the plug-in class path.className
- Class name.Class
.ClassNotFoundException
- If Class
not found.public static org.eclipse.jdt.core.IClasspathEntry createClasspathEntry(String variable, String path)
IClasspathEntry
of the input variable and path.variable
- Name of variable.path
- Path from variable.IClasspathEntry
for the variable or null
if
fails to create.public static void openClasspathResource(String resourcePath, AbstractOfficeFloorEditor<?,?> editor)
resourcePath
- Path to the resource on the class path.editor
- AbstractOfficeFloorEditor
opening the resource.public static void openEditor(AbstractOfficeFloorEditor<?,?> editor, org.eclipse.core.resources.IFile file)
IFile
.editor
- AbstractOfficeFloorEditor
requiring to open the
IFile
.file
- IFile
to open.public static String getClassName(org.eclipse.jdt.core.IJavaElement javaElement)
IJavaElement
.javaElement
- IJavaElement
.null
if IJavaElement
not a
class or contained within a class.public static String getClassPathLocation(String fullPath)
fullPath
- Full path.public static String getClassPathLocation(org.eclipse.core.runtime.IPath path)
IPath
.path
- IPath
.IPath
.@Deprecated public static Object[] getDescendants(Object item)
item
- Item.public static void loadDescendants(Object item, List<Object> descendants)
item
- Item.descendants
- Listing to add descendants.public static Object[] getChildren(Object parent)
parent
- Parent.public static Object[] getChildren(org.eclipse.core.resources.IResource resource)
IResource
.resource
- IResource
.public static Object[] getChildren(org.eclipse.jdt.core.IJavaElement javaElement)
IJavaElement
.javaElement
- IJavaElement
.public static Object[] getChildren(org.eclipse.jdt.core.IJarEntryResource jarEntryResource)
IJarEntryResource
.jarEntryResource
- IJarEntryResource
.public static Object getSpecificProject(org.eclipse.core.resources.IProject project)
IJavaProject
of the
input IProject
or the input IProject
.project
- IProject
.Copyright © 2005–2016. All rights reserved.