boolean () { if (myModified) { return true; } String name = myTemplate == null ? "" : myTemplate.getName(); String extension = myTemplate == null ? "" : myTemplate.getExtension(); if (!Objects.equals(name, myNameField.getText())) { return true; } if (!Objects.equals(extension, myExtensionField.getText())) { return true; } if (myTemplate != null) { if (myTemplate.isReformatCode() != myAdjustBox.isSelected() || myTemplate.isLiveTemplateEnabled() != myLiveTemplateBox.isSelected() || !myTemplate.getFileName().equals(myFileName.getText())) { return true; } } return false; }