Copyright 2006 Travelocity.com L.P. All rights reserved.

 

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 

http://www.apache.org/licenses/LICENSE-2.0

 

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

 

 

 

 

MidStream Developers Guide

 


Overview.. 3

Setup. 3

Build. 3

Testing. 3

Framework. 3

Plug-in Core. 3

 


Overview

 

Please review the ‘MidStream Users Guide’ for details and information of what the MidStream tool suite is about.

 

Setup

The MidStream project is broken up into four modules:

 

Module

Description

framework

Contains the component wrappers for the different types of client/service classes MidStream supports

plugin-ui

Contains all of the plug-in’s UI components, plugin.xml, and IntelliJ integration points (actions, Pico components, etc.)

plugin-core

Contains the core non-UI logic for the plug-in

plugin-lib

Contains the plug-in’s library dependencies (both compile and runtime)

 

Note: Because IntelliJ includes an older ‘xmlrpc-*.jar’ as one of its libraries, use a different JDK for the framework module so that the unit tests will run correctly.

Build

  1. Run the ‘init’ Ant target in the ‘plugin-lib’ module to pull all the necessary .jar files from Maven.
  2. Next, build the ‘framework’ module by running the ‘install’ Ant target within its build file. This will build the module’s classes and copy the ‘midstream-framework.jar’ file into the ‘plugin-core’ module.
  3. Either rebuild the project and run it as a plug-in or select the ‘MidStream’ module from the ‘Project View’ and execute ‘Build -> Prepare Plugin Module ‘MidStream’ For Deployment’ to package the plug-in as a .zip for distribution.

 

Testing

Framework

The framework’s unit tests can be run from within IntelliJ by invoking the ‘midstream.framework unit tests’ configuration or running the module’s ‘test’ Ant target. Running the ‘coverage’ Ant target will generate a report (in ‘test/coverage/reports/index.html’) of the unit test’s coverage. Currently, there is 81% coverage for the framework module.

Plug-in Core

The core unit tests can be run from within IntelliJ by invoking the ‘midstream.core unit tests’ configuration or running the module’s ‘test’ Ant target. Running the ‘coverage’ Ant target will generate a report (in ‘test/coverage/reports/index.html’) of the unit test’s coverage.

 

Note: If running the core unit tests via the IDE, ensure that a rebuild of the project has occurred first so that all necessary resources are placed on the classpath.