Class CleanUpRequirements


public final class CleanUpRequirements extends Object
Specifies the requirements of a clean up. Originally from org.eclipse.jdt.ui 3.5
  • Field Details

    • fRequiresAST

      protected final boolean fRequiresAST
    • fCompilerOptions

      protected final Map<String,String> fCompilerOptions
    • fRequiresFreshAST

      protected final boolean fRequiresFreshAST
    • fRequiresChangedRegions

      protected final boolean fRequiresChangedRegions
  • Constructor Details

    • CleanUpRequirements

      public CleanUpRequirements(boolean requiresAST, boolean requiresFreshAST, boolean requiresChangedRegions, Map<String,String> compilerOptions)
      Create a new instance
      requiresAST - true if an AST is required
      requiresFreshAST - true if a fresh AST is required
      requiresChangedRegions - true if changed regions are required
      compilerOptions - map of compiler options or null if no requirements
  • Method Details

    • requiresAST

      public boolean requiresAST()
      Tells whether the clean up requires an AST.

      Note: This should return false whenever possible because creating an AST is expensive.

      true if the CleanUpContext context must provide an AST
    • requiresFreshAST

      public boolean requiresFreshAST()
      Tells whether a fresh AST, containing all the changes from previous clean ups, will be needed.
      true if the caller needs an up to date AST
    • getCompilerOptions

      public Map<String,String> getCompilerOptions()
      Required compiler options.
      the compiler options map or null if none
      See Also:
    • requiresChangedRegions

      public boolean requiresChangedRegions()
      Tells whether this clean up requires to be informed about changed regions. The changed regions are the regions which have been changed between the last save state of the compilation unit and its current state.

      Has only an effect if the clean up is used as save action.

      Note:: This should return false whenever possible because calculating the changed regions is expensive.

      true if the CleanUpContext context must provide changed regions