Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse in Action

 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was interested to see this title in JavaRanch's book promotion. I've used Eclipse for both personal and professional development, but most definitely not to its fullest extent. I'm excited to see a comprehensive reference with some helpful hints!
The description of the book on Amazon.com says the book covers Ant/JUnit integration - I'm curious to know if it's just a passing description, or if the book actually covers these topics in some depth...
 
David Gallardo
Author
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi -
The book has a chapter devoted to each of these topics. The intention of these chapters is two-fold: to provide an introduction to Ant and JUnit for those unfamiliar with them (which you can skim if you're already familiar with them) and to show, in detail, how to work with them in Eclipse. (And, especially in the case Ant, how this differs from working with Ant outside of Eclipse.) I'll leave it to others to judge how succesful we've been, but I believe we go well past a simple description.
@D
 
Raj Birru
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say I have an interface with a single method
public interface Something {
Collection getItems(String userId);
}
And another class implements it.
public class SomethingImpl implements Something {
Collection getItems(String userId){
return null;
}
}
This doesn't compile in Eclipse but compiles in Unix with the same java 1.3 compiler.
I know it shouldn't compile but why does it compile in Unix with the same java 1.3.1 compiler?
 
Michael Zalewski
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just tried your example in Eclipse 2.1.
It all compiles (except for the fact that you need to add import java.util.Collection, which Eclipse suggests for you.)
I am curious why you think that it should not compile. (Because of the missing import? In that case, I don't know how you got it to compile in any environment).
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know... both the Sun JDK 1.3.1_02 and Sun JDK 1.4.1_01 (both on Win2K... just what I have installed here at work.) will not compile this code either. Though if the JDK will compile it but Eclipse won't that just means that Eclipse's syntax parser is better than the one in your JDK. I think that Eclipse parses the code you are typing and doesn't have to actually compile it to find errors...

This should really be another topic...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope, Michael, he's trying to make the interface method package private...
 
Morten Moeller
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering. Does the book talk about SWT at all?
 
Michael Zalewski
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh I see.
I get the same problem (it does not compile in Eclipse 2.1). When I did it the first time, I inadvertantly removed the 'implements Something' in cut and paste, and it compiles.
In Java, all methods in an interface are implicitly public and abstract, even if you don't put those modifiers on the method. So any implementation of the method in an interface must also be public.
When I exported the code from Eclipse to a FileSystem, and compiled it with javac, it also would not compile. But my JDK comes up as Sun 1.4.1_01-b01 for Windows
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the book ECLIPSE IN ACTION good for basics or someone who knows fairly well about Eclipse. I am very new to Eclipse and can see there is a lot to learn, when is the right time to dig in to the book?
 
Robert McGovern
Author
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Morten Moeller:
I was wondering. Does the book talk about SWT at all?

Yup there are two appendices, D which covers using SWT and E which is about JFace. Basically its a gentle introduction to both, we cover the mechanics of using them (threading, resources, events), setting up the enviroment (which jar and dll's needed). There is an basic example in each appendix which shows you how to set up the main window, using menu's, actions, buttons and events.
Rob
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic