How about making the regexp check to make sure the string isn't inside
quotes?

> -----Original Message-----
> From: Sandip Chitale [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 08, 2001 3:15 PM
> To: 'Javier Lopez'; 'Schewe, Jon (MN65)'; 'Jde List (E-mail)'
> Subject: RE: jde-import-find-and-import puts imports in wrong place
> 
> 
>  
> > I think changing this line of code
> > from  (list (cons "import[ ]+\\(.*\\)[ ]*;" 'backward)
> > to (list (cons "^import[ ]+\\(.*\\)[ ]*;" 'backward)
> > should do the trick for most cases. 
> 
> This assumes that the import statement starts at the 
> beginning of line.
> Granted that is the case most of the time. However for cases like -
> 
> /**/ import java.awt.*; /*
> import java.awt.Component;
> import java.awt.Container;
> import java.awt.Font;
> import java.awt.Window;
> //*/
> 
> it wont. I use the above to achive quick switching between
> import-on-demand and specific-import (inserting a slash
> at the beginning of first line does the trick).
> 
> I think Senator/Semantic should be used if we want to solve
> this most precisely. I do not have a clue though how to do it
> ...sorry.
> 
> -sandip
> 

Reply via email to