Extracted method.
Removed unused EditorView variable.
Converted from using ternary operator to if else.
Converted to enum to make it impossible to instantiate this class.
Crearted convenience method and extracted constant.
Even more refactoring.
Made long anonymous classes into inner classes instead.