[program-java] FW: Need someone patient to get me started with Eclipse

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
  • To: "'program-java@xxxxxxxxxxxxx'" <program-java@xxxxxxxxxxxxx>
  • Date: Thu, 13 Oct 2011 10:11:22 -0400

I have forwarded this to the list with John's permission so that others might 
benefit from this discussion.

This is dependent upon your version of Eclipse but the basics should hold true.

With regards to the single line of imports, it's due to a default setting. 
Actually all of the imports are there if you want to spend the time searching 
but here's a fix....

Open the "Preferences" page usually found under \Window\Preferences\

You will note that there will be a tree view control presented to you and if 
it's the first time through then you will be placed on the top node of the tree 
titled "General".

Scroll the tree view to locate the parent node titled "Java". Expand the note 
and locate the child node "Editor". Expand and locate "Folding".

You need to use the TAB key at this point, so press it twice and locate "Enable 
Folding". It's a check box and by default is checked. So then uncheck it, click 
apply and then OK.

I have personally found that I needed to close the Eclipse program and relaunch 
it to have some preferences loaded so it's just my way of doing things.

Next you might want to use CTRL + SHIFT + O to organize your imports. Note that 
you must do this for each class it's not a global thing.

In the Preferences tree view once again, locate the Editor node as with above 
and then locate "Typing".

Using the TAB key, locate the "TAB Key" checkbox and insure that it is indeed 
checked. Tab again to locate the value for the indentation. Insure that the 
value is that of the one you desire. If not then see below. Next TAB to "Adjust 
Indentation" checkbox and ensure that it as well is checked. Click apply and 
then OK.

Now for the TAB value, once again under the "Preferences" tree view locate 
"Java" then "Code Style", then "Formatter".

With the TAB Key locate, "Edit" button. Click it and you should be placed on an 
edit field that will permit you to change the value of the tab. Note that you 
must be editing the Eclipse Built In active profile.

So there you go, try it and remember that I'm using Eclipse 3.3 so your package 
may alter slightly.


-----Original Message-----
From: John J. Boyer [mailto:john.boyer@xxxxxxxxxxxxxxxxx]
Sent: October 12, 2011 15:46
To: Corbett, James
Subject: Need someone patient to get me started with Eclipse


I saw your answer to my post on the java-programming list. After a lot of trial 
and error I found the preferences dialog in the windows menu, but I don't knwo 
how to use it. There are two things I want set before I can start using Eclipse 
as an editor. From there I can gradually increase the use of other features. 
What bugs me most is that it only shows the first import statement. That is 
certainly odd. I would also like to set indentation to four spaces instead of 
the eight of a tab.
The latter runs things off my braille display quickly. Many Java packages do 
use 4 spaces.

Anything you can do would be much appreciated.


John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
Madison, Wisconsin USA
Developing software for people with disabilities

Other related posts: