}
public static PackageLibraryType typeOfLibrary(Session session,
String library)
{
FileSystemItem projectDir = null;
SessionInfo sessionInfo = session.getSessionInfo();
if (sessionInfo != null)
projectDir = sessionInfo.getActiveProjectDir();
// if there's an active project and this package is in its library or
// the package has no recorded library (i.e. it's not installed), it
// belongs in the project library
if (StringUtil.isNullOrEmpty(library) ||
(projectDir != null && library.startsWith(projectDir.getPath())))
{
return PackageLibraryType.Project;
}
else if (library.startsWith(FileSystemItem.HOME_PATH))
{