Java Web Application Development With Click Framework/ClickIDE

From Wikibooks, open books for an open world
< Java Web Application Development With Click Framework
Jump to: navigation, search

ClickIDE is an Eclipse plug-in for the developing Click web applications. The ClickIDE project has been lead by Naoki Takezoe.

The section discusses the ClickIDE and includes the following topics:

Installing[edit]

ClickIDE requires Eclipse 3.2.x and WTP 1.5.x. The easiest way to use ClickIDE is introducing WTP using Callisto.

After WTP installed, get ClickIDE from the SF.net download page. Unzip clickide-x.x.x.zip and put 2 folders (plugins/ and features/) into your ECLIPSE_HOME.

Features[edit]

ClickIDE is based on Eclipse and the Eclipse Web Tools Project (WTP), and provides extended features for developing web applications using Click.

  • Fast switching between Page classes and templates (Ctrl Alt S)
  • Project creation wizard
  • Click page creation wizard
  • Visual editor for the Click configuration file
  • Velocity template editor
  • Integrated Click documentation

Create Dynamic Web Project[edit]

Create "Dynamic Web Project" in the J2EE perspective and select "Click" as Project Facet. The project creation wizard will add Click JARs, web.xml and template of click.xml into your project.

Create Project

Configuration Editor[edit]

ClickIDE provides the visual editor for the Click configuration file (click.xml). It has some tabs. You can edit click.xml using this editor easily.

Graphical Editor for the click.xml

In the "Source" tab of the configuration file editor, you can edit click.xml directly and you can jump to the source code of the page class and the page template by CTRL CLICK. ClickIDE also provides the validation for click.xml. Error markers are displayed in the editor and "Problems" view.

Direct Editing for the click.xml

Page Creation Wizard[edit]

You can create the page class and the page template file using the page creation wizard. In the wizard, you can choose template for the page class and the html file. These template can be configured at the preference dialog ("Window" > "Preferences" > "Click").

New Page Creation Wizard

Velocity Template Editor[edit]

ClickIDE also provides the Velocity template editor. This editor provides code-completion, highlighting and validation as velocity syntax. You can also configure highlighting colors in the preference dialog.

Template Editor

Fast switch between Page classes and templates[edit]

In the JDT's Java editor and the Velocity template editor, you can switch between the page class and the html file by CTRL ALT S.

Online Help[edit]

Click documentation is integrated with the Eclipse help system.

Integrated Click Documentation

Cayenne Integration (since ClickIDE 2.0.0)[edit]

ClickIDE also support Apache Cayenne since ClickIDE 2.0.0.

You can create new Cayenne mapping project using the New Cayenne Mapping Project wizard.