Browse Prior Art Database

Configuration Based Serviceability Instrumentation for Integrated Development Enviroments Disclosure Number: IPCOM000028941D
Original Publication Date: 2004-Jun-08
Included in the Prior Art Database: 2004-Jun-08
Document File: 1 page(s) / 38K

Publishing Venue



Adding serviceability instrumentation to source code is time consuming, error prone, and it often produces inconsistent results. All of these problems can lead to software products that are more difficult to diagnose and service when they are deployed in a production environment. Many software developers try to alleviate these problems by using macros to automatically insert trace and error logging statements at certain locations in their code. In this case the developer opens the source code file in an editor and advances the cursor to the desired location. Then the developer invokes the macro via a keyboard shortcut or context menu. Finally the developer edits the new code that was produced by the macro so that it matches the context of its surroundings. Some Integrated Development Environments (IDEs) also help alleviate the problem by adding serviceability code to classes or methods that it automatically generates. IDEs might provide this feature in situations such as when code is generated for a class that is overridden or for an interface being implemented. However, neither of these approaches provides the flexibility and ease of use that a software developer truly needs. Using a macro is time intensive and error prone because the developer must navigate to the appropriate locations before invoking the macro, and then edit the resulting source code. IDEs which add serviceability to automatically generated code are helpful but are not useful in situations where the code is not automatically generated or when the code changes after it was generated.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 57% of the total text.

Page 1 of 1

Configuration Based Serviceability Instrumentation for Integrated Development Enviroments

This article describes an approach for adding serviceability instrumentation to source code which does not suffer from the problems listed above. The idea is to take advantage of the plug-in mechanism provided by many IDEs, such as Websphere Studio. A plug-in is provided which can parse one or more source code files that are loaded in the IDE. It uses a configuration file (or configuration panel provided by the IDE which allows the developer to set the following properties:

Pattern based recognition for determining placement -- this tells the plugin what patterns to look for in the source code when deciding where to insert serviceability code. The pattern can be a complex regular expression or as simple as a string match.

Template for content -- this tells the plugin what the inserted serviceability code should look like. Variables are used in the template to allow for contextual strings to be generated such as the name of the enclosing method or the current line number.

Verbosity Level -- the level of verbosity that should be used by default in the serviceability code. This setting influences how much diagnostic information will be produced at runtime by default, without the end user manually adjusting the verbosity level.

The advantages of this approach are:

Ease of use -- The plugin can easily be invoked on one or more files from a simple context menu. The files don't nee...