 
 # TransformString
 # ================================
-transformerRegistry = []
 class TransformString extends Operator
   @extend(false)
   trackChange: true
   stayOptionName: 'stayOnTransformString'
   autoIndent: false
   autoIndentNewline: false
+  @stringTransformers: []
 
   @registerToSelectList: ->
-    transformerRegistry.push(this)
+    @stringTransformers.push(this)
 
   mutateSelection: (selection, stopMutation) ->
     if text = @getNewText(selection.getText(), selection, stopMutation)

  getStdout: (selection) -> @stdoutBySelection.get(selection)

# -------------------------
selectListItems = null
class TransformStringBySelectList extends TransformString
  @extend()
  @description: "Interactively choose string transformation operator from select-list"
  requireInput: true

  getItems: ->
    selectListItems ?= transformerRegistry.map (klass) ->
      if klass::hasOwnProperty('displayName')
        displayName = klass::displayName
      else

  initialize: ->
    super

    @vimState.onDidConfirmSelectList (item) =>
      transformer = item.name
      @target = transformer::target if transformer::target?
      @vimState.reset()
      if @target?
        @vimState.operationStack.run(transformer, {@target})
      else
        @vimState.operationStack.run(transformer)

    @focusSelectList(items: @getItems())

  execute: ->
    # NEVER be executed since operationStack is replaced with selected transformer
