@Override
	public void onUpdatePath(@Nonnull PathNode<?> path) {
		if (path instanceof ClassPathNode classPath) {
			this.path = classPath;

			// Re-initialize the parser if the path updates.
			// This addresses situations where changes to the class introduce new type dependencies.
			// If we used the existing parser, the newly added types would be unresolvable.
			ClassInfo classInfo = classPath.getValue();
			ThreadUtil.run(() -> initialize(classInfo));
		}
	}
Offsets the given input index.

@param index
		Input index.

@return Offset index based on values in {@link #offsetMap} up until the given index.

@see #handleShortDurationChange(PlainTextChange)
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/source/JavaContextActionSupport.java