Stefku / intellij-reference-diagram

This plugin for IntelliJ IDEA Ultimate provides a diagram showing a reference graph for methods in java classes
Apache License 2.0
105 stars 13 forks source link

is plugin ignoring method references? #76

Open 62mkv opened 2 years ago

62mkv commented 2 years ago

I've noticed that method reference diagram is not considering method names used with "method reference syntax". This is what I get for such class:

public class DummyService {
    public Mono<String> getStringWithMethodReference() {
        return Mono.just("Hello, world")
                .map(this::processString);
    }
    public Mono<String> getStringWithLambda() {
        return Mono.just("Hello, world")
                .map(s -> processString(s));
    }
    private String processString(String source) {
        return source.toUpperCase(Locale.ROOT);
    }
}

image

PS: by the way, I would like to be able to contribute a fix for this, so if there're any hints/suggestions, please share! I did not yet take a look at the code though..

Stefku commented 2 years ago

Hi @62mkv, you probably found a bug. Thanks for reporting.

You are very welcome to contribute. I think a good point to start is ReferenceDiagramDataModel. The constructor gets called with a PsiClass where the user wanted to render the diagram. Give it a try and come back to me if you struggle.

62mkv commented 2 years ago

Hi @Stefku only having cloned the project, I realized that it's purely for Ultimate which unfortunately means I can not contribute to this awesome project, as I only have IC edition at home! Will buy you coffee instead!

Stefku commented 2 years ago

Yes, since JetBrains has licensed the diagram library, the plugin is just for Ultimate version. I would know a good and easy to use possibility of a free open source library we could change it (see also #56).

Thanks for the coffee @62mkv! I really appreciate it! I'm glad, that other people also have the use for this plugin.