@Override
	public ListingField getField(ProxyObj<?> proxy, int varWidth) {
		Object obj = proxy.getObject();

		if (!enabled || !(obj instanceof CodeUnit)) {
			return null;
		}
		CodeUnit cu = (CodeUnit) obj;

		ArrayList<FieldElement> elements = new ArrayList<>();

		Function f = cu.getProgram().getFunctionManager().getFunctionContaining(cu.getMinAddress());
		if (f != null) {

			int minOffset = (int) (cu.getMinAddress().getOffset() - f.getEntryPoint().getOffset());
			int maxOffset = minOffset + cu.getLength() - 1;

			Variable[] vars = f.getLocalVariables();
			for (Variable var : vars) {
				int firstUseOffset = var.getFirstUseOffset();
				if (firstUseOffset != 0 && firstUseOffset >= minOffset &&
					firstUseOffset <= maxOffset) {
					StringBuffer buf = new StringBuffer("assign ");
					buf.append(var.getVariableStorage().toString());
					buf.append(" = ");
					buf.append(var.getName());
					AttributedString as = new AttributedString(buf.toString(),
						FunctionColors.VARIABLE_ASSIGNED, getMetrics());
					elements.add(new TextFieldElement(as, 0, 0));
				}
			}
		}
		if (elements.isEmpty()) {
			return null;
		}

		return ListingTextField.createMultilineTextField(this, proxy, elements, startX + varWidth,
			width, hlProvider);
	}
Returns the FactoryField for the given object at index index.
@param varWidth the amount of variable width spacing for any fields
before this one.
@param proxy the object whose properties should be displayed.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/AssignedVariableFieldFactory.java