TransportExceptions when trying to pull from a remote Git repository with the EGit plugin in Eclipse. The issue was a missing line in their .git/config. The file should have looked like this:
... [remote "origin"] ... fetch = +refs/heads/*:refs/remotes/origin/*
The definition of fetch was absent.
I think the students might have failed to check Configure Fetch when they added the remote, but I can’t be sure.
]]>import statements to classes that live in faraway packages with Control-Shift-O or Command-Shift-O. That’s the letter O, not the number 0.Control-Shift-F or Command-Shift-F. You don’t need to have the code highlighted for this to work. However, this will only work when there are no egregious syntax errors.Control-A or Command-A. Then hit Control-Shift-I or Command-Shift-I.Control-/ or Command-/. To apply this to multiple lines, select them first.Control-M.Control-R or Command-R for this purpose by visiting the Eclipse preferences, navigating to General / Keys, searching for and selecting the Run command, and typing the new shortcut in the Binding textbox.I find the auto-closing of ", (, and { to cause more grief than benefit. This isn’t so much a style issue as a human-computer interaction issue. I make a few changes in the Eclipse preferences under Java / Editor / Typing.
Under automatically close, I uncheck the following:
One customizes the style by visiting Eclipse’s preferences and selecting Java / Code Style / Formatter. Click Edit and rename the profile in order to make changes. Once in the editor, I make changes to the following sections.
A lot of developers indent with four spaces. I do a lot of teaching and projecting, and I want to keep as much code on the screen as possible. Since I don’t like breaking lines, I reduce the tab size with the following settings:
I don’t trust Eclipse to perform any line wrapping on my behalf. I select all options and set the following:
When I use Control-/ or Command-/ to comment out some lines of code and then reformat, I lose the indentation of the commented code. I prevent this with the following setting: