Class PluginManager

java.lang.Object
com.iizigo.plugin.PluginManager

public class PluginManager extends Object
The plug-in handler is the manager class for IIZI plug-ins, using the Eclipse OSGi bundle framework.
Author:
Christopher Mindus
  • Constructor Details

    • PluginManager

      public PluginManager()
  • Method Details

    • getBundleClasspath

      public static List<URL> getBundleClasspath(org.osgi.framework.Bundle bundle)
      Finds the classpath entries for a bundle and its required bundles. Only "IIZI" bundles are processed, not other ones.
      Parameters:
      bundle - The bundle.
      Returns:
      The unmodifiable list of classpath URL's for the bundle, null if not found.
    • activatePlugins

      public static void activatePlugins(String requiredPlugins) throws CoreException
      Activates the list of plug-ins if not already done.
      Parameters:
      requiredPlugins - Comma-separated value of plug-in's symbolic name, or null for none.
      Throws:
      CoreException - For bundle action errors.
    • waitPluginLoaded

      public static boolean waitPluginLoaded(IProgressMonitor monitor)
      Waits for the all required plug-in's to complete loading before loading projects.
      Parameters:
      monitor - The progress monitor for the load job.
      Returns:
      true for success, false for canceled.
    • isAvailable

      public static boolean isAvailable(String sn)
      Checks if a required plug-in is available.
      Parameters:
      sn - The symbolic name.
      Returns:
      true if available and loaded.
    • register

      public static void register(PluginDescriptor pd) throws CoreException
      Registers a plug-in.
      Throws:
      CoreException - For registration failures.
    • getNewWizards

      public static CommandContributionItem[] getNewWizards(ModuleModel model, String folderName)
      Gets the new wizards, sorted by label.
      Parameters:
      model - The module model in question.
      folderName - Folder name to match, null for any.
    • getPlugins

      public static PluginDescriptor[] getPlugins()
      Gets the registered plug-ins sorted by name.
      Returns:
      The plug-in's registered, including non-directory or file based plug-in's such as UI component plug-in's.
    • onInitialLayout

      public static void onInitialLayout(IPageLayout layout, IFolderLayout folder, IFolderLayout outlineFolder, IFolderLayout outputFolder)
      Calls the plug-ins to perform IIZI Module perspective customization.
    • onProjectChanged

      public static void onProjectChanged(IResourceDelta delta)
      Called during workspace change to inform the plug-in of a project change.
      Parameters:
      delta - The resource delta.
    • getServerCoreAndPluginClasspath

      public static List<String> getServerCoreAndPluginClasspath()
      Gets the classpath entries used for the Server and all the core plug-ins (Database, WebServices, Terminal and other registered plugins).
      Returns:
      The immutable classpath list.