void () { String text = myTextField.getText(); final boolean inverted = text.startsWith("!"); if (inverted) { text = text.substring(1); } if (myShowRegex && myRegexCheckBox.isSelected()) { myConstraint.setNameOfExprType(text); } else { myConstraint.setExpressionTypes(text); } myConstraint.setInvertExprType(inverted); myConstraint.setExprTypeWithinHierarchy(myHierarchyCheckBox.isSelected()); }