Development Studio


The OpenMRS Development Studio is an Eclipse-based IDE with a collection of tools that ease the development for the OpenMRS platform.

The Development Studio can be installed either as an all-in-one package, or an existing Eclipse-based installation can be updated with the OpenMRS features from the update site.

Release Engineering instructions (needed by Eclipse plug-in developers).

The following features are currently presented.

Contents


OpenMRS perspective

The OpenMRS perspective optimizes the workbench for more convenient development with the OpenMRS platform. This reflects on the configuration of views and actions that are visible to developers.

If you have installed the all-in-one package, the OpenMRS perspective is switched on by default. Otherwise, you can switch to the OpenMRS perspective by selecting Window > Open Perspective > Other... and then choosing the perspective with name OpenMRS.

Image:Screenshot-Open_Perspective.png

Module wizard

The module wizard enables developers to quickly create a Java project with the structure of an OpenMRS module.

  1. Switch to the OpenMRS perspective, if it is not the active one.
  2. Right-click in the Package Explorer view and call New > OpenMRS Module Project wizard.
  3. Type a name for the project in the first wizard page. Then click the Next > button.
  4. Check the default values proposed for the basic module's properties on the second wizard page. When ready click the Finish button.

Image:Screenshot-New_OpenMRS_Module_Project.png

The wizard generates a Java project with the structure of an OpenMRS modules. The config.xml descriptor is populated with the property values specified in the wizard.

config.xml editor

The config.xml editor enables developers to easily manipulate the module's configuration data. The editor provides a graphical interface for changing property values. If an incorrect value is entered a validation error is shown. The Overview tab of the editors allow editing the general module's properties. It also provides actions to deploy the module on a configured OpenMRS runtime location and to access that location in the internal web browser.

Image:Screenshot-config.xml_Editor_Overview.png

The Servlets tab enables creation of new servlets and editing the existing ones. Servlets can be directly accessed in internal web browser by using the Run action.

Image:Screenshot-config.xml_Editor_Servlets.png

In case the user wants to change the data directly in the XML source code, then the Source tab is available for use.

Image:Screenshot-config.xml_Editor_Source.png

Configure OpenMRS runtime location

You can declare the location of your OpenMRS runtime. This is done in the OpenMRS preferences page. It can be opened from the main menu: Window > Preferences > OpenMRS. You need to paste the base url where OpenMRS is installed. The connection can be tested by using the Ping button. Proxy settings can be configured by following the Network Connections link.

Image:Screenshot-Preferences.png

Configuring the OpenMRS runtime location is essential for deploying modules from the IDE.

Deploy OpenMRS modules

OpenMRS modules can be deployed on the configured OpenMRS runtime location. The deploy action can be invoked in several ways:

  • by right-clicking on the OpenMRS module project in the "Project Explorer" or "Navigator" view and choosing the Deploy Module action ++
  • from the main menu Project >> Deploy Module when an OpenMRS module project is selected in the Project Explorer ++
  • from the Overview page in the config.xml editor.
  • from the title bar actions of the config.xml editor.

++ only available if project created with openmrs module project wizard

When the deploy action is called you will be asked for user and password.

Image:Screenshot-Login_to_OpenMRS.png

After authorizing the module will be deployed and run. If an error occurs, you will be prompted with an error dialog.

Note: This action deploys the module by using the OpenMRS Modules Controller. The OpenMRS application does not need to be restarted after the deployment happens. However, you need to configure your runtime settings to allow deploying modules from the web.

Subversion integration

The integration consists of adding the OpenMRS subversion repository to the Subversive repositories list. The SVN repo is added with anonymous (read-only) access. To set your user and password, you should do the following:

  1. Switch to the SVN Repository Exploring perspective. In the SVN Repositories view there should be a node with name OpenMRS.
  2. Right-click on the OpenMRS node and call the Location Properties... action.
  3. Specify your user and password for the OpenMRS subversion repository.
  4. You may also select the Save password checkbox.

Image:Screenshot-SVN_Repository_Location.png

Trac integration

The integration consists of adding the OpenMRS Trac repository to the Mylyn Task repositories list. This enables users to work with Trac tasks directly from the Development Studio. The OpenMRS Trac repository is added with anonymous access. This allows querying and browsing through the existing tasks via the internal web browser in the Eclipse IDE. If you want to have write access to the repository and use the graphical Trac task editor you need to specify your user and password for the OpenMRS Trac repository.

  1. Open the Task Repositories view: Window > Show View > Other... > Mylyn > Task Repositories.
  2. Right-click on the OpenMRS repository and choose Properties from the context menu.
  3. Deselect the Anonymous Access checkbox
  4. Enter your user and password for the OpenMRS Trac system.
  5. Expand the Additional Settings section.
  6. Choose XML-RPC for Access Type.
  7. Click on the Validate Settings button. You should see Authentication credentials are valid. message.
  8. Click the Finish button.

Image:Screenshot-Task_Repository.png

Read this article for a quick tutorial on how to use the Task List and Task Editor. For more information visit the Eclipse Mylyn web site.

Code formatter and code templates

As described by the OpenMRS Conventions the OpenMRS community uses a customized version of the Java code formatter and Java code templates. If the Development Studio is started with the OpenMRS product enabled, then the OpenMRS-specific code formatter and code templates are available and enabled by default.

If you have installed the all-in-one package, then the OpenMRS product is activated by default. If you have installed the OpenMRS Development Tools via the update site on an existing Eclipse-based installation, then you need to activate the OpenMRS product manually.