private DataType getUserSelectedDataType(ListingActionContext context, int maxStorageSize) {
		PluginTool tool = plugin.getTool();
		DataTypeManager dataTypeManager = context.getProgram().getDataTypeManager();
		DataTypeSelectionDialog selectionDialog =
			showSelectionDialog(context, maxStorageSize, tool, dataTypeManager);
		return selectionDialog.getUserChosenDataType();
	}
Returns the storage size of the variable at the current cursor location in the
given listing/program.

@return -1 if the selected item in the listing is not a variable type
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/ChooseDataTypeAction.java