2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT...
-
Upload
valentine-skinner -
Category
Documents
-
view
213 -
download
1
Transcript of 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT...
![Page 1: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/1.jpg)
2005 JavaOneSM Conference | Session BOF-9161
Exploring Annotation-Based Programming through the APT and Mirror APIs
Tim Wagner, Senior Manager
Gary Horen, Program Manager
BEA Systems, Inc.http://www.bea.comBOF-9161
![Page 2: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/2.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 2
Agenda
Why apt/mirror in Eclipse?Feature overviewTechnical detailsFuture plansQ&A
![Page 3: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/3.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 3
Why apt/mirror in Eclipse?
• Want high-fidelity IDE support for annotations…• …but don’t want to reinvent the wheel
Wouldn’t it be great if existingapt processors could run inside Eclipse?
![Page 4: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/4.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 4
Feature Overview
• Eclipse 3.1 plugin that…• Runs apt processors interactively inside Eclipse
• Diagnostic integration “red squiggles”• Build integration (including problem view)• Generated types behave as you’d expect
• APT factories can be loaded as plugins or jars• UI to configure APT options
![Page 5: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/5.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 5
Technical Details
• Implementation of 1.5 JDK mirror APIs over the Eclipse type system (via wrappers)
• Processors executed during compilation• Separate passes: reconcile (interactive) and build• Replicates apt semantics (fixed point iteration, “claim”
model)
• Factory discovery• Jars containing factories or Eclipse plugins• Preference UI supports enabling, ordering of jars
![Page 6: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/6.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 6
Future Plans
• Support for enhanced IDE functionality• Content assist (code completion) in annotation values• Quick fix• Integration with property view
● Type-specific editors● Propose new annotations/annotation values
• Search and refactoring over annotation values• Wizards for creating annotation processor factories and
plugins• Adopt JSR 269
![Page 7: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/7.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 7
Release Dates
• Preview• Summer ’05 (i.e., soon!)• Branch of JDT 3.1, based on GA version (new
component + minor JDT API enhancements)• Based on open source (yay!) apt/mirror interfaces in
the 1.5 JDK
• Eclipse Platform 3.2• Summer ’06• Standard part of JDT – will reach all Eclipse users• Ideally JSR 269-compliant APIs
![Page 8: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/8.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 8
DEMOSample apt processor running inside Eclipse
![Page 9: 2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,](https://reader035.fdocuments.in/reader035/viewer/2022081006/56649cca5503460f9499318f/html5/thumbnails/9.jpg)
2005 JavaOneSM Conference | Session BOF-9161 | 9
Q&A