Log In   View a printable version of the current page.
  Dashboard > [fleXive] > ... > Developer Info > IDE Integration

Added by Markus Plesser, last edited by Daniel Lichtenberger on May 19, 2010  (view change)
Labels: 
(None)

IDE Integration

This page describes how to setup your IDE for developing flexive.
IDE setup for 'old-school' (Ant-based) flexive projects is described in the Reference Documentation.
IDE setup for Maven projects is trivial nowadays (all major IDEs have native support for Maven projects), just open the project and it should work without further setup work.

IDEA 7.x

In each modules resources folder exists an .iml file that can be used to import it into idea. The modules have the correct dependencies set.

To checkout and setup IDEA for the framework follow these instructions:

  • Launch IDEA
  • Version Control|Checkout from Version Control|Subversion
  • Add a new repository by clicking the "+" icon
  • In the dialogbox enter "http://svn.flexive.org/repository/flexive" and click "OK"
  • Open the tree that appears and select "trunk"
  • Click "Checkout"
  • In the "Select Path" dialog create a new directory (I used /home/<user>/develop/flexive)
  • Select the directory and click "OK"
  • Check all options in the next dialog box and wait until flexive has been checked out
  • Select "No" when asked if you wish to create a project from the sources you just checked out (we will use the provided module files instead)
  • Create a new project using File|New Project...
  • Select "Create project from scratch" and click "Next"
  • Enter "flexive" as name and select the directory where you checked out flexive before as "Project file location" and uncheck Create module!
  • Click finish
  • The "Project Settings" dialog will appear, select "Module" in the left panel and click the "+" icon above the second panel to the left
  • Repeat this by selecting Import existing module for the following files:
    • src/framework/resources/framework.iml
    • src/ui/jsf-backend/resources/web-jsf-backend.iml
    • src/ui/jsf-componentes/web-jsf-components.iml
    • src/ui/jsf-globalconfig/web-jsf-globalconfig.iml
    • src/ui/shared/resources/web-shared.iml
    • root.iml
    • docbook/docbook.iml - if you plan on writing documentation
    • at the bottom right click the "Apply" button and then the "Ok" button.
  • Make sure to install the JetGroovy plugin if you plan on coding using Groovy
  • Create a custom build.properties file by selecting build.properties.sample in the root-module inside the project view.
    • Right click the file and select Refactor|Copy (or press F5).
    • As new name enter build.properties, then click "OK".
    • Don't include this file in version control!
    • Adjust the paths/properties according to your needs
  • Enable version control by selecting File|Settings|Project Settings|Version Control and choosing Subversion for <Project Root>
  • To configure ANT, click the Ant Build-tab on the right side, select the "+" icon and add build.xml from the projects root directory

Please make sure that you do not commit back your modified .iml files as IDEA will modify them every blue moon for sure
I'd recommend moving them to a separate changelist so you can't accidently commit them.

Eclipse 3.2

  1. Go to http://www.eclipse.org and download the latest build
  2. Unpack the distribution and start eclipse
  3. Go to Help|Software Updates|Find and install ...
  4. Install updates from the callisto discovery site

Checkstyle integration

[fleXive] comes with a Checkstyle configuration. When working on [fleXive] code, you might want to install the eclipse plugin and try not to add new warnings to the source code. The flexive checks can be added as a global configuration in Preferences|Checkstyle|Global Check Configurations, the file is src/framework/resources/checkstyle/flexive_checks.xml. We are aware that our own code is not 100% compliant, but at least we try.

Optional Plugins you might want to try:

Callisto Release

Can be grabbed from here.

Linux issues

Eclipse 3.2 uses an embedded mozilla renderer.
Issues regarding this renderer are described here and here.
A solution can be found here:
Download mozilla for linux and point MOZILLA_FIVE_HOME to your mozilla installation. Please note that the firefox distribution from mozilla.org is not compiled with embeddable support:

export MOZILLA_FIVE_HOME=/usr/lib/mozilla

Checkout [fleXive]

  • File|New|Other... -> SVN|Checkout Projects from SVN
  • "Create a new repository location"
  • Select trunk|flexive
  • "Checkout as project configured using the New Project Wizard"
    MISSING SOMETHING
  • after checkout delete the project but not the contents!
  • "Java project from existing ant build file" -> choose the build.xml file from the checked out repository
  • If you use checkstyle, activate the flexive configuration in the project's preferences.

Workspace setup

  • Facelet DTD validation:
    Open Preferences|Web and XML|XML Catalog and add a new entry. Enter:
    URI: use a local facelet DTD definition or enter "jar:platform:/resource/flexive/lib/jsf/jsf-facelets.jar!/facelet-taglib_1_0.dtd"
    Key: "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN".

    Note: this adds validation for editing facelet taglib definitions, not XHTML autocompletion for facelets.

Netbeans 6.8

Checking out the sources

  • Start Netbeans
  • Open Team -> Checkout
  • Enter the flexive repository URL: http://svn.flexive.org/repository/flexive
  • Click Next
  • Repository Folder: select "trunk" for the current development version
  • Choose a local directory for "Local Folder"
  • Start the checkout by clicking "Finish"

Project setup

For best support for auto-completion, it is recommended to create several projects:

  • A Java project (with existing sources) for the framework
  • Web projects for the UI components

Use a project group (File -> Project Group -> New Group) to group these projects together permanently.

Creating a project for the framework

  • File -> New Project -> Java -> Java Project with Existing Sources
  • Select the flexive root folder you just checked out as the project folder
  • In the next screen, select the source folders you want to manage, e.g.:
    • src/framework/java
    • src/ui/shared/java
  • Finish

Creating a web project for the JSF components

To improve autocompletion support, it is advisable to create a web project for each of the JSF component libraries you want to use.

  • File -> New Project -> Java Web -> Web Application with Existing Sources
  • Choose the source folder of the component library, e.g. src/ui/jsf-components
  • Choose JavaEE 5 in the next screen
  • Choose the source, web and WEB-INF libraries in the next screen (the WEB-INF library must be specified, although it's usually not necessary for the components)
  • Finish
  • Right-click on the created project, select Properties
  • Under Libraries, click "Add Project" and add the main flexive project
  • Under Frameworks, select Java Server Faces if it is not already selected

Managing the flexive libraries

It's advisable to create a global library for flexive dependencies.

  • Tools -> Libraries
  • New Library...
  • Use a common name, e.g. "flexive-libs"
  • Add all JAR files in the lib/ folder
  • Possibly attach sources for some of the libraries
  • Add the flexive-libs dependency to the main project and the web projects (right-click on the project, Properties, Libraries).
Site running on a free Atlassian Confluence Open Source Project License granted to [fleXive] . Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.1 Build:#916 Nov 09, 2007) - Bug/feature request - Contact Administrators