@Nonnull
	public static Problem fromDiagnostic(@Nonnull CompilerDiagnostic diagnostic) {
		ProblemLevel level = switch (diagnostic.level()) {
			case WARNING -> ProblemLevel.WARN;
			case INFO -> ProblemLevel.INFO;
			default -> ProblemLevel.ERROR;
		};
		return new Problem(diagnostic.line(), diagnostic.column(), diagnostic.length(),
				level, ProblemPhase.BUILD, diagnostic.message());
	}
@param diagnostic
		Compiler diagnostic message to adapt.

@return Problem from the diagnostic data.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/problem/Problem.java