'\" t .\" Title: codequery .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 12/05/2019 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "CODEQUERY" "1" "12/05/2019" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" codequery \- create codequery database .SH "SYNOPSIS" .sp \fBcodequery\fR .SH "EXAMPLE" .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Change directory to the base folder of your source code like this: .sp .if n \{\ .RS 4 .\} .nf cd ~/projects/myproject/src .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} Create a cscope\&.files file with all the source files listed in it (Use java as example here)\&. .sp .if n \{\ .RS 4 .\} .nf find \&. \-iname "*\&.java" > \&./cscope\&.files .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} Create a cscope database like this: .sp .if n \{\ .RS 4 .\} .nf cscope \-cbR .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} Create a ctags database like this: .sp .if n \{\ .RS 4 .\} .nf ctags \-\-fields=+i \-n \-R \-L \&./cscope\&.files .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 5.\h'+01'\c .\} .el \{\ .sp -1 .IP " 5." 4.2 .\} Run cqmakedb to create a CodeQuery database out of the cscope and ctags databases, like this: .sp .if n \{\ .RS 4 .\} .nf cqmakedb \-s \&./myproject\&.db \-c \&./cscope\&.out \-t \&./tags \-p .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 6.\h'+01'\c .\} .el \{\ .sp -1 .IP " 6." 4.2 .\} Open myproject\&.db using the CodeQuery GUI tool by running the following\&. Wild card search (* and ?) supported if Exact Match is switched off\&. Or use cqsearch, the CLI\-version of CodeQuery (type cqsearch \-h for more info)\&. .sp .if n \{\ .RS 4 .\} .nf codequery .fi .if n \{\ .RE .\} .RE .SH "COPYRIGHT" .sp Copyright 2013\-2015 ruben2020 \fIhttps://github\&.com/ruben2020/\fR .sp Website: \fIhttps://github\&.com/ruben2020/codequery\fR .SH "AUTHOR" .sp This manual page was written by ChangZhuo Chen \fI<\fR\fIczchen@debian\&.org\fR\fI>\fR for the \fBDebian GNU/Linux system\fR (but may be used by others)\&.