Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Code completion inside JSDoc for supported JSDoc tags and on Types (type '@' first, then Control-Space). Supported tags:
    • @AllowToRunInFind
    • @author {userName}
    • @constructor
    • @deprecated
    • @example
    • @param {Type} name mandatory name property
    • @param {Type} [beta:name] optional name property
    • @private
    • @protected
    • @return {Type}
    • @see
    • @since
    • @SuppressWarnings (warning)
    • @throws {Type}
    • @type {Type}
    • @version
  • Support for automatically creating the basic JSDoc tags for an existing function: See context menu of the Script Editor > Source > Generate Element Comment (Alt-Shift-J) 
  • Support for inline JSDoc to provide type information for objects: 
    Code Block
    function demo(){
       /** @type {JSFoundset<db:/udm/contacts>}*/
       var x = databaseManager.getFoundset('udm', 'contacts');
       x. //Code-completion here will know that x is a FoundSet on table Contacts in the UDM database, thus will include all columns, calculations and aggregates
    }
  • Support for the @deprecated tag: When a variable or function is marked as deprecated any reference to the object will generate a builder marker
  • Support for the @private tag: Hides the object for access from outside the current scope, including child scopes. Accessing the hidden object from outside the scope in which it is defined will generate a builder marker
  • Support for the @protected tag: Hides the object for access from outside the current scope. Accessing the hidden object from outside the scope in which it is defined will generate a builder marker 
  • Support for typed Arrays: 
    • @type {String[]}
    • @type {Array<String>Array}
    • @type {Array<Byte>Array}
  • Support for types Objects:
    • @type {Object<String>Object}
    • @type {Object<Array<String>>Object>}: equivalent of {[beta:'one', 'two', 'three'], [beta:'four', 'five', 'six'], [beta:'seven', 'eight', 'nine']}
  • Support for typing JSFoundsets and JSRecord: 
    • @type {JSFoundset<datasource>JSFoundset}
    • @type {JSRecord<datasource>JSRecord}
      (a datasource string is build up like this: "db:/{serverName}/{tableName}", for example "db:/udm/contacts")
    • @type {JSFoundset<{column1:String,column2:Number}>}
    • @type {JSRecord<{column1:String,column2:Number}>}
  • Support for typing as a RecordType:
    • @type {JSDataSet<{name:String, age:Number}>}
    • @param { {name:String, age:Number}} person A JavaScript object with a name and age property representing a person
  • Support for optional properties on RecordType. There are two different syntaxes allowed: 
    • Square brackets around the property name: @param {{sDocID:String, [beta:sTemplateID]:String}} oArg
    • An equal-sign behind the type: @param {{sDocID:String, sTemplateID:String=}} oArg

...

  • Support for typing parameters as Objects with certain properties:
  • Code Block
    /**
     * @param {Object} person
     * @param {String} person.name
     * @param {String} person.email
     * @param {Number} [person.age] optional "age" property
     */
    function processPerson(person) {
      application.output(person.name);
      application.output(person.email);
    }
  • Support for rest parameters: Allows to indicate through JSDoc that a function can take unlimited trailing arguments of the specified type:
    Code Block
    /**
      * @param {...String} someExtraStrings One or more additional String can be send into this function
      */
    function methodWithRestParams(someExtraString){}
    
    
    function test() {
       methodWithRestParams('one', 'two', 'three', 'four');
    }
  • Support for typing as an instance of a Form. Can also be used to indicate that the Form must extend the specified Form:
    • @type {Form<mySuperFormName>Form}
  • Support for the so-called "AnyType"
    • @param * myParam A parameter that can contain any type of value. 
  • Beans are made available as types in CodeCompletion, to be used for type checking and JSDoc 
  • Support for @AllowToRunInFind on functions to indicate that the the function should be executed on event handlers while in FindMode:
    Eliminates the //controller.search() workaround. Note that that running JavaScript while in FindMode has it's limitations and not all behavior is 100% defined. More details will follow.
  • Support for @constructor tag, to indicate that a function declaration is to be used as a Constructor. Functions marked as Constructor also display differently in the Script Outline view 
  • Automatic JSDoc @type setting on global and Form variables
  • Ability to update the type of a variable by updating the JSdoc @type tag value AND the default value
  • Added specific JSDoc context for Templates (Window > Preferences > JavaScript > Editor > Templates), besides the already existing JavaScript context.
  • Added dedicated RuntimeXxxx types for all runtime element types and for Forms. For example RuntimeLabel, RuntimeTextField and RuntimeForm. These types can be used in JSDoc, but also in scripting to check if an object is and instance of a certain type, using the instanceOf operator. Note that RuntimeForm and Form are the same, RuntimeForm was added for consistency. RuntimeComponent is the base type for all default elements that Servoy Ships with
  • Removed Strict Mode option from the JavaScript Preferences: the additional warnings that where generated with Strict Mode enabled are now part of the extended JavaScript Error/Warnings preferences and thus can be enabled/disabled on individual basis  

...