docs
docs copied to clipboard
avoid static imports in Java sample code
in case this code is copied to an IDE the imports are missing and you have a bit of a challenge to find the right import for the static imports (VS Code Java extension does not support it at all at the moment).
Alternatively we could also use the new 'focus' feature for code blocks and include the static import statements as 'unfocused' but have them included in the clipboard after clicking the copy button.
I think the static imports improve readability but should be mentioned somewhere
I think the static imports improve readability but should be mentioned somewhere
Some of the statically imported symbols are ambiguous when being imported to an IDE. Even worse, VS Code has no way to resolve the imports with a code action.
So, either we avoid static imports (first commit) or have the imports as part of the code block (but blur them) in order to guide the readers eye.
Can this be merged? I had the feeling it's not final, that's why I'm asking.
Let's at least update with the base branch. @agoerler merge or talk? ;)
@agoerler merge or talk? ;)
talk :-)
We could do sth similar to what we've done in the getting started in a Nutshell. There we have the small snippets that is needed and in addition a detail box that can be expanded if you want the full code example incl. imports.