vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Expose the build command to more places

Open jdneo opened this issue 3 years ago • 1 comments

Below are some feedbacks from user surveys:

  • there no build and run feature in a click like netbeans.
  • Add a command to rebuild the project the current active file is part of.
  • "I really like editing in VS Code but find it not as powerful as tools like Eclipse for build and debug. "
  • The burden I got is there was not shortcut for compile java code, it would be awesome if we had it."
  • For a maven project I find I have to routinely run "mvn clean compile" after making code changes before it will build.

Actually, we have build action which is called Force Java Compilation, it looks like we need to do some enhancement to expose it to more places. Some ideas:

  1. Expose build action to more places (for example, can be invoked in Java Project explorer)
  2. Allow to build some of the projects instead of the entire workspace
  3. Considering renaming it?? - Because in other IDEs they all call it build, here we call it compilation
  4. Ask VS Code to have a dedicate tool bar menu called build or sth...

jdneo avatar Jun 15 '22 07:06 jdneo

Some investigation about the naming.

Eclipse

In Eclipse, the action that generate the jar artifact is called export. export

And the build action will generate all the compiled classes in the output path:

https://user-images.githubusercontent.com/6193897/174934131-dc11b2d3-308c-4e7d-a4be-3238f239f0c2.mp4

IDEA

The term Compile and Build can be found both in IDEA. While, Compile is used to compile a single source file, Build is used for an entire module/project image

https://user-images.githubusercontent.com/6193897/174934378-8bc0f3b5-e9f6-425f-bb9c-c12f50af92fb.mp4

Looks like the term build is commonly used in popular IDEs and does very similar things with our Force Java compilation command. I think it makes sense to make this command's name include the keyword build, so that users can find it more easily.

// cc @rgrunber @fbricon

jdneo avatar Jun 22 '22 03:06 jdneo