Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions handout-files/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These don't automatically install then, right? redhat.java seems fine but I don't love installing for students some plugin maintained by a random guy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it just trigger a popup on the corner like this
image

I agree that install unpopular extension is concerned, but it's the most efficient (and probably the minimal) way to prevent hitting formatting document shortcut to mess up the template's format (because redhat extension format the code differently from google-java-format, and there's no way to configure it to match the style).

There are multiple VS Code extensions that integrate google-java-format to VS Code, I tried some and found this one is the most recent one and works fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, if student chooses to not install the formatting extension, a dialog will show up when formatting the document
image

Then the student is free to configure the formatter back to redhat (although that is probably not helpful).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the student can always opt-out formatting through VS Code at all and run make format directly.

"josevseb.google-java-format-for-vs-code",
"redhat.java"
]
}
19 changes: 19 additions & 0 deletions handout-files/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"java.project.sourcePaths": [
"labs/lab0-pingpong/src",
"labs/lab0-pingpong/tst",
"labs/lab1-clientserver/src",
"labs/lab1-clientserver/tst",
"labs/lab2-primarybackup/src",
"labs/lab2-primarybackup/tst",
"labs/lab3-paxos/src",
"labs/lab3-paxos/tst",
"labs/lab4-shardedstore/src",
"labs/lab4-shardedstore/tst",
],
"java.project.referencedLibraries": [
"jars/*.jar",
],
"java.compile.nullAnalysis.mode": "automatic",
"editor.defaultFormatter": "josevseb.google-java-format-for-vs-code",
}
Loading