@@ -55,6 +55,18 @@ const TCHAR* g_csKeywords
55
55
_T (" volatile while" )
56
56
};
57
57
58
+ const TCHAR* g_groovyKeywords
59
+ {
60
+ /* https://docs.oracle.com/cloud/latest/big-data-discovery-cloud/BDDDE/rsu_transform_unsupported_features.htm */
61
+ _T (" abstract as assert boolean break byte case catch char class const " )
62
+ _T (" continue def default do double else enum extends false final finally " )
63
+ _T (" float for goto if implements import in instanceof int interface long " )
64
+ _T (" native new null package private protected public return short static " )
65
+ _T (" strictfp super switch synchronized this threadsafe throw throws " )
66
+ _T (" transient true try void volatile while" )
67
+ _T (" " )
68
+ };
69
+
58
70
const TCHAR* g_javaKeywords
59
71
{
60
72
/* https://www.w3schools.com/java/java_ref_keywords.asp */
@@ -273,7 +285,7 @@ BOOL CViewTextFileDlg::OnInitDialog()
273
285
}
274
286
else
275
287
{
276
- if (_tcsicmp (lpszExtension, _T (" .java " )) == 0 )
288
+ if (_tcsicmp (lpszExtension, _T (" .groovy " )) == 0 )
277
289
{
278
290
// Create the C++ Lexer
279
291
#pragma warning(suppress: 26429)
@@ -283,11 +295,11 @@ BOOL CViewTextFileDlg::OnInitDialog()
283
295
284
296
// Setup the C++ Lexer
285
297
m_ctrlTextFile.SetILexer (m_pLexer);
286
- m_ctrlTextFile.SetKeyWords (0 , g_javaKeywords );
298
+ m_ctrlTextFile.SetKeyWords (0 , g_groovyKeywords );
287
299
}
288
300
else
289
301
{
290
- if (_tcsicmp (lpszExtension, _T (" .js " )) == 0 )
302
+ if (_tcsicmp (lpszExtension, _T (" .java " )) == 0 )
291
303
{
292
304
// Create the C++ Lexer
293
305
#pragma warning(suppress: 26429)
@@ -297,164 +309,179 @@ BOOL CViewTextFileDlg::OnInitDialog()
297
309
298
310
// Setup the C++ Lexer
299
311
m_ctrlTextFile.SetILexer (m_pLexer);
300
- m_ctrlTextFile.SetKeyWords (0 , g_jsKeywords );
312
+ m_ctrlTextFile.SetKeyWords (0 , g_javaKeywords );
301
313
}
302
314
else
303
315
{
304
- if ((_tcsicmp (lpszExtension, _T (" .htm" )) == 0 ) ||
305
- (_tcsicmp (lpszExtension, _T (" .html" )) == 0 ) ||
306
- (_tcsicmp (lpszExtension, _T (" .asp" )) == 0 ) ||
307
- (_tcsicmp (lpszExtension, _T (" .aspx" )) == 0 ) ||
308
- (_tcsicmp (lpszExtension, _T (" .php" )) == 0 ))
316
+ if (_tcsicmp (lpszExtension, _T (" .js" )) == 0 )
309
317
{
310
- // Create the HTML Lexer
318
+ // Create the C++ Lexer
311
319
#pragma warning(suppress: 26429)
312
- m_pLexer = theApp.m_pCreateLexer (" hypertext " );
320
+ m_pLexer = theApp.m_pCreateLexer (" cpp " );
313
321
if (m_pLexer == nullptr )
314
322
return FALSE ;
315
323
316
- // Setup the HTML Lexer
324
+ // Setup the C++ Lexer
317
325
m_ctrlTextFile.SetILexer (m_pLexer);
326
+ m_ctrlTextFile.SetKeyWords (0 , g_jsKeywords);
318
327
}
319
328
else
320
329
{
321
- if (_tcsicmp (lpszExtension, _T (" .json" )) == 0 )
330
+ if ((_tcsicmp (lpszExtension, _T (" .htm" )) == 0 ) ||
331
+ (_tcsicmp (lpszExtension, _T (" .html" )) == 0 ) ||
332
+ (_tcsicmp (lpszExtension, _T (" .asp" )) == 0 ) ||
333
+ (_tcsicmp (lpszExtension, _T (" .aspx" )) == 0 ) ||
334
+ (_tcsicmp (lpszExtension, _T (" .php" )) == 0 ))
322
335
{
323
- // Create the JSON Lexer
336
+ // Create the HTML Lexer
324
337
#pragma warning(suppress: 26429)
325
- m_pLexer = theApp.m_pCreateLexer (" json " );
338
+ m_pLexer = theApp.m_pCreateLexer (" hypertext " );
326
339
if (m_pLexer == nullptr )
327
340
return FALSE ;
328
341
329
- // Setup the JSON Lexer
342
+ // Setup the HTML Lexer
330
343
m_ctrlTextFile.SetILexer (m_pLexer);
331
344
}
332
345
else
333
346
{
334
- if (_tcsicmp (lpszExtension, _T (" .m " )) == 0 )
347
+ if (_tcsicmp (lpszExtension, _T (" .json " )) == 0 )
335
348
{
336
- // Create the Matlab Lexer
349
+ // Create the JSON Lexer
337
350
#pragma warning(suppress: 26429)
338
- m_pLexer = theApp.m_pCreateLexer (" matlab " );
351
+ m_pLexer = theApp.m_pCreateLexer (" json " );
339
352
if (m_pLexer == nullptr )
340
353
return FALSE ;
341
354
342
- // Setup the Matlab Lexer
355
+ // Setup the JSON Lexer
343
356
m_ctrlTextFile.SetILexer (m_pLexer);
344
- m_ctrlTextFile.SetKeyWords (0 , g_matlabKeywords);
345
357
}
346
358
else
347
359
{
348
- if (_tcsicmp (lpszExtension, _T (" .mak " )) == 0 )
360
+ if (_tcsicmp (lpszExtension, _T (" .m " )) == 0 )
349
361
{
350
- // Create the Makefile Lexer
362
+ // Create the Matlab Lexer
351
363
#pragma warning(suppress: 26429)
352
- m_pLexer = theApp.m_pCreateLexer (" makefile " );
364
+ m_pLexer = theApp.m_pCreateLexer (" matlab " );
353
365
if (m_pLexer == nullptr )
354
366
return FALSE ;
355
367
356
- // Setup the Makefile Lexer
368
+ // Setup the Matlab Lexer
357
369
m_ctrlTextFile.SetILexer (m_pLexer);
370
+ m_ctrlTextFile.SetKeyWords (0 , g_matlabKeywords);
358
371
}
359
372
else
360
373
{
361
- if (_tcsicmp (lpszExtension, _T (" .md " )) == 0 )
374
+ if (_tcsicmp (lpszExtension, _T (" .mak " )) == 0 )
362
375
{
363
- // Create the MD Lexer
376
+ // Create the Makefile Lexer
364
377
#pragma warning(suppress: 26429)
365
- m_pLexer = theApp.m_pCreateLexer (" markdown " );
378
+ m_pLexer = theApp.m_pCreateLexer (" makefile " );
366
379
if (m_pLexer == nullptr )
367
380
return FALSE ;
368
381
369
- // Setup the MD Lexer
382
+ // Setup the Makefile Lexer
370
383
m_ctrlTextFile.SetILexer (m_pLexer);
371
384
}
372
385
else
373
386
{
374
- if (_tcsicmp (lpszExtension, _T (" .py " )) == 0 )
387
+ if (_tcsicmp (lpszExtension, _T (" .md " )) == 0 )
375
388
{
376
- // Create the Python Lexer
389
+ // Create the MD Lexer
377
390
#pragma warning(suppress: 26429)
378
- m_pLexer = theApp.m_pCreateLexer (" python " );
391
+ m_pLexer = theApp.m_pCreateLexer (" markdown " );
379
392
if (m_pLexer == nullptr )
380
393
return FALSE ;
381
394
382
- // Setup the Python Lexer
395
+ // Setup the MD Lexer
383
396
m_ctrlTextFile.SetILexer (m_pLexer);
384
- m_ctrlTextFile.SetKeyWords (0 , g_pyKeywords);
385
397
}
386
398
else
387
399
{
388
- if (_tcsicmp (lpszExtension, _T (" .r " )) == 0 )
400
+ if (_tcsicmp (lpszExtension, _T (" .py " )) == 0 )
389
401
{
390
- // Create the R Lexer
402
+ // Create the Python Lexer
391
403
#pragma warning(suppress: 26429)
392
- m_pLexer = theApp.m_pCreateLexer (" r " );
404
+ m_pLexer = theApp.m_pCreateLexer (" python " );
393
405
if (m_pLexer == nullptr )
394
406
return FALSE ;
395
407
396
- // Setup the R Lexer
408
+ // Setup the Python Lexer
397
409
m_ctrlTextFile.SetILexer (m_pLexer);
398
- m_ctrlTextFile.SetKeyWords (0 , g_rKeywords );
410
+ m_ctrlTextFile.SetKeyWords (0 , g_pyKeywords );
399
411
}
400
412
else
401
413
{
402
- if (_tcsicmp (lpszExtension, _T (" .rs " )) == 0 )
414
+ if (_tcsicmp (lpszExtension, _T (" .r " )) == 0 )
403
415
{
404
- // Create the Rust Lexer
416
+ // Create the R Lexer
405
417
#pragma warning(suppress: 26429)
406
- m_pLexer = theApp.m_pCreateLexer (" rust " );
418
+ m_pLexer = theApp.m_pCreateLexer (" r " );
407
419
if (m_pLexer == nullptr )
408
420
return FALSE ;
409
421
410
- // Setup the Rust Lexer
422
+ // Setup the R Lexer
411
423
m_ctrlTextFile.SetILexer (m_pLexer);
412
- m_ctrlTextFile.SetKeyWords (0 , g_rsKeywords );
424
+ m_ctrlTextFile.SetKeyWords (0 , g_rKeywords );
413
425
}
414
426
else
415
427
{
416
- if (_tcsicmp (lpszExtension, _T (" .sh " )) == 0 )
428
+ if (_tcsicmp (lpszExtension, _T (" .rs " )) == 0 )
417
429
{
418
- // Create the Shell Lexer
430
+ // Create the Rust Lexer
419
431
#pragma warning(suppress: 26429)
420
- m_pLexer = theApp.m_pCreateLexer (" bash " );
432
+ m_pLexer = theApp.m_pCreateLexer (" rust " );
421
433
if (m_pLexer == nullptr )
422
434
return FALSE ;
423
435
424
- // Setup the Shell Lexer
436
+ // Setup the Rust Lexer
425
437
m_ctrlTextFile.SetILexer (m_pLexer);
438
+ m_ctrlTextFile.SetKeyWords (0 , g_rsKeywords);
426
439
}
427
440
else
428
441
{
429
- if (_tcsicmp (lpszExtension, _T (" .sql " )) == 0 )
442
+ if (_tcsicmp (lpszExtension, _T (" .sh " )) == 0 )
430
443
{
431
- // Create the SQL Lexer
444
+ // Create the Shell Lexer
432
445
#pragma warning(suppress: 26429)
433
- m_pLexer = theApp.m_pCreateLexer (" sql " );
446
+ m_pLexer = theApp.m_pCreateLexer (" bash " );
434
447
if (m_pLexer == nullptr )
435
448
return FALSE ;
436
449
437
- // Setup the SQL Lexer
450
+ // Setup the Shell Lexer
438
451
m_ctrlTextFile.SetILexer (m_pLexer);
439
- m_ctrlTextFile.SetKeyWords (0 , g_sqlKeywords);
440
452
}
441
453
else
442
454
{
443
- if (_tcsicmp (lpszExtension, _T (" .xml " )) == 0 )
455
+ if (_tcsicmp (lpszExtension, _T (" .sql " )) == 0 )
444
456
{
445
- // Create the XML Lexer
457
+ // Create the SQL Lexer
446
458
#pragma warning(suppress: 26429)
447
- m_pLexer = theApp.m_pCreateLexer (" xml " );
459
+ m_pLexer = theApp.m_pCreateLexer (" sql " );
448
460
if (m_pLexer == nullptr )
449
461
return FALSE ;
450
462
451
- // Setup the XML Lexer
463
+ // Setup the SQL Lexer
452
464
m_ctrlTextFile.SetILexer (m_pLexer);
465
+ m_ctrlTextFile.SetKeyWords (0 , g_sqlKeywords);
453
466
}
454
467
else
455
468
{
456
- m_ctrlTextFile.SetupDirectAccess ();
457
- m_ctrlTextFile.SetILexer (nullptr );
469
+ if (_tcsicmp (lpszExtension, _T (" .xml" )) == 0 )
470
+ {
471
+ // Create the XML Lexer
472
+ #pragma warning(suppress: 26429)
473
+ m_pLexer = theApp.m_pCreateLexer (" xml" );
474
+ if (m_pLexer == nullptr )
475
+ return FALSE ;
476
+
477
+ // Setup the XML Lexer
478
+ m_ctrlTextFile.SetILexer (m_pLexer);
479
+ }
480
+ else
481
+ {
482
+ m_ctrlTextFile.SetupDirectAccess ();
483
+ m_ctrlTextFile.SetILexer (nullptr );
484
+ }
458
485
}
459
486
}
460
487
}
0 commit comments