SlickEdit Community

Archived Read Only Forums => SlickEdit 2014 v19 beta => Topic started by: jporkkahtc on August 25, 2014, 06:59:35 pm

Title: Java: Organize Imports
Post by: jporkkahtc on August 25, 2014, 06:59:35 pm
This seems to be removing imports that are needed.
I don't think it used to have this problem.

For example, I have this in a function:

         } catch (RemoteException e) { Log.e(TAG, "OOps " + e.getMessage()); }
Yet, OrganizeImports will remove
    import android.os.RemoteException;
and cause the build to fail.
Title: Re: Java: Organize Imports
Post by: Lee on August 26, 2014, 04:10:09 pm
I have not been able to replicate this yet, but I can see how it could happen.  Is it importing the same class from a different package?  Do you have a sample that you can send for me to take a look at?  And how have you got Java > Organize Imports configured?
Title: Re: Java: Organize Imports
Post by: jporkkahtc on August 26, 2014, 05:51:48 pm
I Java->OrganizeImports, the only thing checked in "Auto add import during code help for java".
Package sort order: java, javax, org, com.


Today, same file, when I try it remove all imports except

 
import java.util.ArrayList; import android.os.RemoteException; 
When I run it again, it now asks me to resolve "Log" (either adroid.util.Log or com.android.tools.layoutlib.create.Log).
Each time I run OrganizeImports, it toggles between 2 and 3 imports (including "Log" or not). 
I will send the file via private message.