private int getOperandIndex() {
		ProgramLocation location = context.getLocation();
		if (location instanceof OperandFieldLocation) {
			return ((OperandFieldLocation) location).getOperandIndex();
		}
		return -1;
	}
Get the operand index at the location

@return 0-3 for a good operand location, -1 otherwise
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/CreateEquateCmd.java