ilog.rules.studio.javascript.dom

Class IlrBuildHelper

  • java.lang.Object
    • ilog.rules.studio.javascript.dom.IlrBuildHelper


  • public class IlrBuildHelper
    extends java.lang.Object
    Utility class to build the projects of the workspace. The projects must first be opened. It contains methods to build projects, to retrieve build errors and convenient methods to print them to the standard output.

    Build errors are provided as an IMarker. The information on the errors are contained in the attributes of the markers. Java project errors and rule projects errors can be differentiated by their type (IMarker.getType()). Rule errors have the type IMarker.PROBLEM whereas Java errors have the type IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER or IJavaModelMarker.BUILDPATH_PROBLEM_MARKER.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int SEVERITY_ANY
      Argument to retrieve all the build errors.
      static int SEVERITY_ERROR
      Argument to retrieve all the error markers produced by the build.
      static int SEVERITY_INFO
      Argument to retrieve all the info markers produced by the build.
      static int SEVERITY_WARNING
      Argument to retrieve all the warning markers produced by the build.
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrBuildHelper() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void clean()
      Cleans all projects in the order defined by the workspace or by the project dependence.
      static void clean(org.eclipse.core.resources.IProject project)
      Removes all the artifacts created by the build.
      static void fullBuild()
      Builds all projects in the order defined by the workspace or by the project dependence.
      static void fullBuild(org.eclipse.core.resources.IProject project)
      Rebuilds all the elements of the workspace.
      static java.util.Collection getAllBuildErrors()
      Returns the entire list of build errors.
      static java.util.Collection getAllBuildErrors(int severity)
      Returns the entire list of build errors for a given severity.
      static java.util.Collection getBuildErrors()
      Returns the build errors of all projects.
      static java.util.Collection getBuildErrors(int severity)
      Returns the build errors of all projects.
      static java.util.Collection getBuildErrors(org.eclipse.core.resources.IProject project)
      Returns the build errors for a given project.
      static java.util.Collection getBuildErrors(org.eclipse.core.resources.IProject project, int severity)
      Returns the build errors of a given severity for a given project.
      static void incrementalBuild()
      Incrementally builds all projects in the order defined by the workspace or by the project dependence.
      static void increntalBuild(org.eclipse.core.resources.IProject project)
      Performs an incremental build of the given rule project.
      static void printBuildError(org.eclipse.core.resources.IMarker marker)
      Prints the given IMarker objects to the error output.
      static void printBuildError(org.eclipse.core.resources.IMarker marker, java.lang.String[] markerAttributes)
      Prints the given IMarker objects to the error output.
      static void printBuildErrors(java.util.Collection markerCollection)
      Prints the given collection of IMarker objects to the error output.
      static void printBuildErrors(java.util.Collection markerCollection, java.lang.String[] attributes)
      Prints the given collection of IMarker objects to the error output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrBuildHelper

        public IlrBuildHelper()
    • Method Detail

      • clean

        public static void clean(org.eclipse.core.resources.IProject project)
        Removes all the artifacts created by the build.
        Parameters:
        project - The project to clean.
      • increntalBuild

        public static void increntalBuild(org.eclipse.core.resources.IProject project)
        Performs an incremental build of the given rule project.
        Parameters:
        project - The project to build.
      • incrementalBuild

        public static void incrementalBuild()
        Incrementally builds all projects in the order defined by the workspace or by the project dependence.
      • fullBuild

        public static void fullBuild()
        Builds all projects in the order defined by the workspace or by the project dependence.
      • clean

        public static void clean()
        Cleans all projects in the order defined by the workspace or by the project dependence.
      • fullBuild

        public static void fullBuild(org.eclipse.core.resources.IProject project)
        Rebuilds all the elements of the workspace.
        Parameters:
        project - The project to rebuild.
      • getAllBuildErrors

        public static java.util.Collection getAllBuildErrors()
        Returns the entire list of build errors. Errors can be generated either by Java projects or by rule project builds.
        Returns:
        A collection of IMarker objects containing Java project and rule project errors.
      • getAllBuildErrors

        public static java.util.Collection getAllBuildErrors(int severity)
        Returns the entire list of build errors for a given severity. Errors can be generated either by Java projects or rule projects builds.
        Parameters:
        severity - The severity of the markers to report. Possible values are SEVERITY_ANY, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARNING.
        Returns:
        A collection of IMarker objects containing Java project and rule project error markers.
      • getBuildErrors

        public static java.util.Collection getBuildErrors(org.eclipse.core.resources.IProject project)
        Returns the build errors for a given project. Errors can be generated either by Java projects or by rule project builds.
        Parameters:
        project - The markers reported will come only from this project.
        Returns:
        A collection of IMarker objects containing Java project and rule project errors.
      • getBuildErrors

        public static java.util.Collection getBuildErrors()
        Returns the build errors of all projects. Errors can be generated either by Java projects or by rule project builds.
        Returns:
        A collection of IMarker objects containing Java project and rule project errors.
      • getBuildErrors

        public static java.util.Collection getBuildErrors(int severity)
        Returns the build errors of all projects. Errors can be generated either by Java projects or by rule project builds.
        Parameters:
        severity - The severity of the markers to report. Possible values are SEVERITY_ANY, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARNING.
        Returns:
        A collection of IMarker objects containing Java project and rule project errors.
      • getBuildErrors

        public static java.util.Collection getBuildErrors(org.eclipse.core.resources.IProject project,
                                          int severity)
        Returns the build errors of a given severity for a given project. Errors can be generated either by Java projects or by rule project builds.
        Parameters:
        project - The markers reported will come only from this project.
        severity - The severity of the markers to report. Possible values are SEVERITY_ANY, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARNING.
        Returns:
        A collection of IMarker objects containing Java project and rule project errors.
      • printBuildErrors

        public static void printBuildErrors(java.util.Collection markerCollection)
        Prints the given collection of IMarker objects to the error output. A default subset of attributes of markers will be printed out. The list of attributes contains: the severity, the line number, the location, and the message.
        Parameters:
        markerCollection - The list of IMarker objects to print out.
      • printBuildErrors

        public static void printBuildErrors(java.util.Collection markerCollection,
                            java.lang.String[] attributes)
        Prints the given collection of IMarker objects to the error output. Only the given attributes of the markers will be printed out.
        Parameters:
        markerCollection - The list of IMarker objects to print out.
        attributes - The restricted list of marker attributes to print out.
      • printBuildError

        public static void printBuildError(org.eclipse.core.resources.IMarker marker)
        Prints the given IMarker objects to the error output. A default subset of attributes of markers will be printed out. The list of attributes contains: the severity, the line number, the location, and the message.
        Parameters:
        marker - The marker to print out.
      • printBuildError

        public static void printBuildError(org.eclipse.core.resources.IMarker marker,
                           java.lang.String[] markerAttributes)
        Prints the given IMarker objects to the error output. Only the given attributes of the markers will be printed out.
        Parameters:
        marker - The IMarker objects to print out.
        markerAttributes - The restricted list of marker attributes to print out.

© Copyright IBM Corp. 1987, 2017