String documentPath = document.getPath();
if (org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(documentPath)) {
new SourceIndexer(document).indexDocument();
} else if (org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(documentPath)) {
new BinaryIndexer(document).indexDocument();
}
}