question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fill in package for newly created file

See original GitHub issue

When creating a new file, e.g Foo.java inside the com.mycomp.app-folder then the extension should use the new vscode.workspace.on[Will|Did]CreateFile-api to fill in some default content, esp the package-declaration package com.mycomp.app etc.

Environment
  • Java extension pack 0.8.1
Steps To Reproduce
  1. Use the vscode file explorer to create a new file
Current Result

File is empty

Expected Result

File should be pre-populated

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
fbriconcommented, Mar 31, 2020

Fixed: newfile

When the project uses JDK 14, the proposals look different to accomodate for the different record content:

image

1reaction
jriekencommented, Mar 26, 2020

Understood - we could add a reason or source property that tells you what caused the workspace edit, in the spirit of TextDocumentSaveReason or TextEditorSelectionChangeKind. That could tell you if an edit was caused by a user gesture or not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package files in Illustrator - Adobe Support
Choose File > Package. Package dialog box · Specify the folder and location settings: Location. Specify the location to create the packaged ...
Read more >
Creating a package.json file - npm Docs
Creating a new package.json file. You can create a package.json file by running a CLI questionnaire or creating a default package.json file.
Read more >
Step 3: Creating a package and adding files - Keyman Support
In the Project Window in Keyman Developer, click the Packages tab, and click New Package.... Enter the path and filename of the package...
Read more >
Create a package.json File | heynode.com
Enter the root folder of your project; Run npm init; Fill out the prompts to create your package.json. The easiest way to create...
Read more >
Build a Package from Rmarkdown Files • fusen - ThinkR
Create a new directory / new project with · Choose the template · Open the “dev/flat_teaching. · In this flat Rmd template, run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found