Hi,

As far as I can tell, jde-import-find-and-import also only works with
already compiled classes. Unless I misunderstand you, when you say "that
class" - I mean the class to be imported has to be compiled already.

I actually got a bit confused by this today, when the system was unable to
find a new class that I hadn't compiled yet. Is there a compelling reason to
only allow imports of already compiled classes?

The relevant place in the code appears to be jde.util.ClassPathDir, method
addRecursively, where there is a check that the file name
endsWith(".class"). Would it be possible to just change that to ".java"? I
guess it would be problematic for those who separate .class and .java files,
but maybe the jde-db-source-directories path could be searched as well.

If that's not possible, maybe the imports window could notify the user that
"if the class you were looking for is missing, you should know that only
compiled classes can be auto-imported". That could perhaps save some
confusion.

/ Petter

(By the way, Paul, I couldn't find anywhere that jde.wizards.ImportWizard
was used, so maybe that could be removed?)

> -----Original Message-----
> From: Nick Sieger [mailto:[EMAIL PROTECTED]]
> Sent: den 24 januari 2002 19:45
> To: 'Sandip Chitale'; 'Matthew Rippa'
> Cc: 'JDE Mailing List'
> Subject: RE: Auto import-collapse
>
>
> >     There was some discussion on this some months ago.
> > In fact I have written a BCEL based tool to do the expansion
> > of import.I think Nick Sieger had started a JDEE extension to do that
> > kind of stuff using my tool.I do not know what is the current
> > state of that
> > though. Does anyone have any clue ? Is it part of JDEE now ?
> >
> > Check the following threads -
> >
> > http://www.mail-archive.com/[email protected]/msg01022.html
> >
> > http://www.mail-archive.com/[email protected]/msg01127.html
> >
> >
> > -regards,
> > sandip
>
> Unfortunately, the auto-importer I wrote only works if you already have a
> compiled version of that class.  It appears that Matt needs to do this
> before the first compile.  So there needs to be some parsing of symbols in
> the java file in order to automate the import of all unqualified symbols.
> Unfortunately, semantic 1.x does not parse method bodies so there
> would have
> to be another way to do it.  Personally, I use `next-error' in tandem with
> `jde-import-find-and-import' quite a bit.
>
> Best,
> /Nick
>
> >
> > > -----Original Message-----
> > > From: Matthew Rippa [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, January 22, 2002 11:14 AM
> > > To: JDE Mailing List
> > > Subject: Auto import-collapse
> > >
> > >
> > > HI,
> > >
> > > I know this is just being lazy, but is there a way, after
> > > just witing a
> > > class, to have the JDEE import and collapse all necessary classes?
> > >
> > > I seem to be spending "considerable" time using C-c C-v C-z
> > > on each class
> > > name. --although I coudn't live without that feature! 8-)
> > >
> > > Thanks for any help,
> > > -Matt
> > >
> >
> >

Reply via email to