@Override
	protected void okCallback() {
		int minLength = minLengthField.getIntValue();
		if (minLength <= 1) {
			setStatusText("Please enter a valid minimum search length. Must be > 1");
			return;
		}

		StringTableOptions options = new StringTableOptions();
		options.setAlignment(Math.max(alignField.getIntValue(), 1));
		options.setMinStringSize(Math.max(minLengthField.getIntValue(), 1));
		options.setNullTerminationRequired(nullTerminateCheckbox.isSelected());
		options.setRequirePascal(pascalStringsCheckbox.isSelected());
		options.setUseLoadedBlocksOnly(loadedBlocksRB.isSelected());
		if (searchSelectionRB.isSelected()) {
			options.setAddressSet(selectedAddressSet);
		}

		String wordModelFile = wordModelField.getText();

		if (wordModelFile.matches("^\\s*$")) {
			options.setWordModelInitialized(false);
		}
		else {
			try {
				NGramUtils.startNewSession(wordModelFile, false);
				options.setWordModelInitialized(true);
				options.setWordModelFile(wordModelFile);
			}
			catch (IOException ioe) {
				setStatusText(
					"Select a valid model file (e.g., 'StringModel.sng') or leave blank.");
				return;
			}
		}

		plugin.createStringsProvider(options);
		close();
	}
Dialog that allows users to search for strings within a program.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/string/SearchStringDialog.java