Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » package name does not match directory name problem during importing
package name does not match directory name problem during importing [message #55114] Thu, 12 June 2003 04:15 Go to next message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, some of the classes I'm importing are in a directory "generated" because
they are automatically generated. However, the package name of these classes
does not begine with "generated". However, JDT will report all of them as
error. "Delcared package does not match the expected package name
generated.blah blah".

Anyone has any clue how to turn this thing off? Thanks.

Charles
Re: package name does not match directory name problem during importing [message #55140 is a reply to message #55114] Thu, 12 June 2003 06:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chris.javadisciple.com

I had exactly the same problem when I had to import some classes after
reinstalling. I had Eclipse build a "default package" folder and I moved
the sources there, and the problem stopped.

Charles Zhang wrote:
> Hi, some of the classes I'm importing are in a directory "generated" because
> they are automatically generated. However, the package name of these classes
> does not begine with "generated". However, JDT will report all of them as
> error. "Delcared package does not match the expected package name
> generated.blah blah".
>
> Anyone has any clue how to turn this thing off? Thanks.
>
> Charles
>
>


--
Chris Rehm
chris@javadisciple.com

Thou shalt not avenge, nor bear any grudge against the children of thy
people, but shalt love thy neighbour as thyself. [Lev. 19:18]
Re: package name does not match directory name problem during importing [message #55357 is a reply to message #55114] Thu, 12 June 2003 14:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

When you import, on the import page, have in "From Directory" the
"generated" directory, BUT DON'T check the "generated" directory in the
tree that appears below. Instead check the children directories (and any
files on the left hand panel that you also want from "generated"). AND
at the bottom check the "Create Selected Folders Only" radio button.

By doing this it imports only the subdirectories and direct children of
generated without also creating the generated folder.

Rich
Re: package name does not match directory name problem during importing [message #55410 is a reply to message #55357] Thu, 12 June 2003 15:17 Go to previous message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, Rich,Chris, thanks for helping. I tried both methods and both failed.
The reason is the directory arrangment of the classes do not follow its
directory structure at all. And I am working with very large legacy code
base. They have a very good reason why they can't arrage the directory
hierarchy the same as the package hierarchy.
Any other tips?
Should this be an Eclipse JDT bug? As far as I could understand, Eclipse
should NOT take the directory name and assume it is the same as the package
name.

Thanks again.

Charles
"Richard L. Kulp" <richkulp@NOSPAM.us.ibm.com> wrote in message
news:bca424$61l$1@rogue.oti.com...
> When you import, on the import page, have in "From Directory" the
> "generated" directory, BUT DON'T check the "generated" directory in the
> tree that appears below. Instead check the children directories (and any
> files on the left hand panel that you also want from "generated"). AND
> at the bottom check the "Create Selected Folders Only" radio button.
>
> By doing this it imports only the subdirectories and direct children of
> generated without also creating the generated folder.
>
> Rich
>
Previous Topic:Code Formatter breaks lines in imports
Next Topic:using JacORB in Eclipse-plugins
Goto Forum:
  


Current Time: Sun Dec 22 11:31:55 GMT 2024

Powered by FUDForum. Page generated in 0.03615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top