DocumentListener (final PropertyChangeSupport changeSupport, final @NonNls String propertyName) { return new DocumentAdapter() { @Override protected void textChanged(@NotNull DocumentEvent e) { changeSupport.firePropertyChange(propertyName, null, null); } }; }