private void compile() {
		ExpressionResult result = expressionCompiler.compile(javaEditor.getText());
		FxThreadUtil.run(() -> {
			problemTracking.clear();

			// Validate no compiler errors occurred
			List<CompilerDiagnostic> diagnostics = result.getDiagnostics();
			if (!diagnostics.isEmpty()) {
				Animations.animateFailure(javaEditor, 1000);
				for (CompilerDiagnostic diagnostic : diagnostics) {
					Problem problem = Problem.fromDiagnostic(diagnostic);
					problemTracking.add(problem);
				}
				return;
			}

			// Validate no compile exception was thrown.
			ExpressionCompileException exception = result.getException();
			if (exception != null) {
				Animations.animateFailure(javaEditor, 1000);
				problemTracking.add(new Problem(-1, -1, 0,
						ProblemLevel.ERROR, ProblemPhase.BUILD, StringUtil.traceToString(exception)));
				return;
			}

			// Should have a result, but null check just to be safe.
			String assembly = result.getAssembly();
			jasmEditor.setText(Objects.requireNonNullElse(assembly, "<no-output>"));
		});
	}
Checks for things in the {@link #currentMethod} which would prevent its use in the expression compiler as context.

@return {@code true} when the current method can be used as context in the expression compiler.
recaf-ui/src/main/java/software/coley/recaf/ui/pane/editing/assembler/JvmExpressionCompilerPane.java