How do I get Eclipse to show the javadoc from my classes without including sources in the jar

前端 未结 5 1882
北恋
北恋 2021-01-07 14:04

I\'m building jars where I want to package them without sources but I would like the javadoc to come up for developers in eclipse.

5条回答
  •  天命终不由人
    2021-01-07 14:29

    JIDE have a tool (costs $25) that will run over your source code and strip out all the method bodies, leaving the javadoc in, and produces a zip file. You can then distribute this zip as a source zip, and your IDE will be able to read the javadocs, but of course all your logic has been removed so you can retain your closed-sourceness. Any private members and methods are not included in the zip file.

    It also has the added bonus of retaining method parameter names for intellisense, so the following method

    public void foo( String text, Integer index ) {
    }
    

    will show foo( String text, Integer index ) when you auto-complete, instead of foo( String arg1, Integer arg2 ) so you can hint what the parameters should be.

提交回复
热议问题