Class GapPatternPostProcessor

All Implemented Interfaces:
WorkflowComponent, WorkflowComponentWithID, IWorkflowComponent

public class GapPatternPostProcessor extends AbstractWorkflowComponent2
  • Field Details

  • Constructor Details

    • GapPatternPostProcessor

      public GapPatternPostProcessor()
  • Method Details

    • setCharset

      public void setCharset(Charset charset)
    • addFolders

      public void addFolders(GapPatternFolderSet folders)
    • setSearchPattern

      public void setSearchPattern(String searchPattern)
      Sets the regex which is used to find the occurrences which are supposed to be replaced. The string should contain one string placeholder (%s), which will be used to insert the original class name during execution of this component. If not set, the following default case will be used. The default replacement pattern expects one matching group. If you adapt this regex make sure to adapt the replacement pattern as well. "(?<!\\bnew\\W)\\b(%s)(?=[^a-zA-Z\\d_$])(?!\\W+eINSTANCE\\b)" It comprises of the following aspects: * (%s): the original class name (inserted by String.format) * \\b(%s)(?=[^a-zA-Z\\d_$]): the original class name as separate word (preceeded by a word boundary and not followed by an alphanumerical, underscore or an dollar sign (positive lookahead). We can not use word boundary (\b) here as it does not prevent the latter two. * (?<!\\bnew\\W): not preceeded by "new " (negative lookbehind) to exclude explicit constructor calls. * (?!\\W+eINSTANCE\\b): not followed by "eINSTANCE" to exclude static eINSTANCE fields in interfaces (negative lookahead).
    • setReplacementPattern

      public void setReplacementPattern(String replacementPattern)
    • invokeInternal

      protected void invokeInternal(WorkflowContext arg0, ProgressMonitor arg1, Issues arg2)
      Specified by:
      invokeInternal in class AbstractWorkflowComponent
    • convertUri

      protected String convertUri(URI uri)