Create new JBoss Tools Documentation Jira issue

This will launch the Jboss Tools Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

Chapter 6. Project Examples

6.1. User Sites
6.2. Downloading a Project Example
6.3. Quick Fixes

JBoss Developer Studio provides an option to download and import a ready-made project that you can explore and derive some useful technology implementation lessons from.

To adjust the settings of the Project Examples feature you need to navigate to Windows> Preferences > JBoss Tools > Project Examples.

Project Examples Preferences

Figure 6.1. Project Examples Preferences


The Show experimental sites checkbox serves to enable/disable representing the user sites in the Project Example dialog ( Help > Project Examples).

As you can see from the Project Examples Preferences image you can add a custom project example that can be provided by anyone. This feature can, for example, facilitate project testing.

In oder to add a new project example you need to select the User sites option and press the Add button to the right.

When the Add button is pressed the Add Project Example Site dialog is displayed. The dialog contains 2 input fields: Name where you need to specify the name of the new entry and URL that has to point to the xml file that contains example project(s) properties. In more detail the structure of the xml file is discussed further in the chapter of the guide. Alternatively, if the xml is stored on your local machine, you can hit the Browse button to select the file in the file system.

Here is an example of the xml file that holds project example settings:


<projects>
    <project>
        <category>User Examples</category>
        <name>User Project Example</name>
        <shortDescription>
        Short project description.
        </shortDescription>
        <description>
        Full project description.
        </description>
        <size>10900</size>
        <url>
        http://projectexample.org/projectexample.zip
        </url>
    </project>
</projects>

Once you define the location of the xml file with projects settings you will see a new user site entry added. Please note now if you select the entry you can edit and remove it with the corresponding buttons to the right. You can not do such operations with the Plugin provides sites.

When the user sites location is set up you can download and install the project(s). Please see the next chapter of the guide.

To download a project example and start working with it you need to take a few steps:


Alternatively, you should navigate to New > Other.., scroll down to find the JBoss Tools option (or just type in the first letters of the word "JBoss" for quick search), expand the option and select Project Examples, click Next.

  • Now in the New Project Example dialog you can select a project you would like to explore and a site to download it from

    Project Examples Wizard provides a filter field to more easily locate the project examples you want, so you can type in the project you would like to explore in the field.


Some project examples have dependencies which could not be automatically configured. In such cases you will receive the message prompted about detected requirements (see the figure below).


You should click Details to see the list of requirements and make fixes.


If you have previously specified user sites (see the User Sites chapter) they also will be displayed in the list of project examples in the category that was defined in the xml file with user sites settings.


Pleas note that to view the user sites you need to have Show experimental sites checked.

  • Press Finish to start downloading the project from the repository

When downloading is finished the project will be imported automatically and you will be able to see it in the Package Explorer.

Now you can run the application on the server.


For further operation add the following code to .project files of your Web project example.


<buildCommand>
    <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
    <arguments>
    </arguments>
</buildCommand>
...
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>

It is needed for correct work of Code Assist and JSF EL Validation.

Project Examples Wizard has an option for making quick fixes for the imported project to easily fix possible issues like missing servers, Seam runtimes etc.

To enable quick fixing option you need to check the Show the Quick Fix dialog while choosing the Project Example.

When the project you selected is downloaded it will be checked for missing dependences and if there are some you will see a dialog listing the problems.


To fix the problem you need to:

  • Select the problem from the list

  • Click Quick Fix button

You will be offered a solution or a number of solutions to the problem.


In this case (see the image above), when the Finish button is pressed, Seam Settings dialog box will be displayed where you need to provide a path to the Seam environment to fix the issue.

When the problem is fixed you will be returned to the Quick Fix dialog box with the remaining problems to be fixed.

There is a possibility to fix problems before downloading. When the project example is selected you will see warning message on the New Project Example dialog.


To fix the problem immediately you need to:

  • Click Details... button in the New Project Example dialog

  • Select the problem from the list in the Requirement details dialog box

  • Click Fix button


You will be offered a solution to the problem.