wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse 2.0 Rocks!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse 2.0 Rocks!!" Watch "Eclipse 2.0 Rocks!!" New topic
Author

Eclipse 2.0 Rocks!!

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I just had to post this and let everyone know that the new R2.0 of Eclipse is really awesome. I thought 1.0 was good, but it had some problems, specifically in Linux. R2.0 however is very stable and runs really smooth.


GenRocket - Experts at Building Test Data
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I guess I'm just not an IDE person, but I've been trying to use Eclipse 2.0 for a few weeks now. Sure it looks pretty, it's fairly solid, and the refactoring tools are neat, but I still find that it makes loads of assumptions about how you are going to develop stuff.
Like: it will run Ant scripts for you but you have to jump through hoops to avoid getting lots of wierd error messages about compilers. Why should it be so hard?
Like: it will call JUnit to run your tests but you have no control about where it sets the "current directory" to, so all my tests which access files fail.
Like: I can't find out how to make it automatically write out modified files before running Ant or JUnit
Like: It has some idea of what projects are on the system and won't let me create a new one with a name which already "exists" - yet I can't find the contentious name anywhere in the lists of projects or in the Eclipse config files.
None of these are a problem with the kind of simple generic text editor which knows about groups of files, colours syntax, and can call out to external programs (TextPad, Kawa, etc.), and I'm boggled when they are present in a supposedly much more powerful IDE.
I haven't really looked at any of the other major contenders (JBuilder, Forte/netbeans, IDEA, ...) Do they also have the same "straitjacket" mentality?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
Like Frank Carver, I'm feeling a bit of the straitjacket. I use IDEA, and it makes very few assumptions about what I'm doing with my project's files.
For my projects, I like to keep JUnit TestCases in the same package as the class to be tested, but I keep them in a separate subtree of the source tree:

IDEA has no problem with this layout. Eclipse, however, indicates a number of errors in my TestCase classes that production classes can't be found. Unless I have misused/misconfigured Eclipse, this behavior will surely hinder my adoption of it. I hope that someone can correct me.
Thanks,
Craig
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
I've found another annoyance with Eclipse: the integrated Ant seems to have a problem with build files that access the system environment via Ant's feature to do so. I received the following build output when running such a build file with the integrated Ant:

Line 6 of my build file is the line where I declare the environment property.
Again, if anyone has an answer, I would greatly appreciate your sharing it. In the meantime, I'm off to hunt this one down via other means.
Thanks,
Craig
[ July 07, 2002: Message edited by: Craig Demyanovich ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Craig Demyanovich:
I've found another annoyance with Eclipse: the integrated Ant seems to have a problem with build files that access the system environment via Ant's feature to do so.

Mhh, we don't have any problems with this, neither on windows nor linux.
I suppose you tried the script from the command line and didn't get this error?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Craig Demyanovich:
Like Frank Carver, I'm feeling a bit of the straitjacket. I use IDEA, and it makes very few assumptions about what I'm doing with my project's files.
For my projects, I like to keep JUnit TestCases in the same package as the class to be tested, but I keep them in a separate subtree of the source tree:

IDEA has no problem with this layout. Eclipse, however, indicates a number of errors in my TestCase classes that production classes can't be found. Unless I have misused/misconfigured Eclipse, this behavior will surely hinder my adoption of it. I hope that someone can correct me.
Thanks,
Craig

I just tried that and it seems to work out fine.
Did you set up both main and test as source folders?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Frank Carver:
Like: it will run Ant scripts for you but you have to jump through hoops to avoid getting lots of wierd error messages about compilers. Why should it be so hard?

I didn't ever get any weird error messages about compilers from the ant integration. Can you please elaborate?

Like: it will call JUnit to run your tests but you have no control about where it sets the "current directory" to, so all my tests which access files fail.

You can configure the working directory in the launch configuration editor (use the "Run..." menu item).

Like: I can't find out how to make it automatically write out modified files before running Ant or JUnit

For Ant, it's the topmost checkbox in the External Tools preferences.
For JUnit, you should get a dialog giving you the option to save all "dirty" editors when starting a test.

Like: It has some idea of what projects are on the system and won't let me create a new one with a name which already "exists" - yet I can't find the contentious name anywhere in the lists of projects or in the Eclipse config files.

Did you take a look at the Navigator? The Package Explorer doesn't show non-java or closed projects.
Also, notice that the project name is not bound to the name of the project directory.

I haven't really looked at any of the other major contenders (JBuilder, Forte/netbeans, IDEA, ...) Do they also have the same "straitjacket" mentality?

Well, I think it is reasonable for a more powerfull IDE to also need to "know" more about your code. I think if you don't stop digging, you will find out that Eclipse is in fact rather flexible, but certainly needs some amount of configuration work.
[ July 08, 2002: Message edited by: Ilja Preuss ]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Ilja wrote: I didn't ever get any weird error messages about compilers from the ant integration. Can you please elaborate?
I can't believe you never saw this one, Kyle gave an answer in this thread.
You can configure the working directory in the launch configuration editor (use the "Run..." menu item).
I've looked there, and I can see entries for some Ant build files but nothing relating to JUnit. Can you give me a bit more detail on how I set the working directory for JUnit?
For Ant, it's the topmost checkbox in the External Tools preferences.. Thanks, nailed that one.
For JUnit, you should get a dialog giving you the option to save all "dirty" editors when starting a test. Nope, it just runs it, ignoring the changes, no dialogs or anything, both if I quit the JUnit pane and start it from the menu, and if I just click the "little man" in the JUnit pane title bar.
Did you take a look at the Navigator? The Package Explorer doesn't show non-java or closed projects.
I'm not sure what you mean here. I think one of my main problems with Eclipse is stil that I don't understand the "shape" of it. What is a Navigator, what is it for, and how to I get to it? There doesn't seem anything useful in the "Navigate" menu. I may have been already using it, but I'm not sure how I would know !
I'm still looking for some documentation which bridges the gap between a "type in this example and say yes to everything" tutorial and the "how to build a new plug-in" programmer information. I can feel that experienced Eclipse users (Ilja, Kyle, the others who have helped me in the past) have some internal model of how it works which covers all this, but although I have found and solved lots of small issues, I don't seem any nearer beaing able to understand the big "how and why" picture.
Well, I think it is reasonable for a more powerfull IDE to also need to "know" more about your code. I think if you don't stop digging, you will find out that Eclipse is in fact rather flexible, but certainly needs some amount of configuration work. I'm sure this is the case, it's just that configuration options seem so spread about the application, and searching the help is useless when I don't know the right words to search for. I can find some mention of what buttons are available on the "Navigator", in the help, for example, but nothing so far on how to get into it!
Sorry if I'm moaning, again.
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
Originally posted by Ilja Preuss:

Mhh, we don't have any problems with this, neither on windows nor linux.
I suppose you tried the script from the command line and didn't get this error?

Yes, it does run fine via the command line; it's a script that I have been using for many months now. I do understand that Eclipse integrates Ant 1.4.1. I've used both that vesion and the 1.5 betas without problems.
Thanks,
Craig
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
Originally posted by Ilja Preuss:
I just tried that and it seems to work out fine.
Did you set up both main and test as source folders?

This project structure already existed in my file system. The new project wizard recognized this and indicated that it would use the existing folder instead of the project as a source container. Here's a snippet of the Navigator view:

Did I configure them correctly?
Thanks,
Craig
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Frank Carver:
Ilja wrote: I didn't ever get any weird error messages about compilers from the ant integration. Can you please elaborate?
I can't believe you never saw this one, Kyle gave an answer in this thread.

Well, what can I do so that you believe me I never saw this error in the Eclipse 2.0 development stream?

You can configure the working directory in the launch configuration editor (use the "Run..." menu item).
I've looked there, and I can see entries for some Ant build files but nothing relating to JUnit. Can you give me a bit more detail on how I set the working directory for JUnit?

Sorry, I guess I wasn't clear enough. I meant the "Run..." menu item in the "Run" menu (the one below the "Run as" menu item). There you can set the working directory for every single launch configuration.

For JUnit, you should get a dialog giving you the option to save all "dirty" editors when starting a test. Nope, it just runs it, ignoring the changes, no dialogs or anything, both if I quit the JUnit pane and start it from the menu, and if I just click the "little man" in the JUnit pane title bar.

Oops, you are right with the "rerun last test" button. Restarting it from the Run menu works for me, though - don't know why...

Did you take a look at the Navigator? The Package Explorer doesn't show non-java or closed projects.
I'm not sure what you mean here. I think one of my main problems with Eclipse is stil that I don't understand the "shape" of it.

The Eclipse workbench basically consists of different views and editors. To organize them, you use what is called a perspective. Every perspective has an area for editors, surrounded by different views (see annotated picture of the workbench). Every perspective has a preset layout, but can be configured to your needs by adding, removing and rearranging views.

What is a Navigator, what is it for, and how to I get to it? There doesn't seem anything useful in the "Navigate" menu. I may have been already using it, but I'm not sure how I would know !

The Navigator is one of those views. It is the one used to navigate through the projects independently of their natures. It is activated by default in the Resource perspective; you can add it to the Java perspecive by using "Show View" from the Window menu.
The Package Explorer view, shown by default in the Java perspective, only shows a filtered view on the projects, but also has some java-specific functionality.

I'm still looking for some documentation which bridges the gap between a "type in this example and say yes to everything" tutorial and the "how to build a new plug-in" programmer information.

Yes, I also feel that this is still missing. You can help to fill this gap by documenting your problems and their solutions at the Eclipse Wiki, though.
Regards, Ilja
[ July 08, 2002: Message edited by: Ilja Preuss ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Well, seems like everyone here is having ANT problems. I myself do not use ANT so I can't say that it bothers me.
How about everything else? I like it. And just look at available FREE editors for LINUX. Eclipse is the best one I have found. My opinion anyway.
[ July 08, 2002: Message edited by: Gregg Bolinger ]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Ilja wrote: Well, what can I do so that you believe me I never saw this error in the Eclipse 2.0 development stream?
OK, then, I believe you. I've seen quite a lot of comments about it though, so I guess it's fairly common, and not just a quirk of my setup.
Sorry, I guess I wasn't clear enough. I meant the "Run..." menu item in the "Run" menu (the one below the "Run as" menu item). There you can set the working directory for every single launch configuration.
Is that how you run JUnit, then? I've always done it by selecting my "AllTests" class and then clicking Run>>Run JUnit Test . It was there on the menu so I never thought to look to see if it was also hiding somewhere else. Is there a way of putting one of these configured "launches" as something like a button on a menu bar, so I don't need to wade through Run>>Run... etc each time?
The Package Explorer view, shown by default in the Java perspective, only shows a filtered view on the projects, but also has some java-specific functionality.
Aha! Eventually you've hammered it through my skull. I've added the Navigator to my Java Perspective and now I can see my phantom empty project (and remove it).
Can you have a stab at explaining what it is about a project that makes it a "Java" project, rather than just a collection of files, some of which are Java files? I remember with distress the amount of time I spent trying to get refactoring working, only to find that the project I had put the Java files in was not explicitly a "Java" project, so the refactorings were shown, but just refused to work.
You can help to fill this gap by documenting your problems and their solutions at the Eclipse Wiki, though.
OK, I guess I deserved that. I'll try and put something together ...
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Gregg wrote: How about everything else? I like it. And just look at available FREE editors for LINUX. Eclipse is the best one I have found. My opinion anyway.
Interesting. There are hundreds of free editors for Linux, but I guess very few graphical integrated development environments. I've never tried using something like Eclipse under Linux, as I don't usually run a GUI.
Does Eclipse under Linux need a particular GUI to run? What would you consider its best and worst features, compared with other Linux editors you have used.?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Eclipse does not need a particular GUI to run. I have ran it under Gnome, KDE, and Blackbox. All with no problems.
I only look for 2 things when it comes to an editor.
1. Code Completion
2. Code Highlighting.
I don't normally like IDE's, just simple editors but those 2 features are very important to me. Other editors I have tried are Forte, JEdit, BlueJ, all of which are written in JAVA which, sad to say, I believe is there downfall, simply because of speed. JEdit has improved considerably with their 3.0 version. And I liked how you only had to download the plugins you wanted instead of being packaged with a bunch of crap you don't need. The reason I don't like it is because there are too many vaiables you have to specify just to compile and run a simple Class file. And then the next time you start it, you have to configure it all over again.
The features I like about Eclipse are it's code completion, of course, it's speed, and the "Run.." options when running your project. I also really like it's auto error detection. It will automatically tell you when you have an error in your code without having to compile it first. It will also sometimes give you advice on how to fix your problem.
I also like that several of the other features that I will probably never use aren't getting in the way all time. They stay tucked away nicely until needed.
If someone else can suggest a simple editor for Linux that has Code Completion and syntax highlighting, I will give it a shot, but I can't find one, at least not one NOT written in JAVA except for Eclipse.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Frank Carver:
Sorry, I guess I wasn't clear enough. I meant the "Run..." menu item in the "Run" menu (the one below the "Run as" menu item). There you can set the working directory for every single launch configuration.
Is that how you run JUnit, then? I've always done it by selecting my "AllTests" class and then clicking Run>>Run JUnit Test . It was there on the menu so I never thought to look to see if it was also hiding somewhere else. Is there a way of putting one of these configured "launches" as something like a button on a menu bar, so I don't need to wade through Run>>Run... etc each time?

There should be a "run" button in the toolbar (it has a running manikin icon). Clicking it will start the last used launch configuration. (You can alternatively hit Ctrl-F11.) Clicking on the triangle besides it will open a list with a bunch of the last used launch configurations to choose from. You can even make some of them your favorites (last tab in the launch config editor), so that they will always be displayed at the top of the list.
Aha! Eventually you've hammered it through my skull. I've added the Navigator to my Java Perspective and now I can see my phantom empty project (and remove it).



Can you have a stab at explaining what it is about a project that makes it a "Java" project, rather than just a collection of files, some of which are Java files?

You have to remember that Eclipse *is not* a java IDE, but a platform which happens to come with the JDT plugin. There are also plugins for C/C++, C#, Ruby etc.
So, Eclipse needs to know how to handle special files in projects - for example to automatically compile java files in a java project when changes get saved. For this, a project can have "natures" - if you take a look at the .project file of a java project, you will see that it has the java nature. This enables all the special treatments that come with the JDT.
A project can also have several natures at the same time - for example a web application could have the java nature and the tomcat nature (if you happen to have installed the tomcat plugin).
Does that make things clearer for you?

You can help to fill this gap by documenting your problems and their solutions at the Eclipse Wiki, though.
OK, I guess I deserved that. I'll try and put something together ...


[ July 08, 2002: Message edited by: Ilja Preuss ]
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173

IDEA has no problem with this layout. Eclipse, however, indicates a number of errors in my TestCase classes that production classes can't be found. Unless I have misused/misconfigured Eclipse, this behavior will surely hinder my adoption of it. I hope that someone can correct me.
Thanks,
Craig[/qb]
</blockquote>
I just tried that and it seems to work out fine.
Did you set up both main and test as source folders?[/QB]
</blockquote>
Ilja, I have been able to work with the above structure for a new project; now I need to determine what went wrong (with Eclipse, or, most likely, my use of it ;-)) when I created a project based on an existing structure in the file system.
I still find it confusing, though, that the Package Explorer (not the Navigator, as I said earlier) shows the following structure:

Why is src shown as a plain folder in addition to the two representations above it? What purpose does it serve, since it seems useless to have it?
Many thanks for sharing your thoughts throughout this thread.
Craig
[ July 08, 2002: Message edited by: Craig Demyanovich ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Craig Demyanovich:
I still find it confusing, though, that the Package Explorer (not the Navigator, as I said earlier) shows the following structure:

Why is src shown as a plain folder in addition to the two representations above it? What purpose does it serve, since it seems useless to have it?

Well, the src folder *could* contain additional files folder besides your two source folders. For example, you can right-click on it and use New->File to put a file into it.

Many thanks for sharing your thoughts throughout this thread.

You're welcome!
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Anything can teach you, if only you listen. In this case by having problems with Eclipse about this very point (source code and resources in main directories and subdirectories at the same time) I have learned a better way of structuring my projects generally.
I had already learned (from battling with CVS and make) that even though compilers often like to put object code in the same place as the source code, this is always a bad idea.
I had already learned (from battling with Ant) that splitting the files in a project into directories based on what needs to be be done to them is as valuable as splitting them based on what they contain.
I have now learned (from battling with Eclipse) that putting a source code package tree inside a more general resource directory structure causes more problems than it solves.
After each lesson, I try to modify my "empty project", to incorporate all that I have learned and make the next project build process even smoother and more powerful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse 2.0 Rocks!!