SapphireSteel Forum
Welcome, Guest. Please login or register.
April 26, 2017, 05:23:24 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Sapphire and Amethyst IDEs
4074 Posts in 848 Topics by 708 Members
Latest Member: dcham_inbsys
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Amethyst
| | |-+  Adding import statements when not needed
« previous next »
Pages: [1] Print
Author Topic: Adding import statements when not needed  (Read 3015 times)
Jason King
Full Member
***
Posts: 159


« on: August 03, 2010, 01:55:25 PM »

Import statements are being added from packages that have already been included.  For example, I might have "import foo.*;" but Amethyst will additionally place "import foo.bar;" when I attempt to use the class bar.

Cheers,
Jason
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #1 on: August 05, 2010, 02:15:16 AM »

OK.

fixed.

Dermot
Logged
Jason King
Full Member
***
Posts: 159


« Reply #2 on: August 13, 2010, 12:07:59 PM »

Hi Dermot,

I believe I'm still having this problem with RC2.  Also, not mentioned in the original post - if I attempt to use a class from package foo (foo.bar) in another class from package foo (foo.test) then I will also get the unneeded import statement.

Cheers,
Jason
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #3 on: August 13, 2010, 01:07:26 PM »

Hi Jason,

I think this is connected to the problem reported by san83 in the RC1 Bugs/Issues thread.

I'm looking at this now - but I'm not sure that I want to fix it at this stage. The auto-import code really needs to be smarter than it is, and that might involve some work.

If it's a simple fix, I'll do it - but if not it will have to wait for a post release bug fix.

Dermot
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #4 on: August 14, 2010, 02:01:45 PM »

I think I've fixed this on the second attempt. But the 'add import' processing is still a bit simplistic. It will add imports after the first import statement sometimes - even if its the wrng place to do it.

Dermot
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!