You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JIRA: CPOUI5FOUNDATION-991
Enhances #671 by enabling more
complex autofixes where migration depends on the provided arguments.
Resolves partially: #619
Follow up PRs:
#675
---------
Co-authored-by: Yavor Ivanov <[email protected]>
sap.ui.getCore().applyTheme("customTheme", "find/my/theme/here"); // Should not be autofixed if there is a 2nd argument␊
5305
+
Theming.setTheme("customTheme"); // Can be autofixed when the 2nd argument is undefined␊
5306
+
␊
5285
5307
Core.ready(function() {console.log();});␊
5286
5308
Core.ready(function() {console.log();});␊
5287
5309
␊
@@ -5293,9 +5315,14 @@ Generated by [AVA](https://avajs.dev).
5293
5315
␊
5294
5316
Element.getElementById("id");␊
5295
5317
Element.getElementById("id");␊
5318
+
␊
5319
+
Component.getComponentById("componentId");␊
5320
+
Component.getComponentById("componentId");␊
5296
5321
␊
5297
5322
Element.getElementById("controlId");␊
5298
-
Element.getElementById("controlId");␊
5323
+
␊
5324
+
Element.getActiveElement()?.getId() || null;␊
5325
+
Element.getActiveElement()?.getId() || null;␊
5299
5326
␊
5300
5327
Element.getElementById("elementId");␊
5301
5328
Element.getElementById("elementId");␊
@@ -5336,29 +5363,53 @@ Generated by [AVA](https://avajs.dev).
5336
5363
[
5337
5364
{
5338
5365
coverageInfo: [],
5339
-
errorCount: 3,
5366
+
errorCount: 6,
5340
5367
fatalErrorCount: 0,
5341
5368
filePath: 'DeprecatedCoreApiWithoutImport.js',
5342
5369
messages: [
5343
5370
{
5344
5371
column: 21,
5345
-
line: 2,
5372
+
line: 3,
5346
5373
message: 'Access of global variable \'sap\' (sap.ui.getCore)',
5347
5374
messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
5348
5375
ruleId: 'no-globals',
5349
5376
severity: 2,
5350
5377
},
5351
5378
{
5352
5379
column: 28,
5353
-
line: 2,
5380
+
line: 3,
5354
5381
message: 'Call to deprecated function \'getCore\' (sap.ui.getCore)',
5355
5382
messageDetails: 'Deprecated test message',
5356
5383
ruleId: 'no-deprecated-api',
5357
5384
severity: 2,
5358
5385
},
5359
5386
{
5360
5387
column: 2,
5361
-
line: 28,
5388
+
line: 6,
5389
+
message: 'Access of global variable \'sap\' (sap.ui.getCore)',
5390
+
messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
5391
+
ruleId: 'no-globals',
5392
+
severity: 2,
5393
+
},
5394
+
{
5395
+
column: 9,
5396
+
line: 6,
5397
+
message: 'Call to deprecated function \'getCore\' (sap.ui.getCore)',
5398
+
messageDetails: 'Deprecated test message',
5399
+
ruleId: 'no-deprecated-api',
5400
+
severity: 2,
5401
+
},
5402
+
{
5403
+
column: 19,
5404
+
line: 6,
5405
+
message: 'Call to deprecated function \'applyTheme\' of class \'Core\'',
5406
+
messageDetails: 'Deprecated test message',
5407
+
ruleId: 'no-deprecated-api',
5408
+
severity: 2,
5409
+
},
5410
+
{
5411
+
column: 2,
5412
+
line: 36,
5362
5413
message: 'Deprecated call to Lib.init(). Use the {apiVersion: 2} parameter instead',
0 commit comments