Writing OScript now consists primarily of editing text-based source files. CSIDE provides some tools to help OScript developers.

Editor Preferences

The OScript Preferences (available inside the Eclipse preferences) offer a variety of options to control the behavior of the editor. Preference options are divided into three sub-sections:

Overriding Features

If you don't already know the signature of a feature, function or script you're overriding, select Source > Override Features from the top-level menu to get a list of available features for the object in the current editor window.

Override Features Dialog

Select the features you wish to override and hit Okay. A template containing the default value for the feature, copied from the parent, will be inserted into your object.

Xlates

Xlates allow you to move user interface string into a separate properties file so that they can be translated into other languages.

To replace a string with an Xlate, right-click on string and select "Xlate" from the context menu. You will be presented with the Find Xlate dialog.

Find Xlate Dialog

From there, you can either choose an existing Xlate from the list or, if the desired Xlate does not exist, hit the "New" button.

New Xlate Dialog

From here, select the appropriate properties file, select or add the group, and optionally change the key and Xlate text. Hit Replace and your string will be replaced with the Xlate token.

Note that as of 16.2.11 CSIDE allows you to choose where the CSIDE looks for Xlate property files (either the Content Server installation, your local workspace (the default option), or both). The default as of 16.2.11 is the local workspace. The preference to change this setting can be found on the 'OScript' tab:

Xlate property file location preference setting

16.2.11 also provides the option to highlight string literals in an effort to expedite Xlate conversion:

Sample Xlate Suggestion

By default this behavior is disabled. To enable this enhancement you need to check the following box on the 'OScript' → 'Editor':

Xlate NLS preference setting

Since some strings are not intended to be externalized: CSIDE provides two tags to disable the feature:

Xlating multiple Strings

If you would like to replace multiple string literals in an OScript source simultaneously: select the "Externalize Strings ..." option from the "OScript" menu. This brings up a table of string literals in the active source file (minus any strings marked to not be xlated, as per the above):

Externalize Strings Panel One

From this window if you click the 'Ignore' button: any strings that have been selected will be marked in the document to not be xlateable. Clicking the 'Xlate' button results in a second table being displayed which allows you to replace any selected string(s) with an xlate.

Externalize Strings Panel Two

Code Refactoring

The "Refactor" menu (within the "OScript" menu) provides options to have CSIDE update your code based on some of OpenText's coding standards. Options apply to the entire source file, and include: