ilog.rules.studio.javascript

Class IlrJavascriptPlugin

  • java.lang.Object
    • org.eclipse.core.runtime.Plugin
      • ilog.rules.studio.javascript.IlrJavascriptPlugin
  • All Implemented Interfaces:
    org.osgi.framework.BundleActivator


    public class IlrJavascriptPlugin
    extends org.eclipse.core.runtime.Plugin
    This class controls the plug-in life cycle. The plug-in is an application that can be started in headless mode using the "runner" target. It runs an instance of IlrJsRunnerPlatformRunnable. It accepts the arguments listed in IlrJsRunnerConstants. The plug-in contains methods to print (or not to print) messages to the standard and error output. Below is a sample command to start this plug-in in headless mode. The "-script" argument is mandatory.
     java -jar plugins/org.eclipse.equinox.launcher_1.0.1..jar
     -data "workspace_absolute_file_path"
     -clean
     -application ilog.rules.studio.javascript.runner
     -script "javascript_absolute_file_path"
     
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static boolean error
      Indicates if the errors are printed to the error output.
      static java.lang.String PLUGIN_ID
      ID of the plug-in.
      static boolean progress
      Indicates if the progress tasks are printed to the standard output.
      static boolean trace
      Indicates if the steps of the execution can be printed to the standard output.
      static boolean warning
      Indicates if the warnings are printed to the standard output.
      • Fields inherited from class org.eclipse.core.runtime.Plugin

        PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrJavascriptPlugin()
      The constructor of the plug-in.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void endProgress(java.lang.String task) 
      void error(java.lang.Exception e, java.lang.String msg)
      Prints an exception message to the error output if the error flag is set to true.
      void error(java.lang.String msg)
      Prints the error message to the error output if the error flag is set to true.
      static IlrJavascriptPlugin getDefault()
      Returns the shared instance of this plug-in.
      void incrementProgress(java.lang.String task) 
      void start(org.osgi.framework.BundleContext context)
      Called by the Eclipse framework when the plug-in starts.
      void startProgress(java.lang.String task, int amount) 
      void stop(org.osgi.framework.BundleContext context)
      Called when the Eclipse framework shuts down this plug-in.
      void trace(java.lang.String msg)
      Prints the given message to the standard output if the trace flag is set to true.
      void warning(java.lang.String msg)
      Prints a message to the standard output if the warning flag is set to true.
      • Methods inherited from class org.eclipse.core.runtime.Plugin

        find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • trace

        public static boolean trace
        Indicates if the steps of the execution can be printed to the standard output. The default value is false. The trace, error, and warning values can be set using the command-line arguments listed in IlrJsRunnerConstants.
      • error

        public static boolean error
        Indicates if the errors are printed to the error output. The default value is true. The trace, error, and warning values can be set using the command-line arguments listed in IlrJsRunnerConstants.
      • warning

        public static boolean warning
        Indicates if the warnings are printed to the standard output. The default value is true. The trace, error, and warning values can be set using the command-line arguments listed in IlrJsRunnerConstants.
      • progress

        public static boolean progress
        Indicates if the progress tasks are printed to the standard output. The default value is false. The trace, error, and warning values can be set using the command-line arguments listed in IlrJsRunnerConstants.
      • PLUGIN_ID

        public static final java.lang.String PLUGIN_ID
        ID of the plug-in. The value is "ilog.rules.studio.buildtool".
        See Also:
        Constant Field Values
    • Constructor Detail

      • IlrJavascriptPlugin

        public IlrJavascriptPlugin()
        The constructor of the plug-in. It initializes a singleton accessible from the getDefault() method.
    • Method Detail

      • start

        public void start(org.osgi.framework.BundleContext context)
                   throws java.lang.Exception
        Called by the Eclipse framework when the plug-in starts. It disables an automatic build on the workspace.
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        Overrides:
        start in class org.eclipse.core.runtime.Plugin
        Throws:
        java.lang.Exception
      • stop

        public void stop(org.osgi.framework.BundleContext context)
                  throws java.lang.Exception
        Called when the Eclipse framework shuts down this plug-in. After this method is called the singleton is no longer accessible, that is, getDefault() returns null.
        Specified by:
        stop in interface org.osgi.framework.BundleActivator
        Overrides:
        stop in class org.eclipse.core.runtime.Plugin
        Throws:
        java.lang.Exception
        See Also:
        Plugin.stop(org.osgi.framework.BundleContext)
      • getDefault

        public static IlrJavascriptPlugin getDefault()
        Returns the shared instance of this plug-in. Use this singleton to access any non static method.
        Returns:
        The shared instance.
      • trace

        public void trace(java.lang.String msg)
        Prints the given message to the standard output if the trace flag is set to true.
        Parameters:
        msg - The message to print to the standard output.
      • error

        public void error(java.lang.String msg)
        Prints the error message to the error output if the error flag is set to true.
        Parameters:
        msg - The message to print to the error output.
      • warning

        public void warning(java.lang.String msg)
        Prints a message to the standard output if the warning flag is set to true.
        Parameters:
        msg - The message to print to the standard output.
      • error

        public void error(java.lang.Exception e,
                 java.lang.String msg)
        Prints an exception message to the error output if the error flag is set to true.
        Parameters:
        e - The exception to print to the error input.
        msg - The message to print to the error output.
      • startProgress

        public void startProgress(java.lang.String task,
                         int amount)
      • incrementProgress

        public void incrementProgress(java.lang.String task)
      • endProgress

        public void endProgress(java.lang.String task)

© Copyright IBM Corp. 1987, 2017