how to find out Fully qualified name IntelliJ project

一笑奈何 提交于 2019-12-11 04:44:22

问题


I have an IntelliJ project with 2 scala objects, as below:

cloudera@quickstart tlf]$ ll
total 8
-rwxrw-r-- 1 cloudera cloudera 1601 May  2 15:45 AnalyzeGraphTlf.scala
-rwxrw-r-- 1 cloudera cloudera 1868 May  2 13:35 FormatDataTlf.scala
[cloudera@quickstart tlf]$ ls
AnalyzeGraphTlf.scala  FormatDataTlf.scala
[cloudera@quickstart tlf]$ pwd
/home/cloudera/ideaProjects/grafoTelefonos/src/main/scala/tlf

How can I know the fully qualified name of the package?


回答1:


According to convention that IDEA follows (and maven, and most Java & Scala developers do) all Scala sources goes to ${projectDir}/src/main/scala

Java sources to: ${projectDir}/src/main/java

And so on...

in case Your Scala sources goes to: home/cloudera/ideaProjects/grafoTelefonos/src/main/scala

Full qualified name of the package begins after '/scala' . In your case it is 'tlf' And in addition fully qualified name of class AnalyzeGraphTlf.scala is 'tlf.AnalyzeGraphTlf'

Note that Full qualified name reflects directory structure and use '.' (dot) as a separator.



来源:https://stackoverflow.com/questions/37045829/how-to-find-out-fully-qualified-name-intellij-project

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