Jackpot

Jackpot FAQ

Welcome to the Jackpot Frequently Asked Questions page.

What is Jackpot?

Jackpot is a NetBeans IDE module for modeling, querying and transforming Java source files. Although the Jackpot engine can be used for bug detection or refactoring, the initial focus of this module is to add program transformation capabilities for NetBeans users.

What is meant by a "program transformation"?

In the Jackpot context, a program transformation is a script or Java class which queries sources in Java projects for patterns, changes them, and then writes these changes back to the original source files. One way to think of Jackpot is that it is a stream editor for source code; like the Unix stream editor *sed*, transformations are stored as separate files which can be added as commands to the NetBeans IDE, or shared with other developers. Jackpot differs from sed in that it uses a rich semantic model of the project sources, and so can make safer changes to source code than a stream editor can.

This sounds a lot like a refactoring, and to a large extent it is. While these two concepts overlap quite a bit, their difference is in scope: Jackpot transformations tend to be applied globally, such as at a project level or across several projects; refactorings, on the other hand, tend to be more focused on individual aspects in project source. For example, Encapsulate Field is a common refactoring which is generally applied on a single variable at a time. The equivalent Jackpot transformation would encapsulate *all* public variables, however.

Where can I find Jackpot?

See the following pages for information:

Why can't I run Jackpot from the command-line, or as an Ant command?

Jackpot requires project support that is provided by the IDE, such as the type of project it is and what its source files and build settings are. It also requires user interface support for things like node selection, undo/redo, and (soon) revision control system integration.

Will Jackpot source code be available?

The biggest barrier to Jackpot being open-sourced is being removed with the inclusion of JSR 199, JSR 269 and the new Tree API in Java SE 6. These APIs provide a public read-only model of Java source code, and are supposed to release the end of this year. As Jackpot technology is moved to only use these public APIs, it will be made available as source like most other NetBeans modules.

I have a great idea for a Jackpot transformation, what should I do?

Join the project and contribute to it! We are looking for the best and brightest to help improve Jackpot for the benefit of all Java developers.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo