Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
589 views
in Technique[技术] by (71.8m points)

eclipse - What project files does Visual Studio Code create via its Java extensions?

I give a computer programming course I have written, and I recently switched to recommending Visual Studio Code in the course. We are starting out with the basics, so I just wanted a simple editor. We started learning Git, and one student's repository suddenly had all sorts of cruft in it, including:

  • .settings/
  • .vscode/
  • .classpath
  • .project

In particular the .settings directory had all sorts of Eclipse settings, such as I would expect to see in an Eclipse project.

The student explained to me that these came from VS Code after installing its Java extensions. But why are the VS Code Java extensions creating Eclipse files? And where is all this documented, so that I can update my lessons with the exact details and avoid this problem in the future?

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Simplified the Language Support for Java? by Red Hat is the headless Eclipse Java IDE integrated into Visual Studio Code via the Language Server Protocol (LSP). See the self-description of the extension:

Provides Java? language support via Eclipse JDT Language Server, which utilizes Eclipse JDT, M2Eclipse and Buildship.

Except for .vscode/, the mentioned files are Eclipse Java IDE files.

Because in Eclipse these files are not intended to be edited manually, there is little or no documentation about them (the Java compiler settings in .settings/org.eclipse.jdt.core.prefs are similar to the command line arguments of the Eclipse batch compiler).

For example, the documentation of the Java extension recommends using the Eclipse Java IDE to edit the formatter settings (which are also stored in .settings/org.eclipse.jdt.core.prefs) and concludes:

No it's not an ideal solution, but it should be done only once, unless you regularly change your formatter settings.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...