|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.eclipse.classpath.ClasspathUtil
public class ClasspathUtil
Utility methods for working with class path.
| Method Summary | |
|---|---|
static void |
attemptAddExtensionClasspathProvidersToOfficeFloorClasspath(AbstractOfficeFloorEditPart<?,?,?> editPart,
org.eclipse.core.runtime.IProgressMonitor monitor,
String... extensionClassNames)
Attempts to add the ExtensionClasspathProvider instances to the
class path of the IJavaProject for the edit part. |
static org.eclipse.jdt.core.IClasspathEntry |
createClasspathEntry(Class<?> clazz,
OfficeFloorClasspathContainer container)
Obtains the IClasspathEntry of the class path containing the
Class. |
static org.eclipse.jdt.core.IClasspathEntry |
createClasspathEntry(ClasspathProvision provision,
OfficeFloorClasspathContainer container)
Creates the IClasspathEntry from a ClasspathProvision. |
static org.eclipse.jdt.core.IClasspathEntry |
createClasspathEntry(String variable,
String path)
Obtains the IClasspathEntry of the input variable and path. |
static void |
ensureProjectHasOfficeFloorClasspathContainer(org.eclipse.jdt.core.IJavaProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
Ensures the OfficeFloorClasspathContainer is on the
IJavaProject. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 void ensureProjectHasOfficeFloorClasspathContainer(org.eclipse.jdt.core.IJavaProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
OfficeFloorClasspathContainer is on the
IJavaProject.
project - IJavaProject.monitor - IProgressMonitor. May be null.
public static void attemptAddExtensionClasspathProvidersToOfficeFloorClasspath(AbstractOfficeFloorEditPart<?,?,?> editPart,
org.eclipse.core.runtime.IProgressMonitor monitor,
String... extensionClassNames)
Attempts to add the ExtensionClasspathProvider instances to the
class path of the IJavaProject for the edit part.
No exception is thrown if unable to update the class path and the class path is subsequently not updated.
editPart - AbstractOfficeFloorEditPart.monitor - IProgressMonitor.extensionClassNames - Listing of class names that may have extension associated.
public static org.eclipse.jdt.core.IClasspathEntry createClasspathEntry(ClasspathProvision provision,
OfficeFloorClasspathContainer container)
IClasspathEntry from a ClasspathProvision.
provision - ClasspathProvision.container - OfficeFloorClasspathContainer.
IClasspathEntry or null if fails.
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 org.eclipse.jdt.core.IClasspathEntry createClasspathEntry(Class<?> clazz,
OfficeFloorClasspathContainer container)
IClasspathEntry of the class path containing the
Class.
clazz - Class.container - OfficeFloorClasspathContainer. May be
null if do not require source attachments.
IClasspathEntry of the class path containing the
Class or null if issue obtaining.
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.
classFile - IClassFile.
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||