For navigable index, store also the declaration's position.
1.1 --- a/remoting/server/indexer/usages/src/org/netbeans/modules/jackpot30/indexer/usages/IndexerImpl.java Tue Aug 21 13:33:42 2012 +0200
1.2 +++ b/remoting/server/indexer/usages/src/org/netbeans/modules/jackpot30/indexer/usages/IndexerImpl.java Wed Aug 22 08:31:07 2012 +0200
1.3 @@ -227,6 +227,7 @@
1.4
1.5 if (NAVIGABLE) {
1.6 currentClassDocument.add(new Field("declarationSignature", Common.serialize(ElementHandle.create(el)), Store.YES, Index.NOT_ANALYZED));
1.7 + currentClassDocument.add(new Field("declarationPosition", Long.toString(trees.getSourcePositions().getStartPosition(getCurrentPath().getCompilationUnit(), node)), Store.YES, Index.NO));
1.8 }
1.9
1.10 IndexAccessor.getCurrent().getIndexWriter().addDocument(currentClassDocument);
1.11 @@ -295,6 +296,7 @@
1.12
1.13 if (NAVIGABLE) {
1.14 currentFeatureDocument.add(new Field("declarationSignature", Common.serialize(ElementHandle.create(el)), Store.YES, Index.NOT_ANALYZED));
1.15 + currentFeatureDocument.add(new Field("declarationPosition", Long.toString(trees.getSourcePositions().getStartPosition(getCurrentPath().getCompilationUnit(), getCurrentPath().getLeaf())), Store.YES, Index.NO));
1.16 }
1.17
1.18 IndexAccessor.getCurrent().getIndexWriter().addDocument(currentFeatureDocument);