errael commented on issue #7986:
URL: https://github.com/apache/netbeans/issues/7986#issuecomment-2587940564

   There is a recent thread in dev mailing list, [Formatting Source 
Code](https://lists.apache.org/thread/d9bpg8yynkclfqs8vw8wyrv04f2p0oo3)
   
   A fix for that might include a fix this issue as well. If there's a "treat 
this file like a source code file" detector.
   
   ```
   I noticed this too while writing scripts. The indentation engine
   does not expect methods outside of class bodies and will likely need some 
updates.
   
   best regards,
   michael
   
   On 13.01.25 19:17, Kenneth Fogel wrote:
   > This is a minor issue and not necessarily a bug to be reported. When I 
create a file using the classless approach such as:
   >
   > void main() {
   >      println("Mooses rule!");
   > }
   >
   > It will run with the --enable-preview VM option. Great!
   >
   > Unfortunately, all that  Source -> Formatting does is add a blank line at 
the top of the file and nothing more. 
   > I assume it is looking for something it can identify as a class otherwise 
it does not format the file. 
   ```


-- 
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

Reply via email to