November 11, 2019 Andrew

Enhanced Code Editor in Omnis Studio 10.1 makes developing apps quicker & easier

The Code Editor (with built-in Debugger) is always said by developers to be one of the main reasons why developing apps with Omnis Studio is so quick and easy. In Omnis Studio 10 and 10.1 we’ve done a lot to enhance the Code Editor even further, including several updates in response to customer feedback. We added a new Variable Panel (covered on the blog here), and several other features have been added to the Code Assistant, which we will outline here.

  • Command Keywords are added to a command automatically when pressing Tab, enabled using a new option in the Line menu
  • Construct Parameters for $add, $open, etc are added as appropriate
  • Method name matching to allow you to find a method name as you enter code
  • A new option Show Inherited Methods First to display inherited methods at the top of the methods list in the Code Editor
  • Closing Quotes, Braces, and Square Brackets are entered automatically, if required after the opening character is entered

Command Keywords

There is a new option on the Code Editor Line menu, Tab Adds Missing Optional Keyword, which is enabled by default. In this case, pressing Tab for commands that have optional keywords, such as Do, For and Enter data, the Code Assistant appends the optional keyword(s) to the command, ready for you to enter its parameter(s). For example, pressing tab after entering Do $cinst.$test() will add the “Returns” keyword. In the case of the For and For each line in list commands, tab will cause the keywords “from”, “to” and “step” to be added in turn.

Omnis Code Editor

Construct Parameters

Where possible, the Code Assistant help window now expands “params…” for $add, $open, etc to show the constructor parameters of the class referenced. Omnis identifies the class name that precedes the method name in your code (e.g. classname.$open), and will show the construct parameters for the class.

Method Name Matching

A new keypress has been added to the Code Editor to allow you to search for a method name where the name of a method is required in a line of code. You can press Shift-space after entering a string in the code assistant and any possible matching method names are added to the help list. For notation, if you enter $test and then press Shift-space, the code assistant only shows matching strings that are notation (start with $) and contain “test”.

Showing Inherited Methods First

There is a new option on the View menu of the Code Editor, Show Inherited Methods First, which allows you to display inherited methods at the top of the methods list in the Code Editor; the option defaults to off which means inherited methods will be shown after all other methods at the bottom of the list, as in previous versions.

Entering Quotes, Braces, and Square Brackets

There is a new mechanism in the Code Assistant to detect situations where automatically supplying the ” (closing quote) after typing an “ (opening quote) makes sense. Similarly, a } (closing brace) is inserted automatically where it makes sense after typing { (open brace), or a ] (closing square bracket) is inserted after you enter a valid calculation after entering an [ (opening square bracket); this includes the case when entering a calculation at the end of the parameter for the Sta: command.

More information & Download

For more information about the enhancements in Omnis Studio 10.1, and to download it, please go to the Developer Resources section of our website:

You can view or download the ‘What’s New in Omnis Studio 10.1‘ PDF guide from the same page.

, , , ,