How to enable “type information” for streams returned from methods?

痞子三分冷 提交于 2019-12-05 02:47:05
Roman Ivanov

Actually, there is a heuristic, that makes IDEA not show this hints. If the count of different types the single chain is less than 3, they won't be shown. It is required to avoid spamming this hints, when the type of expression is obvious (e. g. builders).

In IntelliJ IDEA 2019.2 count of different types, required to show hints can be adjusted in settings (if set it to 1, hints will be always shown).

Note: to get to that setting, one has to turn to Preferences -> Editor -> Inlay Hints -> Java and change the "unique type count" for "Method hints".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!