What#39;s #39;API Baseline#39; in Eclipse PDT(什么是 Eclipse PDT 中的“API 基线)
问题描述
自从升级到 Eclipse 3.7 后,Eclipse PDE 插件希望我为我的所有 Eclipse 插件项目指定一个API 基线".
Since upgrading to Eclipse 3.7, the Eclipse PDE plugin wants me to specify an 'API Baseline' for all my Eclipse Plugin projects.
但是,似乎没有任何文档能够真正解释API Baseline"在这里代表什么以及它的用途.
However there seems to be no documentation which actually explains what 'API Baseline' stands for here, and what is it used for.
谁能解释一下?
推荐答案
API Baseline 旨在帮助您维护其他人可以使用的插件.API 工具可帮助您创建兼容的 API 版本.按照 Sumit Singh 发布的链接获取有关如何使用它们的说明.
API Baseline are intended to help you maintain plugins that others can use. The API Tools help you create compatible API versions. Follow the link that Sumit Singh posted to get an explanation on how to use them.
- 您创建插件并向公众发布版本 1.
- 数百万人将使用您的插件并根据您插件的 API 创建自己的代码.
- 您向公众发布了第 2 版.错误地您更改了插件的 API.
- 数百万人更新到新版本并不得不调整他们的代码.数以千计的程序失败.人们很伤心.
- You create your plugin and release version 1 to the public.
- Millions of people will use your plugin and create their own code that depends on the API of your plugin.
- You release version 2 to the public. By mistake you change the API of your plugin.
- Millions of people update to the new version and have to adapt their code. Thousands of programs fail. People are sad.
解决方案:
- 您创建插件,注释其 API 并向公众发布版本 1.
- 数百万人将使用您的插件并根据您插件的 API 创建自己的代码.
- 您将插件的第 1 版声明为 API-Baseline,您的代码更改会自动与之进行比较.API 中的任何中断都会在您发布插件或运行测试之前呈现给您.您发布的第 2 版没有任何 API 更改.
- 数百万人可以在他们的应用程序中更新您的插件,因为新的插件版本与之前的版本兼容.
- 您声明了您的插件的版本 2 ....
- You create your plugin, annotate its API and release version 1 to the public.
- Millions of people will use your plugin and create their own code that depends on the API of your plugin.
- You declare version 1 of your plugin to be the API-Baseline that your code changes are automatically compared against. Any break in the API is presented to you before you release your plugin or run your tests. You release version 2 without any API changes.
- Millions of people can update your plugin in their application, because the new plugin release is binary compatible to the previous one.
- You declare version 2 of your plugin ....
总结
如果您开发的插件仅供您个人使用,并且对维护兼容的 API 不感兴趣,您可以按照建议禁用警告.
Summary
If you develop a plugin just for your personal use and are not interested to maintain a compatible API, you can follow the advices to disable the warnings.
当您为社区开发插件时,例如.G.Eclipse 插件本身,必须将 API 不兼容性降至最低.然后你会按照建议,在为 4.3 开发时将基线设置为 4.2.API 工具将帮助您让 4.3 成为所有当前 4.2 用户的享受.
When you develop plugins for a community, e. g. the eclipse plugins themselves, it is essential that you keep API incompatibilities to a minimum. Then you will follow the advice and set the baseline to 4.2 when you develop for 4.3. The API tools will help you make 4.3 an enjoyment for all current 4.2 users.
请注意,API 工具是供其他人使用的插件的开发人员使用的.它们不是针对这些插件的用户的.
Please note, that the API Tools are for the developers of the plugins that will be used by others. They are not addressed at the users of those plugins.
这篇关于什么是 Eclipse PDT 中的“API 基线"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:什么是 Eclipse PDT 中的“API 基线"
基础教程推荐
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 降序排序:Java Map 2022-01-01