vulewuxe86 opened a new issue, #6084:
URL: https://github.com/apache/netbeans/issues/6084
### Description
Provide options to insert a comment after the closing brace containing the
class, method, if-statements, ... header without parameters.
Due to the fact that e.g. class headers and closing braces could already be
recognized and blank lines "\n" added after them (see the picture below), this
might be easy to implement. Of course one should make sure that the code does
not get spammed with brace comments if something goes wrong.
Some examples:
```
if ( 1 < 2 ) {
return true;
} // if
```
```
public void method( int a ) {
a += 1;
} // public void method
```

The feature would look similar to these plugins except that the "visual
aids" are written to the file:
* https://marketplace.visualstudio.com/items?itemName=wraith13.bracket-lens
or that plugin
* https://marketplace.visualstudio.com/items?itemName=wraith13.bracket-lens
Alternatively it might be a compromise to rebuild the functionality of the
aforementioned plugins to avoid inserting brace comments.
### Use case/motivation
At work, we use these brace comments to keep track of which closing brace
belongs to which opening brace.
I know that there's already syntax highlighting for that, but when there's
an syntax error, this does not work any longer. Additionally if one would use
the visual solution like the vscode plugins do, the benefits are lost when the
code is pushed to a repository that is managed trough a web browser. One would
need to check out the code in the IDE to get back the additional information.
Before any critic:
* I know that these comments might not make sense for small function like
primitive getter functions.
* Maybe this is something retro and was abandoned in the past for good
reason. I haven't been developing software for so long.
* It might violate some Clean Code rules.
### Related issues
_No response_
### Are you willing to submit a pull request?
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists