public void findLinks(@NotNull Analyzer analyzer) {
        _.msg("Adding xref links");
        Progress progress = new Progress(analyzer.getAllBindings().size(), 50);

        int nMethods = 0;
        int nFunc = 0;
        int nClass = 0;
        for (Binding b : analyzer.getAllBindings()) {
            if (b.kind == Binding.Kind.METHOD) {
                nMethods++;
            }
            if (b.kind == Binding.Kind.CLASS) {
                nClass++;
            }

            if (Analyzer.self.hasOption("debug")) {
                processDefDebug(b);
            } else {
                processDef(b);
            }
            progress.tick();
        }

        _.msg("found: " + nMethods + " methods, " + nFunc + " funcs, " + nClass + " classes");

        // highlight definitions
        _.msg("\nAdding ref links");
        progress = new Progress(analyzer.getReferences().size(), 50);

        for (Entry<Node, List<Binding>> e : analyzer.getReferences().entrySet()) {
            if (Analyzer.self.hasOption("debug")) {
                processRefDebug(e.getKey(), e.getValue());
            } else {
                processRef(e.getKey(), e.getValue());
            }
            progress.tick();
        }

        if (Analyzer.self.hasOption("semantic-errors")) {
            for (List<Diagnostic> ld : analyzer.semanticErrors.values()) {
                for (Diagnostic d : ld) {
                    processDiagnostic(d);
                }
            }
        }
    }