Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Go to implementation for functional consumer interfaces #3254

Open
oysandvik94 opened this issue Aug 27, 2024 · 0 comments
Open

Feature: Go to implementation for functional consumer interfaces #3254

oysandvik94 opened this issue Aug 27, 2024 · 0 comments

Comments

@oysandvik94
Copy link

I am not able to go to the implementation of a consumer function that is passed in as an argument to a function.

Given the following code example:

import java.util.List;
import java.util.function.Consumer;

public class Test {
    public class Message {
        private String messageName;
    }

    public void consumeMeldinger(List<List<Message>> messagePartitions,
            Consumer<List<? extends Message>> messageConsumer) {
        for (List<Message> listToSend : messagePartitions) {
            messageConsumer.accept(listToSend); // Cursor here, on accept
        }
    }

    public void test() {
        this.consumeMeldinger(null, (messages -> this.send((List<Message>) messages)));
    }

    public String send(List<Message> messageList) {
        return "";
    }

}

If the cursor is placed on the "accept" call on messageConsumer (see comment), and I call "GoToImplementation", I get error code 32603.

In IntelliJ, you would get a list of implementations, and given the complexity of the project, this list can be very large or very small.

I realize that this is probably really hard to implement, but I couldn't find an existing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant