How to make IntelliJ IDEA recognise code created by macros?

半城伤御伤魂 提交于 2019-12-05 06:42:55

With the latest Scala plugin build, there is an API which can be used to write your own plugin to support your macros: http://blog.jetbrains.com/scala/2015/10/14/intellij-api-to-build-scala-macros-support/

Now, everyone can use this API to make their macros more friendly to their favorite IDE. To do that, you have to implement SyntheticMembersInjector, and register it in the plugin.xml file:

<extensions defaultExtensionNs="org.intellij.scala">
  <syntheticMemberInjector implementation="org.jetbrains.example.injector.Injector"/>
</extensions>

Seems like there's limited support if any.

Quote by this link: http://blog.jetbrains.com/scala/2014/01/23/heading-to-the-perfect-scala-code-analysis/

Alexander Podkhalyuzin says:    

January 30, 2014 at 10:13 am

We started support for Scala macros, but it’s not a simple task, so I can’t promise it will be done soon.

Best regards, Alexander Podkhalyuzin.

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