protected long parseLongInput(String str) throws NumberFormatException {
		
		if (str == null) {
			throw new NumberFormatException();
		}
		str = str.trim().toLowerCase();
		try {
			int ix = 0;
			char c = str.charAt(0);
			boolean neg = (c == '-');
			if (neg || c == '+') {
				++ix;
			}
			if (str.substring(ix).startsWith("0x")) {
				long val = NumericUtilities.parseHexLong(str.substring(ix+2));
				return neg ? -val : val;
			}
		}
		catch (IndexOutOfBoundsException e) {
			throw new NumberFormatException();
		}
		
		return Long.parseLong(str);
	}
Provides flexible parsing of a decimal or hexidecimal value
where hex values are prefixed by '0x'.  A sign prefix may be specified 
first (+ or -).
@param str input string
@return parsed value
@throws NumberFormatException if unable to parse value
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/EditReferencePanel.java