RSE Massagers API

In addition to validating what a user types, we often need to transform it prior to saving. For example, we may need to fold it to uppercase or lowercase. The RSE abstracts and encapsulates this concept into massagers which can be re-used. A few are pre-supplied by RSE.

RSE Massager Interfaces

The ISystemMassager interface is in package org.eclipse.rse.ui. It is a very simple interface with one method: public String massage(String text). Given input text, return the massaged text. While simple, by encapsulating this operation into an interface, you will be able to write re-usable dialogs that take a massager as input. Further, tricky massaging can be built as a re-usable object.

RSE-Supplied Massagers

The RSE supplies the following massagers in package org.eclipse.rse.ui:


Massager Class Description
MassagerFoldCase Simply folds the text to uppercase or lowercase
MassagerFoldCaseOutsideQuotes Folds the text to uppercase or lowercase, except parts of the text that are surrounded by quotes or any given delimiter characters
MassagerFoldCaseUnlessQuoted Folds the text to uppercase or lowercase, unless the whole text is surrounded by quotes or any given delimiter character