Class PlugInManager
- java.lang.Object
-
- com.vividsolutions.jump.workbench.plugin.PlugInManager
-
public class PlugInManager extends Object
Loads plug-ins (or more precisely, Extensions), and any JAR files that they depend on, from the plug-in directory.
-
-
Constructor Summary
Constructors Constructor Description PlugInManager(WorkbenchContext context, TaskMonitor monitor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExtensionsFolder(File dir)
add an extensions folder - adds folder root to classpath - adds all contained jars to classpath - looks for extensions in jars only in folder root (to speedup start) - looks for extensions in any jar file and as class files recursively if limit-ext-lookup is 'false'void
addJarsFolder(File dir)
add all jar files in a folder recursively to classpathFile
findFileOrFolderInExtensionDirs(String fileOrFolder)
search extension directories in the order they were added for a given file or folder return first found or null if none existsClassLoader
getClassLoader()
Deprecated.usegetPlugInClassLoader()
insteadCollection<Configuration>
getConfigurations()
List<File>
getExtensionDirs()
fetch a list of folders holding extension jars that were added during startPlugInClassLoader
getPlugInClassLoader()
To access extension classes, use this ClassLoader rather than the default ClassLoader.File
getPlugInDirectory()
Deprecated.void
load()
static String
message(Configuration configuration)
static String
name(Configuration configuration)
void
setLimitExtensionLookup(boolean limitExtensionLookup)
static String
version(Configuration configuration)
-
-
-
Constructor Detail
-
PlugInManager
public PlugInManager(WorkbenchContext context, TaskMonitor monitor) throws Exception
- Parameters:
plugInDirectory
- null to leave unspecified- Throws:
Exception
-
-
Method Detail
-
setLimitExtensionLookup
public void setLimitExtensionLookup(boolean limitExtensionLookup)
-
addExtensionsFolder
public void addExtensionsFolder(File dir)
add an extensions folder - adds folder root to classpath - adds all contained jars to classpath - looks for extensions in jars only in folder root (to speedup start) - looks for extensions in any jar file and as class files recursively if limit-ext-lookup is 'false'- Parameters:
dir
-
-
addJarsFolder
public void addJarsFolder(File dir)
add all jar files in a folder recursively to classpath- Parameters:
dir
-
-
findFileOrFolderInExtensionDirs
public File findFileOrFolderInExtensionDirs(String fileOrFolder)
search extension directories in the order they were added for a given file or folder return first found or null if none exists- Parameters:
fileOrFolder
-- Returns:
- file object or null
-
name
public static String name(Configuration configuration)
-
version
public static String version(Configuration configuration)
-
message
public static String message(Configuration configuration)
-
getConfigurations
public Collection<Configuration> getConfigurations()
-
getClassLoader
public ClassLoader getClassLoader()
Deprecated.usegetPlugInClassLoader()
insteadTo access extension classes, use this ClassLoader rather than the default ClassLoader. Extension classes will not be present in the latter.
-
getPlugInClassLoader
public PlugInClassLoader getPlugInClassLoader()
To access extension classes, use this ClassLoader rather than the default ClassLoader. Extension classes will not be present in the latter.
-
getExtensionDirs
public List<File> getExtensionDirs()
fetch a list of folders holding extension jars that were added during start
-
getPlugInDirectory
@Deprecated public File getPlugInDirectory()
Deprecated.get extension folder, cloned to prevent modification- Returns:
- possibly null
-
-