OSDN Git Service

make DalvikRunner ignore .#Foo.java files
authorBrian Carlstrom <bdc@google.com>
Tue, 16 Mar 2010 16:46:48 +0000 (09:46 -0700)
committerBrian Carlstrom <bdc@google.com>
Tue, 16 Mar 2010 17:37:25 +0000 (10:37 -0700)
commitfb9714b32b27964d738a9181d55e140c52555bc0
tree1f145cb357f44cbb71d35f97b411b22b490f4e14
parentb28af2e0f3804015c0ddcbb5485e298ffa299da3
make DalvikRunner ignore .#Foo.java files

Emacs makes hidden bogus symlinks for open modified files such as
".#Foo.java -> user@host.pid:rand" which I'm guessing are to identify
the owning user/host/process. Unfortunately, DalvikRunner was picking
these up as source and trying to compile them.

This change makes NamingPatternCodeFinder ignore these. In order to
avoid duplicating this in all the subclasses, the subclasses now call
super.matches as a first pass. Now subclasses only apply any
additional filtering they want. MainFinder.matches was deleted since
it wasn't adding any new restrictions.

We arguably could add a better starting filter perhaps, but skipping
dot files seems a reasonable first stem.

Change-Id: Ic9f5ec0bb629d5e1bc25a5b80a6619a64285d2b0
libcore/tools/runner/java/dalvik/runner/CaliperFinder.java
libcore/tools/runner/java/dalvik/runner/JUnitFinder.java
libcore/tools/runner/java/dalvik/runner/MainFinder.java
libcore/tools/runner/java/dalvik/runner/NamingPatternCodeFinder.java