Codase offers much more than simple text search, in order to take full advantage
of its powerful features, you should be familiar with certain programming
language concepts. Basically, codase breaks a stream of codes into meaningful
programming language constructs, consisting of classes, methods, fields,
constants and variables, each of which in turn has definitions and references.
constant, ONE , line 20
In general, we don't distinguish between methods and functions; all of them are
referred as methods. Definition means where an element is first
defined, whereas references mean the usages of the element. We use the word
class in a loose manner, and it refers to classes,
structs, enums, unions and interfaces.
All of these language constructs can be searched with the corresponding
search form. The tab on the top controls the type of element to
search. When a + is present, it indicates more options are available, and you
can enter more values to further constrain the search. On the right
side is a drop down list for selecting the programming language to
search. After at least one field is filled, you can then click the Search
button or press the Enter
key to start the search.
When search is finished, code snippets are displayed, where you can examine
results and browse through whole source files. Source codes are
displayed using a smart code browsing system with highlights and syntax
sensitive colors. Class, method and comment regions can be
expanded and collapsed for you to easily focus on the most important
portion of code.
Smart query provides a powerful way for you to freely type queries to perform different kinds of searches.
Our query parser processes the input and redirects to different types of searches, such as method calls,
method definitions, class definitions, field definitions, field references, and variables. You can pretty much use this form
to perform most of the searches as described in the following sections.

The above examples find any main method with arg type of string[] that contains a variable x and a method call println.
Sample Searches
These are a few sample queries. The
- Search the main function def, you can type: int main(int argc, char** argv) {}
click here
- Search fopen and fseek function calls, you can type: fopen; fseek;
click here
- Search code invokes any methods of javax.swing.JPanel, you can type: javax.swing.JPanel::?
click here
The query need to conform to our syntax format, which is very similar to java/c++/c# programming languages. For a complete description on smart query, please read this document.
3. Search Method Call
You can use this form to search the invocation of an API, a function, a method
defined in a class, or an operator. You can simply enter a name, or press
the + to expand the form to enter more info on parameters, enclosing
class, object instance, constants and number of parameters.

Fields are described as below:
|
Field Name |
Description |
Examples |
| Method Name |
The name of the method call to search, including operators |
printf, socket, ToString, CreateWindow,
<<, new |
| Class/Namespace |
The enclosing class or namespace where the method is defined |
qstring, java.lang.Thread, std |
| Return Type |
The return type of the method call |
void, char*, float, Thread |
| Parameter Types |
The parameter types of the method call, using space as separator |
int char*, Thread int String |
| Object Name |
The object or instance name the method call is exerted on. |
myobj, System.out
|
| Constants |
The constant names, usually enum or macro names, used inside the
method. Multiple constants can be entered with space as separator |
SEEK_SET |
| Number of Params |
Drop down list to select the number of parameters |
3 |
Sample Searches
Note all fields are optional, the only requirement is that at least one field is
filled with a value.
-
Find code that invokes any methods defined in java.lang.String
class, you only need to specify the Class/Namespace name,
click here
-
Find code that contains invocation of the << operator,
click here
-
Find code that invokes any method that takes 2 parameters of
int types and returns int type,
click here
-
Find code that contains java.lang.Thread.Start method
call,
click here
-
Find code that contains System.out.println method
call, System.out needs to be entered into the
Object Name field,
click here
-
Find code that contains fopen function call and
macro constant SEEK_SET,
click here
4. Search Method Definition
You can use this form to search the definition of a function, a method defined
in a class, or an operator. You can simply enter a name, or press the + to
expand the form to enter more info on parameters, enclosing class, and number
of parameters.

Fields are described as below:
|
Field Name |
Description |
Examples |
| Method Name |
The name of the method to search, including operators |
printf, socket, ToString, CreateWindow, << |
| Class/Namespace |
The enclosing class or namespace where the method is defined |
qstring, java.lang.Thread, std |
| Return Type |
The return type of the method |
void, char*, float, Thread |
| Parameter Types |
The parameter types of the method, using space as separator |
int char*, Thread int String |
| Number of Params |
Drop down list to select the number of parameters |
3 |
Sample Searches
Note all fields are optional, the only requirement is that at least one field is
filled with a value.
-
Find the CreateWindowExA method,
click here
-
Find any operators named as "<< ",
click here
-
Find any method that takes 2 parameters of int types
and returns int type,
click here
-
Find any method that takes 10 parameters,
click here
5. Search Class Definition
You can use this form to search the definition of a struct, a union, an enum,
an interface, or a class. You can simply enter a name, or press the + to
expand the form to enter more info on its parent class and its
implementing interfaces.
The HelloWorld
class in our example can be found using this form.

Fields are described as below:
|
Field Name |
Description |
Examples |
| Class Name |
The name of the class to search |
HelloWorld, Thread, CString, Rect, color |
| Inherit From |
The parent class name |
object, Window |
| Interface(s) |
One or more interface names that the class implements |
Runnable, ICloneable, System.IServiceProvider |
Sample Searches
Note all fields are optional, the only requirement is that at least one field is
filled with a value.
-
Find the SimpleTest class,
click here
-
Find all classes that inherits from object
,
click here
-
Find all classed that implements the Runnable
interface,
click here
6. Search Class Field
You can use this form to search the definition of a field defined in a class,
an interface, a struct, a union or an enum. You can simply enter a name,
or press the + to expand the form to enter more info on its type and
its enclosing class.
The data field
defined in the HelloWorld class in our example
can be found using this form.

Fields are described as below:
|
Field Name |
Description |
Examples |
| Field Name(s) |
The name(s) of the field(s) to search |
data, width, height, x, red |
| Type |
The type for the field |
int, String, single, double, char* |
| Class/Namespace |
The enclosing class where the field is defined |
HelloWorld, Rect, color |
Sample Searches
Note all fields are optional, the only requirement is that at least one field is
filled with a value.
-
Find the data field defined in any classes,
click here
-
Find all fields that has a type of float
,
click here
-
Find all fields defined in Rectangle struct,
click here
7. Search Variable
You can use this form to search local variables used inside a method. You can
simply enter a name, or press the + to expand the form to enter more
info on the type of the variable and the method name where the variable is
used.
The h variable defined
in the main method in our example can be found
using this form.

Fields are described as below:
|
Field Name |
Description |
Examples |
| Variable Name(s) |
The name(s) of the variable(s) to search |
h, var1, o, tmp |
| Type |
The type for the variable |
int, String, single, double, char* |
| Method Name |
The name of the method where the variable is used |
main, <<, start, run |
Sample Searches
Note all fields are optional, the only requirement is that at least one field is
filled with a value.
-
Find all variables named as var1 used in
any methods,
click here
-
Find all variables that has a type of float
,
click here
-
Find all variables of type string used in
main method,
click here
-
Find all usages of the variable cout,
cick here
8. Search Field Reference
Field reference is the invocation of a field, e.g, o->width
= 20, width
is a field reference. You can use this form to search field references.
You can simply enter a name, or press the + to expand the
form to enter more info on type, enclosing class, object instance,
and method name.

Fields are described as below:
|
Field Name |
Description |
Examples |
| Field Name(s) |
The name(s) of the field(s) to search |
data, width,
height, x, red |
| Type |
The type of the field |
void, char*, float, Thread |
| Class/Namespace |
The enclosing class or namespace where the field is defined |
qstring, java.lang.Thread, std |
| Object Name |
The object or instance name the field reference is exerted on. |
myobj, System.out
|
| Method Name |
The name of the method where the field is
used |
main, <<, start, run |
Sample Searches
Note all fields are optional, the only requirement is that at least one field is
filled with a value.
-
Find all references of the data field defined
in any classes,
click here
-
Find all references of any fields that has a type of float
,
click here
-
Find all references of any fields defined in Rectangle
struct,
click here
-
Find all references of the data field defined
in any classes that is used inside the main method,
click here
9. Search Free Text
When you are not sure about which search form to use, you can always resort to
the free text search, where you can type and find aything. You simply
enter texts, in the same way as you use other general search engines.

The drop down box in the middle lists the types of info you can
search, and you can choose All to search all texts, or choose one category to
refine the search. The following table describes these options:
|
Category |
Description |
Examples |
| All |
search all texts |
|
| Project Name |
match project name |
wine |
| File Name |
match source file names |
simpletest.cpp |
| Literal |
| Constant(s) |
enum constants or macro defines |
SEEK_SET |
| Literal String |
literal strings, usually double quoted |
"hello world.\n"
|
| Keywords |
reserved words of programming languages |
typeof, while, for, try, throw, const
|
| Comments |
| Comments |
all comments |
/* implementation of main */
|
| Comments for Class |
documentation comments for classes |
/** the String class */
|
| Comments for Method |
documentation comments for
methods |
/// the Start method, /** the start method
*/
|
| Comments for Class Field |
documentation
comments for fields |
/** the data field */, /// the data field in C#
|
| Class |
| Class Name |
match class names |
Thread, CString, object
|
| Class Field Name |
match field names |
data, width, height, x
|
| Inside Class Field |
match any texts inside field definitions |
|
| Method |
| Method Name |
match method
or operator names |
main, <<, start, Run
|
| Method Call Name |
match method call names |
printf, start, run, getName
|
| Macro |
| Macro Definition |
macro define names in c/c++ |
#define ONE1
|
| Macro Reference |
macro names used as reference |
i = ONE + 1
|
| Variable & Field |
| Variable Name |
match variable names |
tmp, var1, o, x, i
|
| Inside Variable |
match any texts inside variable names |
|
| Field Reference Name |
match field names used as references |
o->width
|
| Inside Field Reference |
match any texts inside field references |
|
For literal strings, keywords, comments and macro
definitions, free text search is the only form to use. Free text
search is easy to use, but comes with a price, namely, the returned code
snippets may come in random portion of code, rather than in unit of
method. In addition, it usually returns more entries compared to other type of
searches. If you want to search class, method and field names, it's
better to use other tabs to search.
Sample Searches
-
Find macro definition of SEEK_SET,
click here
-
Find macro reference of SEEK_SET,
click here
-
Find keyword throw ,
click here
-
Find literal string Hello World,
click here
-
Find constant red,
click here
-
Find make within any contexts,
click here
10. Search Inside Specific Project
Codase provides an easy mechanism for you to constrain your search to a specific
project. When search results are displayed, project info is included with
each entry, and also on the right side a list of projects is
displayed. There are two ways to constrain to a project,
-
From the project list on right side, select and click a project, results will
be filtered to display those entries that come from the selected project.
-
From the displayed result entry, click a project name after Project:, you
will come to the project info page, where Search In This Project can
be clicked to search inside a specific project. Search forms are exactly same
except the Search button is replaced with Search This
Project button. When this is enabled, only results found from the
specific project will be displayed.