add(sCodeRef, sViewId) {
					var oFlexSettings = oRta.getFlexSettings();
					if (!oFlexSettings.developerMode) {
						throw DtUtil.createError(
							"service.ControllerExtension#add", "code extensions can only be created in developer mode",
							"sap.ui.rta"
						);
					}

					if (!sCodeRef) {
						throw DtUtil.createError(
							"service.ControllerExtension#add", "can't create controller extension without codeRef",
							"sap.ui.rta"
						);
					}

					if (!sCodeRef.endsWith(".js")) {
						throw DtUtil.createError("service.ControllerExtension#add", "codeRef has to end with 'js'");
					}

					var oView = Element.getElementById(sViewId);
					var oAppComponent = FlexUtils.getAppComponentForControl(oView);
					var sControllerName = oView.getControllerModuleName() ? `module:${oView.getControllerModuleName()}` : oView.getController()?.getMetadata().getName();
					// Calculate moduleName for code extension
					var sReference = FlexRuntimeInfoAPI.getFlexReference({element: oAppComponent});
					var sModuleName = sReference.replace(/\.Component/g, "").replace(/\./g, "/");
					sModuleName += "/changes/";
					sModuleName += sCodeRef.replace(/\.js/g, "");
					var oChangeSpecificData = {
						codeRef: sCodeRef,
						controllerName: sControllerName,
						changeType: "codeExt",
						layer: oFlexSettings.layer,
						namespace: oFlexSettings.namespace,
						reference: sReference,
						moduleName: sModuleName,
						generator: "rta.service.ControllerExtension"
					};

					var oPreparedChange = ChangesWriteAPI.create({changeSpecificData: oChangeSpecificData, selector: oAppComponent});
					PersistenceWriteAPI.add({change: oPreparedChange, selector: oAppComponent});
					return oPreparedChange.convertToFileContent();
				}
Creates a change that adds an extension to the controller associated with the given view.
Throws an error if the information is not complete.
As of now, this only creates the change with a reference to a file. The consumer has to take care of creating that file
and adding it to the backend.

@method sap.ui.rta.service.ControllerExtension.add
@param {string} sCodeRef - Name of the file, without path, with the extension <code>.js</code>. Must comply to UI5 module naming convention.
							Has to be unique and must not conflict with other already defined modules.
@param {string} sViewId - ID of the view whose controller should be extended
@return {object} Definition of the newly created change
@public