If you have access to bash
(on Windows, you do if you install Git, on Mac/Linux, you already have it) then this little one-liner can do a half-decent job of narrowing down the search:
YOURPROPS=messages.properties
SRCDIR=src
egrep -v "($(
cut -s -d = -f 1 <$YOURPROPS |
while read prop; do
grep -q -d recurse '"'"$prop"'"' $SRCDIR && echo "$prop";
done | xargs echo | sed 's/ /|/g'))" $YOURPROPS | cut -s -d = -f
(This assumes all properties are written like name=value
with no extra spaces around the equals sign, that you use equals sign rather than colon or space for separator, etc.)
It will output all properties which don't appear enclosed in double quotes in any file in the $SRCDIR
. This means that it will might give some false positives. For example, if you have something like this:
String msg = I18n.getString("foo.bar." + "baz");
... it will think the property foo.bar.baz
doesn't appear in the source directory. But as I said, it helps narrow down the search a bit.