Eclipse 如何导入外部库的文档

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13194961/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:19:20  来源:igfitidea点击:

Eclipse How To Import External Library's Documentation

eclipse

提问by COvayurt

When we import the external library to eclipse Java project, we can use the auto-correction feature of eclipse for the imported methods from new libraries but we can't see what the methods specifically do. We have to import library's documentation.

当我们在eclipse Java项目中导入外部库时,对于从新库中导入的方法,我们可以使用eclipse的自动更正功能,但是我们看不到这些方法具体做了什么。我们必须导入库的文档。

Question1:How can I import documentation into eclipse project?

问题 1:如何将文档导入 eclipse 项目?

Question2:What does Java Documentation look like?

问题 2:Java 文档是什么样的?

Question3:Which file format does Java documentation use?

问题 3:Java 文档使用哪种文件格式?

回答by Aazim Parkar

  • Right click on your project->properties->java build path
  • select the libraries (its generally .jar file)
  • click on the dropdown of the libraries to expand the settings-> select source attachment none and click on edit
  • select the source to the doc ( java documents generally represented by JavaDoc)
  • click okay.
  • 右键单击您的项目-> 属性-> java 构建路径
  • 选择库(通常是 .jar 文件)
  • 单击库的下拉列表以展开设置-> 选择源附件无并单击编辑
  • 选择文档的来源(java文档一般用JavaDoc表示)
  • 单击确定。

回答by Duncan Jones

Question1: How can I import documentation into eclipse project?

问题 1:如何将文档导入 eclipse 项目?

In the project explorer, right-click on the library and select Properties. In the resulting dialog, choose "Javadoc Location" and complete the information.

在项目资源管理器中,右键单击库并选择属性。在出现的对话框中,选择“Javadoc Location”并填写信息。

Question2: What is Java Documentation looks like?

问题 2:Java 文档是什么样的?

A set of directories with HTML files for each class. There is typically an index.hmlat the root, plus often a package-listfile too. Eclipse searches for these when you "validate" the location.

一组包含每个类的 HTML 文件的目录。index.hml根通常有一个,通常还有一个package-list文件。当您“验证”位置时,Eclipse 会搜索这些。

Question3: Which file format java documentation using?

问题 3:java 文档使用哪种文件格式?

Eclipse accepts a URL (to a file or a web page), a ZIP or a JAR.

Eclipse 接受 URL(指向文件或网页)、ZIP 或 JAR。

回答by Ravi_Parmar

as far as i know for your Question1: How can i import documentation into eclipse project?

据我所知,您的问题 1:如何将文档导入 eclipse 项目?

suppose you are using AXIS.jar and u want to get its doc properties then :

假设您正在使用 AXIS.jar 并且您想获取其文档属性,然后:

  1. In the Package Explorer view expand your project and its library folder for the Axis library.

  2. Right-click the Axis jar and select Properties.

  3. In the Properties dialog, select Javadoc Location in the tree on the left.

  4. With the Javadoc URL option selected, click Browse.

  5. Navigate to the appropriate folder (see table that follows) and click OK twice to exit the Properties dialog.

  1. 在 Package Explorer 视图中,展开您的项目及其 Axis 库的库文件夹。

  2. 右键单击 Axis jar 并选择 Properties。

  3. 在 Properties 对话框中,选择左侧树中的 Javadoc Location。

  4. 选择 Javadoc URL 选项后,单击浏览。

  5. 导航到适当的文件夹(见下表)并单击确定两次以退出“属性”对话框。

Question2: What is Java Documentation looks like? and Question3:Which file format java documentation using?

问题 2:Java 文档是什么样的?和问题3:java文档使用哪种文件格式?

HTML,zip or jar i guess :))

我猜是 HTML、zip 或 jar :))

and

回答by Friso

  1. In your package explorer (and most likely on other places as well) you can see your jar file (the external library). Right click on that and choose 'properties'. There you've got the options to attach the sources and the javadoc. After you've done that you can view their javadoc as you view your own (i.e. hover, 'javadoc-view', F3 ...)
  2. Formatted text
  3. Javadoc http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
  1. 在您的包浏览器中(很可能也在其他地方),您可以看到您的 jar 文件(外部库)。右键单击它并选择“属性”。在那里您可以选择附加源和 javadoc。完成后,您可以在查看自己的 javadoc 时查看他们的 javadoc(即悬停、'javadoc-view'、F3 ...)
  2. 格式化文本
  3. Javadoc http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

回答by Bruce_Wayne

COvayurt, you cannot see what methods do specifically because you have added libraries for those methods not the java docoumentation for those libraries, so in order to add java doc for libraries simply provide the path of your docs location(if you have got docs for those libraries). right click on your project then under properties set the javadoc path.

COvayurt,您无法看到具体的方法,因为您已经为这些方法添加了库,而不是为这些库添加了 java 文档,因此为了为库添加 java doc,只需提供您的文档位置的路径(如果您有那些的文档)图书馆)。右键单击您的项目,然后在属性下设置 javadoc 路径。

java documentation are html files created from the standard classes.you can create java doc for your own project too. see this link

java 文档是从标准类创建的 html 文件。您也可以为自己的项目创建 java doc。看到这个链接

and if you want to see standard java api documentation here-it-is

如果您想在此处查看标准的 java api 文档