void (int variableNumber) { myCurrentVariableNumber = variableNumber; final boolean isFinished = isFinished(); if (getDocument() != null) { ((DocumentEx)getDocument()).setStripTrailingSpacesEnabled(isFinished); } myCurrentSegmentNumber = isFinished ? -1 : getCurrentSegmentNumber(); }