Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PDE/API Tools"

< PDE
(API Comparison tool)
(Links)
(117 intermediate revisions by 11 users not shown)
Line 1: Line 1:
Welcome to the '''API Tooling''' Wiki Page.
+
{{API_Tools}}
  
API tooling is a collection of utilities that can be used in API maintenance and consistency checks. We hope to explore four directions here:
+
== Introduction ==
<ul>
+
<li>'''API comparison''' – discover new APIs, modified APIs, flag APIs that are modified in a non-backward compatible way</li>
+
<li>'''Bundle version checking''' – use API comparison results to see if version number of a bundle has been properly incremented</li>
+
<li>'''Usage discovery''' – allow developers to discover who is using their APIs and non-APIs</li>
+
<li>'''Usage validation''' – check if usage of APIs from other bundles fits into Eclipse standards</li>
+
</ul>
+
  
Also note that there is an ongoing work on [http://wiki.eclipse.org/index.php/PDE_UI_Incubator_Vis API visualization].
+
API tooling will assist developers in API maintenance by reporting API defects such as binary incompatibilities, incorrect plug-in version numbers, missing or incorrect <code>@since</code> tags, and usage of non-API code between plug-ins. The tooling will be integrated in the Eclipse SDK and will be used in the automated build process. Specifically, the tooling is designed to do the following:
  
== Present state ==
+
* Identify binary compatibility issues between two versions of a software component or product.
 +
* Update version numbers for plug-ins (bundles) based on the Eclipse versioning scheme.
 +
* Update <code>@since</code> tags for newly added classes, interfaces, methods, etc.
 +
* Provide new Javadoc tags and code assist to annotate types with special restrictions.
 +
* Leverage existing information (in <code>MANIFEST.MF</code>) to define the visibility of packages between bundles.
 +
* Identify usage of non-API code between plug-ins.
 +
* Identity leakage of non-API types into API.
 +
* Identify usage of code from a JRE outside the bounds of the one specified in the bundle configuration (<code>MANIFEST.MF</code>).
  
At present we have functional '''API comparison''' engine.
+
== Present state  ==
  
The '''Usage discovery''' has reference extraction working.
+
API tooling was released to the Eclipse SDK in the PDE project during the [http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_4.html Eclipse 3.4] release. Our milestone development time line corresponds to that of the Eclipse SDK (currently in the 3.6 stream).
  
== Plans ==
+
== Planning ==
  
We intend to implement the following items in the API comparison:
+
All planned items (and wishes) can be found on our [[PDE/Plan/3.6#API Tools|3.6 plan]] page.
<ul>
+
<li>Add UI invocation</li>
+
<li>Add Command line invocation</li>
+
<li>Change storage format to allow creation of more flexible baselines</li>
+
<li>Re-visit exclusion mechanism</li>
+
</ul>
+
  
Once this is done, we plan to add bundle version checking on top of API comparison.
+
== Links ==
  
Time permitting we would like to add support of an SQL database as a repository of API information used by all parts of API tools. Having SQL database would allow us to share information - such as reference extraction tool would be able to find suppliers of referenced methods and their API status. Having results in a database potentially can be used to create dynamic web-based reports on API usage.
+
[[PDE/API Tools/Tasks|Ant Tasks]] - Description of the Ant Tasks available in API Tools
  
Rest of items is under investigation. We really would like to implement some automated mechanism for "soft" restrictions used in Eclipse - such as "this class can not be extended", "this interface can not be implemented by clients". At this time it seems that a tool that would go over Javadoc in the source files to automatically extract this information would be a good solution.
+
[[PDE/API_Tools/Javadoc_Tags|Javadoc Tags]] - Description of the Javadoc tags supported by API Tools ad what they mean.
 
+
== API Comparison tool ==
+
 
+
'''API Comparison tool''': discovers backward compatibility problems and new APIs
+
 
+
The tool can be used to create API snapshot of a set of bundles / jars / directories. The snapshot is used as a baseline to compare against another version of the source code to discover problems in API backward compatibility and new APIs.
+
 
+
The tool is written in modular fashion. It has an “engine” with replaceable input and output. Presently OSGi bundles, Java jars, and directories can be used as an input sources. The snapshot output is saved into zip-ed xml file. Comparison results are produced as  XML file which is transformed into HTML for ease of reading.
+
 
+
[http://wiki.eclipse.org/index.php/PDE_UI_Incubator_ApiTools_Compare More information on the API comparison tool]
+
 
+
== Reference extraction tool ==
+
 
+
'''Reference extraction tool''': produces list of references to all “outside” code
+
 
+
The result of the extraction is saved as an XML file grouped by the classes and interfaces used in the code.
+
 
+
== Links ==
+
  
[http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs Evolving Java-based APIs] - What is considered an API in Eclipse.
+
[[ApiTools Architecture|API Tooling Architecture]] - High level description of the tooling's architecture.
  
== Resources ==
+
[[Evolving Java-based APIs]] - What is considered an API in Eclipse.
  
[https://bugs.eclipse.org/bugs/ Eclipse Bugzilla] - Eclipse bug tracking database.
+
[[Version Numbering]] - Guidelines on versioning plug-ins
  
[http://wiki.eclipse.org/index.php/PDE_UI_Incubator PDE Incubator] - New projects that might be incorporated into PDE in future.
+
[[PDE/Incubator]- New projects that might be incorporated into PDE in future.
  
 
[http://www.eclipse.org/pde/pde-ui/ PDE UI Home Page] - The main PDE UI web site.
 
[http://www.eclipse.org/pde/pde-ui/ PDE UI Home Page] - The main PDE UI web site.
  
[[Category:API]]
+
[[Category:API|API Tools]]
 +
[[Category:Equinox|API Tools]]
 +
[[Category:PDE|API Tools]]
 +
[[Category:Eclipse_Project|API Tools]]

Revision as of 12:03, 15 May 2013

API Tools
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

Introduction

API tooling will assist developers in API maintenance by reporting API defects such as binary incompatibilities, incorrect plug-in version numbers, missing or incorrect @since tags, and usage of non-API code between plug-ins. The tooling will be integrated in the Eclipse SDK and will be used in the automated build process. Specifically, the tooling is designed to do the following:

  • Identify binary compatibility issues between two versions of a software component or product.
  • Update version numbers for plug-ins (bundles) based on the Eclipse versioning scheme.
  • Update @since tags for newly added classes, interfaces, methods, etc.
  • Provide new Javadoc tags and code assist to annotate types with special restrictions.
  • Leverage existing information (in MANIFEST.MF) to define the visibility of packages between bundles.
  • Identify usage of non-API code between plug-ins.
  • Identity leakage of non-API types into API.
  • Identify usage of code from a JRE outside the bounds of the one specified in the bundle configuration (MANIFEST.MF).

Present state

API tooling was released to the Eclipse SDK in the PDE project during the Eclipse 3.4 release. Our milestone development time line corresponds to that of the Eclipse SDK (currently in the 3.6 stream).

Planning

All planned items (and wishes) can be found on our 3.6 plan page.

Links

Ant Tasks - Description of the Ant Tasks available in API Tools

Javadoc Tags - Description of the Javadoc tags supported by API Tools ad what they mean.

API Tooling Architecture - High level description of the tooling's architecture.

Evolving Java-based APIs - What is considered an API in Eclipse.

Version Numbering - Guidelines on versioning plug-ins

PDE/Incubator - New projects that might be incorporated into PDE in future.

PDE UI Home Page - The main PDE UI web site.

Back to the top