JBoss.orgCommunity Documentation
This chapter includes detailed reference information about Views and Wizards used to manage Guvnor Tools.
The Guvnor Repository Exploring perspective contains two views supplied by EGT, described in Section 3.4, “Guvnor Repositories View” and Section 3.5, “Guvnor Resource History View”, that will be the center of most interactions with Guvnor. Eclipse standard views such as Properties and Resource Navigator are also useful.
While each of these views can be opened and positioned independently within an Eclipse workbench, the Guvnor perspective provides a convenient method for displaying a common layout. In the Eclipse workbench menu, select → → to view the perspective list:
Selecting the Guvnor perspective.
option will open theThe Guvnor Connection wizard appears in a number of places within the EGT (as detailed below), but in this section we will cover only the two most basic entry points.
The Guvnor Connection wizard can be started in the following ways:
Selecting
→ → → → within EclipseIn the Guvnor Repositories view using the drop-down menu
using the menu button
( )
Choosing either of these will start the Guvnor Connection wizard.
Default values appear in the Location, Port and Repository fields (See Chapter 3, Reference for details about on changing these default values). Of course, any of these fields can be edited by editing the corresponding text box. Drag-and-drop or paste into the Location field a typical Guvnor repository URL such as:
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav
This results in the URL being parsed into the respective fields as well. The authentication information (user name and password) can optionally be stored in the Eclipse workbench's key-ring file based on the selection of Save user name and password.
If the authentication information is not stored in the key-ring, then the EGT uses a session authentication, what means that the credentials supplied are only used during the lifetime of the Eclipse workbench instance.
If authentication information is not stored in the key-ring, or the authentication information (key-ring or session) is not valid, the EGT will prompt for the authentication information once it has to access the Guvnor repository.
If authentication fails, the EGT will retry once and then issue an authentication failure error.
If an authentication failure error occurs, you can retry the same operation and supply different authentication information.
Note that the EGT calls the Guvnor repository at various times, such as when it is determining if any resource updates are available. Thus if you use session authentication, the authentication dialog will appear at different times during the Eclipse workbench session, depending on what actions you take. For ease of use, we recommend saving the authentication information in the Eclipse key-ring.
The Eclipse key-ring file is distinct from key-ring files found in some platforms such as Mac OS X and many forms of Linux. Thus, sometimes if you access a Guvnor repository outside the EGT, the key-ring files might become outdated, and you will be unexpectedly prompted for your credentials in Eclipse. This is nuisance, but in this case you can simply re-enter the appropriate username and password.
In addition to the single file drag-and-drop features provided within the Guvnor Repositories view, the EGT also includes a wizard for copying one or more files from a Guvnor repository to the local workspace (and setting the association with the Guvnor repository). This wizard is available by selecting → → → or → → → → .
Note that the wizard is identical but appears in both locations to accommodate users who tend to view this functionality as being in either category.
The first page of the wizard asks for the selection of the source Guvnor repository and gives the option to create a new Guvnor repository connection (in which case the second page is the same as the Figure 3.4, “Guvnor Connection Wizard”).
Once the source Guvnor repository is chosen, the wizard prompts for the resources to be copied:
Finally, the target location in the local workspace should be chosen:
On completion the wizard copies the selected files from the Guvnor repository to the local workspace. If a file with the same name already exists in the destination, the wizard uses the Eclipse standard prompt for rename dialog:
The Guvnor Repositories view contains tree structures representing the contents of Guvnor repositories.
You can perform the following actions under the resources in the Guvnor Repositories view:
Create a new Guvnor repository connection. This process is described above in Section 3.2, “Guvnor Connection Wizard”.
Remove a Guvnor repository connection. Use the Delete button ( ) in the toolbar or the option in the context menu to remove a repository connection.
Refresh Guvnor repository resources. Use the
context menu item to reload the tree for the selected node.
Make use of "drill-into" functionality. It's represented by a number of toolbar and context menu items such as ), (
) and (
).
Drill-down is useful when working with deeply nested tree structures, and when you wish to concentrate on only a single branch of the tree. For example, drilling into the defaultPackage node changes the tree view to:
Clicking on the ) or selecting in the context menu returns the tree to the top-level structure shown in the previous picture above.
There are a number of operations that can be performed on Guvnor repository files. Selecting a file in the Guvnor repository causes the Eclipse Properties view to display the details of that file:
The Guvnor Resource History view displays details about the revision history for the selected files, both local and those in Guvnor repositories. The initial state of this view is shown on the figure below.
The Guvnor Resource History view is populated by Show History actions in either the local Guvnor context menu or in the context menu for a Guvnor repository file in the Guvnor Repositories View (see Section 3.4, “Guvnor Repositories View”). Once this action is performed, the Guvnor Resource History view is refreshed to display the revision history:
Here we see that the file test.txt
has seven revisions. Double clicking on a revision row or selecting the option from the context menu opens an Eclipse read-only editor with the revision contents.
You can also use the
option when a file is open in a read-only editor to save a local writable copy of the contents. Doing so, however, will not associate the file created with its Guvnor source.The EGT provides a preference page in the Guvnor category:
The preferences cover two categories:
Guvnor repository connections
Local Guvnor repository resource decorations.
There are two preferences that can be set for Guvnor repository connections, which are used when creating new connections:
The first is a default Guvnor repository URL template, which can simplify the process of creating additional similar connections by simply changing part of the field, such as the host name.
The second defines whether or not authentication information should be saved in the Eclipse platform key-ring by default.
As with the Guvnor repository URL template, the decision whether to save authentication information in the Eclipse platform key-ring can be determined when creating the connection. That is, both of these preferences are simply convenience values set to reasonable defaults.
The second category of preferences provided by the EGT can be used to define how the decoration of local resources associated with Guvnor repository resources is presented. Since the Guvnor repository is not a substitute for a SCM, and since SCM tools in Eclipse tend to decorate local resources, it is useful to be able to control how the EGT decorate its local resources to avoid messy conflicts with SCM packages.
In the File Decoration section of the preference page, you can choose the location (Top right, Top left, Bottom right, Bottom left) of the decoration icon, or you can choose not to display it. In the Text section, you can format the Guvnor metadata which is appended to the file names:
Whether to show an indicator (>) when the local file has changes not committed back to the Guvnor repository
Whether to show the revision number
Whether to show the date/time stamp
Any changes to these preferences take effect immediately upon clicking the
and then buttons.