private DataType getDataType(ListingActionContext context) {
		PluginTool tool = plugin.getTool();
		Data data = plugin.getDataUnit(context);
		int noSizeRestriction = -1;
		DataTypeSelectionDialog selectionDialog = new DataTypeSelectionDialog(tool,
			data.getProgram().getDataTypeManager(), noSizeRestriction, AllowedDataTypes.ALL);
		DataType initialType = data.getBaseDataType();
		selectionDialog.setInitialDataType(initialType);
		tool.showDialog(selectionDialog);
		return selectionDialog.getUserChosenDataType();
	}
An action that allows the user to change or select a data type.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/ChooseDataTypeAction.java