Commit Graph

8 Commits

Author SHA1 Message Date
Anna Kozlova
0039037092 java 18 is generally available
GitOrigin-RevId: 6da5af5f9d23adf4aacfc5752765103bb6732a8a
2022-03-23 09:11:50 +00:00
Nikita Eshkeev
436eee6cf4 [javadoc] IDEA-285556 Support language injection into snippet
Implement updating the content of a snippet tag with the help from a method implementer. A snippet might invoke overriding a method though a completion and when a parent method is inserted it might contain javadoc. In this case it's impossible to recreate a snippet tag because the new text for the tag contains "/**" and "*/" that come from the parent method's javadoc. The implemented method implementer helps to strip a method's javadoc if it's present.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: 42b315ed2670701e50574a383f0442df69accd35
2022-01-20 02:16:47 +00:00
Nikita Eshkeev
34ec0bb7c9 [javadoc] IDEA-285556 Support language injection into snippet
Add an enclosing class for snippets in order not to make users define a class in a snippet code to eliminate syntax errors when the code consists of a set of instructions

GitOrigin-RevId: c6f52f94d51fdc6393c8a9fdc0ddb615e8d37b17
2022-01-15 01:44:09 +00:00
Nikita Eshkeev
6ffd9bc4b6 [javadoc] IDEA-285556 Support language injection into snippet
JEP-413 says that by default a snippet tag's body is in JAVA language, so JavadocInjector injects JAVA into a snippet tag automatically. The injector relies on the lang attribute to inject a language, if the attribute is not present, then JAVA is used.
In order to make a user's live easier the injector doesn't make user guess the correct language name, instead if the injector didn't find a language by the value from the `lang` attribute it traverses throughout all the registered languages and looks for the one the name of which matches the specified ignoring case. That is the case for java: in our code base the language goes by the `JAVA` id, but users tend to write the language name in lowercase ("java") or with only the first letter in the capital case ("Java")

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: cca8c90bb5ad04485f1bf4119b9936114e5492e4
2021-12-28 19:34:50 +00:00
Roman Ivanov
c9ec981d20 [java] fix test data
GitOrigin-RevId: c574abaafb637d2f403ab9c209c62c70b8d46f66
2021-12-28 14:22:23 +00:00
Roman Ivanov
9a51f2b953 Revert "[java] fix language level required for @snippet"
This reverts commit 093605a5d64aba4de5c9331ad6fc604e9f014328.

GitOrigin-RevId: a7de981964bbe6f30876c6aad8e9179c391d6aa4
2021-12-28 14:22:17 +00:00
Roman Ivanov
2345574a96 [java] fix language level required for @snippet
GitOrigin-RevId: 093605a5d64aba4de5c9331ad6fc604e9f014328
2021-12-28 12:13:42 +00:00
Roman Ivanov
2717b57828 [java] highlight @snippet javadoc tag if not available at a given language level
GitOrigin-RevId: 7e2a20fbc52b2c8fa72018103ace9a5dc13aa454
2021-12-28 12:13:40 +00:00