CW816BITIDEUG
CW816BITIDEUG
Development Studio
8/16-Bit IDE User’s
Guide
How to Contact Us
I Introduction
1 8/16-Bit IDE User’s Guide Overview 13
Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Licensing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
CodeWarriorU.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Manual Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Keyboard Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
II Projects
3 Working with Projects 25
About Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Project Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Build Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Using Startup Dialog Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Loading Previous Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Accessing Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Start Using CodeWarrior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Managing Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Custom Project Stationery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Subprojects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4 Project Window 39
About Project Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Project Window Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Files Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Link Order Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Targets Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
File, Group, Layout, and Target Management . . . . . . . . . . . . . . . . . . . . . . . . . .46
Build-Target Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
6 Dockable Windows 59
About Dockable Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Working with Dockable Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
Dock Bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
7 Workspaces 67
About Workspaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
Using Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
III Editor
8 CodeWarrior Editor 73
Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
Editor Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
Interfaces Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
Functions Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
Markers Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
Document Settings Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
Version Control System Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
Other Editor Window Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Path Caption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
File Modification Icon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Text Editing Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Line and Column Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Pane Splitter Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
IV Browser
12 Using Browser 133
Browser Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Browser Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Browser Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
Browser Contextual Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
17 Linkers 173
Choosing Linkers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Linking Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
W-Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
VII Menus
22 IDE Menus 261
Windows Menu Layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
View Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Search Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Project Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Help Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
T-U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
V-Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
Index 297
Introduction
This section includes these chapters:
• “8/16-Bit IDE User’s Guide Overview”
• “CodeWarrior IDE Overview”
Release Notes
Please read the release notes. They contain important last-minute additions to the
documentation. The Release Notes folder is located on the CodeWarrior CD.
Licensing
Web-based licensing is available. It is a server licensing solution that generates FlexLM
v8 or later based license keys automatically over the world wide web through a
registration/activation process. You can register and activate permanent, node-locked
license keys.
Freescale products are shipped to customers with registration cards that contain a unique
registration number. Products that ship with a one year annual support certificate will also
have a unique registration number.
The registration website can be reached by selecting the Help > Register Product menu
command from the IDE’s main menu. Registration from the website collects the
registration code and verifies it against the correct product and gathers contact
information.
An email will be sent to you with the License Authorization Code and instructions. In the
IDE you can select Help > License Authorization to display the License Authorization
dialog box. Figure 1.1 shows the License Authorization dialog box.
Enter the License Authorization Code and select an ethernet address from the Node lock
ID for license dropdown list, if one exists. After entering the authorization code, the
CodeWarrior IDE will make an HTTP call to the Freescale licensing server with the
activation code and generate the permanent license keys. The resulting license keys are
automatically updated into the license.dat text file of the CodeWarrior product executing
the authorization. You can also manually edit the license.dat file per instructions provided
in the License_Install.txt file in the root folder of your CodeWarrior installation path. If
the IDE evaluation period expires prior to activation, you will have to manually edit the
license.dat file.
CodeWarriorU.com
CodeWarriorU.com offers a wide range of free, Internet-based courses in a wide variety of
computer programming topics. Use this supplement to the CodeWarrior documentation to
acquire more experience using CodeWarrior products.
CodeWarriorU.com courses include:
• Text-based instruction
• Expert instructors
• A variety of self-assessment and study materials
• Interactive message boards for communicating with instructors and students
CodeWarriorU offers many courses, such as:
• Learn Programming in C
For beginning programmers.
• Introduction to Java
For beginning and experienced programmers. Take this course to learn how to create
Java software.
• Introduction to C++
For beginning and experienced programmers. Take this course to learn how to create
C++ software.
• Intermediate C++
For programmers who completed the Introduction to C++ course and have basic C++
programming knowledge. Take this course to learn the foundation needed to create
more sophisticated C++ software.
To find out more, visit this web site:
http://www.CodeWarriorU.com/
Manual Conventions
This section explains conventions in the 8/16-Bit IDE User’s Guide.
Figure Conventions
The CodeWarrior IDE employs a virtually identical user interface across multiple hosts.
For this reason, illustrations of common interface elements use images from any host.
However, some interface elements are unique to a particular host. In such cases, clearly
labelled images identify the specific host.
Keyboard Conventions
The CodeWarrior IDE accepts keyboard shortcuts, or key bindings, for frequently used
operations. For each operation, this manual lists corresponding key bindings by platform.
Hyphens separate multiple keystrokes in each key binding.
Development Cycle
A software developer follows a general development process:
• Begin with an idea for new software
• Implement new idea in source code
• Have the IDE compile source code into machine code
• Have the IDE link machine code and form an executable file
• Correct errors (debug)
• Compile, link, and release a final executable file.
The stages of the development cycle correspond to one or more chapters in this manual.
Figure 2.1 on page 18 depicts the development cycle as a flowchart. Table 2.1 on page 19
details the different stages and their corresponding sections in this manual.
Start
Create
Edit
Yes
Compile
Compile
Errors?
No Yes
No Yes
No
Legend
Release
Start or End of the
process
End
Development Cy-
cle stage
Decision stage
Process flow
Table 2.1 Stage Descriptions and Related Sections in the IDE User’s Guide
Release Release for public use. Beyond the scope of this manual.
Projects
This section includes these chapters:
• Working with Projects
• Project Window
• Working with Files
• Dockable Windows
• Workspaces
About Projects
The IDE uses build targets and a Project Manager to organize source code and support
files. This section explains both components.
Project Manager
The IDE gathers source, library, resource, and other files into a project. The Project
Manager manipulates the information stored in the project.
Figure 3.1 diagrams Project Manager interactions with IDE tools. Table 3.1 explains the
interactions.
Build System
Legend
Information generated
by the IDE Additional information
Build Targets
For any given build, the project manager tracks:
• files and libraries
• link order
• dependencies
• compiler, linker, and other settings
The IDE stores this information in a build target. As the project changes, the project
manager automatically updates the build target. The project manager also coordinates
program builds, using the build-target information to call the appropriate tools in the
correct order with the specified settings.
For example, the project manager directs the build system to compile only those source
files that rely on information in a modified file.
Note that all of this operation happens automatically. The software developer does not
need to remember makefile syntax or semantics, and never has to debug makefile syntax
errors. The IDE simplifies the process, making it easier to develop software.
The project manager also supports multiple build targets within the same project file. Each
build target can have its own unique settings, and even use different source and library
files. For example, it is common to have both debug and release build targets in a project.
Figure 3.2 on page 28 shows a sample project with debug and release build targets.
Project
File #1 File #2
File #1 File #2
accessing instructions. The Startup dialog opens when you start CodeWarrior software,
unless you specify otherwise. This section describes using the CodeWarrior Startup dialog
box to create new projects, load previous projects or example projects, and access
tutorials.
To start the CodeWarrior IDE for CodeWarrior™ Development Studio for
Microcontrollers, select Start > Programs > CodeWarrior for Microcontrollers V6.x >
CodeWarrior IDE.
To start the CodeWarrior IDE for CodeWarrior™ Development Studio for S12(X), select
Start > Programs > CodeWarrior for S12(X) V5.x > CodeWarrior IDE.
NOTE The name of the CodeWarrior installation varies depending on the software
version and the core used.
The CodeWarrior software starts, and immediately the Startup dialog appears (see Figure
3.3). You can create a new project at this point, or access any of the other features
available from this dialog box.
To prevent the Startup dialog box from appearing when you start the CodeWarrior
software, uncheck the Display on Startup checkbox. The next time you start the software,
only the IDE screen appears. You can still access the Startup dialog box by selecting File
> Startup Dialog after starting the IDE.
NOTE To open the project wizard without using the Startup dialog box, select File >
New Project.
Accessing Tutorials
Click the Run Getting Started Tutorial button to access the library of tutorials available
with the CodeWarrior IDE. Tutorials cover subjects such as starting a project in C, using
Processor Expert, Device Initialization, and using the assembler.
Managing Projects
Use these tasks to manage projects:
• Create a new project
• Open existing project
• Save project
• Close project
• Inspect an open project
• Print an open project
Opening Projects
Use the IDE to open previously saved projects. CodeWarrior projects normally end in the
Freescale CodeWarrior Project extension of .mcp. Open projects to add, remove, or
modify files to enhance the capabilities of the final executable file.
1. Choose File > Open.
2. Find and select the project to open.
3. Click Open.
The IDE opens the project and displays its Project window.
NOTE The IDE prompts you for confirmation to update projects created in older
CodeWarrior versions.
Saving Projects
The IDE automatically saves projects and updates project information after performing
these actions:
• Closing the project
• Applying or saving a preference or target-setting option
• Adding, deleting, or compiling a file
• Editing group information
• Removing or compacting object code
• Quitting the IDE
Printing Projects
The Project Manager can print a complete listing of the Files, Designs, Link Order, or
Targets tab currently displayed in the Project window.
1. Select the Project window.
2. Click the Files, Designs, Link Order, or Targets tab.
3. Choose File > Print.
4. Set the print options in the print dialog.
5. Print the Project window contents.
The IDE prints the contents of the selected tab.
Closing Projects
Use the Close command to close a CodeWarrior project file at the end of a programming
session. The IDE automatically saves changes to a closed project.
1. Select the Project window to close.
2. Close the project.
• Choose File > Close.
• Click the close box in the Project window.
Advanced projects deal with these topics:
• Custom project stationery—modified project stationery tailored to advanced
programming needs.
• Subprojects—projects within projects.
• Strategies—obtaining the maximum benefit from advanced projects.
NOTE Custom project stationery requires in-depth knowledge about project structure
and operation. Before creating custom stationery, be sure to fully understand
existing project stationery included with the CodeWarrior product.
3. From the Example Projects dialog, select the project to use as a stationery base project.
4. Enter a name for the project in the Project name field.
This renames the example project file.
5. Enter a location in the Location field, or click on Set to browse to the location to which
to copy the project.
6. Click on Create Project.
The software creates your project based on the example you selected. You can modify and
use this project in whatever way you choose.
Subprojects
A subproject is a project nested inside a parent project. Subprojects organize source code
for the IDE to build prior to building the parent project. For example, the IDE builds
subprojects for an application’s plug-ins before building the parent project for the
application itself.
Opening Subprojects
The IDE can open a subproject from the parent Project window. Use this feature to more
conveniently open the subproject.
1. Double-click the subproject in the Files view of the parent Project window.
2. The IDE opens the subproject in its own Project window.
Strategies
Projects can organize files into build targets or subprojects. Each of these structures has its
own advantages. Choose the structure best suited to the programming need.
Build Targets
Build targets organize collections of files inside a project. Build targets have these
advantages:
• Using multiple build targets inside a single project allows access to all source code
for that project.
• Build targets organize different collections of build settings for a single project.
• Each project accommodates up to 255 build targets.
• Exception: HC08 supports only one build target.
Subprojects
Subprojects incorporate separate, standalone projects into parent projects. Subprojects
have these advantages:
NOTE The number and names of the tabs in the Project window depend on the current
build target and on the installed IDE plug-ins.
Files Page
The Files page shows information about individual files in a project. The Files page shows
information about these file types:
• Text files—files that contain any type of text. Sample text files include Read Me files
and source files.
• Source files—files that contain source code only. Sample source files include C++
files and assembler files.
• Library files—files that contain special code designed to work together with a
particular programming language or operating environment.
Table 4.2 explains the items in the Files page.
Touch Indicates the touch status of each file. Click in this column to
toggle touching a file. Touching a file manually selects it for
compilation during the next build. Click the Touch icon to sort
files by touch status
File Displays a hierarchical view of the file and group names used
by the project. Click the column title to sort files by name.
Double-click a file to open it. Use the hierarchical controls to
display and hide group contents
Target Indicates whether each file belongs to the current build target.
Click in this column to toggle inclusion status. A black dot
indicates that a file is included with current build target. Click
the Target icon to sort files by inclusion status. The Target
column appears only when the project has more than one
build target
File Management
The project window lists all files found for all targets. If access paths are different for each
target and a file with the same name exists in each path, the project window will list the
occurrence of each file.
For example, if two header files named example.h are used with two targets (TargetA
and TargetB) and exist in separate locations for each target, you will see two entries of
example.h in the project window. If both targets use the same file in one location, then
a single entry will appear in the project window.
Select a file in the Files tab of the project window and view the Project Inspector window
to reveal the path for the selected file, and which targets use the file. You can also select a
file and click the right mouse button to display a context menu. Select Open in Windows
Explorer to display the path.
If a black dot is present in the target column for a listed file, then it is in the current target.
You can select this dot to toggle whether or not to include this file with the current target.
Double-click a source file to open it in the editor.
If you enable the Save project entries using relative paths option in the Target Settings
panel, file locations will be stored using a relative path from the access paths defined in
the Access Paths panel. If disabled, the IDE remembers project entries only by name. This
can cause unexpected results if two or more files share the same name. In this case, re-
searching for files by selecting the Project > Re-search for Files menu command could
cause the IDE to find the file in a different access path.
NOTE If you use source files with the same name in different locations, you should
enable the Save project entries using relative paths option.
Duplicate file names can also appear in the Files tab of the project window if a file is not
found on one of the access paths. This can happen if an access path has been removed
from the User Paths group in the Access Paths target settings panel. When the access path
is removed, a duplicate appears in the project window. The duplicate entry remains
displayed until the access path is restored.
If a project with several targets (for example Debug and Release target) uses the same file,
that file is shown as a single entry. If you remove the access path for that file, then a
duplicate entry will appear in the file list. This duplicate represents a missing file for the
current target. The second file entry is still available for the other target. Restore the access
path and choose Project > Re-search for Files to remove the duplicate entry in the list.
The Project > Re-search for Files command speeds up builds and other project
operations. The IDE caches the location of project files after finding them in the access
paths. Re-search for Files forces the IDE to forget the cached locations and re-search for
them in the access paths. This command is useful if you moved several files and you want
the IDE to find the files in their new locations.
If the Save project entries using relative paths option is enabled, the IDE does not reset
the relative-path information stored with each project entry, so re-searching for files looks
for source files in the same location. If the files are not there, the IDE only re-searches for
header files. To force the IDE to also re-search for source files, choose the Project >
Reset Project Entry Paths menu command. If the Save project entries using relative
paths option is disabled, the IDE re-searches for both header files and source files.
The Reset Project Entry Paths command resets the location information stored with each
project entry and forces the IDE to re-search for project entries in the access paths. This
command does nothing if the Save project entries using relative paths option is
disabled.
NOTE If the IDE is unable to locate or resolve the location of project files, a Rescued
items folder will appear. The IDE tries to locate the missing files and creates
new references. This can happen when project data information, access paths,
or other location settings in target settings panels are missing or have been
compromised, for example, if the location of a project and related data
directory have changed. One way this can happen is if a project has been
committed to a source repository by one person and checked out to a different
location by another person and a new project data folder is created.
Item Explanation
Synchronize To update the modification dates of files stored in a project, click the
Modification checkmark icon.
Dates
Use the Synchronize Modification Dates command to update files
modified outside of the CodeWarrior IDE, perhaps by a third-party
editor that cannot notify the CodeWarrior IDE of changes.
Targets Page
The Targets page presents information about the build targets in a project. Use this page to
create, manage, or remove build targets. Different build targets can store different IDE
settings. For example, two build targets can handle the same project. One build target
handles debugging the software, while the other build target handles building the software
for final release.
Table 4.4 explains items in the Targets page.
Item Explanation
Targets Displays all build targets and subprojects that the IDE processes to create
a binary file. These icons denote build-target status:
Removing Files/Groups/Layouts/Targets
The Remove command deletes files, groups, layouts, and build targets from the Project
window. Removing files from the Files tab removes them from the project itself and from
all build targets that use the files. Removing a file from the Link Order, Segments, or
Overlays tab only removes the file from the current build target.
3. Remove the selected item from the active build target on a Windows host by Selecting
Edit > Delete.
The IDE removes the file from the build target, but leaves the file itself intact. The file
can be reassigned to other build targets in the project.
Moving Files/Groups/Layouts/Targets
Reposition files, groups, layouts, or build targets in the Files, Design, Link Order, or
Targets pages with the cursor.
1. Select one or more files, groups, layouts, or build targets to move with the pointer.
2. Drag the selected items to a new position in the current page, using the focus bar as a
guide.
3. Release the mouse button.
The IDE repositions the selected files, groups, layouts, or build targets to the new location.
NOTE In the Link Order page, repositioning files changes the link order that the
Make command uses to build the final executable file.
Renaming Files/Groups/Targets
The Rename command renames files, groups, or build targets in the project.
Rename files
1. Open the file to rename.
2. Choose File > Save As.
3. Type a new filename in the Name text box.
4. Click Save.
The IDE saves the file under the new name. The new filename appears in the Project
window. Subsequent modifications affect the renamed file, leaving the original file intact.
4. Type a new name into the Enter Group Name text box of the Rename Group
window.
5. Click OK.
The IDE renames the group. For selections of more than one group, the Rename
Group window appears for each group.
Build-Target Management
These tasks help you manage build targets:
• Create a build target
• Remove a build target
• Set the default build target
• Rename a build target
• Configure build-target settings
Project menu
1. Choose Project > Set Default Target > buildtarget.
2. A checkmark indicates the default target.
Targets page
1. Enable the Project window.
2. Click the Targets tab.
3. Click the desired build-target icon.
The icon changes to indicate that the build target is now the default.
Managing Files
These tasks manage files:
• Create a new file
• Open an existing file
• Save a file
• Close a file
• Print a file
• Revert a file to a previously saved state
TIP Use the Customize IDE Commands window to add the New Text File menu
command to the File menu. Adding this menu command reduces the process of
creating a new text file to one step: select File > New Text File. See “Customizing
the IDE” for more information about using the Customize IDE Commands
window.
NOTE The CodeWarrior editor cannot open files that prohibit editing. For example,
the editor cannot open library files.
NOTE The menu does not show files that do not contain source code or are not yet
compiled.
Saving Files
Use the Save command to save source files to ensure their continued existence between
development sessions.
Choose File > Save.
NOTE If the file has no title, a save dialog appears. Type a filename and specify a
location for the file, then click Save.
3. Click Save.
The IDE creates a copy of the file under the new name, leaving the original file
unchanged.
Closing Files
The Close command closes open source files. Close editor windows to close a file.
1. Select an editor window to close.
2. Close the file window.
• Choose File > Close, or
• Click the close box.
NOTE The IDE displays an alert if the file is modified. The alert asks whether to save
changes to the file.
NOTE Use the same process to print the contents of a window, such as a Project
window.
Reverting Files
Use the Revert command to replace the current file with its previously saved version.
1. Choose File > Revert.
2. Click OK in the Revert changes to file dialog.
State Characteristics
Docked • Attached to the left, right, top, or bottom edge of the client
area
• restricted to the client area
• resizable
• has a dock bar instead of a title bar
Floating • Rests above all docked windows and MDI child windows
• movable outside the client area, like a floating palette
• has a thin title bar
• does not have Minimize or Maximize buttons
MDI Child • Normal child window of the client area, when running in
MDI mode
• restricted to the client area
Table 6.2 explains the difference between dockable windows and non-dockable windows.
In this table, the term non-modal refers to a window that does not require your attention
before allowing the IDE to proceed with other operations.
NOTE The default setting for project windows is to dock to an edge of the client area.
You can undock these windows.
Compound windows that have more than one pane dock as a group. You
cannot separately dock individual panes from these windows. For example,
you can dock the Thread Window, but you cannot dock the Stack Crawl pane
separately from the Thread Window.
NOTE The Docked command appears in the contextual menu for dockable windows
only.
The window docks to an edge of the client area. You can resize the docked window or
move it to a different edge of the client area.
Undocking Window
Use a contextual menu to undock a window from an edge of the client area to a floating
window or MDI child window.
1. Right-click the tab inside the docked window that represents the window you want to
undock.
A contextual menu appears.
Floating Window
Use a contextual menu to float a docked window or MDI child window.
1. Right-click the tab in the docked window or the title bar of the MDI child window.
A contextual menu appears.
2. Choose Floating from the contextual menu.
NOTE The Floating command appears in the contextual menu for floatable windows
only.
The window becomes a floating window (that you can drag outside the client area).
Alternately, double-click the tab in a docked window to float its corresponding window.
Unfloating Window
Use a contextual menu to dock a floating window or make it an MDI child window.
1. Right-click the title bar of the floating window.
A contextual menu appears.
2. Choose Docked or MDI Child from the contextual menu.
• Docked—dock the floating window
• MDI child—unfloat the window so that it becomes an MDI child window
The window unfloats and becomes the chosen window type.
Alternately, drag the floating window to an edge of the client area to dock it.
Dock Bars
A docked window has a dock bar instead of a title bar. Use the dock bar to perform these
tasks:
• move the docked window to a different edge of the client area
• collapse or expand view of the docked window
• close the docked window
Figure 6.4 shows a dock bar.
2. Click the collapse button on the dock bar of the docked window that you want
to collapse.
3. The docked window collapses to hide its contents.
About Workspaces
A workspace stores information about the current state of the IDE. This information
consists of the size, location, and the docked state (Windows) of IDE windows. If you
save a workspace during an active debugging session, the workspace also stores
information about the state of debugging windows.
The IDE can use a default workspace, or it can use a workspace that you create. The IDE
works with one workspace at a time. You can save and re-apply a workspace from one
IDE session to the next.
Using Workspaces
Use menu commands to perform these workspace tasks:
• Save a new workspace
• Open an existing workspace
• Close the current workspace
Saving Workspace
Save a workspace to store information about the current state of onscreen windows, recent
items, and debugging.
1. Arrange your workspace.
Move windows to your favorite positions and start or finish a debugging session.
2. Choose File > Save Workspace.
A Save dialog box appears.
3. Enter a name for the current workspace
NOTE Add the extension .cww to the end of the workspace name, for example,
myworkspace.cww. This extension helps you readily identify the
workspace file. The Windows-hosted IDE requires this extension to recognize
the file as a CodeWarrior workspace.
Opening Workspace
Open a workspace to apply its settings to the IDE.
1. Choose File > Open Workspace.
An Open dialog box appears.
NOTE Add the extension .cww to the end of the workspace name, for example,
myworkspace.cww. This extension helps you readily identify the
workspace file. The Windows-hosted IDE requires this extension to recognize
the file as a CodeWarrior workspace.
Closing Workspace
Close the current workspace after you finish working with it.
1. Choose File > Close Workspace.
2. The IDE closes the current workspace.
NOTE You cannot close the default workspace, however, the IDE Extras preference
panel contains an option that determines whether the IDE uses the default
workspace.
Editor
This section includes these chapters:
• CodeWarrior Editor
• Editing Source Code
• Navigating Source Code
• Finding and Replacing Text
Editor Window
Use the editor window to create and manage text files or source files. The window
contains these major parts:
• Editor toolbar
• Text-editing area
• Line and column indicator
• Pane splitter controls
Figure 8.1 on page 74 shows the editor window. Table 8.1 on page 74 explains the items
in the editor window.
Editor Toolbar
Use the editor toolbar to complete these tasks:
• Open interface and header files
• Find function definitions
• Set and clear markers
• Modify file formats
• Control syntax coloring
• Execute version-control operations
• Determine a file’s save state
This section explains how to expand and collapse the toolbar, and how to perform each
toolbar task.
Interfaces Menu
The Interfaces menu lists the source files included in the current source file.
See “Finding Interface Files” for information on navigating source code with the
Interfaces menu.
Functions Menu
The Functions menu lists the functions (routines) defined in the current file.
See “Locating Functions” for information on navigating source code with the Functions
pop-up.
Markers Menu
The Marker menu lists markers placed in the current file. Use markers to scroll to specific
items in source code and find code segments by intuitive names.
See “Using Markers” for information on navigating source code with Markers.
Path Caption
The Path caption shows the path to the active file.
Text Manipulation
Use these tasks to manipulate text files:
• Select text
• Overstrike text
• Use virtual space
• Indent text
This section explains how to perform each task.
NOTE Enable the Left margin click selects line option in the Editor Settings
preference panel to use the right-pointing arrow cursor.
Lines
Follow these steps to select a line of text:
• Triple-click anywhere on a line, or
• Click the right-pointing cursor in the left margin of the line.
Multiple Lines
Follow these steps to select multiple lines of text:
• Drag the cursor over several lines of text and release, or
• Position the cursor at the beginning of a selection range, then Shift-click the end of
the selection range to select all text between the two points, or
• Drag the right-pointing cursor to select lines of text.
Entire Routines
Follow these steps to select an entire routine:
1. Hold down the Shift key.
2. Choose a function name from the Function list menu.
Overstriking Text
Use the Overstrike command to toggle between text insertion and text overwriting mode
when entering text. Press the Ins key to toggle overstrike mode.
Punctuation Balancing
Balance punctuation to ensure that each opening parenthesis, bracket, or brace has a
corresponding closing counterpart. This section explains how to balance punctuation.
Balancing Punctuation
Use the Balance option when editing source code to make sure that every parenthesis (( )),
bracket ([ ]), and brace ({ }) has a mate.
1. Position the cursor between the suspect punctuation.
2. Check for the matching punctuation.
• Choose Edit > Balance
OR
• Double-click the parenthesis, bracket, or brace character to check for a matching
character.
From a text insertion point, the editor searches forward until it finds a parenthesis, bracket,
or brace, then it searches in the opposite direction until it finds the matching punctuation.
When double-clicking on a parenthesis, bracket, or brace, the editor searches in the
opposite direction until it finds the matching punctuation.
When it finds a match, it highlights the text between the matching characters. If the
insertion point is not enclosed or if the punctuation is unbalanced, the computer beeps.
Code Completion
Use code completion to have the IDE automatically suggest ways to complete the symbols
you enter in a source file. By using code completion, you avoid referring to other files to
remember available symbols.
C/C++ Code Completion will function more effectively when “Language Parser” is
selected for the “Generate Browser Data From” option in the Build Extras target settings
panel for a project. Java Code Completion is not affected by this setting.
NOTE To dismiss the Code Completion window after it automatically opens, press the
Esc key or click outside the active editor window.
Resize Bar Drag to resize the Code Completion list and the
Documentation pane.
Class Method
Function Namespace
Constant
Key Action
NOTE Only source code interface files can be opened. Libraries and pre-compiled
header files can not be opened.
Locating Functions
Find functions to expedite source-code editing. Most source files contain several functions
that divide a complicated task into a series of simpler tasks. The editor allows scrolling to
individual functions within the current source file. This section explains how to find
functions.
Going to Line
Use the Goto Line command to navigate to a specific source line in an editor window if
you know its number. Lines are numbered consecutively, with the first line designated as
line 1. The Line Number control at the bottom of the editor window shows the line
number where the text insertion point is positioned.
1. Open the Line Number window.
• Click the Line and Column Indicator control in bottom left corner of editor
window, or
• Choose Search > Go To Line
2. Type a line number in the Line Number text box.
3. Click OK.
NOTE If a line number does not exist, the insertion point jumps to the last line of the
source file.
Using Markers
Markers behave like labels in the editor, identifying specific parts of source code. Use
these tasks to work with markers:
• Add markers to a source file
• Navigate to a marker
• Remove some or all markers from a source file
Item Explanation
Markers list Displays a list of all markers in the current source file.
Cancel button Click to close the Remove Markers window without applying
changes.
Done button Click to close the Remove Markers window and apply changes.
Navigating to Marker
Once you add a marker, you can use the Marker menu to return to it later.
1. Select the marker name from the Marker menu.
2. The editor window scrolls to display the selected marker.
Symbol Definitions
You can find a symbol definition in your project’s source code. Supported online
reference viewers include HTMLHelp for Windows.
TIP You can also use the browser to look up symbol definitions.
TIP To return to your original location after viewing a symbol definition, press Shift-
Ctrl B. This key binding is equivalent to the Go Back menu command.
Single-File Find
Use the Find window to search for text within a single file:
• The Find operation returns a single instance of matching text.
• The Find All operation returns all instances of matching text.
Figure 11.1 shows the Find window. Table 11.1 on page 100 explains the items in the Find
window.
Item Explanation
Find text/list box Enter a search string. Click the arrow symbol to select a
search string that you entered previously.
Find button Click to start a search operation using the string in the Find
text/list box.
Find All button Click to search for all matches in the active editor window.
Cancel button Click to close the Find window without performing a search.
Match whole word Check to search for whole-word matches only, ignoring
checkbox matches within words.
Clear to search for all matches of the search string, including
matches within words.
Case sensitive Check to consider text case during the search. The search
checkbox operation distinguishes between a capital letter and the same
letter in lower case.
Clear to disregard text case during the search. The search
operation does not distinguish between a capital letter and the
same letter in lower case.
Stop at end of file Check to stop a search at the end of a file and not wrap around
checkbox to the beginning of the file.
Clear to wrap around to the beginning of the file and continue
a search. The search stops at the first match or at the current
cursor position.
Search up checkbox Check to perform a search operation back from the current
selection.
Clear to perform a search operation forward of the current
selection
Search selection only Check to search only the currently selected text and not the
checkbox entire file.
Clear to search the entire file.
All text option button Select to search all text in the file.
Item Explanation
Code only option Select to search only source code in the file.
button
TIP If you clicked the Find button to start the search, click Search >
Find Next to find the next match in the file.
Item Explanation
Find text/list box Enter a search string. Click the arrow symbol to select a search
string that you entered previously.
Replace with text/list Enter the replacement string. Click the arrow symbol to select
box a replacement string that you entered previously.
Find button Click to start a search operation using the string in the Find
text/list box.
Replace button Click to replace the current match with the replacement string.
Replace All button Click to replace all matches with the replacement string.
Cancel button Click to close the Find and Replace window without performing
a search.
Match whole word Check to search for whole-word matches only, ignoring
checkbox matches within words.
Clear to search for all matches of the search string, including
matches within words.
Case sensitive Check to consider text case during the search. The search
checkbox operation distinguishes between a capital letter and the same
letter in lower case.
Clear to disregard text case during the search. The search
operation does not distinguish between a capital letter and the
same letter in lower case.
Item Explanation
Stop at end of file Check to stop a search at the end of a file and not wrap around
checkbox to the beginning of the file.
Clear to wrap around to the beginning of the file and continue a
search. The search stops at the first match or at the current
cursor position.
Search up checkbox Check to perform a search operation back from the current
selection.
Clear to perform a search operation forward of the current
selection
Search selection only Check to search only the currently selected text and not the
checkbox entire file.
Clear to search the entire file.
All text option button Select to search all text in the file.
Code only option Select to search only source code in the file.
button
TIP If you clicked the Find button to start the search, click Search >
Find Next to find the next match in the file.
Item Explanation
Find text/list box Enter a search string. Click the arrow symbol to select a search
string that you entered previously.
Replace with text/ Enter the replacement string. Click the arrow symbol to select a
list box replacement string that you entered previously.
Find button Click to start a search operation using the string in the Find text/list
box.
Find All button Click to search for all matches in the selected items.
Replace button Click to replace the current match with the replacement string.
Replace All button Click to replace all matches with the replacement string.
Match whole word Check to search for whole-word matches only, ignoring matches
checkbox within words.
Clear to search for all matches of the search string, including
matches within words.
Item Explanation
Case sensitive Check to consider text case during the search. The search
checkbox operation distinguishes between a capital letter and the same letter
in lower case.
Clear to disregard text case during the search. The search
operation does not distinguish between a capital letter and the
same letter in lower case.
All text option Select to search all text in the selected items.
button
Code only option Select to search only source code in selected items.
button
In Folders tab Click to bring forward the In Folders page. Use this page to search
specific folders in the host file system.
In Projects tab Click to bring forward the In Projects page. Use this page to search
active projects and build targets.
In Symbolics tab Click to bring forward the In Symbolics page. Use this page to
search files containing symbolics (debugging and browsing)
information generated by the IDE.
In Files tab Click to bring forward the In Files page. Use this page to search
files contained in custom file sets.
In Folders
Use the In Folders page to search folder contents for matching text. Figure 11.4 shows the
In Folders page. Table 11.4 explains the items in the page.
Item Explanation
Search in text/list Enter the path to the folder that you want to search. Click the
box arrow symbol to select a path that you entered previously.
Browse button Click to open a dialog box that lets you pick the folder that you
want to search.
By type text/list box Enter the filename extensions of the files that you want to
search. Click the arrow symbol to select a set of filename
extensions.
The search ignores files whose filename extensions do not
appear in this text/list box.
a. Enter a folder path into the Search in text/list box, or click the Browse button to
select a folder.
b. Check or clear the Search sub-folders checkbox.
c. Enter filename extensions into the By type text/list box.
6. Find and replace text:
a. Click the Find or Find All button to search for matching text.
The IDE searches the specified folder contents until it finds a match or reaches the
end of the search. A single match appears highlighted in an editor window, or
multiple matches appear in a Search Results window. The IDE beeps if it does not
find any matching text.
b. Click the Replace or Replace All button to replace the matching text.
Click the Replace button to replace the current match. Click the Replace button
repeatedly to replace subsequent matches. Click the Replace All button to replace
all matching text.
To replace consecutive matches, click the Find button to find the first match, then
repeatedly click the Replace button. To replace one match at a time, or to replace non-
consecutive matches, click the Find button to find a match, then click the Replace button
as needed.
TIP If you clicked the Find button to start the search, click Search > Find Next to
find the next match.
In Projects
Use the In Projects page to search active projects and build targets for matching text.
Figure 11.5 shows the In Projects page. Table 11.5 explains the items in the page.
Item Explanation
Project list box Specify the projects that you want to search.
Target list box Specify the build targets that you want to search.
Search cached sub- Check to search sub-targets that the IDE cached for the
targets checkbox selected build targets.
Clear to ignore the sub-targets that the IDE cached for the
selected build targets.
File list This list shows files that the IDE will search. To remove a file
from this list, select it and press Backspace or Delete. To
open a file in this list, double-click its name.
a. Use the Project list box to specify the projects that you want to search.
b. Use the Target list box to specify the build targets that you want to search.
c. Check or clear the checkboxes to refine your search criteria.
d. Remove files from the File list as needed.
7. Find and replace text:
a. Click the Find or Find All button to search for matching text.
The IDE searches the specified projects and build targets until it finds a match or
reaches the end of the search. A single match appears highlighted in an editor
window, or multiple matches appear in a Search Results window. The IDE beeps if
it does not find any matching text.
b. Click the Replace or Replace All button to replace the matching text.
Click the Replace button to replace the current match. Click the Replace button
repeatedly to replace subsequent matches. Click the Replace All button to replace
all matching text.
To replace consecutive matches, click the Find button to find the first match, then
repeatedly click the Replace button. To replace one match at a time, or to replace non-
consecutive matches, click the Find button to find a match, then click the Replace button
as needed.
TIP If you clicked the Find button to start the search, click Search > Find Next to
find the next match.
In Symbolics
Use the In Symbolics page to search files containing symbolics information for matching
text. Figure 11.6 shows the In Symbolics page. Table 11.6 explains the items in the page.
Item Explanation
Symbolics list Specify the symbolics files that you want to search.
box
Symbolics list This list shows the symbolics files that the IDE will search. To
remove a file from this list, select it and press Backspace or
Delete. To open a file in this list, double-click its name.
NOTE The IDE does not generate browser data for some files, such
as libraries.
a. Click the Find or Find All button to search for matching text.
The IDE searches the specified symbolics files until it finds a match or reaches the
end of the search. A single match appears highlighted in an editor window, or
multiple matches appear in a Search Results window. The IDE beeps if it does not
find any matching text.
b. Click the Replace or Replace All button to replace the matching text.
Click the Replace button to replace the current match. Click the Replace button
repeatedly to replace subsequent matches. Click the Replace All button to replace
all matching text.
To replace consecutive matches, click the Find button to find the first match, then
repeatedly click the Replace button. To replace one match at a time, or to replace non-
consecutive matches, click the Find button to find a match, then click the Replace button
as needed.
TIP If you clicked the Find button to start the search, click Search > Find Next to
find the next match.
In Files
Use the In Files page to search file sets for matching text. Figure 11.7 shows the In Files
page. Table 11.7 on page 113 explains the items in the page.
Item Explanation
File Set list box Specify the file set that you want to search. Select New File Set to
create a new set.
File Set list This list shows the files that the IDE will search. To remove a file
from this list, select it and press Backspace or Delete. To add files
to this list, click the Add Files button, or drag and drop files and
folders into the list. To open a file in this list, double-click its name.
Add Files Click to open a dialog box that lets you add files to the current file
button set. To enable this button, select from the File Set list box an
existing file set or the New File Set option.
Clear List Click to clear the current File Set list. To enable this button, select
button from the File Set list box a file set that has at least one file.
Save This Set Click to save the current file set under a specific name. The file set
button must have at least one file. The name appears in the File Set list
box. To enable this button, modify the current file set or select an
existing file set from the File Set list box.
Remove a Set Click to open a dialog box that lets you remove file sets that you
button created previously. The removed file sets no longer appear in the
File Set list box. To enable this button, select from the File Set list
box an existing file set or the New File Set option.
TIP If you clicked the Find button to start the search, click Search > Find Next to
find the next match in the file.
Text-Selection Find
After you use the Find, Find and Replace, or Find in Files windows to perform a
successful search, you can use menu commands to apply the same search criteria to
additional searches. This way, you do not have to open the windows again to use the same
search criteria. You select text in the active editor window to define the
search string.
NOTE Find Next always searches forward and ignores the Search up checkbox.
The IDE searches the active editor window until it finds a match or reaches the end of the
search. A single match appears highlighted in the editor window. The IDE beeps if it does
not find any matching text.
You can also use the Find Next and Find Previous commands to search for additional
matching text.
Regular-Expression Find
Use regular expressions to search text according to sophisticated text-matching rules. A
regular expression is a text string used as a mask for matching text in a file. To use regular
expressions, select Regular expression in the Find, Find and Replace, or Find in Files
windows. Certain characters are operators with special meanings in a regular expression.
Table 11.9 explains the regular-expression operators that the IDE recognizes.
[...] list Defines a set of items to use as a match. The IDE does
not allow empty lists.
Table 11.10 shows various examples of using regular expressions to match particular text
in a text sample.
[-ab]V aV -V aVal-Val;
(l*;)$ l; a-ct; a =
battLvl;
;
b-ct;
Table 11.11 Examples of Using the Find String in the Replace String
Remembering Sub-expressions
Use the \n construct to recall sub-expressions from the find string in the replacement
string. The digit n ranges from 1 to 9 and represents the nth sub-expression in the find
string, counting from left to right. Enclose each sub-expression in parentheses.
Consider these sample definitions:
• Find string: \#define[ \t]+(.+)[ \t]+([0-9]+);
• Replace string: const int \1 = \2;
• Sub-expression \1: (.+)
• Sub-expression \2: ([0-9]+)
These definitions show a replacement operation that recalls two sub-expressions. Table
11.12 shows the result of applying these sample definitions to some text.
Comparison Setup
You use the Compare Files Setup window to enter information about the files or folders
that you want to compare. Figure 11.9 on page 122 shows the Compare Files Setup
window. Table 11.13 on page 122 explains items in the window.
Item Explanation
Source box Click the Choose button to specify the source file or folder for the
comparison, or drag and drop a file or folder into the box. Click the
selector to the left of the Choose button to specify a file in an open editor
window.
Destination Click the Choose button to specify the destination file or folder for the
box comparison, or drag and drop a file or folder into the box. Click the
selector to the left of the Choose button to specify a file in an open editor
window.
Ignore extra Check to consider extra spaces and tabs during the compare operation.
space The comparison distinguishes differences in the number of spaces and
checkbox tabs in the compared files.
Clear to disregard extra spaces and tabs during the compare operation.
The comparison does not distinguish differences in the number of spaces
and tabs in the compared files.
Item Explanation
Only show Check to have the Folder Compare Results window show only the
different differences between the compared folders. The Files in Both Folders
files pane stays blank.
checkbox
Clear to have the Folder Compare Results window show all files from
the compared folders as well as the differences between those folders.
The Files in Both Folders pane shows the common files between the
compared folders.
CAUTION The compare operation ignores folders matching the criteria that you
specify in the Shielded Folders preference panel.
File Comparison
The IDE file-comparison feature identifies additions, changes, and deletions between two
text files. In addition, this feature allows you to apply the differences in the source file to
the destination file.
You can also use this feature to merge changes between two versions of the same text file.
Specify one version of the text file as the source file and the other version of the text file as
the destination file. Then you can apply changes from the source file to the destination file.
The destination file becomes the merged file.
After you use the Compare Files Setup window to specify two files for comparison, click
the Compare button. The File Compare Results window appears. This window shows
the differences between the source file and destination file. You can apply or unapply
those differences to the destination file.
The File Compare Results window shows file differences in the form of highlighted
portions of text. The highlighting tracks with the text as you scroll through the compared
files.
Figure 11.10 on page 125 shows the File Compare Results window. Table 11.14 on
page 125 explains the items in the window.
Source pane N/A Shows the contents of the source file. You
cannot edit the contents of this pane.
NOTE You cannot alter the source file. You can change the destination file by
applying differences from the source file or by editing the contents of the
Destination pane.
1. Select the items in the Differences pane that you want to apply to the destination file.
2. Click Search > Apply Difference or click the Apply button in the File Compare
Results window.
The Destination pane updates to reflect the differences that you applied to the
destination file. The applied items in the Differences pane change to an italicized font.
TIP Use the Customize IDE Commands window to assign a key binding to the Apply
Difference command. This way, you can use the keyboard to apply differences.
NOTE You cannot alter the source file. You can change the destination file by
unapplying differences from the source file or by editing the contents of the
Destination pane.
1. Select the items in the Differences pane that you want to unapply from the destination
file.
Items that you can unapply appear in an italicized font.
2. Click Search > Unapply Difference or click the Unapply button in the File
Compare Results window.
The Destination pane updates to reflect the differences that you unapplied from the
destination file. The unapplied items in the Differences pane no longer appear in an
italicized font.
TIP Use the Customize IDE Commands window to assign a key binding to the
Unapply Difference command. This way, you can use the keyboard to unapply
differences.
Folder Comparison
The IDE folder-comparison feature identifies the differences between the contents of two
folders. It reports the files in both folders, the files only in the source folder, and the files
only in the destination folder.
You can also use this feature to analyze the differences between two different releases of a
folder of software. Specify one release of the software folder as the source folder and the
other release of the software folder as the destination folder. Then you can analyze the
differences between the source and destination folders.
After you use the Compare Files Setup window to specify two folders for comparison,
click the Compare button. The Folder Compare Results window appears and shows the
differences between the source folder and destination folder.
The Folder Compare Results window shows folder differences in the form of
three panes. Italicized items in these panes indicate non-text files.
Figure 11.11 shows the Folder Compare Results window. Table 11.15 explains the items
in the window.
Files in Both N/A Shows the items that are in both the source
Folders pane folder and the destination folder. A bullet next to
an item indicates that the item content differs
between the two folders.
Files Only in N/A Shows the items that are in the source folder
Source pane only.
Files Only in N/A Shows the items that are in the destination folder
Destination only.
pane
Browser
This section includes these chapters:
• Using Browser
• Using Class Browser Windows
• Using Other Browser Windows
• Using Browser Wizards
Browser Database
The browser database contains information about symbols in a program, which include
(depending on program language) global variables, functions, classes, and type
declarations, among others.
Some IDE windows require that the project contain a browser database. For example, the
Class Hierarchy window only displays information for a project that contains a browser
database. This section explains how to configure a project to generate its browser
database.
NOTE Generating a browser database increases the project’s size. To minimize the
project’s size, generate the browser database only for targets you frequently
use.
Browser Data
Browser data contains symbolic and relationship information about the project code. The
browser uses this data to access the code information.
Use the Generate Browser Data From menu (Figure 12.1) in the Build Extras target
settings panel to enable and disable browser data generation. This drop-down menu
provides these options, which determine how the IDE generates browser data:
• None—The IDE does not generate browser data. Use None to disable browser data.
Select None to generate faster compiles (with no browser features).
• Compiler—The Compiler generates the browser data. While it compiles more
slowly, the compiler generates the most accurate browser data.
• Language Parser—The Code Completion plug-in associated with the project’s
programming language generates the browser data.
The Prefix and Macro files (Figure 12.2) are applicable to C/C++ Code
Completion.
• Prefix file—Similar to that used in the C/C++ Language Settings panel, the
Prefix file contains header files that help the C/C++ Code Completion plug-in
parse code. The Prefix file should only include text files (not pre-compiled
header files).
• Macro file—Contains C/C++ macro files that help the Code Completion plug-in
resolve any #ifdefs found in the source code or in the header files.
4. If you selected Compiler, choose Project > Bring Up To Date or Make.
The IDE generates browser data for the project.
If you selected Language Parser, the IDE generates browser data in the background.
Browser Symbols
Navigate browser symbols to open browser views, find symbol definitions, and examine
inheritance.
You can navigate browser symbols in these ways:
• Use the Browser contextual menu to open various browser windows for a selected
symbol.
• Double-click a symbol name in the Class Browser window to open the file that
contains the declaration of that symbol.
• Use the class hierarchy windows to determine the ancestors or descendants of a
selected symbol.
TIP The default color setting is identical for all eight types of browser-database
symbols. You can choose a different color for each symbol type.
To change the browser symbol colors the editor uses, follow these steps:
1. Choose Edit > Preferences.
2. Select the Text Colors panel from the IDE Preference Panels list.
3. Select the Activate Syntax Coloring option.
Hierarchical
View as implementor • • •
View as subclass • •
View as user •
Show public •
Show protected •
Show private •
4. Select Open browser for class classname from the contextual menu.
The classname is the name of the class that you selected.
A Class Browser window appears.
a. Click the Single Class Hierarchy Window button in the browser toolbar,
or
Classes Pane
Use the Classes pane to perform these tasks:
• Create a new class
• Toggle viewing of classes
• Sort classes
Figure 13.1 on page 140 shows the Classes pane. Table 13.3 explains the items in
the pane.
New Item Click to create a new class using the New Class Wizard.
1. From the Data Members pane, click the New Item button:
2. Enter the Data Member Declarations in the New Data Member window.
3. Click Next.
4. Enter Data Member file locations and #include files information.
5. Click Finish.
6. Review the settings summary, then click Generate.
The IDE adds the new data member to the class declaration.
Source Pane
Use the Source pane to view the source code that corresponds to the selected class,
member function, or data member. This section explains the items in the Source pane.
Figure 13.1 on page 140 shows the Source pane. Table 13.5 explains the items in the pane.
For information on editing source code, see “Editing Source Code”.
Open File Click to open the current source file in a new editor window.
Status Area
Use the status area to perform these tasks:
• Toggle viewing of the Classes pane
• View class declarations
• View classes according to public, private, or protected access
Figure 13.1 on page 140 shows the status area. Table 13.6 on page 148 explains items in
the status area.
Show Classes Pane Click to display the Classes pane in the Class
Browser window.
Hide Classes Pane Click to hide the Classes pane in the Class
Browser window.
Access Filter Display Displays the access state of the current class.
Line button Click to toggle the lines that connect classes between
diagonal and straight lines.
3. Open a graphical Hierarchy window on a Windows host by selecting View > Class
Hierarchy.
• type definitions
1. Activate the browser.
2. Use the Bring Up To Date, Make, Run, or Debug command to update the browser
database.
3. Select View > Browser Contents to open the Browser Contents window.
4. Select a category from the Category list pop-up.
The symbol information for the selected category appears in alphabetical order in the
Symbols list.
Symbols Window
The Symbols window displays information from project browser databases. With the
browser enabled, the IDE generates a browser database for a project during the build
process.
The Symbols window displays symbols that have multiple definitions in the browser
database. For example, the window displays information about multiple versions of
overridden functions in object-oriented code.
Figure 14.4 on page 154 shows the Symbols window.
Item Explanation
Source Pane Displays the source code for the currently selected item.
Symbols Toolbar
Most of the Symbol toolbar items are identical to those in the Class Browser Window.
Symbols Pane
The Symbols pane lists symbols with multiple definitions in the browser database. Select
a symbol from the list to view its definition in the Source pane.
Source Pane
The Source pane used in the Symbols window is identical to the one used by the Class
Browser Window. See “Source Pane” for more details.
NOTE Most wizard pages contain default settings. To accept all current settings in the
wizard, click Finish in any screen. The wizard displays a summary of all
current settings for the new project. Click Generate to accept the current
settings and create the new item, or click Cancel to return to the wizard to
modify settings.
NOTE You can also click the New Item icon in the Class Browser window to
create a new class.
3. In the New C++ Class wizard, enter Name and Location information:
a. Class Name—Enter a name for the class in this field.
b. Declaration File—This menu lets you specify whether the file is a New File,
which is a new declaration file, or Relative to class, which is a declaration that
depends on an existing file in the project.
If you choose the New File option, type in the path where you want to save the file.
Alternatively, click Set next to the field to choose the path in which to save the file.
If you choose the Relative to class option, select Before or After to establish the
order of the new class in relation to existing classes. In the field next to the Before
and After drop-down selection, type the name of the class you want to relate to the
new class. Alternatively, click Set next to this field, type the name of a class in the
window that opens, and then click Select.
NOTE If you want to use a separate file to define the members of the new class, type
the path to the separate file in the field below the Use separate file for
member definitions checkbox. Alternatively, choose Existing to use a
standard dialog box to select the file. To create a new, separate file, choose
New and save the new file to a location on your hard disk.
4. Click Next.
d. As an option, you can enter the required namespaces for the base classes and the
constructor parameters in the field labeled Namespaces required for the base
classes and constructor parameters.
Or,
If needed, you can specify the base classes and constructor parameters.
6. Click Next.
4. Click Next.
5. Specify Data Member File Locations.
This section lets you specify file locations associated with the new member functions,
including these fields: Declaration, Definition, Include file automatically added for
member type, and Additional header include files.
a. Declaration—This field shows you the data member’s declaration file location.
b. Definition—This field is not available in this wizard.
c. Include file automatically added for member type—This field indicates whether
an include file will be automatically added for the data-member type.
d. Additional header include files—Enter in this field a list of other include files for
the new data member, in addition to the file listed in the previous field. Example
files are <string> and YourHeader.h.
6. Click Finish.
7. Review settings summary, then click Generate.
Choosing Compiler
Choose a compiler to determine how the IDE interprets source code. The IDE uses a plug-
in compiler architecture. This architecture provides these features:
• Modularity—the IDE associates a specific compiler plug-in with a particular
programming language or environment. For example, a compiler plug-in exists for
C++ source code, and another compiler plug-in exists for Java source code.
• Flexibility—as new programming languages develop, the IDE can use new compiler
plug-ins.
The IDE associates common filename extensions with various plug-in compilers. For
example, most Java files have the filename extension .java. The IDE associates these
files with the Java compiler. The File Mappings panel provides control over such
associations.
Compiling Projects
Compile projects to process the source files that comprise a program and generate object
code. The compiler flags syntax errors in the source files.
NOTE The Project menu contains most commands for compiling and linking
projects. However, depending on the project type, some commands might be
disabled or renamed.
NOTE The IDE uses the new link order during subsequent Update, Make, Run, and
Debug operations.
Updating Projects
Use the Bring Up To Date command to compile, but not link, the newly added, modified,
and touched files in a project. Unlike the Make and Run commands, the Bring Up To
Date command does not produce a binary file.
1. Select the project to update.
2. Choose Project > Bring Up To Date.
The IDE compiles all uncompiled project files.
Choosing Linkers
Choose a linker to determine the binary file type produced by the IDE. This list describes
common binary files:
• Applications—applications, or executable files, represent a wide body of computer
programs. Common applications include word processors, web browsers, and
multimedia players.
• Libraries—libraries contain code for use in developing new computer programs.
Libraries simplify programming tasks and enhance re-usability.
• Specialized files—files designed for highly efficient operation in a specific context.
Such files usually support a particular combination of hardware and software to
perform tasks.
The IDE provides various linkers for software development. The Target Settings panel
contains an option for selecting a linker. The IDE maps to each linker a group of
recognized filename extensions. These mappings determine how the IDE interprets each
file.
Linking Projects
Link projects to process object code and generate a binary file. Refer to the CodeWarrior
Targeting documentation for more information about linkers for specific computer
systems. This section explains general-purpose linker tasks.
New Group Click to add a new command group to the Commands list.
Factory Settings Click to restore default options for the current Customize IDE
Commands (Commands and Toolbar Items) lists.
Revert Click to restore the most recently saved options for the current
Customize IDE Commands (Commands and Toolbar Items) lists.
Export Click to save a file that contains commands and key bindings to
use later in the Customize IDE Commands lists.
Import Click to open a file that contains commands and key bindings to
use in the current Customize IDE Commands lists.
Commands Tab
Click the Commands tab at the top of the Customize IDE Commands window to display
the commands view. Use this view to modify existing menu commands, and to create and
remove command groups and menu commands.
3. Use the Appears in Menus checkbox to toggle the availability of the new command
group in the IDE menu bar.
Select the Appears in Menus checkbox to display the new command group in the menu
bar. Clear the checkbox if you do not want the command group to appear in the menu
bar.
4. Click Save.
The IDE saves your new command group. If you selected the Appears in Menus
checkbox, your new command group appears in the menu bar.
provide additional arguments that the IDE passes to the application (which is specified in
the Execute field).
NOTE You can use variables that end with Dir as both argument and directory
names.
%targetFilePath targetFilePath is the full path of the output file of the front
project.
%symFilePath symFilePath is the full path to the symbolics file of the front
project (can be the same as targetFile, such as CodeView).
%symFileDir symFileDir is the full directory to the symbolics file of the front
project (can be the same as targetFile, such as CodeView)
NOTE If you need to temporarily remove your customized command groups and
menu commands, consider exporting your settings. If you export your settings,
you do not need to reconstruct them if you want them in the future.
Customize Toolbars
You can customize your IDE toolbars to contain frequently used commands. The IDE
toolbars contain a series of elements. Each element typically represents a menu command.
After you click the element, the IDE executes the associated menu command. The toolbar
can also contain elements that execute actions other than menu commands.
Kinds of Toolbars
The CodeWarrior IDE uses two toolbar types:
• Main toolbar—This toolbar, also known as the floating toolbar, is always available.
• Window toolbars—These toolbars appear in particular windows, such as the Project
window toolbar and the Browser window toolbar.
This distinction is important because you show, hide, clear, and reset the different toolbar
types by using different sets of menu commands. These commands distinguish between
the floating toolbar and the other window toolbars.
When you change one of these toolbar types, that change applies to every instance of that
toolbar type you subsequently create. For example, if you modify the toolbar in an editor
window, your changes appear in all editor windows opened thereafter.
Toolbar Elements
A toolbar can contain these elements:
• Commands—buttons that you click to execute IDE menu commands
• Controls—menus, such as Document Settings, Functions, Header Files, Markers,
Version Control, and Current Target
• Miscellaneous—other elements, such as the File Dirty Indicator and File Path field
Click the Toolbar Items tab at the top of the Customize IDE Commands window to
display the Toolbar view. Use this view to add new elements to a toolbar.
Modify a Toolbar
You can modify a toolbar in these ways:
• Add a toolbar element
• Remove a toolbar element
• Clear all elements on a toolbar
• Reset a toolbar
In certain circumstances there are restrictions on which elements you can add or remove
from a toolbar. For example, you cannot add a second instance of an element to the
toolbar.
After you modify a toolbar, the changes apply to every instance of that toolbar. For
example, if you customize the Project window toolbar, those changes will affect every
Project window that you open, not just the toolbar in the active Project window. Your
changes do not affect windows that are already open.
TIP To display a ToolTip that names a toolbar element, rest the cursor over the
element.
Reset Toolbars
Reset a toolbar to restore its default button set. On a Windows host, reset the main
(floating) toolbar by selecting View > Toolbars > Reset Main Toolbar. Reset the
window toolbar by selecting View > Toolbars > Reset Window Toolbar.
Alternatively, you can use a contextual menu to reset the main toolbar or a window
toolbar. Once you reset the toolbar, the IDE restores the default toolbar button set. On a
Windows host, reset the main (floating) toolbar by right-clicking the toolbar and selecting
Reset Toolbar. Reset the window toolbar by right-clicking the toolbar and selecting
Reset Toolbar.
NOTE If you want to use your keyboard’s numeric keypad as part of the new key
binding, enable the Numeric Keypad Bindings checkbox in the Customize
IDE Commands window.
3. Create the key combination you would like to use for the selected command.
For example, to add the key combination Ctrl-8, hold down the Ctrl key and press the
8 key, then release both keys at the same time.
If you decide against the key combination that you just entered, or if you make a
mistake, click Cancel in the Edit Key Binding dialog box. The IDE discards changes
and returns you to the Customize IDE Commands window.
4. Click OK in the Edit Key Binding dialog box.
The new key binding appears in the Key Bindings list in the Customize IDE
Commands window.
5. Click Save in the Customize IDE Commands window to save your changes.
The new key binding is now available for use in the IDE.
NOTE After you import your custom commands and key bindings into another
computer, the IDE running on that computer first sets all its commands and key
bindings to their default values, then imports your custom commands and key
bindings.
To export your custom commands and key bindings, follow these steps:
1. Click Export in the Customize IDE Commands window.
After you click this button, a standard Save dialog box appears.
2. Select a location in which to save the Commands&KeyBindings.mkb file.
This file contains information about your custom commands and key bindings.
3. Click Save.
The IDE saves the Commands&KeyBindings.mkb file at the selected location.
NOTE After you import your custom commands and key bindings into another
computer, the IDE running on that computer first sets all its commands and key
bindings to their default values, then imports your custom commands and key
bindings.
occurs because the IDE now interprets the 2 as a command key instead of a printing key.
The Quote Key prefix provides the solution to such conflicts.
You can configure the IDE to recognize any key as the Quote Key prefix. Despite its
name, the Quote Key prefix does not have to be the key that creates the quote character
(").
After typing an assigned Quote Key prefix, the IDE interprets the next keypress as a
keystroke, not as a command.
Returning to the earlier example, assume that you assign the 2 key to a command and the
tilde key (~) to be your Quote Key prefix. To execute the command, you would type the 2
key. To enter the character 2 into source code, you would type the tilde key first, then the
2 key. To enter the tilde character into source code, you would press the tilde key twice.
WARNING! The Quote Key only affects the next key or key combination that you
type. You must use the Quote Key once for each bound key or key
combination for which you want to type.
NOTE If you want to use the numeric keypad as part of the new key binding, enable
the Numeric Keypad Bindings checkbox in the Customize IDE Commands
window.
3. Click New Binding to display the Edit Key Bindings dialog box.
4. Type the desired Quote Key prefix.
The keys you type appear in the dialog box. If you make a mistake or decide against
the keys you typed, click Cancel to return to the Customize IDE Commands window.
5. Click OK in the Edit Key Binding dialog box.
The new Quote Key prefix appears in the Key Bindings list.
Item Explanation
IDE Preference Lists preference panels, organized by group. Click the hierarchical
Panels list control next to a group name to show or hide individual preference
panels.
Preference panel Shows options for the selected item in the IDE Preference Panels
list.
Factory Settings Click to restore the default options for the current preference panel.
Revert Panel Click to restore the most recently saved options for the current
preference panel.
Export Panel Click to save an XML file that contains options for the current
preference panel.
Import Panel Click to open an XML file that contains options for the current
preference panel.
Item Explanation
Cancel Click to discard modifications to all preference panels and close the
window.
General Panels
The General section of the IDE Panels defines basic options assigned to a new project.
The General preference panels available on most IDE hosts include:
• “Build Settings”
• “Concurrent Compiles”
• “IDE Extras”
• “Plugin Settings”
• “Shielded Folders”
• “Source Trees”
Build Settings
The Build Settings preference panel provides options for customizing various aspects of
project builds, including:
• file actions during project builds
• memory usage to accelerate builds
• local data storage of projects stored on read-only volumes
Item Explanation
Build before running Choose to always build the project before running it,
never build the project before running it, or ask for the
desired action.
Save open files before build Select to automatically save the contents of all editor
windows before starting a build.
Show message after Select to have the IDE display a message after
building up-to-date project successfully building a project.
Compiler thread stack Enter the kilobytes of memory to allocate to the stack for
execution of the IDE compiler thread. Increase the size
when compiling heavily optimized code.
Use Local Project Data Select to specify a location to save project data if the
Storage project is on a read-only volume. Click Choose to select
the location.
Concurrent Compiles
The Concurrent Compiles preference panel controls execution of simultaneous IDE
compilation processes. The IDE lists this panel in the IDE Preference Panels list when the
active compiler supports concurrency.
The IDE uses concurrent compiles to compile code more efficiently. The IDE improves its
use of available processor capacity by spawning multiple compile processes, which allow
the operating system to perform these tasks as needed:
• optimize resource use
• use overlapped input/output
For those compilers that support concurrency, concurrent compiles improve compile time
on both single- and multiple-processor systems.
Item Explanation
Use Concurrent Compiles Select to have the IDE run multiple compilation
processes simultaneously.
IDE Extras
The IDE Extras preference panel provides options for customizing various aspects of the
IDE, including:
• menu-bar layout
• the number of recent projects, document files, and symbolics files to remember
• use of a third-party editor
Item Explanation
Menu bar layout Choose a layout that organizes IDE menus into a
typical host-platform menu bar. Restart the IDE in
order for menu-bar layout changes to take effect.
Use Third Party Editor Select to use a third-party text editor to edit source
files.
Item Explanation
Use Multiple Document Select to have the IDE use the Multiple Document
Interface Interface (MDI). Clear to have the IDE use the Floating
Document Interface (FDI). Restart the IDE in order for
interface changes to take effect.
Use default workspace Select this option to have the IDE use the default
workspace to save and restore state information.
Clear this option to have the IDE always start in the
same state.
Show Code and Data Sizes Displays or hides Code and Data columns in project
manager.
Plugin Settings
The Plugin Settings preference panel contains options for troubleshooting third-party IDE
plug-ins.
Item Explanation
Disable third party COM plugins Select to prevent the IDE from loading third-party
Common Object Model (COM) plug-ins.
Shielded Folders
The Shielded Folder preference panel enables the IDE to ignore specified folders during
project operations and find-and-compare operations. The IDE ignores folders based on
matching names with regular expressions defined in the preference panel.
NOTE If the Access Paths settings panel in the Target Settings window contains a
path to a shielded folder, the IDE overrides the shielding and includes the
folder in project operations and find-and-compare operations.
Shielded folder list Lists folders that match the specified regular
expression. The IDE skips these folders during
project operations, find-and-compare
operations, or both.
Find and compare Select to have the IDE skip folders during find-
operations and-compare operations. A bullet appears in the
corresponding column of the shielded folder list.
Source Trees
Use the Source Trees panel to add, modify, and remove source trees (root paths) used in
projects. Use source trees to define common access paths and build-target outputs to
promote sharing of projects across different hosts. Source trees have these scopes:
• Global source trees, defined in the IDE Preferences window, apply to all projects.
• Project source trees, defined in the Target Settings window for a particular project,
apply only to files in that project. Project source trees always take precedence over
global source trees.
Except for the difference in scope, global and project source trees operate identically.
Item Explanation
Source Tree list Contains the Name and Path of currently defined source trees.
Name Enter a name for a new source tree or modify the name of a
selected source tree.
Item Explanation
Add Click to add a new source-tree path to the Source Tree list.
Remove Click to delete the selected source tree from the Source Tree list.
Editor Panels
The Editor section of the IDE Preference Panels list defines the editor settings assigned to
a new project.
The Editor preference panels available on most IDE hosts include:
• “Code Completion”
• “Code Formatting”
• “Editor Settings”
• “Font & Tabs”
• “Text Colors”
Code Completion
The Code Completion preference panel provides options for customizing the IDE code-
completion behavior, including:
• automatic invocation and indexing
• window positioning and appearance delay
• case sensitivity
Item Explanation
Window follows insertion point Select to have the Code Completion window follow the
insertion point as you edit text. Clear to leave the
window in place.
Display deprecated items Select to have the Code Completion window display
obsolete items in gray text. Clear to have the window
hide obsolete items.
Item Explanation
Code Completion Delay (ticks) Enter the number of ticks to wait before opening the
Code Completion window. A tick is 1/60 of a second.
Code Formatting
The Code Formatting preference panel provides options for customizing editor code-
formatting behavior, including:
• indenting
• syntax placement
• brace handling
Item Explanation
Use Automatic Code Check to have the editor automatically format your source code
Formatting according to settings in this panel.
Clear to prevent the editor from automatically formatting your
code.
Language Settings Use to specify the language type that you want to format. Your
selection changes the other options in this panel to their default
states for the selected language.
Format braces Check to have the editor automatically insert a closing brace
when you type an opening brace. The editor places the cursor
between the opening brace that you typed and the closing
brace that it inserts.
Clear to prevent the editor from automatically inserting a
closing brace when you type an opening brace.
Place opening brace Check to have the editor place on the next line an opening
on separate line brace that you type.
Clear to prevent the editor from placing on the next line an
opening brace that you type.
Indent braces Check to have the editor indent braces by one tab stop from
the previous line.
Clear to prevent the editor from indenting braces by one tab
stop from the previous line.
Place “else” on same Check to have the editor place else and else if text on the
line as closing brace same line as the closing brace of the if or else if statement.
Clear to prevent the editor from placing else and else if
text on the same line as the closing brace of the if or else
if statement.
Indent code within Check to have the editor indent code by one tab stop from the
braces braces.
Clear to prevent the editor from indenting code by one tab stop
from the braces.
Item Explanation
Indent “case” within Check to have the editor indent case statements by one tab
“switch” statement stop inside a switch statement.
Close braces, Check to have the editor automatically insert the corresponding
brackets, and closing character when you type an opening brace, bracket, or
parentheses parenthesis. The editor places the cursor between the opening
character and the closing character.
Clear to prevent the editor from automatically inserting the
corresponding closing character when you type an opening
brace, bracket, or parenthesis.
Editor Settings
The Editor Settings preference panel provides options for customizing the editor,
including:
• fonts, window locations, and insertion-point positions
• contextual menus
• additional editor-window features
Item Explanation
Font Preferences Select to retain font settings for each source file. Clear to apply
default font settings each time the IDE displays the source file.
Selection position Select to retain the text-insertion position in each source file.
Window position Select to retain the location and dimensions of each editor
and size window.
VCS Commands Select to add VCS (Version Control System) menu commands to
contextual menus.
Use multiple undo Select to allow multiple undo and redo operations while editing
text.
Left margin click Select to allow selection of an entire line of text by clicking in the
selects line left margin of the editor window.
Enable Virtual Select to allow moving the text-insertion point beyond the end of a
Space source-code line. Entering new text automatically inserts spaces
between the former end of the line and the newly entered text.
Item Explanation
Default file format Choose the default end-of-line format used to save files.
Item Explanation
Item Explanation
Script Choose the IDE script system. The script system maps
keyboard keys to characters of an alphabet.
Tab indents selection Select to indent each line of selected text after pressing Tab.
Clear to replace selected text with a tab character after
pressing Tab.
Auto Indent Select to automatically apply the indentation level from the
previous line of text to each new line created by pressing Enter
or Return.
Tab Inserts Spaces Select to insert spaces instead of a tab character after
pressing Tab. The Tab Size option determines the number of
inserted spaces.
Text Colors
The Text Colors preference panel customizes colors applied to elements of source code
displayed in editor windows, such as:
• Default foreground and background in editor windows
• Standard comments, keywords, and strings in source code
• Custom-defined keywords
• Browser symbols
Default settings provide a simple scheme of at least four source-code colors. If four colors
do not provide sufficient detail, modify this preference panel to create more sophisticated
color schemes.
Item Explanation
Foreground Click the color swatch to display a dialog box. Use the
dialog box to set the foreground color used in editor
windows for text.
Background Click the color swatch to set the background color used
in editor windows.
Comments Click the color swatch to set the color used for source-
code comments.
Keywords Click the color swatch to set the color used for source-
code language keywords.
Strings Click the color swatch to set the color used for source-
code string literals.
Set 1, Set 2, Set 3, Set 4 Click a color swatch to set the color used for the
corresponding custom-keyword set.
Activate Browser Coloring Select to apply custom colors to browser symbols in text.
Clear to use the Foreground color for all text.
Classes Click the color swatch to set the color used for source-
code classes.
Constants Click the color swatch to set the color used for source-
code constants.
Enums Click the color swatch to set the color used for source-
code enumerations.
Functions Click the color swatch to set the color used for source-
code functions.
Globals Click the color swatch to set the color used for source-
code global variables.
Macros Click the color swatch to set the color used for source-
code macros.
Item Explanation
Templates Click the color swatch to set the color used for source-
code templates.
TypeDefs Click the color swatch to set the color used for source-
code type definitions.
Other Click the color swatch to set the color used for other
symbols not specified in the Activate Browser Coloring
section.
Item Explanation
Target Lists settings panels, organized by group. Click the hierarchical control
Settings next to a group name to show or hide a list of individual settings
Panels list panels.
Settings panel Shows options for the selected item in the Target Settings Panels list.
Factory Click to restore the default options for the current settings panel.
Settings
Revert Panel Click to restore the most recently saved options for the current settings
panel.
Export Panel Click to save an XML file that contains set options for the current
panel.
Import Panel Click to open an XML file that contains settings for the current panel.
OK Click to save modifications to all settings panels and close the window.
Item Explanation
Cancel Click to discard modifications to all settings panels and close the
window.
Target Panels
The Target group of the Target Settings Panels defines general target settings assigned to
a new project.
The panels available on most IDE hosts include:
• Target Settings
• Access Paths
• Build Extras
• File Mappings
• Source Trees
Target Settings
The Target Settings panel provides options for:
• setting the name of the current build target
• setting the linker, pre-linker, and post-linker for the build target
• specifying the project output directory for the final output file
Item Explanation
Target Name Enter a name (26 or fewer characters) for the selected build target
as it will appear in the project window.
Post-linker Select the post- linker to use on the current build target.
Output Directory Shows the location where the IDE creates the output binary file.
Click Choose to change this location.
Choose Click to select the directory in which the IDE saves the output
binary file.
Save project Select to save project file entries using a relative path from a
entries using defined access path. This option is helpful if the project has
relative paths multiple files with the same name.
Access Paths
The Access Paths settings panel defines the search paths for locating and accessing a
build target’s system files and header files.
NOTE The Access Paths settings panel displays either User Paths or System Paths,
depending on the selected radio button.
Item Explanation
Source relative Select to search for dependent files in the same location as the
includes source file. If the dependent file is not found in this location, specified
User and System paths are searched. If this option is enabled, the
Always Search User Paths should also be enabled.
User Paths The User Paths list shows currently defined user-level access paths
searched by #include "..." statements.
System Paths The System Paths list shows currently defined system-level access
paths searched by #include <...> statements.
Add Default Click to restore the default user- and system-level access paths.
Host Flags list Choose the host platforms that can use the selected access path.
pop-up
The User Paths and System Paths lists display columns with status icons for each access
path. There are different types of access paths. Table 20.4 explains these items.
Search status A checkmark icon indicates an active access path that the
IDE searches.
Access path Shows the full access path to the selected directory.
Access paths have these types:
• Absolute—the complete path, from the root level
of the hard drive to the directory, including all
intermediate directories
• Project—the path from the project file relative to
the designated directory
• CodeWarrior—the path from the CodeWarrior
IDE relative to the designated directory
• System—the path from the operating system’s
base directory relative to the designated
directory
• Source tree—the path from a user-defined
source tree relative to the designated directory
Build Extras
The Build Extras settings panel contains options that define how the CodeWarrior IDE
builds a project.
Item Explanation
Use modification Select to have the IDE cache modification date information and
date caching use that information each time it builds a target. Builds are faster if
file modification dates are cached.
Note that it is recommended to uncheck this option if you are using
an external editor or using mounted directories.
Generate Browser Choose whether the IDE generates browser data for the project,
Data From and the method by which the IDE generates that data.
Dump internal Select to have the IDE dump raw browser information for viewing.
browse information This option appears after selecting Compiler from the Generate
after compile Browser Data From pop-up menu.
Item Explanation
Prefix file Enter the path to your project’s prefix file. This options appears
after selecting Language Parser from the Generate Browser
Data From pop-up menu.
Macro file Enter the path to your project’s macro file. This options appears
after selecting Language Parser from the Generate Browser
Data From pop-up menu.
Initial directory Click Browse to select an initial directory for the external
debugger. Alternatively, enter the path to the initial directory.
File Mappings
The File Mappings settings panel associates filename extensions with a CodeWarrior
plug-in compiler. These associations determine whether the IDE recognizes a source file
by its filename extension or file type. Use the settings panel to add, change, and remove
file mappings.
File Type Enter a file type (such as TEXT) for the file mapping.
Alternatively, click Choose to set the file type by selecting an
example file. This file type also appears in the corresponding
column of the File Mappings list.
Extension Enter the filename extension (such as .cpp) for the file
mapping. This filename extension also appears in the
corresponding column of the File Mappings list.
Resource File A bullet in this column denotes a resource file. The IDE
flag includes these resource files when building the final output file.
Use the Flags context menu to toggle this flag.
Compiler Choose the plug-in compiler to associate with the selected file
mapping from this list. This compiler selection also appears in
the corresponding column of the File Mappings list.
Flags Choose the desired flags for the selected file mapping from
this context menu. A checkmark indicates an active flag.
Bullets appear in the corresponding columns of the File
Mappings list to reflect flag states.
Add Click to add the current File Type, Extension, Flags, Compiler,
and Edit Language entries to the File Mappings list.
Change Click to change the selected item in the File Mappings list to
reflect the current File Type, Extension, Flags, Compiler, and
Edit Language entries.
Remove Click to remove the selected item in the File Mappings list.
Source Trees
The Source Trees settings panel in the Target Settings window defines project-specific
root paths. These project-specific paths override the global root paths defined in the
Source Trees preference panel of the IDE Preferences window. Refer to Source Trees for
information on adding, changing, or removing paths.
Editor Panels
The Editor group of the Target Settings Panels provides a single core panel for
configuring custom keywords within a project.
Custom Keywords
The Custom Keywords panel configures as many as four keyword sets, each with a list of
keywords and syntax coloring for a project. These project-specific settings supersede the
global settings defined in the Text Colors preference panel of the IDE Preferences
window.
Item Explanation
Keyword set 1, Click a color swatch to set the color used for the
Keyword set 2, corresponding custom-keyword set.
Keyword set 3,
Keyword set 4
NOTE This chapter covers options for the core IDE preference or target setting panels
described in this manual.
Add Default
Click this button to restore the default user path or system path to the Access Paths panel.
Application
In this field enter the path to the external debugger that the IDE uses in place of the
CodeWarrior debugger. Alternatively, click Browse to open a dialog box. Use the dialog
box to select the external debugger.
Arguments
In this field enter command-line arguments to pass to the external debugger at the
beginning of a debugging session.
Auto Indent
Select this option to apply automatically the same indentation as the previous line for each
new line of text created by pressing Enter or Return. Clear the option to always return to
the left margin for each new line of text.
NOTE Selecting this option may slow IDE performance. Clear the option to improve
speed.
Automatic Invocation
Select this option to have the Code Completion window automatically open after typing
specific programming-language characters in the active editor window. Clear the option to
manually open the Code Completion window.
The specific characters that trigger opening of the Code Completion window depend on
the programming language that you use. For example, typing a period after a Java class
opens the Code Completion window, allowing you to complete the class invocation.
You can change the time it takes for the Code Completion window to appear after you
type a trigger character. If you perform any activity during this delay time, the Code
Completion window is canceled.
See also:
• “Code Completion Delay”
Background
Click this color swatch to configure the background color of editor windows.
• Found—the editor window scrolls to display the matching character, then returns to
the insertion point. The Balance Flash Delay option determines how long the editor
displays the matching character.
• Not found—the IDE beeps.
Browser Commands
Select this option to add Browser menu commands to contextual menus. Clear the option
to remove commands from the contextual menus.
Browser Path
In this field enter a path to the browser to use for viewing IDE online help. The Netscape
Navigator® browser is the default application. The PATH environment variable specifies
the path to the browser.
To change the default setting, or if the IDE cannot find Netscape Navigator, in the
Browser Path field enter a path to an alternate browser. Alternatively, click Set to select
the path.
Case sensitive
Select this option to have the IDE consider case when completing code. Clear the option to
have the IDE ignore case.
The IDE can determine possible symbol matches according to case. For example, if you
clear the Case sensitive option and type str in the active editor window, the IDE
displays both string and String as possible matches. Selecting the option causes the
IDE to display only string as a possible match.
Comments
Select the Activate Syntax Coloring option in order to configure this option. Use this
option to configure the color of C, C++, and Java comments displayed in editor windows.
The IDE then uses the chosen color for comments placed between /* and */ or from //
to the end of a line.
Click the color swatch next to Comments to set the color.
Compiler
Choose from this list pop-up the desired compiler for the selected File Type in the File
Mappings list. Select None to not associate the selected file type with any compiler.
Do nothing
Select this option to leave all windows in place during a debugging session.
Documents
In this field enter the number of recent documents to display in the Open Recent
submenu.
NOTE After enabling the Dump internal browse information after compile option,
compile only single files or small files. Compiling an entire project can create
huge internal browser information for the IDE to display.
Edit Commands
Select this option to add Edit menu commands to IDE contextual menus. Clear the option
to remove the commands from the contextual menus.
Edit Language
Choose from this pop-up menu the programming language to associate with the selected
file mapping. The selected language determines the syntax-color scheme. For example,
choose C/C++ to apply the appropriate syntax-color scheme for C or C++ programming-
language components.
Environment Settings
Use this section to specify environment variables to pass to your program as part of the
environment parameter in your program’s main() function, or as part of environment
calls. These environment variables are only available to the target program. When your
program terminates, the settings are no longer available.
NOTE The Environment Settings section appears only when you develop code for a
Windows build target. The section does not appear for any other build target.
Export Panel
Click this button to save to an Extensible Markup Language (XML) file the current state
of the active preference or settings panel.
Extension
In this field enter a filename extension, such as the .c or .h, for a selected File Type in
the File Mappings list. Table 21.1 on page 241 lists default filename extensions.
.o Object File
Factory Settings
Click this button to change all modified options to their default values in the current or
settings preference panel.
Failure
Choose from this pop-up menu a sound to play after a Bring Up To Date or Make
operation fails.
File Type
Enter in this field the four-character file type for the selected file mapping in the File
Mappings list.
Font
Choose from the Font options the typeface to use for displaying text in editor windows.
This setting behaves in two different ways, depending on the current IDE state:
• No editor windows open—the setting modifies the default font. All editor windows
take on the default font.
• Editor windows open—the setting modifies the font displayed in the frontmost editor
window only. Other editor windows remain unaffected. The default font remains
unchanged.
Font Preferences
Select the Font Preferences option to remember font settings for each file in a project.
Clear the option to use the default font settings every time the IDE opens each file. The
Font & Tabs preference panel defines the default settings.
Foreground
Use the Foreground option to configure the color of any text not affected by the Activate
Syntax Coloring or Activate Browser Coloring options.
Click the color swatch to change the current color.
G-I
NOTE If you choose the Language Parser option, you can also have the IDE take
into account your custom macro definitions. To do so, enter the path to your
prefix file in the Prefix file field and the path to your macro file in the Macro
file field.
Grid Size X
In the Grid Size X field enter the number of pixels to space between markings on the x-
axis of the Layout Editor grid.
Grid Size Y
In the Grid Size Y field enter the number of pixels to space between markings on the y-
axis of the Layout Editor grid.
Host Flags
The Host Flags list pop-up defines the host platforms which can use the selected access
path. The settings include:
• None–no host can use this access path.
• All–all hosts can use this access path.
• Windows–only use this path for Windows build targets.
Import Panel
Click Import Panel to load the contents of a previously saved Extensible Markup
Language (XML) file into the active preference or settings panel.
Initial directory
In this field enter the initial directory for use with the external debugger. Alternatively,
click Browse to open a dialog box. Use the dialog box to select the initial directory.
NOTE Select the Browser Commands option in order to select the Insert Template
Commands option. Otherwise, the Insert Template Commands state has no
effect.
K-L
Keywords
Use the Keywords option to configure the color of C, C++, and Java programming
language’s keywords displayed in editor windows when the Activate Syntax Coloring
option is enabled. Coloring does not include macros, types, variables defined by system
interface files, or variables defined in source code. Click the color swatch next to
Keywords to set the color.
Launch Editor
Enter in the Launch Editor field a command-line expression that specifies the third-party
text editor that the CodeWarrior IDE runs to edit text files.
The IDE expands the %file variable of the command-line expression into the full file
path. For example, to run the Emacs text editor to edit text files, enter this command-line
expression:
runemacs %file
Consult the documentation provided with the third-party text editor for more information
about using command lines.
Level
Choose from the Level options the amount of information reported for IDE plug-ins in
development. This information is useful for diagnosing plug-in behavior or for viewing
information about the properties of installed plug-ins.
Choose one of these levels of plug-in diagnostic information:
• None (default)—The IDE does not activate plug-in diagnostics or produce output.
• Errors Only—The IDE reports problems encountered while loading plug-ins. These
problems appear in a new text file after the IDE starts up.
• All Info—The IDE reports information for each installed plug-in, such as problems
with plug-in loading, optional plug-in information, and plug-in properties. This
information appears in a new text file after the IDE starts up. The text file also
contains a complete list of installed plug-ins and their associated preference panels,
compilers, and linkers.
The IDE allows saving and printing the text file. Use the file as an error reference for
troubleshooting plug-ins. The text file also provides suggestions for correcting general
plug-in errors.
Linker
Use the Linker option menu to select the linker to use with the project. The choices
available are always dependent on the plug-in linkers that are available to the
CodeWarrior IDE.
To learn more about the linkers, see the appropriate Targeting manual.
Output Directory
Use the Output Directory caption to show the location the IDE places a final linked
output file. The default location is the directory that contains your project file. Select
Choose to specify the location path.
Post-linker
Use the Post-linker option to select a post-linker that performs additional work (such as
format conversion) on the final executable file.
Pre-linker
Use the Pre-linker option to select a pre-linker that performs additional work on the
object code in a project. This work takes place before the IDE links the object code into
the final executable file.
For more information about the pre-linkers available, see the build targets Targeting
manual.
Projects
Enter the number of recent projects to display in the Open Recent submenu.
Project Commands
Select the Project Commands option to add Project menu commands to contextual
menus. Clear the option to remove the commands from the contextual menus.
Project operations
A bullet in the Project operations column, whose label appears at left, indicates
that the IDE ignores matching folders for project operations. Such operations
include dragging a folder into the Project window, building a project, or searching
access paths after choosing File > Open.
Recommended
Select the Recommended option to allow the number of concurrent compiles suggested
by the IDE. This suggestion takes into account the number of active Central Processing
Units (CPUs) on the host computer.
Regular Expression
Enter in the Regular Expression field a text pattern to match against folder names. The
IDE excludes matching folders and their contents from selected project operations or find-
and-compare operations.
Revert Panel
Click Revert Panel to revert all modified options in the current preference or settings
panel to the values present when the panel was originally opened.
Script
Choose from the Scripts options the script system (language) used to display text in editor
windows. This setting behaves in two different ways, depending on the current IDE state:
• No editor windows open—the setting modifies the default script system. All editor
windows take on the default script system.
• Editor windows open—the setting modifies the script system displayed in the
frontmost editor window only. Other editor windows remain unaffected. The default
script system remains unchanged.
Selection position
Select the Selection position option to remember these items for each editor window:
• visible text
• insertion-point location
• selected text
Clear the option to open each editor window according to default settings and place the
insertion point at the first line of text.
NOTE The IDE must be able to write to the file in order to remember selection
position.
Size
Choose from the Size options the font size used to display text in editor windows. This
setting behaves in two different ways, depending on the current IDE state:
• No editor windows open—the setting modifies the default font size. All editor
windows take on the default font size.
• Editor windows open—the setting modifies the font size displayed in the frontmost
editor window only. Other editor windows remain unaffected. The default font size
remains unchanged.
Strings
Use the Strings option to configure the color of anything that is not a comment, keyword,
or custom keyword and displayed in editor windows when the Activate Syntax Coloring
option is enabled. Sample strings include literal values, variable names, routine names,
and type names.
Click the color swatch next to Strings to set the color.
Success
Choose from the Success options a sound to play after a Bring Up To Date or Make
operation succeeds.
Symbolics
Enter the number of recent symbolics files to display in the Open Recent submenu.
System Paths
Click the System Paths radio button to display the System Paths pane in the Access Paths
preference panel.
Tab Size
Enter in the Tab Size field the number of spaces to substitute in place of a tab character in
text. This number applies to the Tab Inserts Spaces option.
Target Name
Use the Target Name text box to set or modify the name of the current build target. This
name appears in the Targets view in the Project window. This name is not the name
assigned to the final output file, that is set in the Linker panel for the build target.
Type
Choose from the Type options the desired source-tree path type:
• Absolute Path—This source-tree type is based on a file path.
• Environment Variable—This source-tree type is based on an existing environment-
variable definition.
• Registry Key—This source-tree type is based on an existing Windows registry key
entry.
User Paths
Click this radio button to display the User Paths pane in the Access Paths preference
panel.
User Specified
Select the User Specified option to stipulate the number of concurrent compiles to allow
in the IDE. Enter the desired number in the text box beside the option.
Value
The Value text box defines the value of the variable defined in the Variable text box that
will be passed to a host application when control is transferred to it by the IDE.
Variable
The Variable text box defines the name of a variable to be passed to a host application
when control is transferred to it by the IDE.
VCS Commands
Select the VCS Commands option to add VCS menu commands to contextual menus.
Clear the option to remove the commands from the contextual menus.
Refer to the documentation that came with the version control system to learn about using
it with the CodeWarrior IDE.
W-Z
NOTE The IDE must be able to write to the file in order to remember window position
and size.
Working Directory
Enter the path to the default directory to which the current project has access.
Workspaces
Enter the number of recent workspace files to display in the Open Recent submenu.
Menus
This section includes these chapters:
• IDE Menus
• Menu Commands
File Menu
The File menu contains commands for opening, creating, saving, closing, and printing
source files and projects. The File menu also provides different methods for saving edited
files.
Open Opens source and project files for editing and project
modification operations.
Find and Open File Opens the file specified in the Find and Open File dialog or
from the selected text in the active window.
Save Saves the active file using the editor window’s filename.
Save As Saves a copy of the active file under a new name and
closes the original file.
Save A Copy As Saves a copy of the active file without closing the file.
Revert Discards all changes made to the active file since the last
save operation.
Close Workspace Closes the current workspace. (You cannot close the
default workspace.)
Save Workspace Saves the current state of onscreen windows, recent items,
and debugging.
Import Components Imports the components from another catalog into the
current catalog.
Close Catalog Closes the current catalog and its associated Catalog
Components window and Component Palette.
Export Project Exports the active project file to disk in extensible markup
language (XML) format.
Page Setup Displays the Page Setup dialog for setting paper size,
orientation, and other printer options.
Print Displays the Print dialog for printing active files, and the
contents of Project, Message, and Errors & Warning
window contents.
Edit Menu
The Edit menu contains all customary editing commands, along with some CodeWarrior
additions. This menu also includes commands that open the Preferences and Target
Settings windows.
Select All Selects all text in current editor window or text box for cut,
copy, paste, clear, or typing operations.
Shift Left Moves selected text one tab stop to the left.
Shift Right Moves selected text one tab stop to the right.
Get Previous Completion Shortcut for selecting the previous item that appears in
the Code Completion window.
Get Next Completion Shortcut for selecting the next item that appears in the
Code Completion window.
Preferences Opens the IDE Preferences window where you can set
general IDE, editor, and layout options.
Target Settings Opens the project’s Target Settings window where you
can set target, language, code generation, linker, and
(the name changes, based
editor options.
on the name of the active
build target)
Version Control Settings Opens the VCS Settings window to enable activation of a
version control system and its relevant settings.
Commands & Key Opens the Customize IDE Commands window where you
Bindings can create, modify, remove menus, menu commands,
and key bindings.
View Menu
The View menu contains commands for viewing toolbars, the class browser, the Message
window, and other windows.
Toolbars Use the Toolbars menu to show, hide, reset, and clear
window and main toolbars.
Class Hierarchy or Class Opens or brings to the front a Class Hierarchy window.
Hierarchy Window
Errors & Warnings or Opens or brings to the front an Errors & Warnings
Errors & Warnings Window window.
Global Variables or Global Opens or brings to the front a Global Variables window.
Variables Window
Search Menu
The Search menu contains commands for finding text, replacing text, comparing files,
and navigating code.
Find Opens the Find and Replace window for performing searches
in the active editor window.
Replace Opens the Find and Replace window for replacing text in the
active editor window.
Find in Files Opens the Find in Files window for performing searches in the
active editor window.
Find Next Finds the next occurrence of the find string in the active editor
window.
Find In Next File Finds the next occurrence of the find string in the next file
listed in the Find window’s File Set.
Enter Find String Replaces the Find text box string with the selected text.
Find Selection Finds the next occurrence of the selected text in the active
editor window.
Replace Selection Replaces the replace string in the Replace text box with the
selected text.
Replace and Find Replaces the selected text with the Replace text box string,
Next then performs a Find Next operation.
Replace All Finds all matches of the Find text box string and replaces them
with the Replace text box string.
Find Definition Searches for definition of the routine name selected in the
active editor window using the project’s source files.
Go to Line Opens the Go To Line dialog where you can specify by line
number where to position the text insertion point.
Compare Files Opens the Compare Files Setup window where you can
choose to compare folders or files and merge their contents.
Apply Difference Adds, removes, or changes the selected text in the destination
file to match the selected text in the source file.
Unapply Difference Reverses the modifications made to the destination file by the
Apply Difference command.
Project Menu
The Project menu contains commands for manipulating files, handling libraries,
compiling projects, building projects, and linking projects.
Add Files Opens a dialog box that you can use to add multiple files to
the active project.
Create Group Opens the Create Group dialog box that you can use to add a
new file group to the active project. The new file group
appears below the selected file or group.
Create Target Opens the Create Target dialog box that you can use to add a
new build target to the active project. The new build target
appears below the selected build target.
Check Syntax Checks the active editor window or selected files in the project
window for compilation errors.
Bring Up To Date Compiles all marked or modified files in the current build
target of the active project.
Make Compiles and links all marked or modified files in the current
build target of the active project, saving the executable file.
Stop Build Stops the current compile and linking operation and cancels
the remainder of the build process.
Remove Object Code Removes object code from one or more build targets in the
project.
Re-search for Files Resets the cached locations of source files using the project
access paths, and stores them for faster builds and project
operations.
Reset Project Entry Resets the location of all source files in the active project
Paths using the project access paths.
Synchronize Updates the modification dates of all source files in the active
Modification Dates project.
Run Compiles and links all marked or modified files in the current
build target of the active window, then runs the built
executable file.
Set Default Project Uses the Set Default Project menu to choose the default
project when more than one project is open in the IDE.
Set Default Target Uses the Set Default Target menu to choose the default build
target when more than one build target is present in the
project file.
Window Menu
The Window menu contains commands that manipulate IDE windows.
The menu lists the names of all open file and project windows. A checkmark appears
beside the active window, and an underline indicates a modified and unsaved file.
Cascade Arranges all editor windows so that only the title bar is
visible.
Tile Vertically Tiles all editor windows vertically on the screen so none
overlap.
Save Default Window Saves the active browser windows settings and applies it
to other browser windows as they are opened.
Help Menu
The Help menu contains commands for accessing the IDE’s online help.
CodeWarrior Help Launches a help viewer to display the online help. Click on a
link to view a specific IDE topic.
About Freescale Displays the CodeWarrior IDE version and build number
CodeWarrior information.
TIP Click the Installed Products button in this window to view and save information
about installed products and plug-ins for the CodeWarrior IDE. You can also use
this window to enable or disable plug-in diagnostics.
Add Files
The Add Files command opens a dialog which allows one or more files to be added to the
project.
Add Window
The Add Window command adds the file in the active Editor window to the open project.
The name of the menu command changes, based on the name of the active window. For
example, if the name of the active window is MyFile, the name of the menu command
changes to Add MyFile to Project.
Align
Reveals the Align submenu with component alignment commands like Right Edges,
Vertical Centers, and others.
See also:
• “Bottom Edges”
• “Horizontal Center”
• “Left Edges”
• “Right Edges”
• “To Grid”
• “Top Edges”
• “Vertical Center”
All Exceptions
The All Exceptions command of the Java submenu tells the debugger to break every time
an exception occurs. This behavior includes exceptions thrown by the virtual machine,
your own classes, the debugger, classes in classes.zip, and so on. Java programs
throw many exceptions in the normal course of execution, so catching all exceptions
causes the debugger to break often.
Apply Difference
The Apply Difference command applies the selected difference from the source file into
the destination file.
Balance
The Balance command selects all text starting at the current insertion point and enclosed
in parentheses (), brackets [], or braces {},
Bottom Edges
The Bottom Edges command of the Align submenu aligns the bottom edges of the
selected components.
Break
The Break command temporarily suspends execution of the target program and returns
control to the debugger.
See also: “Stop”.
Bring To Front
The Bring To Front command moves the selected objects so that they are displayed in
front of all other objects.
Bring Up To Date
The Bring Up To Date command updates the current build target in the active project by
compiling all of the build target’s modified and touched files.
Browser Contents
The Browser Contents command opens the Browser Contents window. This command is
not available if the Enable Browser option is not activated.
Cascade
The Cascade command arranges open editor windows one on top of another, with their
window titles visible.
Check Syntax
The Check Syntax command checks the syntax of the source file in the active Editor
window or the selected files in the open project window. If the IDE detects one or more
errors, a Message window appears and shows information about the errors.
The Check Syntax command is not available if the active Editor window is empty or no
project file is open.
Check Syntax does not generate object code.
Press Esc key to abort the syntax-checking process.
Class Browser
The Class Browser command opens a Class Browser window. This command is
unavailable if the Enable Browser option is not enabled.
Clear
The Clear command removes the selected text. This menu command is equivalent to
pressing the Backspace or Delete key.
Close
The Close command closes the active window.
Close All
The Close All command closes all open windows of a certain type. The name of this menu
command changes, based on the type of item selected. For example, select one of several
open editor windows, the menu command changes its name to Close All Editor
Documents.
Close Catalog
The Close Catalog command closes the current catalog and removes the catalog from the
Component Catalog window and the Component Palette.
Close Workspace
This command closes the current workspace.
You cannot close the default workspace, but you can choose whether to use it by toggling
the Use default workspace option in the IDE Extras preference panel.
Complete Code
The Complete Code command opens the Code Completion window. Use this window to
help you automatically complete programming-language symbols as you type them in the
active editor window.
CodeWarrior Glossary
The CodeWarrior Glossary command opens and displays a list of vocabulary terms used
by the CodeWarrior manuals and online help.
CodeWarrior Help
This command opens the online help for the CodeWarrior IDE.
Collapse Window
The Collapse Window command collapses the active window so that only its title is
visible.
Compare Files
The Compare Files command opens the Compare Files Setup window. Use it to choose
two files or folders for comparison and merging. After choosing the items, a comparison
window appears that shows differences between the items.
Compile
The Compile command compiles selected source files into binary files. The IDE compiles
source files that are:
• part of the current project and open in the active Editor window, or
• selected files, segments, or groups in a project window.
Copy
The Copy command copies selected text to the system Clipboard. If the Message Window
is active, the Copy command copies all text in the Message Window to the Clipboard.
Copy to Expression
The Copy to Expression command copies the variable selected in the active pane to the
Expressions window.
Create Design
This command creates a new design in the current project. The new design appears in the
Design tab of the project window. You cannot create a design if each build target in the
project already belongs to a design.
Create Group
The Create Group command creates a new group in the current project. This command is
active when the Files view is visible in the project window.
Create Target
The Create Target command creates a new build target in the current project. This
command is active when the Targets view is visible in the project window.
Cut
The Cut command copies the selected text to the system Clipboard, replacing the previous
Clipboard contents, and removes it from the current document or text box.
Delete
The Delete command removes selected text without placing it on the system clipboard.
This menu command is equivalent to pressing the Backspace or Delete key.
Disassemble
The Disassemble command disassembles the compiled source files selected in the project
window. After disassembling a file, the IDE creates a .dump file that contains the file’s
object code. The .dump file appears in a new window after the IDE completes the
disassembly process.
Display Grid
The Display Grid command toggles the visibility of grid lines in the layout window.
When checked, the grid lines appear, otherwise, no grid is visible.
Exit
The Exit command exits the CodeWarrior IDE immediately, provided that:
• all changes to the open editor files are already saved, or
• the open editor files are not changed.
If a Project window is open, the IDE saves all changes to the project file before exiting. If
an Editor window is open and changes are not saved, the CodeWarrior IDE asks if you
want to save your changes before exiting.
Expand Window
The Expand Window command expands a collapsed window (a window with only its
title visible). Only available when a collapsed window is currently active.
Export Project
The Export Project command exports a CodeWarrior project to a file in XML format.
The IDE prompts for a name and location to save the new XML file.
Find
The Find command opens the Find and Replace window to perform find operations within
the active file.
Find Definition
The Find Definition command searches for the definition of the selected routine name in
the active window. Searching occurs in the source files belonging to the open project. If
the IDE finds the definition, the source file that contains the definition appears in an Editor
window, and the routine name appears highlighted.
If the IDE finds more than one definition, a Message window appears warning of multiple
definitions. If the IDE does not find a definition, a system beep sounds.
NOTE Select the Activate Browser option in the Build Extras target settings panel
and re-compile the project in order to use the Find Definition command.
Find in Files
The Find in Files command opens the Find in Files window. This window allows you to
perform find-and-replace operations across multiple files using specified search criteria.
Find Next
The Find Next command searches for the next occurrence of the Find text box string in
the active window.
Find Previous
The Find Previous command searches for the previous occurrence of the user defined
string in the active window.
Find Reference
The Find Reference command searches for the definition of the selected routine name in
the active Editor window, using the online help system specified in the IDE Extras
preference panel.
If the IDE does not find a definition, a system beep sounds.
Find Selection
The Find Selection command searches for the next occurrence of the selected text in the
active Editor window.
the previous symbol from the one currently selected, use this command to insert that
previous symbol directly into the active editor window.
Go Back
The Go Back command returns to the previous view in the CodeWarrior browser.
Go Forward
The Go Forward command moves to the next view in the CodeWarrior Browser (after
you select Go Back command to return to previous view).
Go to Line
The Go to Line command opens the Line Number dialog box. Enter a specific line
number to move the text-insertion point. If the line number specified exceeds the number
of lines in the file, the text-insertion point moves to the last line in the file.
Horizontal Center
The Horizontal Center command of the Align submenu aligns the horizontal centers of
the selected components.
Import Components
The Import Components command imports components from another catalog for use
with the current catalog.
Import Project
The Import Project command imports project files previously saved in a XML file with
the Export Project command.
K-L
Left Edges
The Left Edges command of the Align submenu aligns the left edges of the selected
components.
M-N
Make
The Make command builds the selected project by compiling and linking its modified and
touched files. The results of a successful build depends on the selected project type.
Maximize Window
Windows equivalent of Expand Window.
See also: “Expand Window”
Freescale Website
The Freescale Website command launches a web browser and displays the Freescale web
site.
Minimize Window
Windows equivalent of Collapse Window.
See also: “Collapse Window”
New
The New command opens the New window. Use the New window to create new projects,
files, components, and objects.
New Class
The New Class command opens the New Class wizard. Use this wizard to help create new
classes in a project.
New Event
The New Event command opens the New Event window. Use this window to help create
new events for a selected class in a project.
New Method
The New Method command opens the New Method window. Use this window to create a
new method for a selected class in a project.
New Property
The New Property command opens the New Property window. Use this window to create
a new property for a selected class in a project.
Open
The Open command opens an existing project or source file.
Open Recent
The Open Recent menu item reveals a submenu of recently opened projects and files.
Choose a file from the submenu to open that item.
If two or more files in the submenu have identical names, the submenu shows the full
paths to those files in order to distinguish between them.
Open Workspace
This command opens a workspace file that you previously saved.
P-Q
Page Setup
The Page Setup command sets the options used for printing CodeWarrior IDE files.
Paste
The Paste command replaces the selected text with contents of the system clipboard into
the active Editor window or text box. If no text is selected, the IDE places the clipboard
contents at the text-insertion point.
The Paste command is unavailable if the Message window is active.
Precompile
The Precompile command precompiles the text file in the active Editor window into a
precompiled header file.
Preferences
The Preferences command opens the IDE Preferences window. Use this window to
change the global preferences used by the CodeWarrior IDE.
Preprocess
This command preprocesses selected source files in any language that has a preprocessor,
such as C, C++, and Java.
Print
The Print command prints CodeWarrior IDE files, as well as Project, Message, and Errors
and Warnings window contents.
Project Inspector
Opens the Project Inspector window so that you can view information about your project.
You can also use this window to manipulate file-specific information.
Redo
After undoing an operation, you can redo it. For example, after choosing the Undo
Typing command to remove some text that you typed, you can choose Redo Typing to
override the undo and restore the text.
You can enable the Use multiple undo option in the Editor Settings preference panel to
allow greater flexibility with regard to Undo and Redo operations. After enabling this
option, you can choose Undo multiple times to undo multiple actions, and you can Redo
multiple times to redo multiple actions.
Replace
The Replace command opens the Find and Replace dialog box. Use this dialog box to
perform find-and-replace operations within the active file.
Replace All
The Replace All command finds all occurrences of the Find string and replaces them with
the Replace string. If no text is selected in the active Editor window and there is no text in
the Find text box, the IDE dims this menu command.
Replace Selection
The Replace Selection command substitutes the selected text in the active window with
the text in the Replace text box of the Find window. If no text is selected in the active
Editor window, the IDE grays out the menu command.
This menu command replaces one instance of a text string without having to open the Find
window. Suppose that you replaced all occurrences of the variable icount with
jcount. While scrolling through your source code, you notice an instance of the variable
icount misspelled as icont. To replace this misspelled variable with jcount, select
icont and the Replace Selection menu command.
re-search for source files, choose the Project > Reset Project Entry Paths menu
command.
If the Save project entries using relative paths option is disabled, the IDE re-searches
for both header files and source files.
Reset
The Reset command resets the program and returns control to the IDE.
Resize
The Resize command reveals the Resize submenu.
See also:
• “To Largest Height”
• “To Largest Width”
• “To Smallest Height”
• “To Smallest Width”
Restart
The Restart command terminates the current debugging session, then starts a new
debugging session.
Restore Window
The Restore Window command restores a minimized window (a window reduced to an
item in the task bar).
Revert
The Revert command restores the last saved version of the active Editor window.
Right Edges
The Right Edges command of the Align submenu aligns the right edges of the selected
components.
Save
The Save command saves the contents of the active window to disk.
Save A Copy As
The Save A Copy As command saves the active window to a separate file. This command
operates in different ways, depending on the active window.
Save All
The Save All command saves all currently open editor files.
Save As
The Save As command saves the contents of the active window to disk under a different
name.
Save Workspace
This command saves the current state of onscreen windows and recent items. Use the
dialog box that appears to name the workspace and navigate to a location in which to store
the workspace file.
Save Workspace As
This command saves a copy of an existing workspace. Use this command to save the
workspace under a different name.
Select All
The Select All command selects all text in the active window or text box. This command
is usually used in conjunction with other Edit menu commands such as Cut, Copy, and
Clear.
Send To Back
The Send To Back command moves the selected window behind all other windows.
Shift Left
The Shift Left command shifts the selected source code one tab to the left. The amount of
shift is controlled by the Tab Size option.
Shift Right
The Shift Right command shifts the selected source code one tab to the right. The amount
of shift is controlled by the Tab Size option.
Show Types
The Show Types command displays the data types of all local and global variables that
appear in the active variable pane or variable window.
Stop
This command temporarily suspends execution of the target program.
Stop Build
The Stop Build command halts the build currently in progress.
Switch to Monitor
This command transfers control from the CodeWarrior debugger to an external third-party
debugger.
T-U
Target Settings
The Target Settings command displays the Target Settings window. This window
contains settings panels used by the active build target. The name of the menu command
changes, based on the name of the current build target. For example, if the name of the
current build target is ReleaseTarget, the name of the menu command changes to
ReleaseTarget Settings.
Tile Horizontally
This command arranges open editor windows horizontally so that none overlap.
Tile Vertically
This command resizes open editor windows vertically and arranges them so that none
overlap.
To Grid
The To Grid command of the Align submenu aligns selected components to a grid in the
layout. You can display or hide the on screen grid.
To Largest Height
The To Largest Height command of the Resize submenu resizes the selected components
to match the height of the component with the largest height.
To Largest Width
The To Largest Width command of the Resize submenu resizes the selected components
to match the width of the component with the largest width.
Toolbars
The Toolbars command reveals the Toolbars submenu.
See also:
• “Show Window Toolbar”
• “Hide Window Toolbar”
• “Reset Window Toolbar”
• “Clear Window Toolbar”
• “Show Main Toolbar”
• “Hide Main Toolbar”
• “Reset Main Toolbar”
• “Clear Main Toolbar”
• “Hide Floating Toolbar”
• “Show Floating Toolbar”
• “Reset Floating Toolbar”
• “Clear Floating Toolbar”
Top Edges
The Top Edges command of the Align submenu aligns the top edges of the selected
components.
To Smallest Height
The To Smallest Height command of the Resize submenu resizes the selected
components to match the height of the component with the smallest height.
To Smallest Width
The To Smallest Width command of the Resize submenu resizes selected components to
match the width of the component with the smallest width.
Unapply Difference
The Unapply Difference command reverses the action of the Apply Difference
command in a file-comparison window.
Undo
The Undo command reverses the last action. The name of this menu command changes
based upon the editor settings as well as the most recent action. For example, after typing
text in an open Editor window, the Undo command changes its name to Undo Typing.
Choose the Undo Typing command to remove the typed text.
By default, only one undo or redo action is allowed. If the Use multiple undo option is
enabled, undo and redo can act upon multiple actions.
Ungroup
The Ungroup command separates a selected group so that you can move each component
independently.
V-Z
Vertical Center
The Vertical Center command of the Align submenu aligns the vertical centers of the
selected components.
View As Default
The View As Default command displays the selected variable in its default format, based
on the variable’s type.
View As Hexadecimal
The View As Hexadecimal command displays the selected variable as a hexadecimal
value.
View Disassembly
This command changes the data view to show language disassembly.
View Memory
The View Memory command displays the contents of memory as a hexadecimal/ASCII
character dump.
View Memory As
The View Memory As command displays the memory that a selected variable occupies or
the memory to which a selected register points.
View Mixed
This command changes the data view to show source code intermixed with assembly
code.
View Source
This command changes the data view to show source code.
View Variable
The View Variable command creates a separate window to display a selected variable.
Zoom Window
The Zoom Window command expands the active window to its previously set size.
Choose Zoom Window a second time to return the window to its original size.