Class ResourcesPlugin

  • All Implemented Interfaces:

    public final class ResourcesPlugin
    extends Plugin
    The plug-in runtime class for the Resources plug-in. This is the starting point for all workspace and resource manipulation. A typical sequence of events would be for a dependent plug-in to call ResourcesPlugin.getWorkspace(). Doing so would cause this plug-in to be activated and the workspace (if any) to be loaded from disk and initialized.
    This class is not intended to be instantiated by clients.
    • Constructor Detail

      • ResourcesPlugin

        public ResourcesPlugin()
        Constructs an instance of this plug-in runtime class.

        An instance of this plug-in runtime class is automatically created when the facilities provided by the Resources plug-in are required. Clients must never explicitly instantiate a plug-in runtime class.

    • Method Detail

      • getEncoding

        public static String getEncoding()
        Returns the encoding to use when reading text files in the workspace. This is the value of the PREF_ENCODING preference, or the file system encoding (System.getProperty("file.encoding")) if the preference is not set.

        Note that this method does not check whether the result is a supported encoding. Callers should be prepared to handle UnsupportedEncodingException where this encoding is used.

        the encoding to use when reading text files in the workspace
        See Also:
      • getPlugin

        public static ResourcesPlugin getPlugin()
        Returns the Resources plug-in.
        the single instance of this plug-in runtime class
      • getWorkspace

        public static IWorkspace getWorkspace()
        Returns the workspace. The workspace is not accessible after the resources plug-in has shutdown.
        the workspace that was created by the single instance of this plug-in class.