Editing C and C++ Source Files
The IDE's built-in Source Editor enables you to view, create, and
edit your C and C++ source code. You can open the Source Editor window by
double-clicking an editable element in the Projects window or by
choosing File > New to create a new file.
You can also edit Fortran source code, as explained in Editing Fortran Source Files.
The IDE has many features to simplify coding of C and C++ files
such as:
- Code completion.
A code completion box displays possible
ways of completing the expression you are typing.
- Code templates.
You can enter common code snippets by
typing abbreviations for those snippets. You can use built-in
code templates and also create your
own code templates.
-
Code Folding.
Enables you to collapse sections of code, such as
declaration blocks and method bodies.
- Pair Completion, Smart
Enter, and Smart Semicolons. When you type a
quotation mark, bracket, brace, or parenthesis, the Source Editor
automatically inserts the closing character. The matching is
"smart", so the closing characters are not duplicated if you type
them yourself.
- Classes Window. Lets you
view all of the classes in your project and their members and fields.
- Using the Call Graph.
Displays a tree view and graphical view of the
functions called from a selected function, or the functions that
call that function.
- Include Hierarchy Window.
Lets you inspect all header and source files that are directly
or indirectly included in a source file, or all source and header files that
directly or indirectly include a header file.
- Type Hierachy Window Lets you inspect all subtypes or supertypes of a
class.
- Navigator Window.
Provides a compact view of the file that is currently
selected, and simplifies navigation between different
parts of the file.
- Hyperlinks. Let you jump
from the invocation of a class, method, variable, or constant to its
declaration. You can also jump from a function call to the function definition,
from a function definition to the function declaration, and from a function
declaration to the function definition.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.