Re: Bugs introduced that affected jde-import-all
Paul Landes <[email protected]>
| Newsgroups | gmane.emacs.jdee.devel |
|---|---|
| Message-ID | <[email protected]> |
Sure, just invoke the function more than once. So we have: 1. Inserts the import: --snip-- import java.util.Map; --snip-- 2, Inserts a line above the import: --snip-- import java.util.Map; --snip-- 3. Inserts a line after the import: --snip-- import java.util.Map; --snip-- I've also seen it import IN the class definition itself instead of before depending on where the point is. That however might have been a result of having both bugs at the same time. Regardless, I don't see why you'd want to put a newline anywhere. When you import a class, all it is suppose to do is import at the end of the import list with no spaces. If you want to pretty up the imports, use jde-import-organize (that's what it is for). Thanks. On Jan 8, 2010, at 1:20 PM, Jeff Peck wrote: > Paul, > Is there a spec or a set of test cases that define the > 'correct' (non-buggy) behavior? > We do try to test before committing, but when the intent is to > change the behavior, > it is difficult to tell when such a change is a fix/feature vs a bug. > > For example, fixing the "import after comment" problem clearly > requires > putting a new-line in a new place (a change of behavior). > And in my testing, it goes in the correct place, and does not > introduce > spurious new-lines. > > If you have a test-case that demonstrates the problem of "additional > lines being inserted" > I will investigate/resolve that. > > Jeff > > ----- Original Message ----- From: "Paul Landes" <[email protected]> > To: "JDEE Development" <[email protected]> > Sent: Friday, January 08, 2010 12:31 AM > Subject: [jdee-devel] Bugs introduced that affected jde-import-all > > >> I found two bugs when using `jde-import-all': >> >> 1. Classes not being imported. >> 2. Additional lines inserted when importing classes. >> >> The first bug introduced in 181 when adding this to jde.el >> >> (autoload 'wisent-java-default-setup "wisent-java" "Hook run to >> setup Semantic in `java-mode'." nil nil) >> >> which comes from: >> >> http://www.mail-archive.com/[email protected]/msg07334.html >> >> Looks like the 1.5 implementation is buggy as the URL states it might >> be. Perhaps it will work better in the newer cedet, but for now it >> doesn't make sense to break a major feature like `jde-import-all'. >> >> The second bug was introduced in 183 and inserts lines around >> inserted >> imports. Here's the comment for this: >> >> Also fixed a bug where the import insertion point did not go to the >> next line after the last import. so if you had a comment on the last >> import, jde would insert before that comment... >> >> >> This all highlights the need for some kind of automated testing. >> Also, these bugs took many hours to track down and fix so please do >> some basic testing after making big changes like adding 1.5 parsing >> cedet code and inner class importing. >> >> Thanks to all of our for your contributions and hard work. >> >> -- >> Paul Landes >> landes at mailc dot net >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> jdee-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jdee-devel > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev