4.7. Working with Guvnor Files Locally

Resources stored in the Guvnor repository can be copied to JBoss Developer Studio allowing developers to work with files locally.
Use the Resources from Guvnor wizard to copy files from the Guvnor repository to the local workspace.

Importing Guvnor Repository Resources

  • Select FileImportGuvnorResources from Guvnor.
  • Select the repository connection.
  • Select the resources to be copied.
  • Select the target location in the local workspace.
When local copies of Guvnor repository files are created, JBoss Developer Studio sets an association between the local copy and the master file in the repository. This information is kept in the (normally) hidden .guvnorinfo folder in the local project and, like all metadata, should not be changed by end users.
The association allows for operations such as update and commit in synchronization with the master copy held in the Guvnor repository.
The following actions can be performed though the Guvnor context menus in JBoss Developer Studio:
Update Action:
The Update action is available for one or more Guvnor resources that are not synchronized with the Guvnor repository master copies. These files would be out of synchronization due to one or both of the following conditions:
  • There are local changes to the resources.
  • The master copies have been changed in the Guvnor repository.
Performing the Update action replaces the contents of the local file with the contents of the associated master copies in the Guvnor repository.
Add Action:
The Add action adds a local file that is not associated with a Guvnor repository master copy to the Guvnor repository.
Commit Action:
The Commit action is enabled for one or more Guvnor repository associated files that have local changes. The Commit action will write the local changes back to the associated Guvnor repository files and update the association for the new revision.
If a local change is based on an older revision of a file than is currently in the Guvnor repository (for example, someone else changed the same file), then the Commit action will ask whether you wish to overwrite the current version in the Guvnor repository with the local content. When such conflicts occur, you should use the Eclipse Guvnor version tools, along with Eclipse standard tools, to determine the differences and merge content based on the current version in the Guvnor repository.
Show History Action:
The Show History action shows a file's revision history.
Compare with Version Action:
The Compare With Version action opens a wizard that allows versions of a file to be compared for changes.
Switch to Version Action:
The Switch to Version action replaces the current version of a file with the selected version from the revision history.
Delete Action:
The Delete action removes the files in the Guvnor repository and deletes local metadata for the Guvnor repository association.
Disconnect Action:
The Disconnect action is enabled for one or more Guvnor repository associated files, and it removes local metadata for the Guvnor repository association.
Guvnor Preferences

The JBoss Developer Studio preferences for the Guvnor plug-ins allows user to set decoration preferences for local Guvnor resources to identify changes to local files.

The Guvnor preferences are set by accessing the preferences menu. Select WindowPreferencesGuvnor to access the preferences.