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)
(Plans)
Line 19: Line 19:
 
== Plans ==
 
== Plans ==
  
We intend to implement the following items in the API comparison:
+
'''JDT models as a source''': in addition to the processing of .class files, add code to create API snapshots from JDT models. The Javadoc tags then could be used to pass "soft" API restrictions to the tool such as "this interface can not be implemented by clients".
<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.
+
'''Scalable repository''': in addition to files on file system, support storage of API snapshot in an SQL database. Pros: improved scalability and reliability; new functionality could be added an a form of queries, possibly, via Web interface.
 
+
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.
+
 
+
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.  
+
  
 
== API Comparison tool ==
 
== API Comparison tool ==

Revision as of 15:16, 30 August 2007

Welcome to the API Tooling Wiki Page.

API tooling is a collection of utilities that can be used in API maintenance and consistency checks. We hope to explore four directions here:

  • API comparison – discover new APIs, modified APIs, flag APIs that are modified in a non-backward compatible way
  • Bundle version checking – use API comparison results to see if version number of a bundle has been properly incremented
  • Usage discovery – allow developers to discover who is using their APIs and non-APIs
  • Usage validation – check if usage of APIs from other bundles fits into Eclipse standards

Also note that there is an ongoing work on API visualization.

Present state

At present we have functional API comparison engine.

The Usage discovery has reference extraction working.

Plans

JDT models as a source: in addition to the processing of .class files, add code to create API snapshots from JDT models. The Javadoc tags then could be used to pass "soft" API restrictions to the tool such as "this interface can not be implemented by clients".

Scalable repository: in addition to files on file system, support storage of API snapshot in an SQL database. Pros: improved scalability and reliability; new functionality could be added an a form of queries, possibly, via Web interface.

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.

User guide to the API comparison tool

Developer guide to 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

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

Resources

Eclipse Bugzilla - Eclipse bug tracking database.

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