JBoss.orgCommunity Documentation

Forge Reference Guide

Version: 4.0.0

1. Introduction to Forge
2. Using Forge
3. Project commands
3.1. Creating a new project
3.2. Adding persistence
3.3. Creating a new entity
3.4. Creating a new field
4. General commands
4.1. Opening a file or folder
4.2. The pick-up command
5. Preferences

Forge allows developers to use the familiar terminal or command line interface within an Integrated Development Environment (IDE).

To begin using Forge, launch the Forge Console view by navigating to WindowShow ViewOtherForgeForge Console.

The Forge Console will launch in an inactive state. How and when Forge starts can be changed, see Chapter 5, Preferences.

To start Forge, click the green arrow in the Forge Console.

Once Forge starts you will notice the name Forge appear in the Forge Console view and a command line currently in your root workspace directory, without a project selected.

From the Forge Console command line you can type the command cd (change directory) followed by the directory to change to, and if a navigator view is opened, the navigator view will also change to the specified directory. If the resource is not in the local workspace and the Remote Systems view is open, the directory will be selected in the Remote Systems explorer.

Through the Forge Console you can also link the console output to the currently open editor by clicking on the Link with Editor button.

If you find it easier to navigate your project via the Project Explorer view, you can right-click on a file from this view and select Show InForge Console from the context menu.

This will automatically execute the pick-up command, changing the current Forge runtime context to the selected resource and opening the file or folder. For more on this command see: Section 4.2, “The pick-up command”

If you close the Forge Console view, Forge will continue to run in the background. Re-opeing the Forge Console view will display the latest Forge state.

To stop Forge, click on the red square in the Forge Console.

Outlined in this chapter are the commands you will use most often when developing projects with the Forge runtime.

Outlined in this chapter are general commands for interacting with the Forge runtime, your projects and the workspace.

Forge preferences can be accessed by navigating to WindowPreferencesForge.

From the main Forge preference page you can set how Forge should be started. If you select to Start Forge when Eclipse starts Forge will automatically run on launch. Setting the option to Start Forge in Debug Mode will force Forge to debug mode every time it is started.

Selecting Installed Forge Runtimes from the preferences menu will display the currently installed Forge runtimes and their location. the Forge runtime shipped with Forge Tools displays with the name embedded.

You can have more than one Forge runtime installed at once. To install an alternate runtime to the one provided click on the Add button.

To add a new Forge runtime you will need to specify a name and provide the runtime location. Once the fields have been completed, click the OK button to return to the Installed Forge Runtimes page. Once successfully installed, the new Forge runtime will appear in the Installed Forge Runtimes list.