From 272d71b92764602b7f7f512dfe2967340806054e Mon Sep 17 00:00:00 2001
From: Matthias Osswald My super documentation of this class MyProp property ID for the new control, generated automatically if no ID is given Initial settings for the new control Constructor for a new library.j.aaa. Created class / constructor function Name of the class being created Object literal with information about the class Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class Creates a new subclass of class library.j.aaa with name Metadata object describing this class Returns a metadata object for class library.j.aaa. Value of property Gets current value of property MyProp. MyProp property Default value is Reference to New value for property Sets a new value for property MyProp. MyProp property When called with a value of Default value is My super documentation of this class UI5 Tooling Test Library
Since: 1.46.new library.j.aaa(sId?, mSettings?)
"},"methods":[{"name":"library.j.aaa.extend","visibility":"public","static":true,"returnValue":{"type":"function","description":"sClassName and enriches it with the information contained in oClassInfo.oClassInfo might contain the same kind of information as described in library.j.a.extend.library.j.aaa.extend(sClassName, oClassInfo?, FNMetaImpl?) : function
"},{"name":"library.j.aaa.getMetadata","visibility":"public","static":true,"returnValue":{"type":"sap.ui.base.Metadata","description":"library.j.aaa.getMetadata() : sap.ui.base.Metadata
"},{"name":"getMyProp","visibility":"public","since":"1.46","returnValue":{"type":"boolean","description":"MyPropfalse.getMyProp() : boolean
"},{"name":"setMyProp","visibility":"public","since":"1.46","returnValue":{"type":"this","description":"this in order to allow method chainingMyPropnull or undefined, the default value of the property will be restored.false.setMyProp(bMyProp?) : this
"}],"displayName":"library.j.aaa","title":"class library.j.aaa","subTitle":""},{"kind":"class","name":"library.j.Foo","basename":"Foo","resource":"library/j/dependency-es6-1.js","module":"library/j/dependency-es6-1","static":true,"visibility":"public","extends":"library.j.Bar","description":"new library.j.Foo()
"},"displayName":"library.j.Foo","title":"class library.j.Foo","subTitle":""},{"name":"library","displayName":"library","kind":"namespace","nodes":[{"name":"library.j","description":"","href":"api/library.j"}],"title":"namespace library","subTitle":""}]}
\ No newline at end of file
diff --git a/test/lib/builder/builder.js b/test/lib/builder/builder.js
index da01e9586..c81f00bfa 100644
--- a/test/lib/builder/builder.js
+++ b/test/lib/builder/builder.js
@@ -890,8 +890,7 @@ test.serial("Build library.j with JSDoc build only", async (t) => {
graph.setTaskRepository(taskRepository);
await graph.build({
destPath,
- includedTasks: ["generateJsdoc"],
- excludedTasks: ["*"]
+ jsdoc: true
});
const expectedFiles = await findFiles(expectedPath);
diff --git a/test/lib/processors/jsdoc/lib/transformApiJson.js b/test/lib/processors/jsdoc/lib/transformApiJson.js
new file mode 100644
index 000000000..4b7b0dcdd
--- /dev/null
+++ b/test/lib/processors/jsdoc/lib/transformApiJson.js
@@ -0,0 +1,64 @@
+import test from "ava";
+import esmock from "esmock";
+import sinonGlobal from "sinon";
+
+test.beforeEach(async (t) => {
+ t.context.sinon = sinonGlobal.createSandbox();
+ t.context.transformApiJson = await esmock("../../../../../lib/processors/jsdoc/lib/transformApiJson.cjs");
+});
+
+test.afterEach.always((t) => {
+ t.context.sinon.restore();
+});
+
+test("Basic test without symbols", async (t) => {
+ const {sinon, transformApiJson} = t.context;
+
+ const apiJsonPath = "/test-resources/sap/ui5/tooling/test/designtime/api.json";
+ const fakeTargetPath = "/ignore/this/path/resource/will/be/returned";
+ const dotLibraryPath = "/resources/sap/ui5/tooling/test/.library";
+ const dependencyApiJsonPaths = [
+ "/resources/some/path/x/api.json",
+ "/resources/some/path/y/api.json"
+ ];
+
+ const fs = {
+ readFile: sinon.stub().yieldsAsync(new Error("Not found!"))
+ .withArgs("/some/path/.library").yieldsAsync(null, `
+
+ mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description of the syntax of the settings object."
+ },
+ "events": [
+ {
+ "name": "press",
+ "visibility": "public",
+ "parameters": [
+ {
+ "name": "oControlEvent",
+ "type": "sap.ui.base.Event",
+ "parameterProperties": {
+ "getSource": {
+ "name": "getSource",
+ "type": "sap.ui.base.EventProvider",
+ "optional": false
+ },
+ "getParameters": {
+ "name": "getParameters",
+ "type": "object",
+ "optional": false
+ }
+ }
+ }
+ ],
+ "description": "Event is fired when the user clicks the control."
+ }
+ ],
+ "methods": [
+ {
+ "name": "attachPress",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "oData",
+ "type": "object",
+ "optional": true,
+ "description": "An application-specific payload object that will be passed to the event handler along with the event object when firing the event"
+ },
+ {
+ "name": "fnFunction",
+ "type": "function(sap.ui.base.Event) : void",
+ "optional": false,
+ "description": "The function to be called when the event occurs"
+ },
+ {
+ "name": "oListener",
+ "type": "object",
+ "optional": true,
+ "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself"
+ }
+ ],
+ "description": "Attaches event handler fnFunction to the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nWhen called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.\n\nEvent is fired when the user clicks the control."
+ },
+ {
+ "name": "detachPress",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "fnFunction",
+ "type": "function(sap.ui.base.Event) : void",
+ "optional": false,
+ "description": "The function to be called, when the event occurs"
+ },
+ {
+ "name": "oListener",
+ "type": "object",
+ "optional": true,
+ "description": "Context object on which the given function had to be called"
+ }
+ ],
+ "description": "Detaches event handler fnFunction from the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nThe passed function and listener object must match the ones used for event registration."
+ },
+ {
+ "name": "extend",
+ "visibility": "public",
+ "static": true,
+ "returnValue": {
+ "type": "function",
+ "description": "Created class / constructor function"
+ },
+ "parameters": [
+ {
+ "name": "sClassName",
+ "type": "string",
+ "optional": false,
+ "description": "Name of the class being created"
+ },
+ {
+ "name": "oClassInfo",
+ "type": "object",
+ "optional": true,
+ "description": "Object literal with information about the class"
+ },
+ {
+ "name": "FNMetaImpl",
+ "type": "function",
+ "optional": true,
+ "description": "Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class"
+ }
+ ],
+ "description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.\n\noClassInfo might contain the same kind of information as described in {@link sap.ui.core.Control.extend}."
+ },
+ {
+ "name": "firePress",
+ "visibility": "protected",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "mParameters",
+ "type": "object",
+ "optional": true,
+ "description": "Parameters to pass along with the event"
+ }
+ ],
+ "description": "Fires event {@link #event:press press} to attached listeners."
+ },
+ {
+ "name": "getColor",
+ "visibility": "public",
+ "returnValue": {
+ "type": "sap.ui5.tooling.test.TestEnum",
+ "description": "Value of property color"
+ },
+ "description": "Gets current value of property {@link #getColor color}.\n\nProperty with an Enum\n\nDefault value is Red."
+ },
+ {
+ "name": "getMetadata",
+ "visibility": "public",
+ "static": true,
+ "returnValue": {
+ "type": "sap.ui.core.ElementMetadata",
+ "description": "Metadata object describing this class"
+ },
+ "description": "Returns a metadata object for class sap.ui5.tooling.test.TestControl."
+ },
+ {
+ "name": "getValue",
+ "visibility": "public",
+ "returnValue": {
+ "type": "int",
+ "description": "Value of property value"
+ },
+ "description": "Gets current value of property {@link #getValue value}.\n\nProperty with type int\n\nDefault value is 0."
+ },
+ {
+ "name": "setColor",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "sColor",
+ "type": "sap.ui5.tooling.test.TestEnum",
+ "optional": true,
+ "defaultValue": "Red",
+ "description": "New value for property color"
+ }
+ ],
+ "description": "Sets a new value for property {@link #getColor color}.\n\nProperty with an Enum\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is Red."
+ },
+ {
+ "name": "setValue",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "iValue",
+ "type": "int",
+ "optional": true,
+ "defaultValue": 0,
+ "description": "New value for property value"
+ }
+ ],
+ "description": "Sets a new value for property {@link #getValue value}.\n\nProperty with type int\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is 0."
+ }
+ ]
+ },
{
- "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0",
- "version": "1.2.3",
- "library": "sap.ui5.tooling.test",
- "symbols": []
+ "kind": "enum",
+ "name": "sap.ui5.tooling.test.TestEnum",
+ "basename": "TestEnum",
+ "resource": "sap/ui5/tooling/test/library.js",
+ "module": "sap/ui5/tooling/test/library",
+ "export": "TestEnum",
+ "static": true,
+ "visibility": "public",
+ "description": "Defines colors",
+ "ui5-metadata": {
+ "stereotype": "enum"
+ },
+ "properties": [
+ {
+ "name": "Blue",
+ "visibility": "public",
+ "static": true,
+ "type": "string",
+ "description": "Yellow"
+ },
+ {
+ "name": "Red",
+ "visibility": "public",
+ "static": true,
+ "type": "string",
+ "description": "Red"
+ }
+ ]
}
- )),
+ ]
+ }
+ /* eslint-enable max-len */
+ ));
+
+ const readdir = sinon.stub().yieldsAsync(new Error("Not found!"));
- readdir: sinon.stub().yieldsAsync(new Error("Not found!"))
- };
+ const fs = {readFile, readdir};
const apiJsonContent = await transformApiJson(
apiJsonPath, fakeTargetPath, dotLibraryPath, dependencyApiJsonPaths, "", {
@@ -55,10 +426,645 @@ test("Basic test without symbols", async (t) => {
}
);
- t.is(apiJsonContent, JSON.stringify({
+ /* eslint-disable max-len */
+ t.deepEqual(JSON.parse(apiJsonContent), {
"$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0",
- "version": "1.2.3",
+ "version": "2.1.0",
"library": "sap.ui5.tooling.test",
- "symbols": []
- }));
+ "symbols": [
+ {
+ "kind": "namespace",
+ "name": "sap.ui5.tooling.test",
+ "basename": "test",
+ "resource": "sap/ui5/tooling/test/library.js",
+ "module": "sap/ui5/tooling/test/library",
+ "export": "",
+ "static": true,
+ "visibility": "public",
+ "since": "1.0.0",
+ "description": "
This control is just for UI5 Tooling testing purposes.
", + "href": "api/sap.ui5.tooling.test.TestControl", + "deprecated": true + }, + { + "name": "sap.ui5.tooling.test.TestEnum", + "description": "Defines colors
", + "href": "api/sap.ui5.tooling.test.TestEnum" + } + ], + "title": "namespace sap.ui5.tooling.test", + "subTitle": "Deprecated in version: 2.0.0", + "deprecatedText": "Deprecated as of version 2.0.0" + }, + { + "kind": "class", + "name": "sap.ui5.tooling.test.TestControl", + "basename": "TestControl", + "resource": "sap/ui5/tooling/test/TestControl.js", + "module": "sap/ui5/tooling/test/TestControl", + "export": "", + "static": true, + "visibility": "public", + "extends": "sap.ui.core.Control", + "description": "This control is just for UI5 Tooling testing purposes.
", + "experimental": { + "since": "1.4", + "text": "The API may change. Use with care." + }, + "ui5-metadata": { + "stereotype": "control", + "properties": [ + { + "name": "color", + "type": "sap.ui5.tooling.test.TestEnum", + "defaultValue": "Red", + "group": "Misc", + "visibility": "public", + "description": "Property with an Enum
", + "methods": [ + "getColor", + "setColor" + ], + "linkEnabled": true + }, + { + "name": "value", + "type": "int", + "defaultValue": 0, + "group": "Misc", + "visibility": "public", + "description": "Property with type int
", + "methods": [ + "getValue", + "setValue" + ] + } + ] + }, + "constructor": { + "visibility": "public", + "parameters": [ + { + "name": "sId", + "optional": true, + "description": "id for the new control, generated automatically if no id is given
", + "phoneName": "sId", + "depth": 0, + "types": [ + { + "name": "string", + "linkEnabled": false + } + ], + "defaultValue": "" + }, + { + "name": "mSettings", + "optional": true, + "description": "initial settings for the new control
", + "phoneName": "mSettings", + "depth": 0, + "types": [ + { + "name": "object", + "linkEnabled": false + } + ], + "defaultValue": "" + } + ], + "description": "Constructor for a new TestControl.
Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui5.tooling.test.TestControl(sId?, mSettings?)" + }, + "events": [ + { + "name": "press", + "visibility": "public", + "parameters": [ + { + "name": "oControlEvent", + "type": "sap.ui.base.Event", + "linkEnabled": true + }, + { + "name": "getSource", + "type": "sap.ui.base.EventProvider", + "optional": false, + "depth": 1, + "phoneName": "oControlEvent.getSource", + "linkEnabled": true + }, + { + "name": "getParameters", + "type": "object", + "optional": false, + "depth": 1, + "phoneName": "oControlEvent.getParameters" + } + ], + "description": "
Event is fired when the user clicks the control.
" + } + ], + "methods": [ + { + "name": "attachPress", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
An application-specific payload object that will be passed to the event handler along with the event object when firing the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "fnFunction", + "optional": false, + "description": "The function to be called when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself
Attaches event handler fnFunction to the press event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Event is fired when the user clicks the control.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/attachPress", + "code": "attachPress(oData?, fnFunction, oListener?) : this" + }, + { + "name": "detachPress", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
The function to be called, when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object on which the given function had to be called
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + } + ], + "description": "Detaches event handler fnFunction from the press event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/detachPress", + "code": "detachPress(fnFunction, oListener?) : this" + }, + { + "name": "sap.ui5.tooling.test.TestControl.extend", + "visibility": "public", + "static": true, + "returnValue": { + "type": "function", + "description": "
Created class / constructor function
", + "types": [ + { + "value": "function" + } + ] + }, + "parameters": [ + { + "name": "sClassName", + "optional": false, + "description": "Name of the class being created
", + "types": [ + { + "value": "string" + } + ], + "defaultValue": "" + }, + { + "name": "oClassInfo", + "optional": true, + "description": "Object literal with information about the class
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "FNMetaImpl", + "optional": true, + "description": "Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class
", + "types": [ + { + "value": "function" + } + ], + "defaultValue": "" + } + ], + "description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.
oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.
sap.ui5.tooling.test.TestControl.extend(sClassName, oClassInfo?, FNMetaImpl?) : function" + }, + { + "name": "firePress", + "visibility": "protected", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
Parameters to pass along with the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + } + ], + "description": "Fires event press to attached listeners.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/firePress", + "code": "firePress(mParameters?) : this" + }, + { + "name": "getColor", + "visibility": "public", + "returnValue": { + "type": "sap.ui5.tooling.test.TestEnum", + "description": "
Value of property color
Gets current value of property color.
Property with an Enum
Default value is Red.
getColor() : sap.ui5.tooling.test.TestEnum" + }, + { + "name": "sap.ui5.tooling.test.TestControl.getMetadata", + "visibility": "public", + "static": true, + "returnValue": { + "type": "sap.ui.core.ElementMetadata", + "description": "
Metadata object describing this class
", + "types": [ + { + "value": "sap.ui.core.ElementMetadata", + "href": "api/sap.ui.core.ElementMetadata", + "linkEnabled": true + } + ] + }, + "description": "Returns a metadata object for class sap.ui5.tooling.test.TestControl.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.getMetadata", + "code": "sap.ui5.tooling.test.TestControl.getMetadata() : sap.ui.core.ElementMetadata" + }, + { + "name": "getValue", + "visibility": "public", + "returnValue": { + "type": "int", + "description": "
Value of property value
Gets current value of property value.
Property with type int
Default value is 0.
getValue() : int" + }, + { + "name": "setColor", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
New value for property color
Sets a new value for property color.
Property with an Enum
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Red.
setColor(sColor?) : this" + }, + { + "name": "setValue", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
New value for property value
Sets a new value for property value.
Property with type int
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 0.
setValue(iValue?) : this" + } + ], + "displayName": "sap.ui5.tooling.test.TestControl", + "title": "class sap.ui5.tooling.test.TestControl", + "subTitle": "Deprecated in version: 2.0", + "deprecatedText": "Deprecated as of version 2.0. there's no replacement for this functionality" + }, + { + "kind": "enum", + "name": "sap.ui5.tooling.test.TestEnum", + "basename": "TestEnum", + "resource": "sap/ui5/tooling/test/library.js", + "module": "sap/ui5/tooling/test/library", + "export": "TestEnum", + "static": true, + "visibility": "public", + "description": "
Defines colors
", + "ui5-metadata": { + "stereotype": "enum" + }, + "properties": [ + { + "name": "sap.ui5.tooling.test.TestEnum.Blue", + "visibility": "public", + "description": "Yellow
" + }, + { + "name": "sap.ui5.tooling.test.TestEnum.Red", + "visibility": "public", + "description": "Red
" + } + ], + "displayName": "sap.ui5.tooling.test.TestEnum", + "title": "enum sap.ui5.tooling.test.TestEnum", + "subTitle": "" + }, + { + "name": "sap", + "displayName": "sap", + "kind": "namespace", + "nodes": [ + { + "name": "sap.ui5", + "description": "", + "href": "api/sap.ui5" + } + ], + "title": "namespace sap", + "subTitle": "" + }, + { + "name": "sap.ui5", + "displayName": "sap.ui5", + "kind": "namespace", + "nodes": [ + { + "name": "sap.ui5.tooling", + "description": "", + "href": "api/sap.ui5.tooling" + } + ], + "title": "namespace sap.ui5", + "subTitle": "" + }, + { + "name": "sap.ui5.tooling", + "displayName": "sap.ui5.tooling", + "kind": "namespace", + "nodes": [ + { + "name": "sap.ui5.tooling.test", + "description": "UI5 Tooling Test Library
", + "href": "api/sap.ui5.tooling.test", + "deprecated": true + } + ], + "title": "namespace sap.ui5.tooling", + "subTitle": "" + } + ] + }); + /* eslint-enable max-len */ +}); + +test("Test with docuindex.json reference", async (t) => { + const {sinon, transformApiJson} = t.context; + + const apiJsonPath = "/test-resources/sap/ui5/tooling/test/designtime/api.json"; + const fakeTargetPath = "/ignore/this/path/resource/will/be/returned"; + const dotLibraryPath = "/resources/sap/ui5/tooling/test/.library"; + const dependencyApiJsonPaths = []; + + const readFile = sinon.stub().yieldsAsync(new Error("Not found!")); + + readFile.withArgs("/resources/sap/ui5/tooling/test/.library").yieldsAsync(null, ` + +UI5 Tooling Test Library
", + displayName: "sap.ui5.tooling.test", + export: "", + kind: "namespace", + module: "sap/ui5/tooling/test/library", + name: "sap.ui5.tooling.test", + resource: "sap/ui5/tooling/test/library.js", + since: "1.0.0", + static: true, + subTitle: "Deprecated in version: 2.0.0", + title: "namespace sap.ui5.tooling.test", + visibility: "public", + }, + { + displayName: "sap", + kind: "namespace", + name: "sap", + nodes: [ + { + description: "", + href: "api/sap.ui5", + name: "sap.ui5", + }, + ], + subTitle: "", + title: "namespace sap", + }, + { + displayName: "sap.ui5", + kind: "namespace", + name: "sap.ui5", + nodes: [ + { + description: "", + href: "api/sap.ui5.tooling", + name: "sap.ui5.tooling", + }, + ], + subTitle: "", + title: "namespace sap.ui5", + }, + { + displayName: "sap.ui5.tooling", + kind: "namespace", + name: "sap.ui5.tooling", + nodes: [ + { + deprecated: true, + description: "UI5 Tooling Test Library
", + href: "api/sap.ui5.tooling.test", + name: "sap.ui5.tooling.test", + }, + ], + subTitle: "", + title: "namespace sap.ui5.tooling", + }, + ] + }); }); From 74ac58182d467525ec36bd0d99d4395906787c11 Mon Sep 17 00:00:00 2001 From: Matthias OsswaldThis control is just for UI5 Tooling testing purposes.
", + "href": "api/sap.ui5.tooling.test.TestControl", + } + ], name: "sap.ui5.tooling.test", resource: "sap/ui5/tooling/test/library.js", since: "1.0.0", @@ -1022,6 +1117,133 @@ test("Test with docuindex.json reference", async (t) => { title: "namespace sap.ui5.tooling.test", visibility: "public", }, + { + "kind": "class", + "name": "sap.ui5.tooling.test.TestControl", + "basename": "TestControl", + "resource": "sap/ui5/tooling/test/TestControl.js", + "module": "sap/ui5/tooling/test/TestControl", + "export": "", + "static": true, + "visibility": "public", + "extends": "sap.ui.core.Control", + "description": "This control is just for UI5 Tooling testing purposes.
", + "ui5-metadata": { + "stereotype": "control" + }, + "constructor": { + "visibility": "public", + "parameters": [ + { + "name": "sId", + "optional": true, + "description": "TEST DESCRIPTION
", + "phoneName": "sId", + "depth": 0, + "types": [ + { + "name": "string", + "linkEnabled": false + } + ], + "defaultValue": "" + }, + { + "name": "mSettings", + "optional": true, + "description": "TEST DESCRIPTION
", + "phoneName": "mSettings", + "depth": 0, + "types": [ + { + "name": "object", + "linkEnabled": false + } + ], + "defaultValue": "" + } + ], + "description": "TEST DESCRIPTION
", + "references": [], + "codeExample": "new sap.ui5.tooling.test.TestControl(sId?, mSettings?)" + }, + "methods": [ + { + "name": "sap.ui5.tooling.test.TestControl.extend", + "visibility": "public", + "static": true, + "returnValue": { + "type": "function", + "description": "
TEST DESCRIPTION
", + "types": [ + { + "value": "function" + } + ] + }, + "parameters": [ + { + "name": "sClassName", + "optional": false, + "description": "TEST DESCRIPTION
", + "types": [ + { + "value": "string" + } + ], + "defaultValue": "" + }, + { + "name": "oClassInfo", + "optional": true, + "description": "TEST DESCRIPTION
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "FNMetaImpl", + "optional": true, + "description": "TEST DESCRIPTION
", + "types": [ + { + "value": "function" + } + ], + "defaultValue": "" + } + ], + "description": "TEST DESCRIPTION
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.extend", + "code": "sap.ui5.tooling.test.TestControl.extend(sClassName, oClassInfo?, FNMetaImpl?) : function" + }, + { + "name": "sap.ui5.tooling.test.TestControl.getMetadata", + "visibility": "public", + "static": true, + "returnValue": { + "type": "sap.ui.core.ElementMetadata", + "description": "
TEST DESCRIPTION
", + "types": [ + { + "value": "sap.ui.core.ElementMetadata", + "href": "api/sap.ui.core.ElementMetadata", + "linkEnabled": true + } + ] + }, + "description": "TEST DESCRIPTION
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.getMetadata", + "code": "sap.ui5.tooling.test.TestControl.getMetadata() : sap.ui.core.ElementMetadata" + } + ], + "displayName": "sap.ui5.tooling.test.TestControl", + "title": "class sap.ui5.tooling.test.TestControl", + "subTitle": "", + }, { displayName: "sap", kind: "namespace", @@ -1067,4 +1289,5 @@ test("Test with docuindex.json reference", async (t) => { }, ] }); + /* eslint-enable max-len */ }); From 5aed1e855322f4a35769e2eaf353d877b958d4e9 Mon Sep 17 00:00:00 2001 From: Matthias Osswald
mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description of the syntax of the settings object."
},
"events": [
+ {
+ "name": "change",
+ "visibility": "public",
+ "parameters": [
+ {
+ "name": "oControlEvent",
+ "type": "sap.ui.base.Event",
+ "parameterProperties": {
+ "getSource": {
+ "name": "getSource",
+ "type": "sap.ui.base.EventProvider",
+ "optional": false
+ },
+ "getParameters": {
+ "name": "getParameters",
+ "type": "object",
+ "optional": false,
+ "parameterProperties": {
+ "item": {
+ "name": "item",
+ "type": "sap.ui.core.Control",
+ "optional": false,
+ "description": "Reference to the item"
+ }
+ }
+ }
+ }
+ }
+ ],
+ "description": "Fires when an item is changed."
+ },
{
"name": "press",
"visibility": "public",
@@ -215,6 +297,52 @@ test("Test with library, control, enum", async (t) => {
}
],
"methods": [
+ {
+ "name": "addItem",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "oItem",
+ "type": "sap.ui.core.Control",
+ "optional": false,
+ "description": "The item to add; if empty, nothing is inserted"
+ }
+ ],
+ "description": "Adds some item to the aggregation {@link #getItems items}."
+ },
+ {
+ "name": "attachChange",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "oData",
+ "type": "object",
+ "optional": true,
+ "description": "An application-specific payload object that will be passed to the event handler along with the event object when firing the event"
+ },
+ {
+ "name": "fnFunction",
+ "type": "function(sap.ui.base.Event) : void",
+ "optional": false,
+ "description": "The function to be called when the event occurs"
+ },
+ {
+ "name": "oListener",
+ "type": "object",
+ "optional": true,
+ "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself"
+ }
+ ],
+ "description": "Attaches event handler fnFunction to the {@link #event:change change} event of this sap.ui5.tooling.test.TestControl.\n\nWhen called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.\n\nFires when an item is changed."
+ },
{
"name": "attachPress",
"visibility": "public",
@@ -244,6 +372,38 @@ test("Test with library, control, enum", async (t) => {
],
"description": "Attaches event handler fnFunction to the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nWhen called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.\n\nEvent is fired when the user clicks the control."
},
+ {
+ "name": "destroyItems",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "description": "Destroys all the items in the aggregation {@link #getItems items}."
+ },
+ {
+ "name": "detachChange",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "fnFunction",
+ "type": "function(sap.ui.base.Event) : void",
+ "optional": false,
+ "description": "The function to be called, when the event occurs"
+ },
+ {
+ "name": "oListener",
+ "type": "object",
+ "optional": true,
+ "description": "Context object on which the given function had to be called"
+ }
+ ],
+ "description": "Detaches event handler fnFunction from the {@link #event:change change} event of this sap.ui5.tooling.test.TestControl.\n\nThe passed function and listener object must match the ones used for event registration."
+ },
{
"name": "detachPress",
"visibility": "public",
@@ -297,6 +457,36 @@ test("Test with library, control, enum", async (t) => {
],
"description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.\n\noClassInfo might contain the same kind of information as described in {@link sap.ui.core.Control.extend}."
},
+ {
+ "name": "fancyFunction",
+ "visibility": "public",
+ "description": "Some fancy function"
+ },
+ {
+ "name": "fireChange",
+ "visibility": "protected",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "mParameters",
+ "type": "object",
+ "optional": true,
+ "parameterProperties": {
+ "item": {
+ "name": "item",
+ "type": "sap.ui.core.Control",
+ "optional": true,
+ "description": "Reference to the item"
+ }
+ },
+ "description": "Parameters to pass along with the event"
+ }
+ ],
+ "description": "Fires event {@link #event:change change} to attached listeners."
+ },
{
"name": "firePress",
"visibility": "protected",
@@ -323,6 +513,14 @@ test("Test with library, control, enum", async (t) => {
},
"description": "Gets current value of property {@link #getColor color}.\n\nProperty with an Enum\n\nDefault value is Red."
},
+ {
+ "name": "getItems",
+ "visibility": "public",
+ "returnValue": {
+ "type": "sap.ui.core.Control[]"
+ },
+ "description": "Gets content of aggregation {@link #getItems items}.\n\nItems to be rendered"
+ },
{
"name": "getMetadata",
"visibility": "public",
@@ -333,6 +531,14 @@ test("Test with library, control, enum", async (t) => {
},
"description": "Returns a metadata object for class sap.ui5.tooling.test.TestControl."
},
+ {
+ "name": "getSelectedItem",
+ "visibility": "public",
+ "returnValue": {
+ "type": "sap.ui.core.ID"
+ },
+ "description": "ID of the element which is the current target of the association {@link #getSelectedItem selectedItem}, or null."
+ },
{
"name": "getValue",
"visibility": "public",
@@ -342,6 +548,72 @@ test("Test with library, control, enum", async (t) => {
},
"description": "Gets current value of property {@link #getValue value}.\n\nProperty with type int\n\nDefault value is 0."
},
+ {
+ "name": "indexOfItem",
+ "visibility": "public",
+ "returnValue": {
+ "type": "int",
+ "description": "The index of the provided control in the aggregation if found, or -1 otherwise"
+ },
+ "parameters": [
+ {
+ "name": "oItem",
+ "type": "sap.ui.core.Control",
+ "optional": false,
+ "description": "The item whose index is looked for"
+ }
+ ],
+ "description": "Checks for the provided sap.ui.core.Control in the aggregation {@link #getItems items}. and returns its index if found or -1 otherwise."
+ },
+ {
+ "name": "insertItem",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "oItem",
+ "type": "sap.ui.core.Control",
+ "optional": false,
+ "description": "The item to insert; if empty, nothing is inserted"
+ },
+ {
+ "name": "iIndex",
+ "type": "int",
+ "optional": false,
+ "description": "The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position"
+ }
+ ],
+ "description": "Inserts a item into the aggregation {@link #getItems items}."
+ },
+ {
+ "name": "removeAllItems",
+ "visibility": "public",
+ "returnValue": {
+ "type": "sap.ui.core.Control[]",
+ "description": "An array of the removed elements (might be empty)"
+ },
+ "description": "Removes all the controls from the aggregation {@link #getItems items}.\n\nAdditionally, it unregisters them from the hosting UIArea."
+ },
+ {
+ "name": "removeItem",
+ "visibility": "public",
+ "returnValue": {
+ "type": "sap.ui.core.Control|null",
+ "description": "The removed item or null"
+ },
+ "parameters": [
+ {
+ "name": "vItem",
+ "type": "int|string|sap.ui.core.Control",
+ "optional": false,
+ "description": "The item to remove or its index or id"
+ }
+ ],
+ "description": "Removes a item from the aggregation {@link #getItems items}."
+ },
{
"name": "setColor",
"visibility": "public",
@@ -360,6 +632,23 @@ test("Test with library, control, enum", async (t) => {
],
"description": "Sets a new value for property {@link #getColor color}.\n\nProperty with an Enum\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is Red."
},
+ {
+ "name": "setSelectedItem",
+ "visibility": "public",
+ "returnValue": {
+ "type": "this",
+ "description": "Reference to this in order to allow method chaining"
+ },
+ "parameters": [
+ {
+ "name": "oSelectedItem",
+ "type": "sap.ui.core.ID|sap.ui.core.Control",
+ "optional": false,
+ "description": "ID of an element which becomes the new target of this selectedItem association; alternatively, an element instance may be given"
+ }
+ ],
+ "description": "Sets the associated {@link #getSelectedItem selectedItem}."
+ },
{
"name": "setValue",
"visibility": "public",
@@ -412,7 +701,6 @@ test("Test with library, control, enum", async (t) => {
}
]
}
- /* eslint-enable max-len */
));
const readdir = sinon.stub().yieldsAsync(new Error("Not found!"));
@@ -426,7 +714,6 @@ test("Test with library, control, enum", async (t) => {
}
);
- /* eslint-disable max-len */
t.deepEqual(JSON.parse(apiJsonContent), {
"$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0",
"version": "2.1.0",
@@ -504,7 +791,42 @@ test("Test with library, control, enum", async (t) => {
"setValue"
]
}
- ]
+ ],
+ "aggregations": [
+ {
+ cardinality: "0..n",
+ description: "Items to be rendered
", + linkEnabled: true, + methods: [ + "getItems", + "destroyItems", + "insertItem", + "addItem", + "removeItem", + "indexOfItem", + "removeAllItems", + ], + name: "items", + singularName: "item", + type: "sap.ui.core.Control", + visibility: "public", + }, + ], + "associations": [ + { + cardinality: "0..1", + description: "Selected item
", + linkEnabled: true, + methods: [ + "getSelectedItem", + "setSelectedItem", + ], + name: "selectedItem", + singularName: "selectedItem", + type: "sap.ui.core.Control", + visibility: "public", + }, + ], }, "constructor": { "visibility": "public", @@ -543,6 +865,42 @@ test("Test with library, control, enum", async (t) => { "codeExample": "new sap.ui5.tooling.test.TestControl(sId?, mSettings?)" }, "events": [ + { + "name": "change", + "visibility": "public", + "parameters": [ + { + "name": "oControlEvent", + "type": "sap.ui.base.Event", + "linkEnabled": true + }, + { + "name": "getSource", + "type": "sap.ui.base.EventProvider", + "optional": false, + "depth": 1, + "phoneName": "oControlEvent.getSource", + "linkEnabled": true + }, + { + "name": "getParameters", + "type": "object", + "optional": false, + "depth": 1, + "phoneName": "oControlEvent.getParameters" + }, + { + "name": "item", + "type": "sap.ui.core.Control", + "optional": false, + "description": "
Reference to the item
", + "depth": 2, + "phoneName": "oControlEvent.getParameters.item", + "linkEnabled": true + } + ], + "description": "Fires when an item is changed.
" + }, { "name": "press", "visibility": "public", @@ -573,7 +931,38 @@ test("Test with library, control, enum", async (t) => { ], "methods": [ { - "name": "attachPress", + "name": "addItem", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
The item to add; if empty, nothing is inserted
", + "types": [ + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" + } + ], + "description": "Adds some item to the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/addItem", + "code": "addItem(oItem) : this" + }, + { + "name": "attachChange", "visibility": "public", "returnValue": { "type": "this", @@ -619,9 +1008,116 @@ test("Test with library, control, enum", async (t) => { "defaultValue": "" } ], - "description": "
Attaches event handler fnFunction to the press event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Event is fired when the user clicks the control.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/attachPress", - "code": "attachPress(oData?, fnFunction, oListener?) : this" + "description": "
Attaches event handler fnFunction to the change event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Fires when an item is changed.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/attachChange", + "code": "attachChange(oData?, fnFunction, oListener?) : this" + }, + { + "name": "attachPress", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
An application-specific payload object that will be passed to the event handler along with the event object when firing the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "fnFunction", + "optional": false, + "description": "The function to be called when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself
Attaches event handler fnFunction to the press event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Event is fired when the user clicks the control.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/attachPress", + "code": "attachPress(oData?, fnFunction, oListener?) : this" + }, + { + "name": "destroyItems", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
Destroys all the items in the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/destroyItems", + "code": "destroyItems() : this" + }, + { + "name": "detachChange", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
The function to be called, when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object on which the given function had to be called
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + } + ], + "description": "Detaches event handler fnFunction from the change event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/detachChange", + "code": "detachChange(fnFunction, oListener?) : this" }, { "name": "detachPress", @@ -678,46 +1174,242 @@ test("Test with library, control, enum", async (t) => { }, "parameters": [ { - "name": "sClassName", + "name": "sClassName", + "optional": false, + "description": "
Name of the class being created
", + "types": [ + { + "value": "string" + } + ], + "defaultValue": "" + }, + { + "name": "oClassInfo", + "optional": true, + "description": "Object literal with information about the class
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "FNMetaImpl", + "optional": true, + "description": "Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class
", + "types": [ + { + "value": "function" + } + ], + "defaultValue": "" + } + ], + "description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.
oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.
sap.ui5.tooling.test.TestControl.extend(sClassName, oClassInfo?, FNMetaImpl?) : function" + }, + { + "name": "fancyFunction", + "visibility": "public", + "description": "
Some fancy function
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/fancyFunction", + "code": "fancyFunction() : void" + }, + { + "name": "fireChange", + "visibility": "protected", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
Parameters to pass along with the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "item", + "optional": true, + "description": "Reference to the item
", + "depth": 1, + "types": [ + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "phoneName": "mParameters.item", + "defaultValue": "" + } + ], + "description": "Fires event change to attached listeners.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/fireChange", + "code": "fireChange(mParameters?) : this" + }, + { + "name": "firePress", + "visibility": "protected", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
Parameters to pass along with the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + } + ], + "description": "Fires event press to attached listeners.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/firePress", + "code": "firePress(mParameters?) : this" + }, + { + "name": "getColor", + "visibility": "public", + "returnValue": { + "type": "sap.ui5.tooling.test.TestEnum", + "description": "
Value of property color
Gets current value of property color.
Property with an Enum
Default value is Red.
getColor() : sap.ui5.tooling.test.TestEnum" + }, + { + "name": "getItems", + "visibility": "public", + "returnValue": { + "type": "sap.ui.core.Control[]", + "types": [ + { + "value": "sap.ui.core.Control[]" + } + ], + "description": "" + }, + "description": "
Gets content of aggregation items.
Items to be rendered
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/getItems", + "code": "getItems() : sap.ui.core.Control[]" + }, + { + "name": "sap.ui5.tooling.test.TestControl.getMetadata", + "visibility": "public", + "static": true, + "returnValue": { + "type": "sap.ui.core.ElementMetadata", + "description": "
Metadata object describing this class
", + "types": [ + { + "value": "sap.ui.core.ElementMetadata", + "href": "api/sap.ui.core.ElementMetadata", + "linkEnabled": true + } + ] + }, + "description": "Returns a metadata object for class sap.ui5.tooling.test.TestControl.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.getMetadata", + "code": "sap.ui5.tooling.test.TestControl.getMetadata() : sap.ui.core.ElementMetadata" + }, + { + "name": "getSelectedItem", + "visibility": "public", + "returnValue": { + "type": "sap.ui.core.ID", + "types": [ + { + "value": "sap.ui.core.ID", + "href": "api/sap.ui.core.ID", + "linkEnabled": true + } + ], + "description": "" + }, + "description": "
ID of the element which is the current target of the association selectedItem, or null.
getSelectedItem() : sap.ui.core.ID" + }, + { + "name": "getValue", + "visibility": "public", + "returnValue": { + "type": "int", + "description": "
Value of property value
Gets current value of property value.
Property with type int
Default value is 0.
getValue() : int" + }, + { + "name": "indexOfItem", + "visibility": "public", + "returnValue": { + "type": "int", + "description": "
The index of the provided control in the aggregation if found, or -1 otherwise
", + "types": [ + { + "value": "int" + } + ] + }, + "parameters": [ + { + "name": "oItem", "optional": false, - "description": "Name of the class being created
", - "types": [ - { - "value": "string" - } - ], - "defaultValue": "" - }, - { - "name": "oClassInfo", - "optional": true, - "description": "Object literal with information about the class
", - "types": [ - { - "value": "object" - } - ], - "defaultValue": "" - }, - { - "name": "FNMetaImpl", - "optional": true, - "description": "Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class
", + "description": "The item whose index is looked for
", "types": [ { - "value": "function" + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" } ], "defaultValue": "" } ], - "description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.
oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.
sap.ui5.tooling.test.TestControl.extend(sClassName, oClassInfo?, FNMetaImpl?) : function" + "description": "
Checks for the provided sap.ui.core.Control in the aggregation items. and returns its index if found or -1 otherwise.
indexOfItem(oItem) : int" }, { - "name": "firePress", - "visibility": "protected", + "name": "insertItem", + "visibility": "public", "returnValue": { "type": "this", "description": "
Reference to this in order to allow method chaining
Parameters to pass along with the event
", + "name": "oItem", + "optional": false, + "description": "The item to insert; if empty, nothing is inserted
", "types": [ { - "value": "object" + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" + }, + { + "name": "iIndex", + "optional": false, + "description": "The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
Fires event press to attached listeners.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/firePress", - "code": "firePress(mParameters?) : this" + "description": "
Inserts a item into the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/insertItem", + "code": "insertItem(oItem, iIndex) : this" }, { - "name": "getColor", + "name": "removeAllItems", "visibility": "public", "returnValue": { - "type": "sap.ui5.tooling.test.TestEnum", - "description": "
Value of property color
An array of the removed elements (might be empty)
", "types": [ { - "value": "sap.ui5.tooling.test.TestEnum" + "value": "sap.ui.core.Control[]" } ] }, - "description": "Gets current value of property color.
Property with an Enum
Default value is Red.
getColor() : sap.ui5.tooling.test.TestEnum" + "description": "
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/removeAllItems", + "code": "removeAllItems() : sap.ui.core.Control[]" }, { - "name": "sap.ui5.tooling.test.TestControl.getMetadata", + "name": "removeItem", "visibility": "public", - "static": true, "returnValue": { - "type": "sap.ui.core.ElementMetadata", - "description": "
Metadata object describing this class
", + "type": "sap.ui.core.Control|null", + "description": "The removed item or null
Returns a metadata object for class sap.ui5.tooling.test.TestControl.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.getMetadata", - "code": "sap.ui5.tooling.test.TestControl.getMetadata() : sap.ui.core.ElementMetadata" - }, - { - "name": "getValue", - "visibility": "public", - "returnValue": { - "type": "int", - "description": "
Value of property value
Gets current value of property value.
Property with type int
Default value is 0.
getValue() : int" + "parameters": [ + { + "name": "vItem", + "optional": false, + "description": "
The item to remove or its index or id
", + "types": [ + { + "value": "int" + }, + { + "value": "string" + }, + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" + } + ], + "description": "Removes a item from the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/removeItem", + "code": "removeItem(vItem) : sap.ui.core.Control|null" }, { "name": "setColor", @@ -824,6 +1536,42 @@ test("Test with library, control, enum", async (t) => { "href": "api/sap.ui5.tooling.test.TestControl#methods/setColor", "code": "
setColor(sColor?) : this" }, + { + "name": "setSelectedItem", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
ID of an element which becomes the new target of this selectedItem association; alternatively, an element instance may be given
", + "types": [ + { + "value": "sap.ui.core.ID", + "linkEnabled": true, + "href": "api/sap.ui.core.ID" + }, + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" + } + ], + "description": "Sets the associated selectedItem.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/setSelectedItem", + "code": "setSelectedItem(oSelectedItem) : this" + }, { "name": "setValue", "visibility": "public", @@ -933,10 +1681,9 @@ test("Test with library, control, enum", async (t) => { } ] }); - /* eslint-enable max-len */ }); -test("Test with docuindex.json reference", async (t) => { +test(".library with docuindex.json reference", async (t) => { const {sinon, transformApiJson} = t.context; const apiJsonPath = "/test-resources/sap/ui5/tooling/test/designtime/api.json"; @@ -1088,7 +1835,6 @@ test("Test with docuindex.json reference", async (t) => { } ); - /* eslint-disable max-len */ t.deepEqual(JSON.parse(apiJsonContent), { "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", "version": "2.1.0", @@ -1289,5 +2035,171 @@ test("Test with docuindex.json reference", async (t) => { }, ] }); - /* eslint-enable max-len */ +}); + +test(".library with
UI5 Tooling Test Library
", + displayName: "sap.ui5.tooling.test", + export: "", + kind: "namespace", + module: "sap/ui5/tooling/test/library", + name: "sap.ui5.tooling.test", + nodes: [ + { + description: "UI5 Tooling Test Library - Extension
", + href: "api/sap.ui5.tooling.test.ext", + name: "sap.ui5.tooling.test.ext", + } + ], + resource: "sap/ui5/tooling/test/library.js", + static: true, + subTitle: "", + title: "namespace sap.ui5.tooling.test", + visibility: "public", + }, + { + basename: "ext", + component: "UI5-TOOLING-EXT", + description: "UI5 Tooling Test Library - Extension
", + displayName: "sap.ui5.tooling.test.ext", + export: "", + kind: "namespace", + module: "sap/ui5/tooling/test/ext/ext", + name: "sap.ui5.tooling.test.ext", + resource: "sap/ui5/tooling/test/ext/ext.js", + static: true, + subTitle: "", + title: "namespace sap.ui5.tooling.test.ext", + visibility: "public", + }, + { + displayName: "sap", + kind: "namespace", + name: "sap", + nodes: [ + { + description: "", + href: "api/sap.ui5", + name: "sap.ui5", + }, + ], + subTitle: "", + title: "namespace sap", + }, + { + displayName: "sap.ui5", + kind: "namespace", + name: "sap.ui5", + nodes: [ + { + description: "", + href: "api/sap.ui5.tooling", + name: "sap.ui5.tooling", + }, + ], + subTitle: "", + title: "namespace sap.ui5", + }, + { + displayName: "sap.ui5.tooling", + kind: "namespace", + name: "sap.ui5.tooling", + nodes: [ + { + description: "UI5 Tooling Test Library
", + href: "api/sap.ui5.tooling.test", + name: "sap.ui5.tooling.test", + }, + ], + subTitle: "", + title: "namespace sap.ui5.tooling", + }, + ] + }); }); From 40b669fbae9a7f4af03bc72ba8ad200cdfad2849 Mon Sep 17 00:00:00 2001 From: Matthias Osswaldthis in order to allow method chaining"
@@ -370,7 +475,10 @@ test("Test with library, control, enum", async (t) => {
"description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself"
}
],
- "description": "Attaches event handler fnFunction to the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nWhen called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.\n\nEvent is fired when the user clicks the control."
+ "description": "Attaches event handler fnFunction to the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nWhen called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.\n\nEvent is fired when the user clicks the control.",
+ "deprecated": {
+ "since": "2.0"
+ }
},
{
"name": "destroyItems",
@@ -384,6 +492,7 @@ test("Test with library, control, enum", async (t) => {
{
"name": "detachChange",
"visibility": "public",
+ "since": "1.4",
"returnValue": {
"type": "this",
"description": "Reference to this in order to allow method chaining"
@@ -425,7 +534,10 @@ test("Test with library, control, enum", async (t) => {
"description": "Context object on which the given function had to be called"
}
],
- "description": "Detaches event handler fnFunction from the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nThe passed function and listener object must match the ones used for event registration."
+ "description": "Detaches event handler fnFunction from the {@link #event:press press} event of this sap.ui5.tooling.test.TestControl.\n\nThe passed function and listener object must match the ones used for event registration.",
+ "deprecated": {
+ "since": "2.0"
+ }
},
{
"name": "extend",
@@ -460,11 +572,21 @@ test("Test with library, control, enum", async (t) => {
{
"name": "fancyFunction",
"visibility": "public",
- "description": "Some fancy function"
+ "throws": [
+ {
+ "type": "Error",
+ "description": "In case something bad happens"
+ }
+ ],
+ "description": "Some fancy function",
+ "deprecated": {
+ "since": "2.0"
+ }
},
{
"name": "fireChange",
"visibility": "protected",
+ "since": "1.4",
"returnValue": {
"type": "this",
"description": "Reference to this in order to allow method chaining"
@@ -502,7 +624,10 @@ test("Test with library, control, enum", async (t) => {
"description": "Parameters to pass along with the event"
}
],
- "description": "Fires event {@link #event:press press} to attached listeners."
+ "description": "Fires event {@link #event:press press} to attached listeners.",
+ "deprecated": {
+ "since": "2.0"
+ }
},
{
"name": "getColor",
@@ -546,7 +671,10 @@ test("Test with library, control, enum", async (t) => {
"type": "int",
"description": "Value of property value"
},
- "description": "Gets current value of property {@link #getValue value}.\n\nProperty with type int\n\nDefault value is 0."
+ "description": "Gets current value of property {@link #getValue value}.\n\nProperty with type int\n\nDefault value is 0.",
+ "deprecated": {
+ "since": "2.0"
+ }
},
{
"name": "indexOfItem",
@@ -665,7 +793,10 @@ test("Test with library, control, enum", async (t) => {
"description": "New value for property value"
}
],
- "description": "Sets a new value for property {@link #getValue value}.\n\nProperty with type int\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is 0."
+ "description": "Sets a new value for property {@link #getValue value}.\n\nProperty with type int\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is 0.",
+ "deprecated": {
+ "since": "2.0"
+ }
}
]
},
@@ -765,6 +896,14 @@ test("Test with library, control, enum", async (t) => {
},
"ui5-metadata": {
"stereotype": "control",
+ "specialSettings": [
+ {
+ "name": "specialControlData",
+ "type": "any",
+ "visibility": "public",
+ "description": ""
+ }
+ ],
"properties": [
{
"name": "color",
@@ -789,44 +928,45 @@ test("Test with library, control, enum", async (t) => {
"methods": [
"getValue",
"setValue"
- ]
+ ],
+ "deprecatedText": "Deprecated as of version 2.0"
}
],
"aggregations": [
{
- cardinality: "0..n",
- description: "Items to be rendered
", - linkEnabled: true, - methods: [ + "name": "items", + "singularName": "item", + "type": "sap.ui.core.Control", + "cardinality": "0..n", + "visibility": "public", + "description": "Items to be rendered
", + "methods": [ "getItems", "destroyItems", "insertItem", "addItem", "removeItem", "indexOfItem", - "removeAllItems", + "removeAllItems" ], - name: "items", - singularName: "item", - type: "sap.ui.core.Control", - visibility: "public", - }, + "linkEnabled": true + } ], "associations": [ { - cardinality: "0..1", - description: "Selected item
", - linkEnabled: true, - methods: [ + "name": "selectedItem", + "singularName": "selectedItem", + "type": "sap.ui.core.Control", + "cardinality": "0..1", + "visibility": "public", + "description": "Selected item
", + "methods": [ "getSelectedItem", - "setSelectedItem", + "setSelectedItem" ], - name: "selectedItem", - singularName: "selectedItem", - type: "sap.ui.core.Control", - visibility: "public", - }, - ], + "linkEnabled": true + } + ] }, "constructor": { "visibility": "public", @@ -868,6 +1008,7 @@ test("Test with library, control, enum", async (t) => { { "name": "change", "visibility": "public", + "since": "1.4", "parameters": [ { "name": "oControlEvent", @@ -899,7 +1040,7 @@ test("Test with library, control, enum", async (t) => { "linkEnabled": true } ], - "description": "Fires when an item is changed.
" + "description": "Fires when an item is changed.
Since: 1.4.
Event is fired when the user clicks the control.
" + "description": "Event is fired when the user clicks the control.
", + "deprecated": { + "since": "2.0" + }, + "deprecatedText": "Deprecated as of version 2.0" } ], "methods": [ @@ -964,6 +1109,7 @@ test("Test with library, control, enum", async (t) => { { "name": "attachChange", "visibility": "public", + "since": "1.4", "returnValue": { "type": "this", "description": "Reference to this in order to allow method chaining
Attaches event handler fnFunction to the press event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Event is fired when the user clicks the control.
", + "deprecated": { + "since": "2.0" + }, "href": "api/sap.ui5.tooling.test.TestControl#methods/attachPress", + "deprecatedText": "Deprecated as of version 2.0", "code": "attachPress(oData?, fnFunction, oListener?) : this" }, { @@ -1082,6 +1232,7 @@ test("Test with library, control, enum", async (t) => { { "name": "detachChange", "visibility": "public", + "since": "1.4", "returnValue": { "type": "this", "description": "
Reference to this in order to allow method chaining
Detaches event handler fnFunction from the press event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", + "deprecated": { + "since": "2.0" + }, "href": "api/sap.ui5.tooling.test.TestControl#methods/detachPress", + "deprecatedText": "Deprecated as of version 2.0", "code": "detachPress(fnFunction, oListener?) : this" }, { @@ -1214,13 +1369,25 @@ test("Test with library, control, enum", async (t) => { { "name": "fancyFunction", "visibility": "public", + "throws": [ + { + "type": "Error", + "description": "
In case something bad happens
", + "linkEnabled": false + } + ], "description": "Some fancy function
", + "deprecated": { + "since": "2.0" + }, "href": "api/sap.ui5.tooling.test.TestControl#methods/fancyFunction", + "deprecatedText": "Deprecated as of version 2.0", "code": "fancyFunction() : void" }, { "name": "fireChange", "visibility": "protected", + "since": "1.4", "returnValue": { "type": "this", "description": "
Reference to this in order to allow method chaining
Fires event press to attached listeners.
", + "deprecated": { + "since": "2.0" + }, "href": "api/sap.ui5.tooling.test.TestControl#methods/firePress", + "deprecatedText": "Deprecated as of version 2.0", "code": "firePress(mParameters?) : this" }, { @@ -1373,7 +1544,11 @@ test("Test with library, control, enum", async (t) => { ] }, "description": "
Gets current value of property value.
Property with type int
Default value is 0.
getValue() : int" }, { @@ -1598,7 +1773,11 @@ test("Test with library, control, enum", async (t) => { } ], "description": "
Sets a new value for property value.
Property with type int
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 0.
setValue(iValue?) : this" } ], From 526a97799c998ec97ac037679e52c1fc4a4622b0 Mon Sep 17 00:00:00 2001 From: Matthias Osswald
mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description of the syntax of the settings object."
+ "throws": [
+ {
+ "type": "Error",
+ "description": "In case something bad happens"
+ }
+ ],
+ "description": "Constructor for a new TestControl.\n\nAccepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See {@link sap.ui.base.ManagedObject#constructor} for a general description of the syntax of the settings object.",
+ "examples": [
+ {
+ "text": "new TestControl();"
+ }
+ ]
},
"events": [
{
@@ -365,6 +383,12 @@ test("Test with library, control, enum", async (t) => {
"type": "sap.ui.core.Control",
"optional": false,
"description": "Reference to the item"
+ },
+ "pressed": {
+ "name": "pressed",
+ "type": "boolean",
+ "optional": false,
+ "description": "Whether pressed"
}
}
}
@@ -578,7 +602,7 @@ test("Test with library, control, enum", async (t) => {
"description": "In case something bad happens"
}
],
- "description": "Some fancy function",
+ "description": "Some fancy function.\n\nSome links: {@link https://openui5.org OpenUI5} {@link demo:foo} {@link sap.ui.core.Control.prototype.placeAt} {@link sap.m.Button#event:press} {@link sap.m.Button#setText} {@link fiori:/flexible-column-layout/ Flexible Column Layout} {@link topic:59a0e11712e84a648bb990a1dba76bc7 Link text} {@link module:sap/ui/comp/smartfield/SmartField#annotation:TextArrangement TextArrangement}",
"deprecated": {
"since": "2.0"
}
@@ -602,6 +626,12 @@ test("Test with library, control, enum", async (t) => {
"type": "sap.ui.core.Control",
"optional": true,
"description": "Reference to the item"
+ },
+ "pressed": {
+ "name": "pressed",
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether pressed"
}
},
"description": "Parameters to pass along with the event"
@@ -668,10 +698,10 @@ test("Test with library, control, enum", async (t) => {
"name": "getValue",
"visibility": "public",
"returnValue": {
- "type": "int",
+ "type": "string",
"description": "Value of property value"
},
- "description": "Gets current value of property {@link #getValue value}.\n\nProperty with type int\n\nDefault value is 0.",
+ "description": "Gets current value of property {@link #getValue value}.\n\nProperty with type string\n\nDefault value is empty string.",
"deprecated": {
"since": "2.0"
}
@@ -786,14 +816,14 @@ test("Test with library, control, enum", async (t) => {
},
"parameters": [
{
- "name": "iValue",
- "type": "int",
+ "name": "sValue",
+ "type": "string",
"optional": true,
- "defaultValue": 0,
+ "defaultValue": "\"\"",
"description": "New value for property value"
}
],
- "description": "Sets a new value for property {@link #getValue value}.\n\nProperty with type int\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is 0.",
+ "description": "Sets a new value for property {@link #getValue value}.\n\nProperty with type string\n\nWhen called with a value of null or undefined, the default value of the property will be restored.\n\nDefault value is empty string.",
"deprecated": {
"since": "2.0"
}
@@ -845,1021 +875,1059 @@ test("Test with library, control, enum", async (t) => {
}
);
- t.deepEqual(JSON.parse(apiJsonContent), {
- "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0",
- "version": "2.1.0",
- "library": "sap.ui5.tooling.test",
- "symbols": [
- {
- "kind": "namespace",
- "name": "sap.ui5.tooling.test",
- "basename": "test",
- "resource": "sap/ui5/tooling/test/library.js",
- "module": "sap/ui5/tooling/test/library",
- "export": "",
- "static": true,
- "visibility": "public",
- "since": "1.0.0",
- "description": "UI5 Tooling Test Library
", - "displayName": "sap.ui5.tooling.test", - "nodes": [ - { - "name": "sap.ui5.tooling.test.TestControl", - "description": "This control is just for UI5 Tooling testing purposes.
", - "href": "api/sap.ui5.tooling.test.TestControl", - "deprecated": true - }, - { - "name": "sap.ui5.tooling.test.TestEnum", - "description": "Defines colors
", - "href": "api/sap.ui5.tooling.test.TestEnum" - } - ], - "title": "namespace sap.ui5.tooling.test", - "subTitle": "Deprecated in version: 2.0.0", - "deprecatedText": "Deprecated as of version 2.0.0" - }, - { - "kind": "class", - "name": "sap.ui5.tooling.test.TestControl", - "basename": "TestControl", - "resource": "sap/ui5/tooling/test/TestControl.js", - "module": "sap/ui5/tooling/test/TestControl", - "export": "", - "static": true, - "visibility": "public", - "extends": "sap.ui.core.Control", - "description": "This control is just for UI5 Tooling testing purposes.
", - "experimental": { - "since": "1.4", - "text": "The API may change. Use with care." - }, - "ui5-metadata": { - "stereotype": "control", - "specialSettings": [ - { - "name": "specialControlData", - "type": "any", - "visibility": "public", - "description": "" - } - ], - "properties": [ - { - "name": "color", - "type": "sap.ui5.tooling.test.TestEnum", - "defaultValue": "Red", - "group": "Misc", - "visibility": "public", - "description": "Property with an Enum
", - "methods": [ - "getColor", - "setColor" - ], - "linkEnabled": true - }, - { - "name": "value", - "type": "int", - "defaultValue": 0, - "group": "Misc", - "visibility": "public", - "description": "Property with type int
", - "methods": [ - "getValue", - "setValue" - ], - "deprecatedText": "Deprecated as of version 2.0" - } - ], - "aggregations": [ - { - "name": "items", - "singularName": "item", - "type": "sap.ui.core.Control", - "cardinality": "0..n", - "visibility": "public", - "description": "Items to be rendered
", - "methods": [ - "getItems", - "destroyItems", - "insertItem", - "addItem", - "removeItem", - "indexOfItem", - "removeAllItems" - ], - "linkEnabled": true - } - ], - "associations": [ - { - "name": "selectedItem", - "singularName": "selectedItem", - "type": "sap.ui.core.Control", - "cardinality": "0..1", - "visibility": "public", - "description": "Selected item
", - "methods": [ - "getSelectedItem", - "setSelectedItem" - ], - "linkEnabled": true - } - ] - }, - "constructor": { + t.deepEqual(JSON.parse(apiJsonContent), + { + "$schema-ref": "http://schemas.sap.com/sapui5/designtime/api.json/1.0", + "version": "2.1.0", + "library": "sap.ui5.tooling.test", + "symbols": [ + { + "kind": "namespace", + "name": "sap.ui5.tooling.test", + "basename": "test", + "resource": "sap/ui5/tooling/test/library.js", + "module": "sap/ui5/tooling/test/library", + "export": "", + "static": true, "visibility": "public", - "parameters": [ + "since": "1.0.0", + "description": "UI5 Tooling Test Library
", + "displayName": "sap.ui5.tooling.test", + "nodes": [ { - "name": "sId", - "optional": true, - "description": "id for the new control, generated automatically if no id is given
", - "phoneName": "sId", - "depth": 0, - "types": [ - { - "name": "string", - "linkEnabled": false - } - ], - "defaultValue": "" + "name": "sap.ui5.tooling.test.TestControl", + "description": "This control is just for UI5 Tooling testing purposes.
", + "href": "api/sap.ui5.tooling.test.TestControl", + "deprecated": true }, { - "name": "mSettings", - "optional": true, - "description": "initial settings for the new control
", - "phoneName": "mSettings", - "depth": 0, - "types": [ - { - "name": "object", - "linkEnabled": false - } - ], - "defaultValue": "" + "name": "sap.ui5.tooling.test.TestEnum", + "description": "Defines colors
", + "href": "api/sap.ui5.tooling.test.TestEnum" } ], - "description": "Constructor for a new TestControl.
Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui5.tooling.test.TestControl(sId?, mSettings?)" + "title": "namespace sap.ui5.tooling.test", + "subTitle": "Deprecated in version: 2.0.0", + "deprecatedText": "Deprecated as of version 2.0.0" }, - "events": [ - { - "name": "change", - "visibility": "public", + { + "kind": "class", + "name": "sap.ui5.tooling.test.TestControl", + "basename": "TestControl", + "resource": "sap/ui5/tooling/test/TestControl.js", + "module": "sap/ui5/tooling/test/TestControl", + "export": "", + "static": true, + "visibility": "public", + "extends": "sap.ui.core.Control", + "description": "
This control is just for UI5 Tooling testing purposes.
", + "experimental": { "since": "1.4", - "parameters": [ + "text": "The API may change. Use with care." + }, + "ui5-metadata": { + "stereotype": "control", + "specialSettings": [ { - "name": "oControlEvent", - "type": "sap.ui.base.Event", - "linkEnabled": true - }, + "name": "specialControlData", + "type": "any", + "visibility": "public", + "description": "" + } + ], + "properties": [ { - "name": "getSource", - "type": "sap.ui.base.EventProvider", - "optional": false, - "depth": 1, - "phoneName": "oControlEvent.getSource", + "name": "color", + "type": "sap.ui5.tooling.test.TestEnum", + "defaultValue": "Red", + "group": "Misc", + "visibility": "public", + "description": "Property with an Enum
", + "methods": [ + "getColor", + "setColor" + ], "linkEnabled": true }, { - "name": "getParameters", - "type": "object", - "optional": false, - "depth": 1, - "phoneName": "oControlEvent.getParameters" - }, - { - "name": "item", - "type": "sap.ui.core.Control", - "optional": false, - "description": "Reference to the item
", - "depth": 2, - "phoneName": "oControlEvent.getParameters.item", - "linkEnabled": true + "name": "value", + "type": "string", + "defaultValue": "empty string", + "group": "Misc", + "visibility": "public", + "description": "Property with type string
", + "methods": [ + "getValue", + "setValue" + ], + "deprecatedText": "Deprecated as of version 2.0" } ], - "description": "Fires when an item is changed.
Since: 1.4.
Items to be rendered
", + "methods": [ + "getItems", + "destroyItems", + "insertItem", + "addItem", + "removeItem", + "indexOfItem", + "removeAllItems" + ], "linkEnabled": true - }, - { - "name": "getParameters", - "type": "object", - "optional": false, - "depth": 1, - "phoneName": "oControlEvent.getParameters" } ], - "description": "Event is fired when the user clicks the control.
", - "deprecated": { - "since": "2.0" - }, - "deprecatedText": "Deprecated as of version 2.0" - } - ], - "methods": [ - { - "name": "addItem", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "Reference to this in order to allow method chaining
The item to add; if empty, nothing is inserted
", - "types": [ - { - "value": "sap.ui.core.Control", - "linkEnabled": true, - "href": "api/sap.ui.core.Control" - } + "name": "selectedItem", + "singularName": "selectedItem", + "type": "sap.ui.core.Control", + "cardinality": "0..1", + "visibility": "public", + "description": "Selected item
", + "methods": [ + "getSelectedItem", + "setSelectedItem" ], - "defaultValue": "" + "linkEnabled": true } - ], - "description": "Adds some item to the aggregation items.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/addItem", - "code": "addItem(oItem) : this" + ] }, - { - "name": "attachChange", + "constructor": { "visibility": "public", - "since": "1.4", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
An application-specific payload object that will be passed to the event handler along with the event object when firing the event
", - "types": [ - { - "value": "object" - } - ], - "defaultValue": "" - }, - { - "name": "fnFunction", - "optional": false, - "description": "The function to be called when the event occurs
", + "description": "id for the new control, generated automatically if no id is given
", + "phoneName": "sId", + "depth": 0, "types": [ { - "value": "function(sap.ui.base.Event) : void" + "name": "string", + "linkEnabled": false } ], "defaultValue": "" }, { - "name": "oListener", + "name": "mSettings", "optional": true, - "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself
initial settings for the new control
", + "phoneName": "mSettings", + "depth": 0, "types": [ { - "value": "object" + "name": "object", + "linkEnabled": false } ], "defaultValue": "" } ], - "description": "Attaches event handler fnFunction to the change event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Fires when an item is changed.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/attachChange", - "code": "attachChange(oData?, fnFunction, oListener?) : this" + "throws": [ + { + "type": "Error", + "description": "
In case something bad happens
", + "linkEnabled": false + } + ], + "description": "Constructor for a new TestControl.
Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
Example: new TestControl();
new sap.ui5.tooling.test.TestControl(sId?, mSettings?)" }, - { - "name": "attachPress", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
Reference to the item
Since: 1.4.
Whether pressed
", + "deprecated": {}, + "depth": 2, + "phoneName": "oControlEvent.getParameters.pressed", + "deprecatedText": "Deprecated" } - ] + ], + "description": "Fires when an item is changed.
Since: 1.4.
An application-specific payload object that will be passed to the event handler along with the event object when firing the event
", - "types": [ - { - "value": "object" - } - ], - "defaultValue": "" + { + "name": "press", + "visibility": "public", + "parameters": [ + { + "name": "oControlEvent", + "type": "sap.ui.base.Event", + "linkEnabled": true + }, + { + "name": "getSource", + "type": "sap.ui.base.EventProvider", + "optional": false, + "depth": 1, + "phoneName": "oControlEvent.getSource", + "linkEnabled": true + }, + { + "name": "getParameters", + "type": "object", + "optional": false, + "depth": 1, + "phoneName": "oControlEvent.getParameters" + } + ], + "description": "Event is fired when the user clicks the control.
", + "deprecated": { + "since": "2.0" }, - { - "name": "fnFunction", - "optional": false, - "description": "The function to be called when the event occurs
", + "deprecatedText": "Deprecated as of version 2.0" + } + ], + "methods": [ + { + "name": "addItem", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself
Attaches event handler fnFunction to the press event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Event is fired when the user clicks the control.
", - "deprecated": { - "since": "2.0" - }, - "href": "api/sap.ui5.tooling.test.TestControl#methods/attachPress", - "deprecatedText": "Deprecated as of version 2.0", - "code": "attachPress(oData?, fnFunction, oListener?) : this" - }, - { - "name": "destroyItems", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
Destroys all the items in the aggregation items.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/destroyItems", - "code": "destroyItems() : this" - }, - { - "name": "detachChange", - "visibility": "public", - "since": "1.4", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
The item to add; if empty, nothing is inserted
", + "types": [ + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" } - ] + ], + "description": "Adds some item to the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/addItem", + "code": "addItem(oItem) : this" }, - "parameters": [ - { - "name": "fnFunction", - "optional": false, - "description": "
The function to be called, when the event occurs
", + { + "name": "attachChange", + "visibility": "public", + "since": "1.4", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
Context object on which the given function had to be called
", - "types": [ - { - "value": "object" - } - ], - "defaultValue": "" - } - ], - "description": "Detaches event handler fnFunction from the change event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/detachChange", - "code": "detachChange(fnFunction, oListener?) : this" - }, - { - "name": "detachPress", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
An application-specific payload object that will be passed to the event handler along with the event object when firing the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, { - "value": "this" + "name": "fnFunction", + "optional": false, + "description": "The function to be called when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself
Attaches event handler fnFunction to the change event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Fires when an item is changed.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/attachChange", + "code": "attachChange(oData?, fnFunction, oListener?) : this" }, - "parameters": [ - { - "name": "fnFunction", - "optional": false, - "description": "
The function to be called, when the event occurs
", + { + "name": "attachPress", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
Context object on which the given function had to be called
", - "types": [ - { - "value": "object" - } - ], - "defaultValue": "" - } - ], - "description": "Detaches event handler fnFunction from the press event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", - "deprecated": { - "since": "2.0" - }, - "href": "api/sap.ui5.tooling.test.TestControl#methods/detachPress", - "deprecatedText": "Deprecated as of version 2.0", - "code": "detachPress(fnFunction, oListener?) : this" - }, - { - "name": "sap.ui5.tooling.test.TestControl.extend", - "visibility": "public", - "static": true, - "returnValue": { - "type": "function", - "description": "
Created class / constructor function
", - "types": [ + "parameters": [ { - "value": "function" + "name": "oData", + "optional": true, + "description": "An application-specific payload object that will be passed to the event handler along with the event object when firing the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "fnFunction", + "optional": false, + "description": "The function to be called when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object to call the event handler with. Defaults to this sap.ui5.tooling.test.TestControl itself
Attaches event handler fnFunction to the press event of this sap.ui5.tooling.test.TestControl.
When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui5.tooling.test.TestControl itself.
Event is fired when the user clicks the control.
", + "deprecated": { + "since": "2.0" + }, + "href": "api/sap.ui5.tooling.test.TestControl#methods/attachPress", + "deprecatedText": "Deprecated as of version 2.0", + "code": "attachPress(oData?, fnFunction, oListener?) : this" }, - "parameters": [ - { - "name": "sClassName", - "optional": false, - "description": "
Name of the class being created
", + { + "name": "destroyItems", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
Object literal with information about the class
", + "description": "Destroys all the items in the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/destroyItems", + "code": "destroyItems() : this" + }, + { + "name": "detachChange", + "visibility": "public", + "since": "1.4", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class
", - "types": [ - { - "value": "function" - } - ], - "defaultValue": "" - } - ], - "description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.
oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.
sap.ui5.tooling.test.TestControl.extend(sClassName, oClassInfo?, FNMetaImpl?) : function" - }, - { - "name": "fancyFunction", - "visibility": "public", - "throws": [ - { - "type": "Error", - "description": "
In case something bad happens
", - "linkEnabled": false - } - ], - "description": "Some fancy function
", - "deprecated": { - "since": "2.0" - }, - "href": "api/sap.ui5.tooling.test.TestControl#methods/fancyFunction", - "deprecatedText": "Deprecated as of version 2.0", - "code": "fancyFunction() : void" - }, - { - "name": "fireChange", - "visibility": "protected", - "since": "1.4", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
The function to be called, when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, { - "value": "this" + "name": "oListener", + "optional": true, + "description": "Context object on which the given function had to be called
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" } - ] + ], + "description": "Detaches event handler fnFunction from the change event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/detachChange", + "code": "detachChange(fnFunction, oListener?) : this" }, - "parameters": [ - { - "name": "mParameters", - "optional": true, - "description": "
Parameters to pass along with the event
", + { + "name": "detachPress", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
Reference to the item
", - "depth": 1, - "types": [ - { - "value": "sap.ui.core.Control", - "linkEnabled": true, - "href": "api/sap.ui.core.Control" - } - ], - "phoneName": "mParameters.item", - "defaultValue": "" - } - ], - "description": "Fires event change to attached listeners.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/fireChange", - "code": "fireChange(mParameters?) : this" - }, - { - "name": "firePress", - "visibility": "protected", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
The function to be called, when the event occurs
", + "types": [ + { + "value": "function(sap.ui.base.Event) : void" + } + ], + "defaultValue": "" + }, + { + "name": "oListener", + "optional": true, + "description": "Context object on which the given function had to be called
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" } - ] + ], + "description": "Detaches event handler fnFunction from the press event of this sap.ui5.tooling.test.TestControl.
The passed function and listener object must match the ones used for event registration.
", + "deprecated": { + "since": "2.0" + }, + "href": "api/sap.ui5.tooling.test.TestControl#methods/detachPress", + "deprecatedText": "Deprecated as of version 2.0", + "code": "detachPress(fnFunction, oListener?) : this" }, - "parameters": [ - { - "name": "mParameters", - "optional": true, - "description": "
Parameters to pass along with the event
", + { + "name": "sap.ui5.tooling.test.TestControl.extend", + "visibility": "public", + "static": true, + "returnValue": { + "type": "function", + "description": "Created class / constructor function
", "types": [ { - "value": "object" + "value": "function" } - ], - "defaultValue": "" - } - ], - "description": "Fires event press to attached listeners.
", - "deprecated": { - "since": "2.0" - }, - "href": "api/sap.ui5.tooling.test.TestControl#methods/firePress", - "deprecatedText": "Deprecated as of version 2.0", - "code": "firePress(mParameters?) : this" - }, - { - "name": "getColor", - "visibility": "public", - "returnValue": { - "type": "sap.ui5.tooling.test.TestEnum", - "description": "
Value of property color
Gets current value of property color.
Property with an Enum
Default value is Red.
getColor() : sap.ui5.tooling.test.TestEnum" - }, - { - "name": "getItems", - "visibility": "public", - "returnValue": { - "type": "sap.ui.core.Control[]", - "types": [ + "name": "sClassName", + "optional": false, + "description": "
Name of the class being created
", + "types": [ + { + "value": "string" + } + ], + "defaultValue": "" + }, + { + "name": "oClassInfo", + "optional": true, + "description": "Object literal with information about the class
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, { - "value": "sap.ui.core.Control[]" + "name": "FNMetaImpl", + "optional": true, + "description": "Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class
", + "types": [ + { + "value": "function" + } + ], + "defaultValue": "" } ], - "description": "" + "description": "Creates a new subclass of class sap.ui5.tooling.test.TestControl with name sClassName and enriches it with the information contained in oClassInfo.
oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.
sap.ui5.tooling.test.TestControl.extend(sClassName, oClassInfo?, FNMetaImpl?) : function" }, - "description": "
Gets content of aggregation items.
Items to be rendered
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/getItems", - "code": "getItems() : sap.ui.core.Control[]" - }, - { - "name": "sap.ui5.tooling.test.TestControl.getMetadata", - "visibility": "public", - "static": true, - "returnValue": { - "type": "sap.ui.core.ElementMetadata", - "description": "
Metadata object describing this class
", - "types": [ + { + "name": "fancyFunction", + "visibility": "public", + "throws": [ { - "value": "sap.ui.core.ElementMetadata", - "href": "api/sap.ui.core.ElementMetadata", - "linkEnabled": true + "type": "Error", + "description": "In case something bad happens
", + "linkEnabled": false } - ] + ], + "description": "Some fancy function.
Some links: OpenUI5\n\t\t\t
demo:foo\n\t\t\t
sap.ui.core.Control.prototype.placeAt sap.m.Button#event:press sap.m.Button#setText Flexible Column Layout Link text TextArrangement
fancyFunction() : void" }, - "description": "
Returns a metadata object for class sap.ui5.tooling.test.TestControl.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.getMetadata", - "code": "sap.ui5.tooling.test.TestControl.getMetadata() : sap.ui.core.ElementMetadata" - }, - { - "name": "getSelectedItem", - "visibility": "public", - "returnValue": { - "type": "sap.ui.core.ID", - "types": [ + { + "name": "fireChange", + "visibility": "protected", + "since": "1.4", + "returnValue": { + "type": "this", + "description": "
Reference to this in order to allow method chaining
Parameters to pass along with the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" + }, + { + "name": "item", + "optional": true, + "description": "Reference to the item
", + "depth": 1, + "types": [ + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "phoneName": "mParameters.item", + "defaultValue": "" + }, + { + "name": "pressed", + "optional": true, + "description": "Whether pressed
", + "depth": 1, + "types": [ + { + "value": "boolean" + } + ], + "phoneName": "mParameters.pressed", + "defaultValue": "" } ], - "description": "" + "description": "Fires event change to attached listeners.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/fireChange", + "code": "fireChange(mParameters?) : this" }, - "description": "
ID of the element which is the current target of the association selectedItem, or null.
getSelectedItem() : sap.ui.core.ID" - }, - { - "name": "getValue", - "visibility": "public", - "returnValue": { - "type": "int", - "description": "
Value of property value
Reference to this in order to allow method chaining
Parameters to pass along with the event
", + "types": [ + { + "value": "object" + } + ], + "defaultValue": "" } - ] + ], + "description": "Fires event press to attached listeners.
", + "deprecated": { + "since": "2.0" + }, + "href": "api/sap.ui5.tooling.test.TestControl#methods/firePress", + "deprecatedText": "Deprecated as of version 2.0", + "code": "firePress(mParameters?) : this" }, - "description": "
Gets current value of property value.
Property with type int
Default value is 0.
Value of property color
Gets current value of property color.
Property with an Enum
Default value is Red.
getColor() : sap.ui5.tooling.test.TestEnum" }, - "href": "api/sap.ui5.tooling.test.TestControl#methods/getValue", - "deprecatedText": "Deprecated as of version 2.0", - "code": "
getValue() : int" - }, - { - "name": "indexOfItem", - "visibility": "public", - "returnValue": { - "type": "int", - "description": "
The index of the provided control in the aggregation if found, or -1 otherwise
", - "types": [ - { - "value": "int" - } - ] + { + "name": "getItems", + "visibility": "public", + "returnValue": { + "type": "sap.ui.core.Control[]", + "types": [ + { + "value": "sap.ui.core.Control[]" + } + ], + "description": "" + }, + "description": "Gets content of aggregation items.
Items to be rendered
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/getItems", + "code": "getItems() : sap.ui.core.Control[]" }, - "parameters": [ - { - "name": "oItem", - "optional": false, - "description": "
The item whose index is looked for
", + { + "name": "sap.ui5.tooling.test.TestControl.getMetadata", + "visibility": "public", + "static": true, + "returnValue": { + "type": "sap.ui.core.ElementMetadata", + "description": "Metadata object describing this class
", "types": [ { - "value": "sap.ui.core.Control", - "linkEnabled": true, - "href": "api/sap.ui.core.Control" + "value": "sap.ui.core.ElementMetadata", + "href": "api/sap.ui.core.ElementMetadata", + "linkEnabled": true + } + ] + }, + "description": "Returns a metadata object for class sap.ui5.tooling.test.TestControl.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/sap.ui5.tooling.test.TestControl.getMetadata", + "code": "sap.ui5.tooling.test.TestControl.getMetadata() : sap.ui.core.ElementMetadata" + }, + { + "name": "getSelectedItem", + "visibility": "public", + "returnValue": { + "type": "sap.ui.core.ID", + "types": [ + { + "value": "sap.ui.core.ID", + "href": "api/sap.ui.core.ID", + "linkEnabled": true } ], - "defaultValue": "" - } - ], - "description": "
Checks for the provided sap.ui.core.Control in the aggregation items. and returns its index if found or -1 otherwise.
indexOfItem(oItem) : int" - }, - { - "name": "insertItem", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
ID of the element which is the current target of the association selectedItem, or null.
getSelectedItem() : sap.ui.core.ID" }, - "parameters": [ - { - "name": "oItem", - "optional": false, - "description": "
The item to insert; if empty, nothing is inserted
", + { + "name": "getValue", + "visibility": "public", + "returnValue": { + "type": "string", + "description": "Value of property value
The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
Gets current value of property value.
Property with type string
Default value is empty string.
getValue() : string" + }, + { + "name": "indexOfItem", + "visibility": "public", + "returnValue": { + "type": "int", + "description": "
The index of the provided control in the aggregation if found, or -1 otherwise
", "types": [ { "value": "int" } - ], - "defaultValue": "" - } - ], - "description": "Inserts a item into the aggregation items.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/insertItem", - "code": "insertItem(oItem, iIndex) : this" - }, - { - "name": "removeAllItems", - "visibility": "public", - "returnValue": { - "type": "sap.ui.core.Control[]", - "description": "
An array of the removed elements (might be empty)
", - "types": [ + ] + }, + "parameters": [ { - "value": "sap.ui.core.Control[]" + "name": "oItem", + "optional": false, + "description": "The item whose index is looked for
", + "types": [ + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" } - ] + ], + "description": "Checks for the provided sap.ui.core.Control in the aggregation items. and returns its index if found or -1 otherwise.
indexOfItem(oItem) : int" }, - "description": "
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/removeAllItems", - "code": "removeAllItems() : sap.ui.core.Control[]" - }, - { - "name": "removeItem", - "visibility": "public", - "returnValue": { - "type": "sap.ui.core.Control|null", - "description": "
The removed item or null
Reference to this in order to allow method chaining
The item to insert; if empty, nothing is inserted
", + "types": [ + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" }, { - "value": "null" + "name": "iIndex", + "optional": false, + "description": "The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
Inserts a item into the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/insertItem", + "code": "insertItem(oItem, iIndex) : this" }, - "parameters": [ - { - "name": "vItem", - "optional": false, - "description": "
The item to remove or its index or id
", + { + "name": "removeAllItems", + "visibility": "public", + "returnValue": { + "type": "sap.ui.core.Control[]", + "description": "An array of the removed elements (might be empty)
", "types": [ { - "value": "int" - }, + "value": "sap.ui.core.Control[]" + } + ] + }, + "description": "Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/removeAllItems", + "code": "removeAllItems() : sap.ui.core.Control[]" + }, + { + "name": "removeItem", + "visibility": "public", + "returnValue": { + "type": "sap.ui.core.Control|null", + "description": "
The removed item or null
Removes a item from the aggregation items.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/removeItem", - "code": "removeItem(vItem) : sap.ui.core.Control|null" - }, - { - "name": "setColor", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
The item to remove or its index or id
", + "types": [ + { + "value": "int" + }, + { + "value": "string" + }, + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" } - ] + ], + "description": "Removes a item from the aggregation items.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/removeItem", + "code": "removeItem(vItem) : sap.ui.core.Control|null" }, - "parameters": [ - { - "name": "sColor", - "optional": true, - "defaultValue": "Red", - "description": "
New value for property color
Reference to this in order to allow method chaining
Sets a new value for property color.
Property with an Enum
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Red.
setColor(sColor?) : this" - }, - { - "name": "setSelectedItem", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
New value for property color
Sets a new value for property color.
Property with an Enum
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Red.
setColor(sColor?) : this" }, - "parameters": [ - { - "name": "oSelectedItem", - "optional": false, - "description": "
ID of an element which becomes the new target of this selectedItem association; alternatively, an element instance may be given
", + { + "name": "setSelectedItem", + "visibility": "public", + "returnValue": { + "type": "this", + "description": "Reference to this in order to allow method chaining
Sets the associated selectedItem.
", - "href": "api/sap.ui5.tooling.test.TestControl#methods/setSelectedItem", - "code": "setSelectedItem(oSelectedItem) : this" - }, - { - "name": "setValue", - "visibility": "public", - "returnValue": { - "type": "this", - "description": "
Reference to this in order to allow method chaining
ID of an element which becomes the new target of this selectedItem association; alternatively, an element instance may be given
", + "types": [ + { + "value": "sap.ui.core.ID", + "linkEnabled": true, + "href": "api/sap.ui.core.ID" + }, + { + "value": "sap.ui.core.Control", + "linkEnabled": true, + "href": "api/sap.ui.core.Control" + } + ], + "defaultValue": "" } - ] + ], + "description": "Sets the associated selectedItem.
", + "href": "api/sap.ui5.tooling.test.TestControl#methods/setSelectedItem", + "code": "setSelectedItem(oSelectedItem) : this" }, - "parameters": [ - { - "name": "iValue", - "optional": true, - "defaultValue": 0, - "description": "
New value for property value
Reference to this in order to allow method chaining
Sets a new value for property value.
Property with type int
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 0.
setValue(iValue?) : this" - } - ], - "displayName": "sap.ui5.tooling.test.TestControl", - "title": "class sap.ui5.tooling.test.TestControl", - "subTitle": "Deprecated in version: 2.0", - "deprecatedText": "Deprecated as of version 2.0. there's no replacement for this functionality" - }, - { - "kind": "enum", - "name": "sap.ui5.tooling.test.TestEnum", - "basename": "TestEnum", - "resource": "sap/ui5/tooling/test/library.js", - "module": "sap/ui5/tooling/test/library", - "export": "TestEnum", - "static": true, - "visibility": "public", - "description": "
Defines colors
", - "ui5-metadata": { - "stereotype": "enum" + }, + "parameters": [ + { + "name": "sValue", + "optional": true, + "defaultValue": "\"\"", + "description": "New value for property value
Sets a new value for property value.
Property with type string
When called with a value of null or undefined, the default value of the property will be restored.
Default value is empty string.
setValue(sValue?) : this" + } + ], + "displayName": "sap.ui5.tooling.test.TestControl", + "title": "class sap.ui5.tooling.test.TestControl", + "subTitle": "Deprecated in version: 2.0", + "deprecatedText": "Deprecated as of version 2.0. there's no replacement for this functionality" }, - "properties": [ - { - "name": "sap.ui5.tooling.test.TestEnum.Blue", - "visibility": "public", - "description": "
Yellow
" + { + "kind": "enum", + "name": "sap.ui5.tooling.test.TestEnum", + "basename": "TestEnum", + "resource": "sap/ui5/tooling/test/library.js", + "module": "sap/ui5/tooling/test/library", + "export": "TestEnum", + "static": true, + "visibility": "public", + "description": "Defines colors
", + "ui5-metadata": { + "stereotype": "enum" }, - { - "name": "sap.ui5.tooling.test.TestEnum.Red", - "visibility": "public", - "description": "Red
" - } - ], - "displayName": "sap.ui5.tooling.test.TestEnum", - "title": "enum sap.ui5.tooling.test.TestEnum", - "subTitle": "" - }, - { - "name": "sap", - "displayName": "sap", - "kind": "namespace", - "nodes": [ - { - "name": "sap.ui5", - "description": "", - "href": "api/sap.ui5" - } - ], - "title": "namespace sap", - "subTitle": "" - }, - { - "name": "sap.ui5", - "displayName": "sap.ui5", - "kind": "namespace", - "nodes": [ - { - "name": "sap.ui5.tooling", - "description": "", - "href": "api/sap.ui5.tooling" - } - ], - "title": "namespace sap.ui5", - "subTitle": "" - }, - { - "name": "sap.ui5.tooling", - "displayName": "sap.ui5.tooling", - "kind": "namespace", - "nodes": [ - { - "name": "sap.ui5.tooling.test", - "description": "UI5 Tooling Test Library
", - "href": "api/sap.ui5.tooling.test", - "deprecated": true - } - ], - "title": "namespace sap.ui5.tooling", - "subTitle": "" - } - ] - }); + "properties": [ + { + "name": "sap.ui5.tooling.test.TestEnum.Blue", + "visibility": "public", + "description": "Yellow
" + }, + { + "name": "sap.ui5.tooling.test.TestEnum.Red", + "visibility": "public", + "description": "Red
" + } + ], + "displayName": "sap.ui5.tooling.test.TestEnum", + "title": "enum sap.ui5.tooling.test.TestEnum", + "subTitle": "" + }, + { + "name": "sap", + "displayName": "sap", + "kind": "namespace", + "nodes": [ + { + "name": "sap.ui5", + "description": "", + "href": "api/sap.ui5" + } + ], + "title": "namespace sap", + "subTitle": "" + }, + { + "name": "sap.ui5", + "displayName": "sap.ui5", + "kind": "namespace", + "nodes": [ + { + "name": "sap.ui5.tooling", + "description": "", + "href": "api/sap.ui5.tooling" + } + ], + "title": "namespace sap.ui5", + "subTitle": "" + }, + { + "name": "sap.ui5.tooling", + "displayName": "sap.ui5.tooling", + "kind": "namespace", + "nodes": [ + { + "name": "sap.ui5.tooling.test", + "description": "UI5 Tooling Test Library
", + "href": "api/sap.ui5.tooling.test", + "deprecated": true + } + ], + "title": "namespace sap.ui5.tooling", + "subTitle": "" + } + ] + } + ); }); test(".library with docuindex.json reference", async (t) => {