runtime(java): Recognise all available standard doclet tags
* Complement the tag set with @spec, {@systemProperty},
{@summary}, @provides, @uses, @hidden, and {@index}.
* Do not hoard all tags under a single highlighting group.
* Skip over nested balanced braces in inline tags.
* Observe that tag names are case sensitive: both {@docRoot}
and {@inheritDoc} are valid, whereas {@inheritdoc} and
{@docroot} are not.
* In the @see tag arguments, allow for:
- module name prefixes (e.g. java.base/java.lang.String);
- references to arbitrary URI fragments (e.g. ##foo);
- matching any tag variation arguments on the next line.
* Test directives and tags for Java module declarations.
* Enforce the word end for "module-info" candidates.
References:
https://bugs.openjdk.org/browse/JDK-8226279 (@spec)
https://bugs.openjdk.org/browse/JDK-8214559 ({@systemProperty})
https://bugs.openjdk.org/browse/JDK-8173425 ({@summary})
https://bugs.openjdk.org/browse/JDK-8160196 (@provides & @uses)
https://bugs.openjdk.org/browse/JDK-8073100 (@hidden)
https://bugs.openjdk.org/browse/JDK-8044243 ({@index})
https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html
https://github.com/openjdk/jdk/blob/jdk-21-ga/src/jdk.compiler/share/classes/com/sun/source/doctree/DocTree.java
closes: #15652
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
508403687d
commit
a9ae38dc3f
30
runtime/syntax/testdir/input/setup/java_module_info.vim
Normal file
30
runtime/syntax/testdir/input/setup/java_module_info.vim
Normal file
@ -0,0 +1,30 @@
|
||||
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,
|
||||
}])
|
||||
Reference in New Issue
Block a user