Paul Kinnucan <[EMAIL PROTECTED]> writes:


]>import statements.  In almost every case, when I use class Foo in code, I
]>want to import Foo from it's first occurrence on the classpath... so with
]>this feature enabled, I could type "Foo blegga = new Foo()" and the
]>
]>import com.warga.bar.Foo;
]>
]>statement would be automatically inserted in the import block at the top of
]>the file, if it wasn't already there, the next time the class is compiled.
]>
]
]Why not immediately?


]Meanwhile, if you haven't already, I'd suggest playing with the new JDE
]2.1.5 command, jde-wiz-import (C-c C-v C-z). This command prompts you to
]enter the qualified name of the class to import. It then generates the
]import statement at the top of the buffer or after any existing import
]statements. I use the command a lot.

I was thinking that something along the lines of jde-wiz-import, without the 
qualification condition, maybe better i.e. you don't enter a fully qualified class. 
The wizard instead allows you to specify just the classname and does the 
import(defaulting to something at point perhaps). Typically, the wizard would search 
the jde-compile-option-classpath. 
            One problem that I came up against is zip/jar files. The only solution to 
this, that I could think of, was to use the jar command to list the files in the 
various jar files and store the output on disk. Ofcourse, entries in classpath that 
aren't jar files will be scanned every time.

   My contention is that contents of your classpath(read jar files) do not change that 
often. So you should be able to generate this listing when there is a change.

Anyone with a better solution?

Ram.
-- 
-------------------------------------------------------------------------------
Ramkarthik Kalyanasundaram                  
CRM Products Division                    
Oracle Corporation                      
-------------------------------------------------------------------------------

Reply via email to