@Override
	protected boolean showInputs(FieldPanel fieldPanel) {
		FieldLocation locOpns = findFieldLocation(getAddress(), "Operands");
		if (locOpns == null) {
			Msg.showError(this, fieldPanel, getName(),
				"The Operands field must be present to patch data");
			return false;
		}
		fieldPanel.add(input, locOpns);
		input.setVisible(true);
		input.grabFocus();
		return true;
	}
A context menu action to patch data at the current address
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/assembler/PatchDataAction.java