Live Synchronization of Artifacts with AppXRay

Underlying the entire Workshop product family is the unique AppXRay technology that manages framework artifacts for code completion, consistency checking with generated classes, configuration files or annotations, pre-build error checking, and validation that reaches all the levels of your application.

In order to use AppXRay, you must:

Enabling and Disabling AppXRay

Normally, AppXRay is enabled. However if this causes performance to decrease unacceptably, you can disable AppXRay by clicking Project > Properties and expanding the Builders item.

To disable AppXRay, uncheck beside the AppXRay builder as shown below.

To re-enable AppXRay, simply click to put a check back beside the AppXRay builder.

AppXRay builder is also disabled if you use the Project > Build Automatically command to disable automatic builds. Within the Workshop products, automatic builds are done not only for Java classes but for the AppXRay application database.

Manually Rebuilding the Application Database

AppXRay's application database is incrementally updated as you make changes to the files in your web application. Some of the information that is used to construct the application database comes from your compiled Java class files and edited configuration files. The information from these files can sometimes be misreported by Eclipse if it becomes out of sync (as a developer you may have sometime noticed the need to perform a Rebuild All command to update Eclipse when you make changes to your Java classes). Rebuilding the application database allows the application database to be rebuilt from scratch and updated with the latest information about your application. This can be useful if you should see problems that appear to be misreported by the IDE.

If you have disabled the AppXRay builder or if AppXRay features are not working as expected, you can rebuild the application database by right clicking on your project in the AppXplorer view and choosing Rebuild AppXRay Database from the menu.

The following dialog is displayed:

Click Yes to begin rebuilding the database.

The IDE starts the web application analysis process. Depending on the size of your application, this operation may take a few seconds to a few minutes.

AppXRay Validation

The Application Database, AppXRay, analyzes the JSP pages, Java source files, resource bundles, and web configuration files and uses this information to build a database of the relationships between these artifacts. The Workshop group of products then use the information stored in AppXRay to provide validation and consistency checking across all layers of the application. 

Project level validation properties

To set project-level validation properties, click Project > Properties and expand Validation - AppXRay.

This dialog allows you to control validation for:

File level validation properties

The Workshop group of products also provide the same level of validation control for a single source file. In this case, you insert JSP comments containing the validation property to disable/enable. These comments can be placed anywhere within the source code and the IDE will enforce these properties for the single file. The following table defines the validation properties for a single file.

Validation Property Definition
<%--<nitrox:set-property property="validation.missingFile" value="true"/> --%> Controls validation for missing files. The default value of true will complain about missing files.
<%--<nitrox:set-property property="validation.unresolvedVar" value="false"/> --%> Controls validation for unresolved variables. The default value of false will not complain about unresolved variables.
<%--<nitrox:set-property property="validation.compile" value="true" />--%> Controls scriptlet compilation. The default value of true enables scriptlet compilation on the page.
<%--<nitrox:set-property property="validation" value="true"/> --%>
Controls all validation in the IDE. The default value of true enables validation.

Sharing the AppXRay Database

If you have a shared project that takes a very long time to build (more than 15 minutes), you can build the AppXRay database on a single machine and then share it with other users. This technique should only be used for very large projects. There are two ways to do this:

If both users have a copy of the project files, with AppXRay disabled:

  1. The first user enables AppXRay (right click on the project and choose Enable AppXRay) and allows AppXRay to build its database. The AppXRay status will be displayed by the project name in the AppXplorer view, and you must wait til the build completes and no more status messages are displayed.
  2. The first user then copies the following folder from their workspace folder :

    .metadata/.plugins/com.m7.nitrox/<project>/ArtifactDb

    to the second user's project folder.

  3. The second user then enables AppXRay (right click on the project and choose Enable AppXRay).

If the second user does not have a copy of the project files:

  1. From the operating system, the first user copies the project folder to a new shared folder.
  2. From the operating system, the first user copies the following folder from their workspace folder :

    .metadata/.plugins/com.m7.nitrox/<project>/ArtifactDb

    to the new shared folder.

  3. From the operating system, in the new shared folder, the first user deletes the file
  4. .settings/com.bea.workshopstudio

  5. The second user opens Workshop and chooses New > Dynamic Web Project From Existing Source. For the project source, the second user specifies the new shared folder created by the first user.
  6. The new project will be created with the files from the new shared folder, AppXRay will be enabled, and the AppXRay database will not need to be rebuilt. The ArtifactDb folder will not be copied to the new project, but instead will be installed into the workspace metadata folder automatically.

Note that this feature only works if BOTH users have at least version 3.2 installed. This feature does not work with previous versions.

 

Related Topics

Browsing and Managing Web Elements

Mapping Application Dependencies


Still need help? Post a question on the Workshop newsgroup.