|
|
Re: Import [message #149052 is a reply to message #148815] |
Mon, 17 April 2006 21:02 |
Chris Gage Messages: 74 Registered: July 2009 |
Member |
|
|
I would do it a little differently...
The zip file is not in a very eclipse-friendly format, but you can fix that.
Create a new Java project and unzip all of the files in the the zip file
directly into it. Rightmousebutton (RMB) > refresh on the project to
see what you get.
You will now have a set of packages called Eclipse.something and one
called just Eclipse. It probably isn't a good idea to have packages
called Eclipse or Eclipse.something in your project, you might confuse
people down the road.
Also the file contents do not match these package names, so first of all
you can just refactor the package names to match what is in the files,
by doing the following on each package name:
select the package, then RMB > Refactor > Rename
delete the "Eclipse." part from the name
click ok
Java doesn't like package names with uppercase letters so it will give
you a warning about that, you can fix that manually later. You also
have main() procedures in some of these files, so the refactoring will
give you warnings about that, but hopefully no actual errors.
Click on Continue to accept the warnings for the moment.
You may have some residual compile errors to resolve.
The Java files in the package called Eclipse do not contain a package
statement, so you'll have to edit each of them by hand, and add the
following line at the top of each file:
package Eclipse;
Now you should go back and refactor the package names to be all
lower-case. Just select each package in turn in the Package Explorer,
and RMB > Refactor > Rename and edit as you think fit, and rename the
package called Eclipse to something else. Click OK.
The package declarations inside the files will get updated automatically
for you in the process.
The applets and some of the other java files implement serializable so
you need to add the following line to each of them just after the first
{ of the class to suppress a warning:
static final long serialVersionUID = 1234567;
You're good to go at this point.
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.07622 seconds