redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.08k stars 440 forks source link

New Java File -> Class/Interface option defaults file name to public class Main {.java #3725

Open anazar2001 opened 3 months ago

anazar2001 commented 3 months ago

New Java File -> Class/Interface option defaults file name to public class Main {.java

[provide a description of the issue]

Environment
Steps To Reproduce
  1. Open Explorer
  2. New Java File -> Class/Interface
  3. Change the class name
  4. Save

[Please attach a sample project reproducing the error] Please attach logs

Current Result

Class file name includes the first class line, not just a class name

Expected Result

Expect only file name like Main.java

Screenshot 2024-07-28 at 12 31 08
Additional Informations
jdneo commented 3 months ago

Where did you trigger the New Java File?

anazar2001 commented 3 months ago

You can use menu option from explorer or use a shortcut

On Wed, 14 Aug 2024, 13:42 Sheng Chen, @.***> wrote:

Where did you trigger the New Java File?

— Reply to this email directly, view it on GitHub https://github.com/redhat-developer/vscode-java/issues/3725#issuecomment-2288639225, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJXPJ2YI7LGSU2QS5R5RMLZRNGEBAVCNFSM6AAAAABLSXFHMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGYZTSMRSGU . You are receiving this because you authored the thread.Message ID: @.***>