ThinkJavaCode2
ThinkJavaCode2 copied to clipboard
Created IntelliJ template project
Hi!
My name is Jonathan Colmenares, but I mostly go around online as Jonathing.
Why did I make this?
I've been using Think Java, 2nd Edition as the textbook for my computer science class this semester (props to you for such a good book, by the way) and I recently came across the source code for the textbook, since I needed it to be able to get the proper context for some of the information I needed. I wanted to open one of the chapter folders as a project since IntelliJ has a feature to allow importing Eclipse projects into IntelliJ, but since each of the chapter folders were part of a larger workspace, IntelliJ would throw a fit whenever I tried to open one of the folders to play with the source code on my own.
What did I do?
What I've done is created a template IntelliJ project for anyone to be able to open and play with the code on their own (granted, if they use IntelliJ. I'm sure Eclipse would work just fine with it). I've organized each of the chapter files into a module so that IntelliJ respects that each folder is its own workspace and doesn't try to shove the java files into packages. I've also been able to import the same code-formatting rules by importing the eclipse Formatter.xml
file. Here's an image of what this looks like below.
In addition, I've modified the README.md
file in the root of the repository to include instructions on how to open the source-code in their preferred IDE, and I've fixed some minor formatting issues that may have been a slight annoyance. I also took the liberty to add the book's cover to the top of the file and have it act as a link to the publisher's page for it!
I truly hope this small, yet meaningful PR proves meaningful to you! Cheers.
tl;dr
- IntelliJ users can open the cloned repository as a project with no issues, code-formatting and everything.
- The
README.md
file looks prettier.
This looks great, and is timely! I like the way the README shows multiple options for IDEs. I have on my to-do list to make things work "out of the box" for vscode as well. Let me finish the semester, and I'll take a closer look. Thank you for sharing.
Made a few changes. CheckStyle should now just work if the CheckStyle-IDEA plugin is installed.