Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created IntelliJ template project #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Jonathing
Copy link

@Jonathing Jonathing commented Dec 2, 2020

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.

Think Java source code in an IntelliJ project

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!

Top of the README.md file
New README.md section

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.

- Fixed formatting issues according to markdownlint
- Added instructions for opening the source code in an IDE
@ChrisMayfield
Copy link
Owner

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.

@Jonathing
Copy link
Author

Made a few changes. CheckStyle should now just work if the CheckStyle-IDEA plugin is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants