com.microfocus.awm.internal.functionpackage.awm.tools

## Class ValidateLineLength

- java.lang.Object
- - com.microfocus.awm.core.internal.util.AbstractConvertedToolExecutor
  - - com.microfocus.awm.internal.functionpackage.awm.tools.ValidateLineLength

- All Implemented Interfaces:
    IToolExecutor2

      public class ValidateLineLength
      extends AbstractConvertedToolExecutor

  A tool descriptor to validate each line of one or more files or the active editor against the set maximum line length.
  Author:
    Micro Focus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidateLineLength()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IToolResult` | `executeMassProcessing(IMassProcessingToolContext pMassProcessingContext, org.eclipse.core.runtime.IProgressMonitor pMon)` Executes the tool as mass processing tool.
    `IToolResult` | `executeSingleProcessing(IToolContext pToolContext, org.eclipse.core.runtime.IProgressMonitor pMon)` Gets the maximum line length Gets the content either from the editor context or a file Validates the content of each line Based on the result, it creates the `ToolExecutionStatus` and puts the `RToolOutParameter` into the `IExecutionContext`.
    `void` | `init(IToolContext pToolContext)` Initializes the tool executor before it is being executed.

    - ### Methods inherited from class com.microfocus.awm.core.internal.util.AbstractConvertedToolExecutor

      `createToolContext`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.microfocus.awm.model.toolexecution.IToolExecutor2

      `supportsMassProcessing`

- - ### Constructor Detail

    - #### ValidateLineLength

          public ValidateLineLength()

  - ### Method Detail

    - #### init

          public void init(IToolContext pToolContext)
                    throws TaurusToolException

      Description copied from interface: `IToolExecutor2`
      Initializes the tool executor before it is being executed. This can be used process or validate tool descriptor attributes and parameters.
      Parameters:
        `pToolContext` - the tool context
      Throws:
        `TaurusToolException` - if the tool executor cannot be initialized for any reason

    - #### executeSingleProcessing

          public IToolResult executeSingleProcessing(IToolContext pToolContext,
                                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                                              throws TaurusToolException

      1. Gets the maximum line length
      2. Gets the content either from the editor context or a file
      3. Validates the content of each line
      4. Based on the result, it creates the `ToolExecutionStatus` and puts the `RToolOutParameter` into the `IExecutionContext`.
      Parameters:
        `pToolContext` - the tool context
        `pMon` - a progress monitor. Setting the monitor to `canceled` will cancel the action after the tool has been executed
      Returns:
        an `IToolResult`
      Throws:
        `TaurusToolException` - if the tool cannot be executed for any reason
      See Also:
        `ToolUtility`

    - #### executeMassProcessing

          public IToolResult executeMassProcessing(IMassProcessingToolContext pMassProcessingContext,
                                                   org.eclipse.core.runtime.IProgressMonitor pMon)
                                            throws TaurusToolException

      Executes the tool as mass processing tool. If the output parameter is set to single processing (`RToolParameter.isMassProcessing()`), the value of the output parameter will be set to `true`, if every file validated by this action is successfully. Else the output parameter will be set to `false`.

      If the output parameter type is set to mass processing ( `RToolParameter.isMassProcessing()`), then the output parameter context will be set for every execution context.

      Parameters:
        `pMassProcessingContext` - the mass processing context
        `pMon` - a progress monitor. Setting the monitor to `canceled` will cancel the action after the tool has been executed
      Returns:
        an `IToolResult`. Can be `null` if `IToolExecutor2.supportsMassProcessing()` returned `false`
      Throws:
        `TaurusToolException` - if the tool cannot be executed for any reason
      See Also:
        `ToolUtility`

Copyright © 2015 Micro Focus GmbH. All rights reserved.