How do I make a custom autocomplete suggestion in IntelliJ? Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of How do I make a custom autocomplete suggestion in IntelliJ? without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I want to make add a suggestion to intellij’s autocomplete to object names. Currently when autocompleting a name of a instance of a class it just autocompletes to the class name but in lower case.

ExampleObject exampleObject;

This has sometimes causes bugs that take some time to track down. I found this other naming convention that often should work better. Just by adding ‘a’ infront of the class name, it often is much clearer which is the object and which is the class. E.g

ExampleObject aExampleObject;

I’ve looked through the settings a bit but couldn’t quite find the setting to do this. It’s something small, but i think it will be a “nice to have”. Any help on this would be nice.

Thanks.

Answer

You may define prefixes and suffixes of fields, local variables etc in Preferences | Editor | Code Style | Java | Code Generation pane: enter image description here

We are here to answer your question about How do I make a custom autocomplete suggestion in IntelliJ? - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji