private void checkText(Document document) {
				try {
					String text = document.getText(0, document.getLength());
					if (StringUtils.isBlank(text)) {
						okButton.setEnabled(false);
						updateStatusText(true, null);
					}
					else {
						okButton.setEnabled(true);
						updateStatusText(true, text);
					}
				}
				catch (BadLocationException ble) {
					// nothing we can do here
				}
			}
Creates a new dialog with the given parent.

@param tool The current tool that this dialog needs to access services.
@param program the current program
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/CreateStructureDialog.java