Interface IFactoryPath


public interface IFactoryPath
A minimal API for manipulating the annotation processor factory path. The factory path is an ordered list of containers, each of which has certain attributes, e.g., isEnabled, runInBatchMode. Containers on the path do not necessarily contain implementations of any particular service; in particular, a path may have both Java 5 and Java 6 annotation processors, as well as entries that contain supporting classes or resources.

Clients should not implement this interface.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add an external jar file (not in the workspace) to the head of the factory path.
    void
    addVarJar(org.eclipse.core.runtime.IPath jarPath)
    Add a jar file in the workspace, specified with a classpath variable, to the head of the factory path.
    void
    addWkspJar(org.eclipse.core.runtime.IPath jarPath)
    Add a jar file in the workspace to the head of the factory path.
    void
    Disable a plugin on the factory path.
    void
    enablePlugin(String pluginId)
    Enable a plugin on the factory path, and move it to the head of the path.
    void
    Remove an external jar file from the factory path.
    void
    removeVarJar(org.eclipse.core.runtime.IPath jarPath)
    Remove from the factory path a jar file whose name is based on a classpath variable.
    void
    removeWkspJar(org.eclipse.core.runtime.IPath jarPath)
    Remove a workspace-relative jar from the factory path.
  • Method Details

    • addExternalJar

      void addExternalJar(File jar)
      Add an external jar file (not in the workspace) to the head of the factory path. If the jar is already on the path, move it to the head. The jar will be added with default attributes, e.g., isEnabled=true, runInBatchMode=false.
      Parameters:
      jar - a java.io.File representing the jar file. Must not be null.
    • removeExternalJar

      void removeExternalJar(File jar)
      Remove an external jar file from the factory path. If the jar isn't on the path, do nothing.
      Parameters:
      jar - must not be null.
    • addWkspJar

      void addWkspJar(org.eclipse.core.runtime.IPath jarPath)
      Add a jar file in the workspace to the head of the factory path. If the jar is already on the path, move it to the head. The jar will be added with default attributes, e.g., isEnabled=true, runInBatchMode=false.
      Parameters:
      jarPath - an Eclipse IPath representing the jar file; the path is relative to the workspace root. Must not be null.
    • removeWkspJar

      void removeWkspJar(org.eclipse.core.runtime.IPath jarPath)
      Remove a workspace-relative jar from the factory path. If the jar isn't on the path, do nothing.
      Parameters:
      jarPath - an Eclipse IPath representing the jar file; the path is relative to the workspace root. Must not be null.
    • addVarJar

      void addVarJar(org.eclipse.core.runtime.IPath jarPath)
      Add a jar file in the workspace, specified with a classpath variable, to the head of the factory path. If the jar is already on the path, move it to the head. The jar will be added with default attributes, e.g., isEnabled=true, runInBatchMode=false.
      Parameters:
      jarPath - an Eclipse IPath representing the jar file; the first segment of the path is assumed to be the variable name. Must not be null.
    • removeVarJar

      void removeVarJar(org.eclipse.core.runtime.IPath jarPath)
      Remove from the factory path a jar file whose name is based on a classpath variable. If the jar isn't on the path, do nothing.
      Parameters:
      jarPath - an Eclipse IPath representing the jar file; the first segment of the path is assumed to be the variable name. Must not be null.
    • enablePlugin

      void enablePlugin(String pluginId) throws org.eclipse.core.runtime.CoreException
      Enable a plugin on the factory path, and move it to the head of the path.
      Parameters:
      pluginId - the unique id of the processor plugin, e.g., "org.example.myProcessors"
      Throws:
      org.eclipse.core.runtime.CoreException - if the plugin is not installed.
    • disablePlugin

      void disablePlugin(String pluginId)
      Disable a plugin on the factory path. If the plugin is not installed, do nothing.
      Parameters:
      pluginId - the unique id of the processor plugin, e.g., "org.example.myProcessors"