Chapter 9. JBoss Tools Preferences

Configuring the various JBoss Developer Studio features is done via the Preferences screen by selecting Window > Preferences > JBoss Tools from the menu bar.

Preferences are included in this dialog.

Figure 9.1. Preferences are included in this dialog.


From this screen, you can select these more specific sets of JBoss Tools preferences:

9.1. CodeAssist

Select JBoss Tools > XDoclet > Code Assist to see Code Assist preference page.

Here is what the Code Assist preference page looks like:

CodeAssist

Figure 9.2. CodeAssist


9.2. Editors

You can set various preferences for the editors that JBoss Developer Studio adds to the Eclipse environment by selectind JBoss Tools > Web > Editors.

Editors

Figure 9.3. Editors


In the initial Editors screen, you can decide on some global settings for JBoss Tools editors. You can select whether an available JBoss Tools editor should always be the default editor for a type of file, whether the user should be warned that making a project an Red Hat project will make an JBoss Tools editor fully available for a particular type of file, and whether, for JBoss Tools editors, the Source mode should be the default instead of a visual mode.

9.3. JBoss Servers

The following preferences can be changed on the JBoss Tools > JBoss Servers preference page.

Here is what the JBoss Servers preference page looks like:

JBoss Servers

Figure 9.4. JBoss Servers


9.4. JSF

Select JBoss Tools > Web > JSF to get to the JSF Project specific preferences.

JSF

Figure 9.5. JSF


9.5. JSF Flow Diagram

Selecting JBoss Tools > Web > Editors > JSF Flow Diagram allows you to specify some aspects of the Diagram mode of the JSF configuration file editor.

JSF Flow Diagram

Figure 9.6. JSF Flow Diagram


The first two items control the background grid for the diagram. The next two items allow you to control the appearance of the labels for views (pages) and the transitions between views. For these two items, clicking the Change... button allows you to assign a font with a dialog box.

The first check box determines whether a view in the diagram that doesn't have a transition connecting it to another view yet should be written to the source code as a partial navigation rule. The next check box determines whether the diagram cursor reverts immediately to the standard selection mode after it's used in the transition-drawing mode to draw a transition. Finally, the last two check boxes concern shortcuts. A shortcut is a transition that is there but isn't actually displayed in the diagram as going all the way to the target view it's connected to, in order to make the diagram clearer. With the check boxes, you can decide whether to display a small shortcut icon as part of the shortcut and also whether to display the target view as a label or not.

Add View

Figure 9.7. Add View


Selecting the Add Page tab in the JSF Flow Diagram screen allows you to determine the default template and file extension for views (pages) you add directly into the diagram using a context menu or the view-adding mode of the diagram cursor.

9.6. JSF Page

By selecting JBoss Tools > Web > JSF > > JSF Pages you can add jsf pages or remove existing ones.

JSF Page

Figure 9.8. JSF Page


9.7. JSF Propject

Select JBoss Tools > Web > JSF > Project to see JSF Project preference page.

On Project panel you define a template for a new created project: servlet version, page template and so on.

JSF Propject

Figure 9.9. JSF Propject


Selecting the Import Project tab in the JSF Project screen allows you to determine the default servlet version and whether to register Web Context in server.xml.

Import JSF Propject

Figure 9.10. Import JSF Propject


9.8. Packaging Archives

The following preferences can be changed on the JBoss Tools > Packaging Archives page.

On Packaging Archives panel you determine settings for Project Packages view and core preferences.

Packaging Archives

Figure 9.11. Packaging Archives


9.9. Plug-in Insets

By selecting Web > Struts > Automation > Plug-in Insets on tab Tiles you can define a default text for tiles plugin.

Plug-in Insets

Figure 9.12. Plug-in Insets


The same is done but for validator plugin on the tab Validators.

Plug-in Insets of Validators

Figure 9.13. Plug-in Insets of Validators


9.10. Resource Insets

To see Resource Insets preference page select JBoss Tools > Web > Strats > Automation > Resource Insets.

On Resource Insets panel you determine default error messages for error resource files.

Resource Insets

Figure 9.14. Resource Insets


9.11. Seam

The following preferences can be changed on the JBoss Tools > Web > Seam page.

On Seam screen you can add and remove Seam runtimes.

Here is what Seam preference page looks like:

Seam

Figure 9.15. Seam


9.12. Seam Validator

The following preferences can be changed on the JBoss Tools > Web > Seam > Validator page.

In Validator panel you configure seam problems that will be processed by validator.

Seam Validator

Figure 9.16. Seam Validator


9.13. Struts

By selecting JBoss Tools > Web > Struts you can configure Struts projects specific preferences.

Struts

Figure 9.17. Struts


9.14. Struts Automatic

On Automation panel you can modify default text for the Tilel Struts plug-in element, the Validator Struts plug-in element, and error message resource files.

Struts Automatic

Figure 9.18. Struts Automatic


9.15. Struts Customization

The following preferences can be changed on the JBoss Tools > Web > Struts > Customization page.

In theCustomization screen you configure Link Recognizer for Struts tags.

Struts Customization

Figure 9.19. Struts Customization


9.16. Struts Flow Diagram

Similarly to the JSF Flow Diagram screen, selecting JBoss Tools > Web > Editor > Struts Flow Diagram page allows you to specify aspects of the Diagram mode of the Struts configuration file editor. The Struts Flow Diagram screen adds an option to hide the Diagram tab and labeling settings for additional artifacts.

Struts Flow Diagram

Figure 9.20. Struts Flow Diagram


Selecting the Add Page tab in the Struts Flow Diagram screen allows you to determine the default template and file extension for views (pages) you add directly into the diagram using a context menu or the view-adding mode of the diagram cursor.

Adding Page

Figure 9.21. Adding Page


9.17. Struts Pages

You can change the following preferences on the JBoss Tools > Web > Struts > Struts Pages preference page.

On Struts Pages panel you can add or remove Struts pages.

Struts Pages

Figure 9.22. Struts Pages


9.18. Struts Project

You can change the following preferences on the JBoss Tools > Web > Struts > Project preference page:

On Project panel you define a template for a new Struts created project: servlet version, page template and so on.

Struts Project

Figure 9.23. Struts Project


Selecting the Import Project tab in the Struts Project screen allows you to determine the default servlet version and whether to register Web Context in server.xml.

Import Struts Pages

Figure 9.24. Import Struts Pages


9.19. Struts Support

The following preferences can be changed on the JBoss Tools > Web > Struts > Project > Struts Support page.

Select Struts Support screen if you want to configure Struts versions support settings.

Struts Support

Figure 9.25. Struts Support


9.20. Title Diagram

JBoss Tools > Web > Editors > Title Diagram screen allows you control some settings for the placement of Tiles definitions in the Diagram mode of the JBoss Tools Tiles editor.

Title Diagram

Figure 9.26. Title Diagram


9.21. Verification

The following preferences can be changed on the JBoss Tools > Web > Verification page.

On Rules Configuration tab of Verifcation panel you can determine JSF and Struts rules.

Verification

Figure 9.27. Verification


On Options tab you can define a limit for the reported errors number.

Options of Verification

Figure 9.28. Options of Verification


9.22. View

The following preferences can be changed on the JBoss Tools > JBoss Servers > View page.

The View shows you preferences for JBoss Servers view.

View

Figure 9.29. View


9.23. Visual Page Editor

JBoss Tools > Web > Editors > Visual Page Editor screen allows you to control some aspects of the behavior of the Visual Page Editor (VPE) for JSP files. Also you can define a default editor tab.

Visual Page Editor

Figure 9.30. Visual Page Editor


On the Templates tab you can edit or remove VPE templates.

Visual Page Editor Templates

Figure 9.31. Visual Page Editor Templates


9.24. XDoclet

The following preferences can be changed on the JBoss Tools > XDoclet page.

On XDoclet screen you determine XDoclet module versions.

XDoclet

Figure 9.32. XDoclet


9.25. XDoclet Templates

To see what XDoclet tags templates available for completion select JBoss Tools > XDoclet > Code Assist > Templates.

XDoclet Templates

Figure 9.33. XDoclet Templates


By right clicking on any tree element you can add a new template, remove or rename it and also add a new tree.

Select, for example, Add and you'll be prompted by a list of available elements to add.

Add New XDoclet Template

Figure 9.34. Add New XDoclet Template


By double-clicking some element a new list will be shown: now for available methods.

Select New Element

Figure 9.35. Select New Element


Choose any element from the list, then select an attribute.

Select New Element

Figure 9.36. Select New Element


It will be added to the available templates.

Select New Element

Figure 9.37. Select New Element


9.26. XDoclets Variables

By selecting JBoss Tools > XDoclet > Variables you define variables used in templates.

XDoclets Variables

Figure 9.38. XDoclets Variables


9.27. Changing Default Environment During Project Creation

To change the default environment and project template for either JSF or Struts new project creation:

  1. Select Window > Preferences > JBoss Tools > Web > {JSF or Struts} > Project

  2. For Version set the environment you want to be the default one

  3. For Project Template set the template you want to be the default one

Changing Enviroment Template

Figure 9.39. Changing Enviroment Template


9.28. Changing Default Project Template During Project Creation

To change the default project template for either JSF or Struts new project creation:

  1. Select Window > Preferences > JBoss Tools > Web > {JSF or Struts} > Project

  2. For Project Template set the template you want to be the default one

Changing Project Template

Figure 9.40. Changing Project Template