private List<TextPart> parseText(String text) {

		List<TextPart> textParts = new ArrayList<>();
		boolean escaped = false;
		boolean inQuote = false;
		int partStart = 0;
		int n = text.length();
		for (int i = 0; i < n; i++) {

			boolean wasEscaped = escaped;
			escaped = false;
			char prev = '\0';
			if (i != 0 && !wasEscaped) {
				prev = text.charAt(i - 1);
			}

			char c = text.charAt(i);
			if (prev == '\\') {
				if (Annotation.ESCAPABLE_CHARS.indexOf(c) != -1) {
					escaped = true;
					continue;
				}
			}

			if (c == '"') {
				if (inQuote) {
					// end quote
					String s = text.substring(partStart, i + 1); // keep the quote
					textParts.add(new QuotedTextPart(s));
					partStart = i + 1;
				}
				else {
					// end previous word; start quote
					if (i != 0) {
						String s = text.substring(partStart, i);
						textParts.add(new TextPart(s));
						partStart = i;
					}
				}
				inQuote = !inQuote;
			}
		}

		if (partStart < n) { // grab trailing text
			String s = text.substring(partStart, n);
			textParts.add(new TextPart(s));
		}

		return textParts;
	}
Constructor
<b>Note</b>: This constructor assumes that the string starts with "{<pre>@</pre>" and ends with '}'

@param annotationText The complete annotation text.
text this Annotation can create
@param program the program
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/Annotation.java