private JPanel buildMainPanel() {

		regexCb = new GCheckBox("Regular Expression", false);
		regexCb.setName("Regular Expression Search");

		regexCb.addItemListener(e -> clearStatusText());

		searchSelectionCb = new JCheckBox("Search Selection");
		searchSelectionCb.setName("Search Selection");

		textCombo = new GhidraComboBox<>();
		textCombo.setEditable(true);
		textCombo.addActionListener(e -> doSearch());

		textCombo.setColumns(20);
		textCombo.addDocumentListener(new DocumentListener() {
			@Override
			public void changedUpdate(DocumentEvent e) {
				handleDocumentUpdate();
			}

			@Override
			public void insertUpdate(DocumentEvent e) {
				handleDocumentUpdate();
			}

			@Override
			public void removeUpdate(DocumentEvent e) {
				handleDocumentUpdate();
			}

			private void handleDocumentUpdate() {
				String text = textCombo.getText();
				searchButton.setEnabled(!StringUtils.isBlank(text));
				clearStatusText();
			}
		});

		JLabel findLabel = new GLabel("Find: ");

		// associate this label with a mnemonic key that activates the text field
		findLabel.setDisplayedMnemonic(KeyEvent.VK_N);
		textCombo.associateLabel(findLabel);

		JPanel mainPanel = new JPanel(new BorderLayout());
		JPanel textPanel = new JPanel();
		textPanel.setLayout(new BoxLayout(textPanel, BoxLayout.LINE_AXIS));
		textPanel.add(findLabel);
		textPanel.add(textCombo);
		mainPanel.add(textPanel, BorderLayout.NORTH);
		mainPanel.add(buildOptionsPanel(), BorderLayout.SOUTH);
		mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

		return mainPanel;
	}
A dialog to gather input for performing a search over decompiled text.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/search/DecompilerTextFinderDialog.java