CodeMySky / java-importer

Help import package in Atom for Java Programmers
https://atom.io/packages/java-importer
MIT License
8 stars 3 forks source link

Feature: Improve scan feature #4

Open CodeMySky opened 9 years ago

CodeMySky commented 9 years ago
  1. Avoid scan when there is no project.
  2. Start scan when the paths changed
  3. Scan on a regular bases to detect new class.
SlimeQ commented 9 years ago

i've noticed issues where a class won't be found right after i create it. i'm guessing it's just not in the buffer yet, but it's odd because i'll have the class open in a different tab and the importer won't find it. it might be effective to just scan open tabs first.

on a sidenote i have the javac-linter package now, and it seems to be able to determine possible classes very effectively by scanning the build folder/classpath. looking at my current project (built with gradlew), i can see all compiled classes in build/classes/* in the proper tree structure. nested classes are labeled as Super$Subclass.class. scanning this folder would probably be a very cheap way to scan for classes internal to the project. for external dependencies, i've extracted my project_name.jar/libs file into a classpath and created a .classpath file which points to it so my linter doesn't throw up