| java.lang.Object org.netbeans.modules.web.jspparser.ContextUtil
ContextUtil | final public class ContextUtil (Code) | | Static utilities related to web context stuff - relative paths, relative objects etc.
author: Petr Jiricka |
Method Summary | |
public static String | findRelativeContextPath(FileObject rootFolder, FileObject relativeObject) Finds a relative context path between rootFolder and relativeObject. | public static String | findRelativePath(FileObject rootFolder, FileObject relativeObject) Finds a relative resource path between rootFolder and relativeObject. | public static String | getThrowableMessage(Throwable throwable, boolean includeStackTrace) Returns a message for a given throwable. | public static boolean | isInSubTree(FileObject folder, FileObject fo) Decides whether a given file is in the subtree defined by the given folder. |
findRelativeContextPath | public static String findRelativeContextPath(FileObject rootFolder, FileObject relativeObject)(Code) | | Finds a relative context path between rootFolder and relativeObject.
Similar to findRelativePath(FileObject, FileObject) , only
different slash '/' conventions.
relative context path between rootFolder and relativeObject. The returned pathalways starts with a '/'. It ends with a '/' if the relative object is a directory. exception: IllegalArgumentException - if relativeObject is not in rootFolder's tree. |
findRelativePath | public static String findRelativePath(FileObject rootFolder, FileObject relativeObject)(Code) | | Finds a relative resource path between rootFolder and relativeObject.
relative path between rootFolder and relativeObject. The returned pathnever starts with a '/'. It never ends with a '/'. exception: IllegalArgumentException - if relativeObject is not in rootFolder's tree. |
getThrowableMessage | public static String getThrowableMessage(Throwable throwable, boolean includeStackTrace)(Code) | | Returns a message for a given throwable. Optionally includes the throwable
stack trace in the message.
Parameters: throwable - throwable for which to construct the message Parameters: includeStackTrace - whether to include a stack trace of the throwable in the message an appropriate message for the throwable |
isInSubTree | public static boolean isInSubTree(FileObject folder, FileObject fo)(Code) | | Decides whether a given file is in the subtree defined by the given folder.
Similar to org.openide.filesystems.FileUtil.isParentOf (FileObject folder, FileObject fo) ,
but also accepts the case that fo == folder
|
|
|