Author Topic: Beta2: java organize imports not working  (Read 1857 times)

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Beta2: java organize imports not working
« on: September 04, 2014, 03:44:04 am »
The organize import function still doesn't consult the external jars to resolve imports and just nukes the ones it doesn't find. In my example, these are imports from the junit jar.
The first 2 attached screen shots show a before/after situation when using explicit imports.
The next shot shows the error generated when using wildcards
The last shot, for reference, shows the structure Intellij builds from external jars (e.g. junit). SE should do something similar to be able to resolve symbols.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3660
  • Hero Points: 483
Re: Beta2: java organize imports not working
« Reply #1 on: September 10, 2014, 07:10:51 pm »
SlickEdit can handle symbols from external Jars if you have tagging set up properly for those symbols.

Two options:
  1) Add a Java language-specific tag file and add the external jar files to it that you are using.
      Tools > Tag Files... > Add Tag File > Java ...

  2) Add an additional project to your Java workspace for external jar files that your project requires.
      Project > New... > Project > Generic [ check Add to current workspace ]

Using either of these techniques will make SlickEdit aware of the symbols in the jar files you are using.

There is an outstanding feature request for SlickEdit to tag Jar files that you add to your class path.  Due to a number of complications we have not yet implemented this option, but we plan on doing it in a future release.  In the meantime, the above workarounds work quite well, and give you a lot more control over what is tagged and what isn't tagged.