Files
vim/runtime/syntax/testdir/input/setup/java_module_info.vim
Aliaksei Budavei 1054b18291 runtime(java): Make changes for JDK 24 in syntax script
- "Demote" SecurityManager from the list of java.lang class
  types to javaLangDeprecated.
- Reintroduce supported syntax-preview-feature numbers 455
  and 476 as _new numbers_ 488 and 494, respectively.

References:
- https://openjdk.org/jeps/486 (Permanently Disable the Security Manager)
- https://openjdk.org/jeps/488 (Primitive Types in Patterns etc.)
- https://openjdk.org/jeps/494 (Module Import Declarations)

closes: #16977

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-29 09:16:30 +01:00

33 lines
729 B
VimL

vim9script
# Test filenames are required to begin with the filetype name prefix,
# whereas the name of a Java module declaration must be "module-info".
const name_a: string = 'input/java_module_info.java'
const name_b: string = 'input/module-info.java'
def ChangeFilename()
exec 'saveas! ' .. name_b
enddef
def RestoreFilename()
exec 'saveas! ' .. name_a
delete(name_b)
enddef
autocmd_add([{
replace: true,
group: 'java_syntax_tests',
event: 'BufEnter',
pattern: name_a,
cmd: 'ChangeFilename()',
once: true,
}, {
group: 'java_syntax_tests',
event: ['BufLeave', 'ExitPre'],
pattern: name_b,
cmd: 'RestoreFilename()',
once: true,
}])
g:java_syntax_previews = [476, 494]