Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow creation of abstract class and @interface from "New Java Class" command #1722

Closed
ghokun opened this issue Nov 28, 2020 · 0 comments · Fixed by #1723
Closed

Allow creation of abstract class and @interface from "New Java Class" command #1722

ghokun opened this issue Nov 28, 2020 · 0 comments · Fixed by #1723

Comments

@ghokun
Copy link
Contributor

ghokun commented Nov 28, 2020

Environment
  • Operating System: Fedora 33 (Xfce) x86_64
  • JDK version: OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
  • Visual Studio Code version: 1.51.1
  • Java extension version: 0.71.0
Steps To Reproduce
  1. Open a java project
  2. Wait for the java language server to detect it
  3. Click "Explorer" Tab
  4. Select "JAVA PROJECTS" view
  5. Right click on any project or package and select "New Java Class"
Current Result

Current extension provides class, interface or enum for Java <14 and class, interface, enum or record for Java >=14.
snippet

Expected Result

abstract class and @interface options could be added to current snippet lists as an enhancement.

Additional Informations

I was developing a project with lots of custom annotation and thought this would be a good addition to this extension.

I think the code that handles this snippet is here:

} else if (!serverReady || await isVersionLessThan(emptyFiles[i].toString(), 14)) {
snippets.push(`public \${1|class,interface,enum|} ${typeName} {`);
} else {
snippets.push(`public \${1|class ${typeName},interface ${typeName},enum ${typeName},record ${typeName}()|} {`);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants