private void recomputeLineContext() {
		// Must have AST to infer data
		if (ast == null || ast.isEmpty()) {
			context = new EmptyContext();
			return;
		}

		// Must be in code block
		boolean inCode = false;
		int caret = area.getCaretPosition();
		ASTElement element = ast.getFirst().pick(caret);
		while (element != null) {
			if (element instanceof ASTCode code) {
				if (code.range().within(caret))
					inCode = true;
				break;
			}
			element = element.parent();
		}
		if (!inCode) {
			context = new EmptyContext();
			return;
		}

		// Get the line to regex match, and the trimmed slice of it for tab-completion's "partial text" to complete.
		// The line content we track should be up to the caret, but no further since we're completing the text where
		// the caret is at and not the end of the line.
		int caretColumn = area.getCaretColumn();
		String line = area.getParagraph(area.getCurrentParagraph()).getText();
		if (caretColumn <= line.length())
			line = line.substring(0, caretColumn);
		String partialText = line.trim();

		// Skip if there is nothing to complete.
		if (partialText.isEmpty()) {
			context = new EmptyContext();
			return;
		}

		// Match for:
		//  - Opcodes
		//  - Field references
		//  - Method references
		if (RegexUtil.matches("^\\s*(\\w+)\\s*$", line)) {
			context = new CodeOpcodeContext(partialText);
		} else {
			// Field matching
			Matcher matcher = RegexUtil.getMatcher("^\\s*(?:(?:get|put)(?:static|field))\\s+({type}[\\w\\/]+)?(?:\\.({name}\\w+)?)?(?:\\s+({desc}[\\w\\/;]+))?\\s*$", line);
			if (matcher.find()) {
				String type = matcher.group("type");
				String name = matcher.group("name");
				String desc = matcher.group("desc");
				context = new CodeFieldContext(partialText, type, name, desc);
				return;
			}

			// Method matching
			matcher = RegexUtil.getMatcher("^\\s*(?:(?:invoke)(?:virtual|interface|special|static)(?:interface)?)\\s+" +
					"({type}[\\w\\/]+)?" +
					"(?:\\.({name}\\w+)?)?" +
					"(?:\\s+({desc}.+))?\\s*$", line);
			if (matcher.find()) {
				String type = matcher.group("type");
				String name = matcher.group("name");
				String desc = matcher.group("desc");
				context = new CodeMethodContext(partialText, type, name, desc);
				return;
			}

			// Type matching for 'new/checkcast/instanceof'
			matcher = RegexUtil.getMatcher("^\\s*(?:new|checkcast|instanceof)\\s+({type}[\\w\\/]+)?\\s*$", line);
			if (matcher.find()) {
				// Can re-use field/method ctx here for type name completion
				String type = matcher.group("type");
				context = new CodeMethodContext(partialText, type, null, null);
				return;
			}

			// Unknown
			context = new EmptyContext();
		}
	}
Remove AST to work off of.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/AssemblerTabCompleter.java