Home
CodeWarrior™ Development Tools IDE 5.1 User's Guide
Contents
1. 2 20 Special note for Solaris users and Linux users 2 2 2 2 20 2 CodeWarrior IDE Overview 21 Development Cycle s swo so eog ee 21 CodeWarrior IDE Advantages 2 2 2 2 eee ee 23 IDE Tools Overview 2 2 1 a ee ee ee ee ee DA Il Projects 3 Working with Projects 29 About Projects s e s 8 Se ow ce a ae Be eee ee Ae ee we o 29 Project Manager 2 ee 29 Build Targets sa ke a a ee ee ee ee SL Managing Projects 2 2 ee ee ee 32 Advanced Projects 2 a ee 89 Custom Project Stationery 2 2 2 ee ee 40 SUbPCOJects o v e bow cg eca Se a el wee ee wel 2 ke be a AT IDE 5 1 User s Guide IDE 3 Table of Contents Strategies 4 Project Window About the Project Window Project Window Views Files View Designs View Link Order View Targets View File Group Layout and Target Management Build Target Management 5 Working with Files Managing Files 6 Dockable Windows About Dockable Windows Working with Dockable Windows Dock Bars 7 Workspaces About Workspaces Using Workspaces 8 Creating Console Applications About Console Applications Creating Console Applications lll Editor 9 The CodeWarrior Editor Editor Window Editor Toolbar IDE 4 42 45 45 AT 41 49 49 50 51 56 61 61 69 69 71 76 81 81 81 85 85 86 91 91 93 IDE 5 1 User s Guide Interfaces Menu Function
2. The IDE removes the layout from the project IDE 284 IDE 5 1 User s Guide 26 Layout Editing This chapter explains how to edit Rapid Application Development RAD layouts in the CodeWarrior IDE Use layouts to perform these tasks e Construct a user interface a layout visually represents a user interface Construct a layout with various components For example you can construct a dialog box layout that contains button scrollbar and panel components e Manage components organize related components into catalogs For example you can collect frequently used components into a single catalog e Manipulate components examine or change each component in a layout For example you can change properties and events This chapter contains these sections e Layout Wizards on page 285 e Layout Editor on page 286 e Component Palette on page 290 e Object Inspector on page 294 Layout Wizards Use layout wizards to create new layouts for RAD projects The IDE uses the information that you specify in a layout wizard to perform these tasks e name the layout e display the layout onscreen e generate the source code that implements the layout at runtime The wizard provides a series of steps that help you to create a new layout IDE 5 1 User s Guide IDE 285 Layout Editing Layout Editor Layout Editor Use the Layout Editor to design a graphical user interface GUI for
3. Balance Selects the text between the nearest set of parenthesis braces or brackets Shift Left Moves the selected text one tab stop to the left Shift Right Moves the 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 Complete Code Opens the Code Completion window Preferences Opens the IDE Preferences window where you can set general IDE editor debugger and layout options Target Settings the name changes based on the name of the active build target Opens the projects Target Settings window where you can set target language code generation linker editor and debugger options Version Control Settings Opens the VCS Settings window to enable the activation of a version control system and its relevant settings Commands amp Key Bindings View Menu Opens the Customize IDE Commands window where you can create modify remove menus menu commands and key bindings The View menu contains commands for viewing toolbars RAD windows the class browser the Message window and debugging windows IDE 454 IDE 5 1 User s Guide IDE Menus Windows Menu Layout Table 34 3 View menu commands Menu command Toolbars Explanation Use the Toolbar
4. Edit Click to add modify or remove keywords from the corresponding custom keyword set Adding a Keyword to a Keyword Set To add a keyword to a keyword set follow these steps 1 Click Edit next to the desired keyword set A dialog box appears This dialog box lists the current collection of keywords in the keyword set 2 Enter the new keyword into the field at the top of the dialog box 3 Click Add The new keyword appears in the keyword list 4 Select Case Sensitive as desired When selected the IDE treats the case of each keyword in the keyword set as significant When cleared the IDE ignores the case of each keyword in the keyword set 5 Click Done The IDE saves the modified keyword set IDE 402 IDE 5 1 User s Guide Working with Target Settings Debugger Panels Removing a Keyword from a Keyword Set To remove a keyword from a keyword set follow these steps 1 Click Edit next to the desired keyword set A dialog box appears This dialog box lists the current collection of keywords in the keyword set 2 Select the obsolete keyword in the Custom Keywords list 3 Press the delete key for your platform e Windows Solaris and Linux Backspace e Macintosh Delete 4 Click Done The IDE saves the modified keyword set Debugger Panels The Debugger section of the Target Settings Panels list defines general debugger settings for the project Consult the Targeting documentation for more
5. I Dump internal browse information after compile This setting is used by compiler developers to debug generated browser data J Use External Debugger Application Browse Arguments Initial directory Browse Table 32 5 Build Extras settings panel items Item Explanation Use modification date caching Select to have the IDE cache modification date information and use that information each time it builds a target Cache Subprojects Select to improve multi project updating and linking speed Generate Browser Data From Choose whether the IDE generates browser data for the project and the method by which the IDE generates that data Dump internal browse Select to have the IDE dump raw browser information for viewing information after compile This option appears after selecting Compiler from the Generate Browser Data From pop up menu 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 IDE 5 1 User s Guide IDE 393 Working with Target Settings Target Panels Table 32 5 Build Extras settings panel items continued Item Macro file Explanation 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 Use External Debugger
6. Edit Wire button IDE 5 1 User s Guide 6 3 Select a wire in the layout then click this button to edit the wire properties Clicking this button is equivalent to selecting Layout gt Edit Wire IDE 287 Layout Editing Layout Editor Table 26 1 Layout Editor items continued Item Icon Description Show All Wires a Clicking this button toggles visibility of all wires in the layout Clicking button this button is equivalent to selecting Layout gt Show All Wires Show Incoming Wires Select a component in the layout then click this button to view all wires that define the selected component as their destination E button component Clicking this button is equivalent to selecting Layout gt Show Incoming Wires Show Outgoing ar Select a component in the layout then click this button to view all Wires l wires that define the selected component as their source component button Clicking this button is equivalent to selecting Layout gt Show Outgoing Wires Grid button Clicking this button toggles visibility of a grid in the layout editor Clicking this button is equivalent to selecting Layout gt Display Grid Snap To Grid button E Clicking this button toggles whether components snap to the grid in the layout editor as you move them in the layout Clicking this button is equivalent to selecting Layout gt Snap To Grid Customize button i Select a component
7. Setting or Clearing a Watchpoint in the Symbolics Window To set a Watchpoint in the Symbolics window follow these steps 1 Select Project gt Debug A debugging session starts 2 Open the Symbolics window 3 Highlight a variable in the Source pane of the Symbolics window 4 Select Debug gt Set Clear Watchpoint The IDE sets the watchpoint Select the variable again and choose the same menu command to clear the watchpoint Alternatively use a contextual menu to set or clear the watchpoint as explained in Table 21 6 Table 21 6 Clearing a watchpoint y using a contextual menu On this host Do this Windows Right click the variable and select Set Clear Watchpoint Macintosh Control click the variable and select Set Clear Watchpoint Solaris Control click the variable and select Set Clear Watchpoint Linux Ctrl click the variable and select Set Clear Watchpoint IDE 250 IDE 5 1 User s Guide 22 Using Eventpoints This chapter explains how to use eventpoints in the CodeWarrior IDE and contains these sections About Eventpoints on page 251 Using Eventpoints in the Breakpoints Window on page 256 Using Eventpoints in Other Windows on page 259 Using Eventpoints in the Symbolics Window on page 261 About Eventpoints An eventpoint is a conditional breakpoint that performs a specific task instead of halting program execution An eventpoint can beha
8. Line 15 Col9 Source N Setting an Eventpoint in the Thread Window Follow these steps to set an eventpoint in the Variables pane in the Thread window 1 Debug your program The Thread window appears 2 Inthe Variables pane in the Thread window select the variable IDE 260 IDE 5 1 User s Guide Using Eventpoints Using Eventpoints in the Symbolics Window 3 Choose Debug gt Set Eventpoint Follow these steps to set an eventpoint in the Source pane in the Thread window 1 Debug your program The Thread window appears 2 Inthe Source pane in the Thread window double click the variable 3 Choose Debug gt Set Eventpoint Alternately right click the variable and choose Set Eventpoint Clearing an Eventpoint in the Thread Window To clear an eventpoint in Variables pane in the Thread window follow these steps 1 Debug your program The Thread window appears 2 Inthe Variables pane in the Thread window double click the variable 3 Choose Debug gt Clear Eventpoint To clear an Eventpoint in the Source pane in the Thread window follow these steps 1 In the Source pane in the Thread window double click the variable 2 Choose Debug gt Clear Eventpoint Alternately right click the variable and choose Clear Eventpoint Using Eventpoints in the Symbolics Window The Symbolics window lets you view any file in the build target for which the IDE generated a symbolics file and lets
9. Viewing Browser Data by Inheritance Use a Hierarchy window to view data in graphical form and better understand class relationships Use the expand and collapse arrows to enlarge or shrink the class views IDE 168 IDE 5 1 User s Guide Using Other Browser Windows Multiple Class Hierarchy Window 1 Activate the browser 2 Update the browser database by using the Bring Up To Date Make Run or Debug command 3 Open a graphical Hierarchy window as explained in Table 15 2 Table 15 2 Opening the Hierarchy window Windows On this host Do this Select View gt Class Hierarchy Macintosh Select Window gt Class Hierarchy Solaris Select Window gt Class Hierarchy Linux Select Window gt Class Hierarchy Printing Class Hierarchies To print the contents of a Class Hierarchy window save an image of the window contents then print the image file from a graphics processing application The IDE saves the image in a graphics file format based on the host platform as shown in Table 15 3 Table 15 3 Graphics file format for host platforms Host Graphics file Format Windows EMF Enhanced Metafile Macintosh PICT Picture Solaris PICT Picture Linux PICT Picture 1 Open the Class Hierarchy window 2 Choose File gt Save a Copy As 3 Save the image to a file IDE 5 1 User s Guide IDE 169 Using Other Browser Windows Single Class Hierarchy Window 4 Open the
10. 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 You use menu commands to perform these workspace tasks e save a new workspace open an existing workspace e close the current workspace IDE 5 1 User s Guide IDE 81 Workspaces Using Workspaces Using the Default Workspace Use the default workspace to preserve IDE state from one session to the next The IDE saves and restores the default workspace automatically 1 Choose Edit gt Preferences The IDE Preferences window opens Select IDE Extras in the IDE Preference Panels list The IDE Extras preference panel appears Configure the Use default workspace option Selected the IDE saves its state at the time you quit then restores that state the next time you launch the IDE Cleared the IDE always launches with the same default state no windows visible Saving a Workspace Save a workspace to store information about the current state of onscreen windows recent items an
11. Catalog list pop up B Swing Components M Use to select a component catalog Component tool buttons h Sample tool Shows the available tools for the selected component catalog Each tool button represents a component Opening the Component Palette Open the Component Palette to select components to add to a layout 1 Open the Component Palette window as explained in Table 26 5 on page 292 IDE 5 1 User s Guide IDE 291 Layout Editing Component Palette Table 26 5 Opening the Component Palette window On this host Do this Windows Select View gt Component Palette Macintosh Select Window gt Component Palette Solaris Select Window gt Component Palette Linux Select Window gt Component Palette 2 The component palette appears z Alternatively click the Component Palette button in the layout editor Adding a Component to a Layout You can add new components to a layout by using the Component Palette or the Component Catalog Component Palette Click the component that you want to use then click in the layout shown in the layout editor to place that component in the layout The component appears in the layout Component Catalog 1 Select a component in the Component Catalog 2 Drag the selection from the Component Catalog to the layout shown in the layout editor The component appears in the layout Removing a Component from a Lay
12. For example select main c and choose Edit gt Delete Create a new source file as explained in Table 8 1 Table 8 1 Creating a new source file On this host Do this Windows Press Ctrl N Macintosh Press Command N Solaris Press Meta N Linux Press Ctrl N 12 Enter source code For example enter this source code shown in Listing 8 1 on page 88 IDE 5 1 User s Guide IDE 87 Creating Console Applications Creating Console Applications Listing 8 1 Sample source code A minimal Win32 console application include lt stdio h gt int main void printf Hello World return 0 13 Save the source file as explained in Table 8 2 Table 8 2 Saving the source file On this host Do this Windows Press Ctrl S Macintosh Press Commanda S Solaris Press Meta S Linux Press Ctrl S Enter a name for the source code For example enter Hello c Then click Save 14 Choose Project gt Add Hello c to Project The Add Files window appears 15 Add the file to all build targets in the project Select all checkboxes to add the file to all build targets then click OK 16 Drag the source file inside the Sources group 17 Choose Project gt Run The IDE compiles links then runs the console application IDE 88 IDE 5 1 User s Guide Editor This section contains these chapters e The CodeWarrior Editor e Editing Source Code
13. Table 31 6 Plugin Settings preference panel items Item Level Explanation Choose the plug in diagnostics level the IDE generates the next time it loads plug ins Restart the IDE in order for diagnostic level changes to take effect 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 IDE 5 1 User s Guide IDE 359 Working with IDE Preferences General Panels Figure 31 9 Shielded Folders preference panel Shielded Folders Shielded Folders M CyS _ Data Shielded folders will be skipped ignored during project and or find and compare operations To include files inside a shielded folder in your project add the folder to your access paths Shielded Folder Info Regular Expression NK m Skip matching folders for V Project operations Find and compare operations Remove Table 31 7 Shielded Folders preference panel items I
14. Use the Bring Up To Date Make Run or Debug command to update the browser database Open the Browser Contents window as explained in Table 15 5 Table 15 5 Opening the Browser Contents window On this host Do this Windows Select View gt Browser Contents Macintosh Select Window gt Browser Contents Solaris Select Window gt Browser Contents Linux Select Window gt Browser Contents 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 IDE 5 1 User s Guide IDE 173 Using Other Browser Windows Symbols window 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 15 4 shows the Symbols window Table 15 5 on page 173 explains the items in the window Figure 15 4 Symbols window Symbol istream_iterator Symbols std istream_iterator ___ct std istream_iterator ___ct T amp D Source Hard Disk 7 8GB Applications More C MSL_Common Include iterator E a template lt class T class charT class traits class Dis
15. View as user Show public Show protected Show private er sie g Viewing Class Data from the Browser Contents Window To view class data for a project in the Browser Contents window follow these steps 1 Open the Browser Contents window as explained in Table 14 3 on page 158 Table 14 3 Opening the Browser Contents window On this host Do this Windows Select View gt Browser Contents Macintosh Select Window gt Browser Contents Solaris Select Window gt Browser Contents Linux Select Window gt Browser Contents 2 Select a class in the Browser Contents window 3 Open a contextual menu for the selected class as explained in Table 14 4 IDE 158 IDE 5 1 User s Guide Using Class Browser Windows Class Browser window Table 14 4 Opening a contextual menu for the selected class On this host Do this Windows Right click the selected class Macintosh Control click the selected class Solaris Click and hold on the selected class Linux Click and hold on the selected class A contextual menu like the one shown in Figure 14 2Figure 14 2 appears Figure 14 2 Browser Contents window contextual menu m C Console App Debug contents Ed Classes std overflow_error std plus std pointer_to_binary Ml ee oe std pointer_to_binar Open hierarchy for class std pair std pointer_to_unary Go to member function
16. e Layout Editor on page 384 IDE 5 1 User s Guide IDE 383 Working with IDE Preferences RAD Tools Panels Layout Editor The Layout Editor preference panel provides options for customizing the Layout Editor tool including e display of the Component Palette and the Object Inspector e grid size displayed onscreen Figure 31 19 Layout Editor preference panel Layout Editor TA Show the component palette when opening a form v Show the object inspector when opening a form Grid Size X Grid Size Y 10 Table 31 18 Layout Editor preference panel items Item Explanation Show the component palette Select to automatically display the Component Palette after opening when opening a form a form Show the object inspector when_ Select to automatically display the Object Inspector after opening opening a form a form Grid Size X Enter the number of pixels to space between markings on the x axis of the Layout Editor grid Grid Size Y Enter the number of pixels to space between markings on the y axis of the Layout Editor grid IDE 384 IDE 5 1 User s Guide 32 Working with Target Settings This chapter explains core CodeWarrior IDE target settings panels and provides basic information on target settings options for the current project s build targets Consult the Targeting documentation for information on platform specific target settings panels This chapter contains t
17. Customizing the IDE Customize Toolbars Adding a Toolbar Element You add an element to a toolbar by dragging and dropping it from the Toolbar Items list onto a toolbar This list is in the Toolbar Items view in the Customize IDE Commands window To add an element to a toolbar follow these steps 1 From the Toolbar Items list select the icon next to the element that you want to add to a toolbar Make sure that the destination toolbar is visible Drag the element s icon from the Toolbar Items list to the destination toolbar On the Windows hosted IDE if the destination toolbar accepts the element a framing bracket appears in the toolbar This framing bracket shows you where the new element will appear after you release the cursor If the destination toolbar does not accept the element the framing bracket does not appear Release the element at the desired position After you release the element the IDE inserts the element into the destination toolbar The toolbar might not accept an element for these reasons The toolbar is full The element already exists in the toolbar You cannot use the element in the toolbar because the window does not support that element You cannot add these elements to any toolbar except the editor window toolbar Document Settings Functions Header Files Markers and Version Control menus File Dirty Indicator and File Path field You cannot add the Current Target menu element
18. The Save As command saves the contents of the active window to disk under a different name IDE 5 1 User s Guide IDE 509 Menu Commands IDE 510 Save Default Window The Save Default Window command saves the settings of the active Browser window The IDE applies the saved settings to subsequently opened browser windows Save Workspace This command saves to a file the current state current state of onscreen windows recent items and debugging Use the dialog box that appears to name the workspace and navigate to a location in which to store the workspace 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 objects so that they are displayed behind all other objects Set Breakpoint The Set Breakpoint command sets a breakpoint at the currently selected line If the Show Breakpoints option is active the Breakpoints column in the editor windows will display a marker next to each line with a breakpoint Set Clear Breakpoint The Set Clear Breakpoint command displays the Set Clear Breakpoints dialog that lets you set or clear a breakpoint at a particular address or symbol Set Default Project T
19. The Show Floating Toolbar command displays the IDE s floating toolbar After displaying the floating toolbar the command changes to Hide Floating Toolbar IDE 5 1 User s Guide IDE 511 Menu Commands IDE 512 Show Main Toolbar The Show Main Toolbar command displays the IDE s main toolbar After displaying the main toolbar the command changes to Hide Main Toolbar 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 Show Window Toolbar The Show Window Toolbar command displays the toolbar in the active window After displaying the window toolbar the command changes to Hide Window Toolbar Snap To Grid The Snap to Grid command automatically aligns objects with the grid in the layout window of a RAD project Stack Editor Windows The Stack Editor Windows command arranges open editor windows one on top of another with their window titles visible Step Into The Step Into command executes a single statement stepping into function calls Step Out The Step Out command executes the remainder of the current function then exit to that function s caller Step Over The Step Over command executes a single statement stepping over function calls IDE 5 1 User s Guide Menu Commands Stop This command temporarily suspends execution of the target program and returns control to the debugger Stop Build T
20. These commands open the Global Variables window Use this window to view global variables for an entire project or for a single file Click a filename in the Files list displays the file s global variables in the Variables list 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 The Go Back command to return to a previous view Go to Line The Go to Line command opens the Line Number dialog box and enter a specific line number to move the text insertion point to 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 IDE 5 1 User s Guide IDE 497 Menu Commands Group The Group command combines selected objects into a single item in the Layout Editor window of a RAD project IDE 498 Hide Breakpoints The Hide Breakpoints command conceals the Breakpoints column which appears to the left of the source code shown in editor windows Hide Floating Toolbar The Hide Floating Toolbar command conceals the IDE s floating toolbar After concealing the floating toolbar the command changes to Show Floating Toolbar Hide Main Toolbar The Hide Main Toolbar command conceals the IDE s main toolbar After concealing the main toolbar the command changes to Show Main Toolbar Hide Window Toolbar The Hide Window Tool
21. You work with object wiring in these IDE elements e layout editor draw wires modify wires and delete wires either graphically or by using a contextual menu e Create Wire wizard define the action represented by the wire e object inspector reorder wires with the same source component and action and delete wires Working with Object Wires You work with object wires in these ways e create a wire e modify a wire e delete a wire IDE 310 IDE 5 1 User s Guide Object Wiring Working with Object Wires This section explains how to perform these tasks Creating a Wire by Drawing It Draw wires in the layout editor to connect a source component to a destination component The wire represents an action on the destination component To view the layout editor open a RAD project and open a layout from the Design tab in the project window 1 Identify the source and destination component in the layout These components have an interaction that you define by drawing a wire between them NOTE You do not need to select a source component or destination component in order to create a wire In this case the Create Wire wizard substitutes default values in place of the missing components You can change these default values in the wizard 2 Click the New Wire button in the layout editor toolbar 3 The button highlights 3 Position the cursor over the source component 4 Drag the cursor from the source component
22. 1 Inthe Thread window double click on a variable in the Variables pane to open a Variable window 2 Select the variable from the Variable window 3 Choose Debug gt Set Watchpoint Alternately right click the variable and Set Watchpoint IDE 5 1 User s Guide IDE 247 Using Watchpoints Using Watchpoints in Other Windows Setting a Conditional Watchpoint A conditional watchpoint is a watchpoint that stops program execution at a given point when a specified condition is met Use the Variable window to create conditional watchpoints To set a conditional watchpoint follow these steps 1 Select a variable from the Variable window 2 Select Debug gt Set Watchpoint 3 Open the Watchpoints window as explained in Table 21 5 on page 248 Table 21 5 Opening the Watchpoints window Windows On this platform Do this Select View gt Watchpoints Macintosh Select Window gt Watchpoints Solaris Select Window gt Watchpoints Linux IDE 248 Select Window gt Watchpoints 4 Double click the Condition field in the Watchpoints window for the watchpoint that you just created The field becomes editable 5 Enter an expression in the Condition field The debugger evaluates this expression to determine whether to stop program execution at the watchpoint If the expression evaluates to true non zero the debugger stops program execution at the watchpoint If the expressio
23. 2 Find the breakpoint that you want to clear A red marker in the Breakpoint column left edge of window indicates a breakpoint 3 Click the red marker in the Breakpoint column The IDE clears the breakpoint Clearing All Breakpoints Use the Clear All Breakpoints command to clear all project breakpoints with a single command 1 Select Debug gt Clear All Breakpoints 2 The IDE clears all breakpoints in project source files NOTE Alternatively use the Breakpoints window to clear breakpoints select the breakpoint that you want to remove and press Delete Clearing Breakpoints in the Breakpoints window Use the Clear Breakpoints command to clear breakpoints in the Breakpoints window 1 Open the Breakpoints window 2 Inthe Location column select the breakpoint that you want to clear 3 Click the red marker to the left of the breakpoint The IDE clears the breakpoint IDE 5 1 User s Guide IDE 235 Using Breakpoints Common Breakpoint Tasks Setting Temporary Breakpoints Use the Temporary Breakpoint command to set temporary breakpoints A temporary breakpoint causes the debugger to halt program execution only once The debugger removes the temporary breakpoint after suspending program execution Essentially setting a temporary breakpoint is equivalent to using the Run To Cursor command 1 Open any window that displays source code 2 In the source code find the line at which you want to set the tem
24. Bring Up To Date amp Make 433 Save open files before build 436 Show message after building up to date project 438 Success 440 Use Local Project Data Storage 443 Build Settings preference panel 351 options Build before running 353 IDE 5 1 User s Guide Compiler thread stack 353 Failure 353 Include file cache 353 Play sound after Bring Up To Date amp Make 353 Save open files before build 353 Show message after building up to date project 353 Success 353 Use Local Project Data Storage 353 build system overview 25 build targets 31 configuring 58 creating 56 management 51 managing 56 moving 52 removing 51 56 renaming 54 58 setting default 57 strategies for 42 Button Choose 336 Delete 337 Export 347 Import 347 New Binding 346 Save 338 buttons Add 391 Add Default 411 Change 391 Edit 372 Export Panel 422 Factory Settings 424 Installed Products 481 Purge Cache 434 Remove 391 resetting in toolbars 343 C cache purging 434 Cache Edited Files Between Debug Sessions option 415 Cache Subprojects option 416 Cache Symbolics Between Runs option 416 IDE 523 caching include files 428 precompiled headers 428 Can t Redo menu command 453 466 Can t Undo menu command 453 466 Cancel in Find and Replace window 128 in Find window 126 Cancel button in Remove Markers window 120 Cascade menu command 484 Case sensitive 126 128 131 Case Sensitive option
25. Cancel 5 Enter Member Function File Locations and Include Files information 6 Click Finish 7 Review settings summary then click Generate The New Data Member Wizard Use the New Data Member wizard to define the new data member declaration and to specify new data member file locations The wizard offers additional options to further define the function IDE 5 1 User s Guide IDE 185 Using Browser Wizards The New Data Member Wizard Figure 16 7 New Data Member wizard New C Data Member Data Member Declaration ixj Name DataMemberName sss i sSOSOSO CCCCS Type int Namespaces required for type optional Example std std Initializer Example 100 or inConstructorParameterN ame ocala Modifiers Access Protected Specifier None Tl Const Volatile Finish Cancel Using the New Data Member Wizard To use the New Data Member wizard follow these steps 1 Open the Class Browser window as explained in Table 16 3 on page 186 Table 16 3 Opening the Class Browser window Windows Select View gt Class Browser Macintosh Select Window gt Class Browser IDE 186 IDE 5 1 User s Guide Using Browser Wizards The New Data Member Wizard Table 16 3 Opening the Class Browser window continued Solaris Select Window gt Class Browser Linux Select Window gt Class Browser 2 Select Browser gt New Data Member 3 Inthe New C Dat
26. Clear Breakpoint The Clear Breakpoint command clears the breakpoint at the currently selected line If the Show Breakpoints option is enabled the marker in the Breakpoints column of the Editor window disappears Clear Eventpoint This command opens a submenu that lets you remove an eventpoint from the currently selected line If the Show Breakpoints option is active the Breakpoints column in the editor windows shows a marker next to each line with an eventpoint The marker represents the eventpoint type Clear Floating Toolbar The Clear Floating Toolbar command removes all the shortcut icons from the floating toolbar Once the toolbar is cleared drag shortcut icons from the Commands and Key Bindings window to the toolbar to create a custom floating toolbar Clear Main Toolbar The Clear Main Toolbar command removes all the shortcut icons from the main toolbar Once the toolbar is cleared drag shortcut icons from the Commands and Key Bindings window to the toolbar to create a custom main toolbar Clear Watchpoint The Clear Watchpoint command removes a watchpoint from the selected variable or memory range IDE 5 1 User s Guide Menu Commands Clear Window Toolbar The Clear Window Toolbar command removes all the shortcut icons from the window toolbar Once the toolbar is cleared drag shortcut icons from the Commands and Key Bindings window to the toolbar to create a custom window toolbar Close The Close command closes
27. IDE 504 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 that you typed 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 IDE 5 1 User s Guide Menu Commands Refresh All Data This command updates the data that appears in all windows Register Details Window The Register Details Window command opens the Register Details window which allows you view descriptions of registers bit fields and bit values Registers Register Window These commands reveal the Registers submenu which can be used to view general registers or FPU registers See also e Register Details Window on page 505 Remove Object Code The Remove Object Code command shows the Remove Object Code dialog box Use this dialog box to remove binary object code from the active project or to mark the project s files for re compilation Remove Object Code amp Compact This command removes all binaries from the project and compacts it Compacting the project removes all binary and debugging information and retains only the information regardi
28. IDE 529 Program entry point 434 Stop at Watchpoints 408 440 Stop on application launch 407 440 Update data every n seconds 442 Update data every n seconds 408 User specified 407 Debugger window See Thread window 245 259 debugger defined 191 debugging advanced defined 202 basic skills 193 introduction 191 multiple cores 228 debugging information 245 259 debugging session starting 195 Declaration File field 179 Default File Format option 418 default filename extensions 422 Default Language Entry Point option Debugger Settings panel 419 default projects 38 Default Size For Unbounded Arrays option 419 default target setting 57 default workspace defined 81 default workspace using 82 definition of action 309 of advanced debugging 202 of breakpoints 231 of bug 191 of child windows 69 of client area 69 of debugger 191 of default workspace 81 of dock 69 of non modal 71 of project 29 of symbolics file 192 of touch 48 of wire 309 of workspace 81 definitions file set 134 IDE 17 regular expression 140 symbols 122 definitions symbol 121 IDE 530 Delete menu command 491 deleting wires with the layout editor 314 Design view 52 designs creating empty 281 removing layouts from 283 Designs view 37 49 development process cycle for software 21 diagnostics disabling for plug ins 481 enabling for plug ins 481 Diagonal Line 170 dialog boxes New Connection 381 difference from Single Class Hierarchy window 170 Disab
29. New Command Delete N Factory Settings Revert Save To delete a command group or menu command follow these steps 7ARRARR Ree A 1 Select the command group or menu command you wish to delete If necessary click the hierarchical control next to a group to expand and view its contents 2 Click Delete After clicking the Delete button the selected command group or menu command disappears from the Commands list 3 Click Save IDE 5 1 User s Guide IDE 337 Customizing the IDE Customize Toolbars Clicking the Save button confirms the deletion The IDE removes deleted command groups from its menu bar Deleted menu commands disappear from their respective command groups 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 Figure 30 7 Toolbar Items tab Customize IDE Commands Commands Toolbar Items Toolbar Items Resource mode toggle View as Us 7 Browser Access Filters M Show Inherited Separator E Document Settings X File Ditty Indicator Functions Path C 5 5File c File Path b Header Files M Markers E M
30. Project Manager Manipulate items associated with a project CodeWarrior IDE Features Handles top level file management for the software developer Organizes project items by major group such as files and targets Tracks state information such as file modification dates Determines build order and inclusion of specific files in each build Coordinates with plug ins to provide version control services Editor Create and modify source code Uses color to differentiate programming language keywords Allows definition of custom keywords for additional color schemes Automatically verifies parenthesis brace and bracket balance Allows use of menus for navigation to any function or into the header files used by the program Search Engine Find and replace text Finds a specific text string Replaces found text with substitute text Allows use of regular expressions Provides file comparison and differencing functionality Source Browser Manage and view program symbols Maintains a symbolics database for the program Sample symbols include names and values of variables and functions Uses the symbolics database to assist code navigation Links every symbol to other locations in the code related to that symbol Processes both object oriented and procedural languages Build System Convert source code into an executable file IDE 5 1 User s Guide Uses the compiler to generate object code
31. Use the New Class wizard to specify the name declaration and location for a new class Click Finish in any screen to apply default values to any remaining parameters and complete the process The New Class wizard creates the files that define the class 1 From the Classes pane click the New Item button 49 2 Enter the Name and Location in the New Class window 3 To create a more complex class click Next optional Follow the on screen directions to further define the class 4 Click Finish to complete the New Class process Showing the Classes Pane Use the Show Classes button to expand the Classes pane 1 Click the Show Classes button 2 The Classes pane appears in the Class Browser window Hiding the Classes Pane Use the Hide Classes button to collapse the Classes pane 1 Click the Hide Classes button 2 The Classes pane disappears from the Class Browser window IDE 162 IDE 5 1 User s Guide Using Class Browser Windows Member Functions pane Sorting the Classes List Use the Sort Alphabetical and Sort Hierarchical commands to specify the sort order of classes in the Classes pane The displayed icon always represents the alternate sort order For example when the Classes list appears in alphabetical order the Sort Hierarchical icon is visible e Click the Sort Alphabetical icon The IDE sorts the Classes list in alphabetical order e Click the Sort Hierarchical icon E The IDE sorts
32. You can still manually trigger code completion functionality from the keyboard or from the main IDE menu bar NOTE To dismiss the Code Completion window after it automatically opens press the Esc key or click outside the active editor window 1 Choose Edit gt Preferences The IDE Preferences window appears 2 Select the Code Completion preference panel in the IDE Preference Panels list The Code Completion preference panel appears 3 Clear the Automatic Invocation option Clearing this option prevents the IDE from automatically opening the Code Completion window 4 Save your preferences Click the Save or Apply button IDE 5 1 User s Guide IDE 109 Editing Source Code Code Completion 5 Choose File gt Close The IDE Preferences window closes The IDE now requires you to manually open the Code Completion window from the keyboard or from the main menu bar Code Completion Window The Code Completion window displays possible symbols based on the context of the insertion point Figure 10 2 shows the Code Completion window Table 10 3 on page 111 explains the items in the Code Completion window Table 10 4 on page 111 explains the icons that appear in the Code Completion list Figure 10 2 Code Completion window public static void main String args System out println Hello World Systen Searching for java lang System K3 arraycopy Object src int src_position Object dst i
33. Click Generate to create the wire or click Cancel to discard the wire If you generate the wire it appears in the layout The IDE generates a basic wire implementation in source code using your supplied information to complete the process NOTE If you choose to Execute Your Own Code an editor window opens and scrolls to the generated source code Insert your source code at this location Inspecting Wires Use the Object Inspector to perform these tasks with wires e view wires defined in the current layout e re order wires with the same source component and action IDE 5 1 User s Guide IDE 317 Object Wiring Inspecting Wires e modify wires e delete wires Viewing Wires by Using the Object Inspector You can use the object inspector to see a list of wires currently defined in the layout editor 1 Open the object inspector for the active RAD project 2 Click the Wires tab in the object inspector Wire information for the current layout appears in the Wires tab Use the hierarchical controls in the Wires tab to collapse or expand the wire hierarchy Re ordering Wires by Using the Object Inspector Use the object inspector to change the order of wires that have the same source component and action The order listed in the object inspector represents the order of wire precedence 1 Open the object inspector for the active RAD project 2 Click the Wires tab in the object inspector The Wires tab appear
34. 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 Code Displays the size in bytes or kilobytes of the compiled executable object code for files and groups Click the column title to sort files by code size Data Displays the size in bytes or kilobytes of non executable data in the object code for files in the project Click the column title to sort files by data size Target Indicates whether each file belongs to the current build target Click in this column to toggle inclusion status Click the Target icon to sort files by inclusion status The Target column appears only when the project has more than one build target Debug Displays debugging status Click in this column to toggle generation of debugging information for a file or group Click the Debug icon to sort files by debugging status Checkout or Displays icons representing the current file status in a version control system Status The Checkout Status column appears only when the project uses a version control system to manage files Interfaces Zi Click to display a list of files inside a group or a list of include files inside a source file Choose a file to open it Sort Order S Click to toggle sorting between ascending and descending order for the active column The icon indicates the current sort order IDE 48 IDE 5 1 User s Guide Project Window Project Window Vi
35. Hold down the mouse button 3 Drag the resize bar to enlarge or shrink the pane Collapsing Browser Panes Click the Pane Collapse box just above the scroll bar in the upper right hand corner of the pane to collapse the Classes Function Members Data Members or Source panes in a Browser window IDE 160 IDE 5 1 User s Guide Using Class Browser Windows Classes pane 1 Click the Pane Collapse box to collapse a pane The chosen pane collapses to its original size 2 You can now view other panes in a Browser window Alternately you can use the resize bar between the panes to collapse each pane although the pane does not fill the Browser window 1 Rest the cursor over the resize bar The cursor icon changes to this 2 Hold down the mouse button 3 Drag the resize bar to collapse the pane Classes pane Use the Classes pane to perform these tasks e Create a new class Toggle viewing of classes e Sort classes Figure 14 1 on page 156 shows the Classes pane Table 14 5 explains the items in the pane Table 14 5 Classes pane items Item Icon Explanation New Item a4 Click to create a new class using the New Class Wizard Sort Alphabetical Click to sort the Classes list in alphabetical order Sort Hierarchical z Click to sort the Classes list in hierarchical order IDE 5 1 User s Guide IDE 161 Using Class Browser Windows Classes pane Creating a New Class
36. IP Address field 382 383 J Java Exceptions Submenu No Exceptions command 502 Java Exceptions submenu All Exceptions command 482 IDE 5 1 User s Guide Exceptions In Targeted Classes command 492 Uncaught Exceptions Only command 517 Java submenu 482 492 502 517 K Key Bindings 327 329 Add 345 Customize 344 key bindings 122 keyboard conventions 20 keyboard shortcuts Find symbols with prefix 105 Find symbols with substring 105 Get next symbol 105 Get previous symbol 105 keywords adding to a keyword set 402 removing from a keyword set 403 Keywords option Text Colors panel 429 Kill command 198 Kill menu command 499 L Language Parser option in Generate Browser Data From menu 427 Launch Editor option IDE Extras panel 429 Launch Editor w Line option IDE Extras panel 430 Launch Remote Host Application option Remote Debugging settings panel 430 Launchable flag 397 layout moving components in 293 layout editing 285 layout editor 286 Layout Editor contextual menu 289 Layout Editor panel options Grid Size X 427 Grid Size Y 427 Show the component palette when opening a form 438 Show the object inspector when opening a form 438 Layout Editor preference panel 384 IDE 5 1 User s Guide options Grid Size X 384 Grid Size Y 384 Show the component palette when opening a form 384 Show the object inspector when opening a form 384 layout management 51 Layout manager in layout editor 288 Layout menu 478 layout
37. Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear Alternatively use a contextual menu to remove the design as explained in Table 25 2 on page 281 IDE 280 IDE 5 1 User s Guide Creating RAD Projects Working with Designs Table 25 2 Removing a design by using a contextual menu On this host Do this Windows Right click the design and select Delete Macintosh Control click the design and choose Clear Solaris Click and hold on the design then choose Clear Linux Click and hold on the design then choose Clear The IDE removes the design from the project Viewing a Design Use the Design view tab in the project window to view all RAD designs in the current build target Use the Current Target list pop up to change which build target s designs to view e Click the Design view tab in the project window The current build target s designs are shown Creating an Empty Design Create an empty design in a legacy project to add design objects to that project In order to add an empty design at least one build target must not yet belong to an existing design in the project 1 Open a project The project window appears 2 Click the Targets tab in the project window The Targets view appears This view shows the existing designs in the project and their corresponding build targets 3 Choose Project gt Create Design The Create New
38. Select to allow selection of an entire line of text by clicking in the left margin of the editor window Sort function popup Select to sort function names by alphabetical order in menus Clear to sort function names by order of appearance in the source file Enable Virtual Space Windows and Macintosh Select to allow moving the text insertion point beyond the end of a source code line Entering new text automatically inserts spaces between the former end of the line and the newly entered text Balance Flash Delay Enter the number of ticks to flash a balancing punctuation character A tick is1 60 of a second Default file format Choose the default end of line format used to save files Font amp Tabs The Font amp Tabs preference panel provides options for customizing settings used by the editor including e font and font size used in editor windows e auto indentation and tab size e tabs on selections and replacing tabs with spaces IDE 368 IDE 5 1 User s Guide Working with IDE Preferences Editor Panels Figure 31 13 Font amp Tabs preference panel Font amp Tabs Font settings Font Courier v Size 9 X Script Westem v Sample I program therefore I am m Tab settings MV Tab indents selection Tab Size 4 J Auto Indent Tab Inserts Spaces Table 31 12 Font amp Tabs preference panel items Item Explanation Fo
39. a conditional eventpoint performs an action Use the Breakpoints window to create conditional eventpoints To set a conditional eventpoint follow these steps 1 Open the Breakpoints window 2 In the Condition field next to the eventpoint enter your condition For example enter a condition like this x n Figure 22 6 Conditional eventpoint ereakponts ee Location Condition main line 15 Scr 7 main line 17 Skip Point The next time you debug the program the IDE initiates an event based on the conditions you set for the eventpoint Using Eventpoints in Other Windows As a general rule you can right click a variable in most windows to set and clear an eventpoint Using Eventpoints in the Thread Window The Thread window also known as the Debugger Stack Crawl and Program windows shows debugging information about the currently suspended process IDE 5 1 User s Guide IDE 259 Using Eventpoints Using Eventpoints in Other Windows Figure 22 7 Thread window C Console Debug exe Thread 0x470 Rex tod Variables All Value Location O0x77E97D08 KERNEL32 dll 020041 4124 global mainCRT Startup main Source C Documents and Settings nmoorefield Desktopi PowerProject01Shello cpp lt http www metrowerks com gt include lt iostream gt using namespace std e lt lt Hello World this is CodeWarrior lt lt endl fe t gt return 0
40. as explained in Table 4 12 Table 4 12 Saving a new name for a build target On this host Do this Windows Click OK Macintosh Click Save Solaris Click Save Linux Click Save The new build target name appears in the Project window Configuring Build Target Settings The Target Settings panel options determine IDE 58 IDE 5 1 User s Guide Project Window Build Target Management The compiler used to process the project and produce object code The linker used to combine object code and produce a binary file The pre linker and post linker options that further process the object code The name assigned to a build target Follow these steps to configure build target settings 1 Choose Edit gt targetname Settings 2 Select Target Settings from the Target Setting Panels list 3 Specify target options as desired 4 Save the new options as explained in Table 4 13 Table 4 13 Saving the build target settings On this host Do this Windows Click OK Macintosh Click Save Solaris Click Save Linux Click Save NOTE The panels available in the Target Settings Panels list update to reflect the choices in the Target Settings panel IDE 5 1 User s Guide IDE 59 Project Window Build Target Management IDE 60 IDE 5 1 User s Guide Working with Files This chapter explains how to work with files in the CodeWarrior IDE Most computer programs use these fi
41. e Modifying key bindings e Adding key bindings e Deleting key bindings e Setting Auto Repeat for key bindings e Exporting commands and key bindings Importing commands and key bindings IDE 5 1 User s Guide Customizing the IDE Customize Key Bindings Figure 30 10 Customize IDE Commands Key Bindings aixi Commands Toolbar Items File x amp Copy IV Appears in Menus Action Command 33 Co py Paste New Binding et Delete Ctrl C i Ctrl Ins J Auto Repeat Select All Balance Prefix Key Timeout fi 20 I Numeric Keypad Bindings Export Import New Group New Command Delete Factory Settings Revert Save Shift Left Adding Key Bindings Use the Customize IDE Commands window to specify additional key bindings for a particular command To add a key binding follow these steps 1 From the Commands list select the command to which you want to add a new key binding Click the hierarchical controls next to the command categories to expand them as necessary so that you can see individual commands Select the individual command you wish to modify IDE 5 1 User s Guide IDE 345 Customizing the IDE Customize Key Bindings 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 2 Click New Binding After clickin
42. from source code Uses the linker to generate a final executable file from object code IDE 25 CodeWarrior IDE Overview IDE Tools Overview Table 2 2 IDE tools and features continued Tool Purpose CodeWarrior IDE Features Debugger Resolve errors e Uses the symbolics database to provide source level debugging e Supports symbol formats such as CodeView DWARF Debug With Arbitrary Records Format and SYM SYMbolic information format RAD tools Graphically develop a e Allows onscreen editing of a user interface user interface for the as it appears to the end user project e Organizes user interface elements into sets of onscreen buttons e Handles generation of code to implement the user interface IDE 26 IDE 5 1 User s Guide Projects This section contains these chapters e Working with Projects e Project Window e Working with Files e Dockable Windows e Workspaces e Creating Console Applications IDE 5 1 User s Guide IDE 27 IDE 28 IDE 5 1 User s Guide Working with Projects This chapter explains how to work with projects in the CodeWarrior IDE Projects organize several file types associated with a computer program e Text files files that contain any kind of text Sample text files include Read Me files and source files e Source files files that contain source code only Sample source files include C files and Java files e Library files files th
43. gt Delete Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear The IDE removes the file from the build target but leaves the file itself intact The file can be re assigned to other build targets in the project Setting the Default Build Target The CodeWarrior Project Manager can handle up to 255 build targets in a single project One build target must be defined as the default target when more than one project is open The default target is the target affected by project commands such as Make and Run The Project menu 1 Choose Project gt Set Default Target gt buildtarget 2 A checkmark indicates the default target Using the Project window toolbar 1 Enable the Project window 2 Choose the build target name from the Current Target pop up menu The build target name appears in the pop up menu IDE 5 1 User s Guide IDE 57 Project Window Build Target Management The Targets view 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 Renaming Build Targets The Rename command renames build targets in a project 1 Click the Targets tab in the Project window 2 Choose Edit gt targetname Settings 3 Select Target Settings in the Target Settings Panels list 4 Type anew name in the Target Name text box 5 Save the new name
44. hello cpp ios iterator maincrt c telse void _MSL_ CDECL exit int status cc 010326 if _ aborting if __dest_os _ win32_os amp amp _WINSIOUX 1 __ begin_critical_region atexit_funcs_access Line 162 Coll IDE 5 1 User s Guide IDE 205 Advanced Debugging Symbolics Window Table 19 1 Symbolics window items Item Debugger toolbar Icon Reena Explanation Contains buttons that represent common debugging commands such as stopping the program and stepping through code Executables pane Lists recently used executable files that contain symbolics information Files pane Lists source files in the build target being debugged for the selected executable file Functions pane Lists the functions declared in the file selected in the Files pane Source pane Displays the source code in the file selected in the Files pane Opening the Symbolics Window The Symbolics window displays information generated by the IDE for a file To open the Symbolics window do one of these tasks e Select View gt Symbolics or Window gt Symbolics window e Open asymbolics file The IDE typically appends xSymM or iSYM to the names of these files e Open an executable file for which the IDE previously generated symbolics information The IDE typically appends exe or app to the names of the files Alternatively click the Symbolics button in the Thread w
45. s Guide IDE 275 IDE 276 IDE 5 1 User s Guide 25 Creating RAD Projects This chapter explains how to create Rapid Application Development RAD projects in the CodeWarrior IDE RAD projects provide these programming aids e Graphical construction instead of manually coding a user interface use the RAD tools to create the interface visually The IDE creates rudimentary code that implements the interface e Component manipulation the RAD tools manipulate graphical items or components that make up a user interface e Catalog organization use component collections or catalogs to quickly construct a user interface Create custom catalogs of frequently used components to simplify RAD tasks Read this chapter to learn more about typical tasks for creating RAD projects This chapter contains these sections e RAD Wizards on page 277 e Working with Designs on page 278 e Working with Layouts on page 282 RAD Wizards Use RAD wizards to create RAD projects in the IDE The wizards provide options for specifying RAD related items e Names specify the name of the RAD project or the name of an item to place inside an existing RAD project e Locations specify the location in which to store the RAD project or the item to place inside an existing RAD project e Parameters specify additional information about the project The selected RAD wizard determines the available parameters The wi
46. scope in C code You can enter the expression x 1 and the IDE computes the resulting value just as you would compute it on a calculator 1 Select the variable to which you want to add a constant value For example select x 2 Enter an expression that adds a constant value to the variable For example append 1 to x so that the resulting expression is x 1 The IDE adds the constant value to the variable and displays the result in the Expressions window Making a Summation of Two Variables You can enter an expression in the Expressions window that computes the sum of two variables Suppose x is a short integer type in the variable context of some function scope in C code You can enter the expression x y and the IDE computes the resulting value just as you would compute it on a calculator 1 Select the variable to which you want to add another variable For example select x 2 Enter an expression that adds a second variable to the first variable For example append y to x so that the resulting expression is x y The IDE computes the sum of the two variables and displays the result in the Expressions window IDE 212 IDE 5 1 User s Guide Advanced Debugging Global Variables Window Removing Expressions The Expressions window handles various ways of removing expressions that no longer require inspection To remove an expression from the Expressions window do this e Select the expression to remove and choose E
47. 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 Compiler thread stack Enter in this field the maximum kilobytes of stack size for the IDE to allocate to compiling and linking thread support The IDE threads all build processes with compiling and linking occurring on a thread separate from the main application thread This setting controls the compiler thread stack size To avoid frequent compiler crashes such as when building very large or complex projects increase the default compiler thread stack size Confirm invalid file modification dates when debugging Select this option to keep track of source file modification dates in a project The IDE displays a warning message if the modification dates do not match The message IDE 5 1 User s Guide IDE 417 Preference and Target Settings Options warns of possible discrepancies between object code and source code Clear the option to prevent the IDE from displaying the warning message Confirm Kill Process when closing or quitting Select the Confirm Kill Process when closing or quitting option to have the IDE prompt for confirmation before killing processes
48. you can right click the Watchpoint and select Enable Watchpoint Using Watchpoints in Other Windows As a general rule you can right click a variable in most windows to set and clear a Watchpoint Using Watchpoints in the Thread Window The Thread window Figure 21 3 also known as the Debugger Stack Crawl and Program windows shows debugging information about the currently suspended process Figure 21 3 Thread window gdidemo EXE Thread 0x508 lO x sex hh Variables All Location Value Ox77E97D08 KERNEL32 dil hinst 0 00000000 ESI Ox40389E gdidemo EXE hPrevinst 0x00000000 0x00 2FF34 WinM ain E hwndFrame 000132398 EBX E IpszLine ea 0x0012FF38 msg 0x0012FF04 0x24 ESF nShow 1 Ox0012FF3C WINDOWS MAIN PROCEDURE 4 This is the process entry point routine This is the basis application events int PASCAT WinMainfHTNSTANCE hTn xt HINSTANCE hPrevTnst TPSTR IDE 5 1 User s Guide IDE 245 Using Watchpoints Using Watchpoints in Other Windows Setting a Watchpoint in the Thread Window Follow these steps to set a Watchpoint in the Variables pane in the Thread window 1 Debug Run your program The Thread window opens In the Variables pane in the Thread window select the variable Choose Debug gt Set Watchpoint Alternately right click the variable and Set Watchpoint Follow these steps to set a Watchpoint in the source pane of the Thread wi
49. 490 Cycle View 490 Debug 490 Delete 491 Disable Breakpoint 491 Disable Watchpoint 491 Disassemble 491 Display Grid 491 Enable Breakpoint 491 Enable Watchpoint 492 Enter Find String 139 492 Enter Replace String 492 Errors And Warnings 492 Errors And Warnings Window 492 Exit 493 Expand Window 493 Export Project 493 499 Export Project as GNU Makefile 493 Expressions 493 Expressions Window 493 Find 127 494 Find and Open Filename 495 Find and Open File 495 Find And Replace 496 Find Definition 494 Find Definition amp Reference 494 Find In Files 495 IDE 543 Find In Next File 495 Find In Previous File 495 Find Next 495 Find Previous 496 Find Previous Selection 496 Find Reference 496 Find Selection 138 496 Get Next Completion 497 Get Previous Completion 497 Global Variables 497 Global Variables Window 497 Go Back 497 Go Forward 497 Go To Line 497 Group 498 Hide Breakpoints 498 Hide Window Toolbar 498 Import Components 499 Import Project 499 Insert Reference Template 123 499 Kill 499 Make 500 Maximize Window 500 Metrowerks Website 500 Minimize Window 500 New 500 New Class 500 New Class Browser 501 New Data 501 New Event 501 New Event Set 501 New Expression 501 New Member Function 501 New Method 501 New Property 501 New Text File 502 Object Inspector 502 Online Manuals 502 Open 502 Open Recent 502 Open Scripts Folder 502 Open Workspace 503 Page Setup 503 P
50. 5 Enter Base Classes and Methods information Enter a list of base classes for the new class a Access Choose an access type Public Protected or Private for the constructor and destructor from this drop down menu Constructor parameters Enter a list of parameters for the constructor Virtual destructor Click this checkbox to create a virtual destructor for the new class As an option you can enter in the Namespaces required for the base classes and constructor parameters field the required namespaces for the base classes from the Base Classes field and the constructor parameters in the Generate Constructor and Destructor section of the wizard Or If needed you can specify the base classes and constructor parameters IDE 5 1 User s Guide Using Browser Wizards The New Class Wizard 6 Click Next Figure 16 3 New Class wizard tnclude Files New C Class Include Files Xx Include files that will automatically be added for base classes Seas r Addtional header include files por eader h Example lt string gt lt vector gt YourHeader h 7 Enter Include Files information Specify additional header include files for the new class a Include files that will automatically be added for base classes This field shows you a list of include files that the IDE automatically adds to find the base classes b Additional header include files Enter in this field a list of o
51. 501 New Member Function wizard 163 182 183 new member functions creating 182 New Menu Command Create 331 335 New menu command 500 New Method menu command 501 New Property menu command 501 New Text File command 62 New Text File menu command 502 New Wire button in layout editor 287 New Wire command 290 479 No Exceptions command 502 None option of Plugin Diagnostics 430 None option in Generate Browser Data From menu 426 non modal defined 71 notes for the latest release 17 IDE 545 Numeric Keypad Bindings 346 O Object Inspector 294 object inspector opening 296 sorting the Wires tab 320 using to delete wires 319 using to modify wires 318 using to re order wires 318 using to view wires 318 Object Inspector menu command 502 Object list pop up in object inspector 295 object wiring 309 creating wires with contextual menus 312 creating wires with menus 312 deleting wires with the layout editor 314 drawing wires 311 inspecting wires 317 modifying wires with the layout editor 313 sorting the Wires tab in the object inspector 320 using the object inspector to delete wires 319 using the object inspector to modify wires 318 using the object inspector to re order wires 318 using the object inspector to view wires 318 working with 310 object wiring about 309 Online Manuals menu command 502 Open Catalog button in component palette 291 Open command 62 Open File 165 Open In Windows Explorer command 49 Op
52. A Memory window appears 3 Select a memory space from the Page list pop up 4 Select Raw data from the View list pop up if inspecting a variable Select Disassembly Source or Mixed from the View list pop up if inspecting source code The Memory window displays the selected memory space page Setting a Watchpoint in the Memory Window To set a Watchpoint using the Memory window follow these steps 1 Run Debug your program 2 From the Main Toolbar choose Data gt View Memory This opens the Memory window 3 Select a range of bytes in the Memory window Do not double click the range of bytes IDE 5 1 User s Guide IDE 227 Advanced Debugging Multi core Debugging 4 From the Main Toolbar choose Debug gt Set Watchpoint NOTE A red line appears under the selected variable in the Variable window indicating that you have set a Watchpoint You can change the color of this line in the Display Settings panel of the IDE Preferences window Edit gt IDE Preferences Clearing Watchpoints from the Memory window To clear a Watchpoint from the Memory window follow these steps 1 Select a range of bytes in the Memory window 2 Choose Debug gt Clear Watchpoint To clear all Watchpoints from the Memory window 1 Open the Memory window You do not have to select a range of bytes 2 Choose Debug gt Clear All Watchpoints NOTE All Watchpoints clear automatically when the target program terminates
53. About Object Wiring Working with Object Wires IDE 5 1 User s Guide 277 lt i 278 282 285 299 Wis oa ee DOO eds Be a Ede ok 302 Seah bees s gone 304 305 309 309 310 IDE 9 Table of Contents Using the Create Wire Wizard Inspecting Wires 29 RAD Browsing RAD Browser Window Tab Control Properties Tab Methods Tab Events Tab Browser RAD Wizards Vill Preferences and Target Settings 30 Customizing the IDE Customizing IDE Commands Commands Tab Pre defined Variables in Command Definitions Customize Toolbars Kinds of Toolbars Toolbar Elements Modify a Toolbar Customize Key Bindings 31 Working with IDE Preferences IDE Preferences Window General Panels Build Settings Concurrent Compiles IDE Extras Help Preferences Plugin Settings Shielded Folders 2315 317 321 321 321 322 322 322 323 327 327 329 333 338 339 340 340 344 349 349 351 351 353 354 358 358 359 IDE 10 IDE 5 1 User s Guide Source Trees Editor Panels Code Completion Editor Settings Font amp Tabs Text Colors Debugger Panels Display Settings Windowing Global Settings Remote Connections RAD Tools Panels Layout Editor 32 Working with Target Settings Target Settings Window Target Panels Target Settings Access Paths Build Extras Runtime Settings File Mappings Source Tr
54. Delete E pote Uva ae eee rent Target Oul ile Name Current Target Name IDE 5 1 User s Guide IDE 333 Customizing the IDE Customizing IDE Commands Figure 30 5 Pre defined Directory variables m Customize IDE Commands x Commands Toolbar Items D j Ix Commands Get next symbol Name New Command Get previous symbol IV Appears in Menus Execute Bi Arguments eal Directory Source File Directory Action Add bookmark Go to next bookmark Go to previous bookmark Toggle overstrike mode Ss Project File Directory Help Key Bindings Current Target Output File Directory Catalog Current Target Symbolics File Directory E Layout E New Group New Command Prefix Key Timeout fi 20 J Numeric Keypad Bindings New Group Export Import d New Command New Group New Command Delete Factory Settings Revert Save Table 30 2 explains the pre defined variables for command line arguments Table 30 2 Pre defined variables in command definitions Variable Command line output sourceFilePath sourceFilePath is the frontmost editor window s full path sourceFileDir sourceFileDir is the frontmost editor window s directory sourceFileName sourceFileName is the frontmost editor window s filename sourceLineNumber sourceLineNumber is the line number of the insertion point in the front window sourceSel
55. Design dialog box appears IDE 5 1 User s Guide IDE 281 Creating RAD Projects Working with Layouts 4 Enter a design name in the Name for new design field 5 Select the checkbox next to each build target that you want to assign to the new design Clear the checkbox next to each build target that you do not want to assign to the new design NOTE You must assign at least one build target to the new design 6 Click OK The IDE creates an empty design and associates with it the build targets that you selected The new design appears in the Targets view of the project window Working with Layouts RAD projects can contain one or more layouts A layout visually organizes a particular set of components in a user interface A layout contains these items e Components the user interface components that comprise a graphical interface For example you can create a layout that contains components that make up an alert box The individual components include the alert box window the alert message and an OK button e Views the views of a complex user interface For example you can create a multi tabbed window in one layout The layout could also contain the different states of the window that might appear as users perform various actions A pane in the layout editor contains a hierarchical list of the components in a layout Adding a Layout to a Design Use the New command to add a layout to a RAD design 1 Click the De
56. Done button Click to close the Remove Markers window and apply changes Adding Markers to a Source File Use the Add Marker command to add a marker to a file to identify specific line locations by name 1 Position the cursor on a line 2 Choose Marker gt Add Marker 3 Type a name for the new marker 4 Click Add The IDE adds the marker to the file Navigating to a 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 Removing a Marker from a Source File Use the Remove Marker command to remove one or more markers from a source file 1 Choose Marker gt Remove Markers 2 Select the marker name to remove from the list IDE 120 IDE 5 1 User s Guide Navigating Source Code Symbol Definitions 3 Click Remove The IDE removes the selected marker Removing All Markers from a Source File Use the Remove Marker command to remove one or more markers from a source file 1 Choose Marker gt Remove Markers 2 Select all markers in the Markers list as explained in Table 11 4 Table 11 4 Selecting all markers in the Markers list On this host Do this Windows Shift click each marker name in the list Macintosh Select Edit gt Select All Solaris Select Edit gt Select All Linux Select Edit gt Select All 3 Click Remove Th
57. Files in Cache 431 Select stack crawl window when task is stopped 437 Global Settings preference panel options Auto Target Libraries 380 Automatically launch applications when SYM file opened 379 Cache Edited Files Between Debug Sessions 379 Confirm Kill Process when closing or quitting 379 Confirm invalid file modification dates when debugging 379 Don t step into runtime support code 380 Maintain files in cache 379 Purge Cache 379 Select stack crawl window when task is stopped 379 Global Variables menu command 497 Global Variables window 213 opening 214 IDE 5 1 User s Guide Global Variables Window menu command 497 Globals option 372 Go Back 156 Go Back menu command 497 Go Forward 156 Go Forward menu command 497 Go To Line menu command 497 going back 118 going forward 118 going to a particular line 118 Grid button in layout editor 288 Grid Size X option Layout Editor panel 427 Grid Size Y option Layout Editor panel 427 Group button in layout editor 287 group management 51 Group menu command 498 grouping regular expressions 142 groups moving 52 removing 51 renaming 53 touching 54 touching all 54 untouching 55 untouching all 55 H headers caching precompiled headers 428 Help menu 463 477 Help Preferences panel 358 options Browser Path 358 Set 358 Hide Breakpoints menu command 498 Hide Classes 162 Hide Classes pane 166 Hide Floating Toolbar command 498 Hide Main Toolbar command in Toolbar s
58. Find All to find all matches The IDE searches the specified folders and displays matching text or beeps if no matching text occurs Searching Text Across Multiple Projects Use the In Projects tab to search text within active projects 1 Choose Search gt Find in Files 2 Type search text into the Find text box 3 Set general search options 4 Click the In Projects tab 5 Choose the projects to search from the Project list box e Choose All Open Projects to search all active projects e Choose by name a specific project to search 6 Choose the build targets to search from the Target list box e Choose All Targets to search all build targets in the selected projects e Choose Default Targets available after choosing All Open Projects to search the default build target of each project IDE 132 IDE 5 1 User s Guide Finding and Replacing Text Multiple File Find and Replace e Choose by name a specific build target available after choosing a specific project to search 7 Set additional search options for the selected projects and build targets e Select Project sources to search all source files e Select Project headers to search all header files e Select System headers to search all system header files e Select Search cached sub targets to search targets in the selected build targets stored for frequent use by the IDE NOTE Choose Project gt Make to update the project data to correctly list source files h
59. 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 When using the Macintosh menu layout on a Macintosh host hold down the Shift key to change this command to Find Previous Find In Next File Finds the next occurrence of the find string in the next file listed in the Find window s File Set When using the Macintosh menu layout on a Macintosh host hold down the Shift key to change this command to Find In Previous File Enter Find String Replaces the Find text box string with the selected text When using the Macintosh menu layout on a Macintosh host hold down the Shift key to change this command to Enter Replace String Find Selection Finds the next occurrence of the selected text in the active editor window When using the Macintosh menu layout on a Macintosh host hold down the Shift key to change this command to Find Previous Selection Replace Selection Replaces the replace string in the Replace text box with the selected text Replace and Find Next Replaces the selected text with the Replace text box string then performs a Find Next operation When using the Macintosh menu layout on a Macintosh host hold down the Shift key to change this command to Replace and Find Previous Replace All IDE 468 Finds all matches of the Find text box string and replaces th
60. Guide IDE 327 Customizing the IDE Customizing IDE Commands Figure 30 1 Customize IDE Commands window Customize IDE Commands f 2 x Commands Toolbar Items File Edit Name fiFite View IV Appears in Menus Search Project Debug Data Memory OcD Multi Core Debug Browser Miscellaneous Editor Commands Auto Repeat Help Catalog Layout a an dowi Prefix Key Timeout fi 20 J7 Numeric Keypad Bindings Export Import New Group New Command Delete Factory Settings Revert Save Action AAA eee New Bin ding 7AHAARAAAE HA Table 30 1 Customize IDE Commands window button explanations Button name Explanation New Group Click to add a new command group to the Commands list New Command Click to add a new command setting within a group Factory Settings Click to restore the 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 opena file that contains commands and key bindings to use in the current Customize IDE Commands lists Save Click to save customizations to the Cus
61. Linux Alt click the Functions menu Alphabetizing Functions Menu Order The default behavior of the Functions menu is to list functions in order of appearance in the source file You can select the Sort function popup option in the Editor Settings preference panel to list functions in alphabetical order 1 Open the IDE Preferences window Choose Edit gt IDE Preferences 2 Select the Editor Settings preference panel 3 Select the Sort function popup option 4 Save your modifications to the Editor Settings panel as explained in Table 11 2 on page 118 IDE 5 1 User s Guide IDE 117 Navigating Source Code Going Back and Forward Table 11 2 Saving changes to the IDE Preferences window On this host Do this Windows Click Apply then OK Macintosh Click Save then close the IDE Preferences window Solaris Click Save then close the IDE Preferences window Linux Click Save then close the IDE Preferences window Going Back and Forward Go back and forward in source files to edit existing code Most source files contain more than one screen of code The editor always counts the number of lines in the source files Go to a particular line to scroll a particular item into view Going to a Particular Line IDE 118 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 de
62. Member wizard See Table 14 6 for a complete list of identifier icons that appear in the Data Members pane Creating a New Data Member IDE 164 Use the New Data Member wizard to specify the name type and initializer for the new data member Specify other options to further refine the data member Click Finish in any screen to apply default values to any remaining parameters and complete the process 1 From the Data Members pane click the New Item button 49 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 IDE 5 1 User s Guide Using Class Browser Windows Source pane 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 14 1 on page 156 shows the Source pane Table 14 7 explains the items in the pane For information on editing source code see Editing Source Code on page 101 Table 14 7 Source pane items Item icon Explanation Open File 2 Click to open the current source file in a new editor window VCS menu 4 Enable a version control system in order to activate this menu Use this menu to select and execute a version control c
63. Search column 392 Search Status column 391 Action 329 action defined 309 Activate Browser 205 Activate Browser Coloring option 411 Text Colors panel 426 Activate Browser option 494 Activate Syntax Coloring option 411 417 Text Colors panel 426 429 440 activating automatic code completion 107 Add button 391 Add Default button 411 Add Files menu command 481 Add Window menu command 481 adding components to a layout 292 remote connections 381 source trees 363 advanced debugging 201 advanced debugging defined 202 advanced projects 39 advantages of using IDE 23 Align command 289 Align submenu 482 483 498 499 508 515 516 517 Horizontal Center command 498 Left Edges command 499 Vertical Center command 508 515 516 517 All Exceptions command in Java Exceptions submenu 482 All Info option of Plugin Diagnostics 430 alphabetical sorting or Functions list pop up 117 Always Search User Paths option 412 Ancestor pop up 168 Anchor Floating Toolbar command in Toolbar submenu 482 Appears in Menus 138 329 330 Apple Help Viewer 425 IDE 521 Apple menu 464 Application field 412 applications creating for the console 85 for the console about 85 for the console creating 86 Apply Difference command 482 516 Arguments field 412 Arithmetic Optimizations 400 Array window 221 opening 223 arrays setting default viewing size for unbounded 419 Attempt To Use Dynamic Type of C Object Pascal And SOM Objects option 412 Auto Indent
64. Settings Revert Import Panel Export Panel OK Cancel Apply Table 31 1 IDE Preferences window items Item Explanation IDE Preference Panels list Lists preference panels organized by group Click the hierarchical control next to a group name to show or hide individual preference panels Preference panel Shows the 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 IDE 350 IDE 5 1 User s Guide Working with IDE Preferences General Panels Table 31 1 IDE Preferences window items continued Item Explanation OK Windows Click to save modifications to all preference panels and close the window Cancel Windows Click to discard modifications to all preference panels and close the window Apply Windows Click to confirm modifications to all preference panels Save Macintosh Solaris and Click to save modifications to all preference panels Linux Opening the IDE Preferences Window Use the IDE Preferences window to modify global general editor debugger a
65. Symbolics Window Linux Select Window gt Symbolics Window 3 Select the variable in the Source pane of the Symbolics window 4 Choose Debug gt Set Eventpoint Alternately right click the variable and choose Set Eventpoint Clearing an Eventpoint in the Symbolics Window To clear an eventpoint in the Symbolics window follow these steps 1 Choose Project gt Debug The Thread window appears 2 Open the Symbolics window as explained in Table 22 6 Table 22 6 Opening the Symbolics window On this platform Do this Windows Select View gt Symbolics Macintosh Select Window gt Symbolics Window Solaris Select Window gt Symbolics Window Linux Select Window gt Symbolics Window 3 Select the variable in the Source pane of the Symbolics window 4 Choose Debug gt Clear Eventpoint Alternately right click the variable and choose Clear Eventpoint IDE 5 1 User s Guide IDE 263 Using Eventpoints Using Eventpoints in the Symbolics Window IDE 264 IDE 5 1 User s Guide VI Compilers and Linkers This section contains these chapters e Compilers e Linkers IDE 5 1 User s Guide IDE 265 IDE 266 IDE 5 1 User s Guide 23 Compilers This chapter explains how to work with compilers in the CodeWarrior IDE The IDE uses compilers to complete these tasks e Generate object code the compiler translates source code into object code Sample source code i
66. Text Manipulation Selecting Text in Editor Windows The editor lets you select text in several ways while you edit source files 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 e Triple click anywhere on a line or e Click the right pointing cursor in the left margin of the line These actions select the line of text Multiple lines Follow these steps to select multiple lines of text e Drag the cursor over the contiguous range of text and release or e 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 e Drag the right pointing cursor to select lines of text These actions select the lines of text Rectangular text selections Table 10 1 explains how to select rectangular portions of text Table 10 1 Selecting a rectangular portion of text Windows Alt drag the cursor over the portion of text Macintosh Command drag the cursor over the portion of text IDE 102 IDE 5 1 User s Guide Editing Source Code Text Manipulation Table 10 1 Selecting a rectangular portion of text continued Solaris Alt drag the cursor over the portion of text Linux Alt drag the cursor over the portion of text Entire routines Follow these steps to select an entire routine
67. Thread Stack field 417 Complete Code menu command 488 completing the Create Wire wizard 315 completing code 107 component catalog adding components to 302 removing components from 304 Component Catalog button in component palette 291 Component Catalog menu command 488 component catalog window opening 301 Component list in layout editor 288 Component Object Model 419 Component Palette 290 component palette opening 291 Component Palette button in layout editor 288 Component Palette menu command 489 component tool buttons in component palette 291 components adding to a component catalog 302 moving in a layout 293 removing from a catalog 304 removing from layouts 292 resizing 293 Concurrent Compiles panel options Use Concurrent Compiles 435 442 User Specified 445 Concurrent Compiles preference panel 353 options Recommended 354 Use Concurrent Compiles 354 IDE 528 User Specified 354 Condition column of Breakpoints window 232 Condition field 248 259 conditional breakpoints setting 236 conditional eventpoint 258 Conditional Watchpoint 248 configuring build targets 58 code completion 107 targets 58 Confirm Kill Process When Closing Or Quitting option 418 Confirm Invalid File Modification Dates When Debugging option 417 Connect menu command 489 Connection pop up menu in Remote Debugging settings panel 408 Connection Type option 382 console applications creating 85 86 applications creating console applications
68. Use the Task pane to view tasks under debugger control Select a process in the Process pane to display its tasks under debugger control in the Task pane Double click a task to open it in a new Thread window or choose the task name and click the Stack Crawl Window button Attaching the Debugger to a Process Click the Attach to Process button to assign a selected process to a new debugging session This assignment allows the debugger to control processes that it does not otherwise recognize For example you can click the Attach to Process button to assign dynamic link libraries or shared libraries to the debugger 1 Use the Processes selector to select the item for which to view active processes 2 Select a process to attach to the debugger 3 Click Attach to Process Cp The debugger assumes control of the selected process Processes under debugger control appear in bold or with a check mark Expressions Window The Expressions window helps you monitor and manipulate these kinds of items e global and local variables e structure members e array elements Figure 19 5 on page 211 shows the Expressions window Table 19 4 on page 211 explains the items in the window IDE 210 IDE 5 1 User s Guide Advanced Debugging Expressions Window Figure 19 5 Expressions window Expressions ioj x Expression Value E IpCmdLine 0001 40F6F IpCmdLine 0x00 hPrevlnstance 0x00000000 hinstance 000400000 nEmdSho
69. a hierarchical list Value Shows the value of each array element Location Shows the address in memory of each array element IDE 222 IDE 5 1 User s Guide Advanced Debugging Memory Window Opening an Array Window Use the View Array command to manipulate a contiguous memory block as an array of elements in an Array window 1 Select the array that you want to view 2 Select Data gt View Array A new Array window appears TIP Drag and drop a register name or variable name to an Array window to set the base address Use the View Memory As command to interpret memory displayed in an Array window as a different type Alternatively use a contextual menu to open an Array window as explained in Table 19 10 on page 223 Table 19 10 Opening an Array window by using a contextual menu On this host Do this Windows Right click the array and select View Array Macintosh Control click the array and select View Array Solaris Click and hold on the array then select View Array Linux Click and hold on the array then select View Array Memory Window The Memory window manipulates program memory contents in various data types Use this resizable window to perform these tasks e View memory e Change individual memory bytes e Set watchpoints IDE 5 1 User s Guide IDE 223 Advanced Debugging Memory Window CAUTION Arbitrarily changing memory contents could degrade the stability of the IDE an
70. appears 2 Choose MDI Child from the contextual menu The docked window or floating window becomes an MDI child window Suppressing Dockable Windows Suppress dockable windows to drag a window to any location onscreen without docking it to an edge of the client area 1 Hold down the Ctrl key while dragging or floating an MDI child window The thin window outline that normally indicates docked window placement becomes a heavy window outline Use this heavy outline as a visual cue that the IDE suppresses dockable windows 2 Release the window at its final position The window appears in the position indicated by the heavy window outline 3 Release the Ctrl key Dock Bars A docked window has a dock bar instead of a title bar Use the dock bar to perform these tasks e move the docked window to a different edge of the client area IDE 76 IDE 5 1 User s Guide Dockable Windows Dock Bars e collapse or expand view of the docked window e close the docked window Figure 6 4 shows a dock bar Figure 6 4 Dock Bar xi IDE 5 1 User s Guide IDE 77 Dockable Windows Dock Bars Collapsing a Docked Window If two or more distinct docked windows occupy the same edge of the client area you can collapse one docked window to view more contents of the other docked windows 1 Dock two or more windows to the same edge of the client area The windows contents must appear in separate docked windows n
71. copy one or more components from an existing catalog file IDE 302 IDE 5 1 User s Guide 1 2 3 Component Editing Working with Catalogs Open the Component Catalog Select a catalog file in the All Catalogs list to display its components Add one or more components to the catalog file Adding a single component Click and drag the selected component from the Components list onto the destination catalog file shown in the All Catalogs list Adding multiple components simultaneously 1 Select the components as explained in Table 27 3 Table 27 3 Selecting components On this host Do this Windows Ctrl click each component Macintosh Shift click each component Solaris Shift click each component Linux Shift click each component 2 Click and drag the selected components from the Components list onto the destination catalog file shown in the All Catalogs list Adding components by using copy and paste 1 2 Select the components in the Components list that you want to copy Select Edit gt Copy Select the destination catalog file in the All Catalogs list Select Edit gt Paste IDE 5 1 User s Guide IDE 303 Component Editing Working with Menu Editors Removing Components from a Catalog File Remove from a component catalog file the components that you no longer use 1 Open the Component Catalog 2 Select the component catalog file in the All Catalogs list to display
72. data member for the class IDE 5 1 User s Guide IDE 113 Editing Source Code Code Completion Completing Code for Parameter Lists Complete code for parameter lists for those programming languages that support it For example in the Java programming language you can complete code for parameter lists through the character 1 Bring forward an editor window 2 Place the insertion point at the end of the function or method to complete 3 Type a parameter list trigger character The character depends on the programming language you use In the Java programming language for example type an open parenthesis 4 The Code Completion window appears The upper portion of this window lists different overloaded versions of the function or method The lower portion shows possible parameter lists for the selected function or method in the top portion Use this window to complete the parameter list for the function or method IDE 114 IDE 5 1 User s Guide 11 Navigating Source Code This chapter explains how to navigate source code in the CodeWarrior IDE Navigate source code to accomplish these tasks Find specific items the editor finds interface files functions and lines of source code e Go to a specific line the editor can scroll to a specific line of source code e Use markers the editor allows labelling of specific items of text These labels or markers provide intuitive navigation of text Read thi
73. debugger which stops program execution IDE 5 1 User s Guide IDE 197 Basic Debugging Common Debugging Actions Resuming Program Execution Use the Resume command to continue executing a suspended debugging session If the debugging session is already active use this command to switch view from the Thread window to the executing program NOTE The Resume command appears only for those platforms that support it 1 Resume the program e Choose Project gt Resume or e Click Debug ee on the debugger toolbar 2 The stopped session continues or the view changes to the running program Killing Program Execution Use the Kill command to completely terminate program execution and end the debugging session This behavior differs from stopping a program as stopping temporarily suspends execution 1 Kill program execution e Choose Debug gt Kill or e Click Kill on the debugger toolbar 2 The debugger terminates program execution and ends the debugging session Running a Program Use the Run command to execute a program normally without debugger control 1 Run the project IDE 198 IDE 5 1 User s Guide Basic Debugging Common Debugging Actions e Choose Project gt Run or e Click Run P on the debugger toolbar 2 The project runs Restarting the Debugger Use the Restart command after stopping program execution The debugger goes back to the beginning of the program and begins exe
74. debugging monitor debugging monitor when when a debugging session starts debugging starts Classic Macintosh Open windows on debugging Select to display on the debugging monitor any window opened monitor during debugging during a debugging session Classic Macintosh Global Settings The Global Settings preference panel provides options for customizing various global options for the debugger including e file caching to accelerate debugger sessions e automatic launch of applications and libraries e confirmation of attempts to close or quit debugging sessions IDE 378 IDE 5 1 User s Guide Working with IDE Preferences Debugger Panels Figure 31 17 Global Settings preference panel Global Settings M Cache Edited Files Between Debug Sessions Maintain files in cache for fi days Purge Cache Other Settings I Auto Target Libraries Tl Confirm invalid file modification dates when debugging T Automatically launch applications when SYM file opened V Confirm Kill Process when closing or quitting IV Select stack crawl window when task is stopped V Don t step into runtime support code Table 31 16 Global Settings preference panel items Item Cache Edited Files Between Debug Sessions Explanation Select to maintain a cache of modified files between debugging sessions Use this option to debug through the original source code for files modified s
75. declaration of std pair gt std pointer_to_unary Go to member function definition of std pair gt std istreambuf_iterator proxy std _TempVec proxy Go to class declaration of std pair 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 Viewing Class Data from Hierarchy Windows To view class data from a hierarchy window follow these steps IDE 5 1 User s Guide IDE 159 Using Class Browser Windows Class Browser window 1 Open a Single Hierarchy or Multi Class Hierarchy window a Click the Single Class Hierarchy Window button mt in the browser toolbar or b Click the Class Hierarchy button a in the browser toolbar 2 In the Single or Multi Class Hierarchy window double click a class name A Class Browser window appears Expanding Browser Panes Click the Pane Expand box just above the scroll bar in the upper right hand corner of the pane to expand the Classes Function Members Data Members or Source panes in a Browser window 1 Click the Pane Expand box to expand a pane This pane expands to fill the Browser window 2 Use the enlarged pane to view data Alternately you can use the resize bar between the panes to enlarge each pane although the pane does not fill the Browser window 1 Rest the cursor over the resize bar The cursor icon changes to this 2
76. e Navigating Source Code Finding and Replacing Text IDE 5 1 User s Guide IDE 89 IDE 90 IDE 5 1 User s Guide The CodeWarrior Editor TM This chapter explains how to work with the editor in the CodeWarrior IDE Use the editor to perform these tasks e Manage text files the editor includes common word processing features for creating and editing text files Sample text files include Read Me files and release notes e Manage source files the editor includes additional features for creating and editing source files The IDE processes source files to produce a program This chapter contains these sections e Editor Window on page 91 e Editor Toolbar on page 93 e Other Editor Window Components on page 97 Editor Window Use the editor window to create and manage text files or source files The window contains these major parts e Editor toolbar e Text editing area Line and column indicator e Pane splitter controls Figure 9 1 on page 92 shows the editor window Table 9 1 on page 92 explains the items in the editor window IDE 5 1 User s Guide IDE 91 The CodeWarrior Editor Editor Window Figure 9 1 Editor window b M E d Path D Program Files Metrowerks CodeW arrior Tools c lt gt return FALSE Qa A BOOL CreateToolBar HWND hwnd HANDLE hInstance int ilc HUND hwndTnp RECT rect if defined WIN32 hInst HANDLE GetWindowLon
77. files as source files in a project or as plain text files Select File gt New Text File to create a new text file The IDE creates the new text file and displays its contents in a new editor window Opening Source Files The Open command opens one or more editable source files at a time Each open file appears in its own editor window NOTE The CodeWarrior editor cannot open files that prohibit editing For example the editor cannot open library files From the File menu 1 Choose File gt Open 2 Windows Use the Files of type pop up menu to select All Files IDE 62 IDE 5 1 User s Guide Working with Files Managing Files 3 Select a file 4 Click Open The IDE displays the file in an editor window From the Project window 1 Perform one of these e Double click a filename in the Files tab of the Project window or e Select an interface filename from the Interface menu 2 The IDE finds opens and displays the selected source file in an editor window From an editor window 1 Select an interface filename from the Interface menu 2 The IDE selects opens and displays the source file in an editor window NOTE The menu does not show files that lack source code or are not yet compiled Using Find and Open Files 1 Select text in an editor window containing the name of an interface file 2 Choose File gt Find and Open File The IDE finds opens and displays in an editor window the source file ma
78. image file in an graphics processing application 5 Print the image file The graphics processing application prints the image of the class hierarchy Changing Line Views in a Hierarchical Window Use the Diagonal Line and Straight Line commands to change the appearance of the connecting lines between classes and subclasses in a hierarchical window display e Click the Diagonal Line icon The Hierarchical window display updates to use diagonal lines Click the Straight Line icon at The Hierarchical window display updates to use straight lines Single Class Hierarchy Window Use the Single Class Hierarchy window to examine the structure of a single class in the browser database The Single Class Hierarchy window operates identically to the Multi Class Hierarchy window but restricts the display to a single class IDE 170 IDE 5 1 User s Guide Using Other Browser Windows Single Class Hierarchy Window Figure 15 2 Single Class Hierarchy window s java lang Object hierarchy _iava lana Obiect Dy The Single Class Hierarchy window contains the same components as the Multi Class Hierarchy window Opening a Single Class Hierarchical window Use one of these methods to open a Single Class Hierarchical window e Click the Show Single Class Hierarchy icon 6 in a Browser toolbar e Use the Browser Contextual menu in one of these windows e New Class Browser window Browser Contents window
79. in a separate Variable window Opening the Global Variables Window Use the Global Variables window to display global variables declared in a program or static variables declared in the source files the comprise the program To open the Global Variables window select View gt Global Variables or Window gt Global Variables Window Registers Window The Registers window gives you a hierarchical view of these register types e general registers contents of the central processing unit CPU of the host computer IDE 214 IDE 5 1 User s Guide Advanced Debugging Registers Window e floating point unit FPU registers contents of the FPU registers e registers specific to the host computer You can use the Register window to perform these tasks e expand the hierarchical items in the window and view their contents e select and modify register values e view documentation for individual registers depending on the register Figure 19 7 shows a sample Registers window Figure 19 7 Registers Window alo x Register Value E Local Windows PC al H C Console Debug exe B Thread 0x458 General Registers EAX ECX 0x0041801C EDX 0x004034C0 Lu EBX 0x FFDFOOO jm ESP 0x0012FF90 EBP 0x0012FFCO zi FSI NALNNNNNNNAN General Registers The General Registers are the register contents of the central processing unit CPU of the host computer The exact listing of these registers depends on the host CPU and on
80. in the File menu or the Quit CodeWarrior command in the CodeWarrior menu The Edit menu contains all the customary editing commands along with some CodeWarrior additions This menu also includes the commands that open the Preferences and Target Settings windows Table 34 2 Edit menu commands IDE 5 1 User s Guide Menu command Explanation Undo Undoes the action of the last cut paste clear or typing operation If you cannot undo the action this command changes to Can t Undo Redo Redoes the action of the last Undo operation If you cannot redo the action this command changes to Can t Redo Cut Removes the selected text and places a copy of it on the Clipboard Copy Copies the selected text and places a copy of it on the Clipboard IDE 453 IDE Menus Windows Menu Layout Table 34 2 Edit menu commands continued Menu command Explanation Paste Places the contents of the Clipboard at current insertion point or replaces the selected text Delete Removes the selected text without placing a copy on the Clipboard When using the Windows menu layout on a Macintosh host this command does not appear Instead use the Clear command This command saves a copy of an existing workspace Use this command to save the workspace under a different name Select All Selects all the text in the current editor window or text box for cut copy paste clear or typing operations
81. in the layout then click this button to open a customization utility for the selected component Clicking this button is equivalent to selecting Layout gt Customize This button grays out if the component does not support a utility Properties button Ca Click this button to open the object inspector and manage the properties of the selected component Clicking this button is equivalent to selecting Layout gt Properties Component Palette button m Click this button to open the Component Palette Component list Lists all components in the current layout In this list you can expand and collapse view drag a component to reorder it in the list open a contextual menu for a selected component and clear a selected component Layout manager Shows the user interface for the current layout The IDE generates source code that implements this user interface IDE 5 1 User s Guide IDE 288 Layout Editing Layout Editor Opening a Layout To open a layout in a design follow these steps 1 Click the Design tab in the project window 2 Double click the layout name A layout editor appears and shows the layout that you double clicked Using Contextual Menus in the Layout Editor Use the contextual menu in the layout editor to execute specific commands on the selected component The available commands depend on the item that you select Table 26 2 explains contextual menu commands
82. information about platform specific settings panels The Debugger settings panels available on most IDE hosts include e Other Executables on page 403 e Debugger Settings on page 406 e Remote Debugging on page 408 Other Executables The Other Executables settings panel configures additional executable files for the IDE to debug together with the current build target IDE 5 1 User s Guide IDE 403 Working with Target Settings Debugger Panels Figure 32 10 Other Executables settings panel Other Executables Specify other executable files to debug while debugging this target id ens i Hard Disk CodeExamples SupportFiles DebugExecutableFile app Hard Disk CodeExamples SupportFiles RuntimeExecutableFile app Add Change Remove Table 32 11 Other Executables settings panel items Item Icon Explanation File list Lists the executable files that the IDE can debug together with the current build target Debug column x Click in this column to toggle debugging of the corresponding executable file Add Click to select an executable file to add to the File list Change Click to change the selected entry in the File list Remove Click to remove the selected entry in the File list IDE 404 IDE 5 1 User s Guide Working with Target Settings Debugger Panels Adding an Executable File to the File List To add an executable file to the File list fo
83. its components 3 Select the component that you want to remove 4 Remove the component as explained in Table 27 4 Table 27 4 Removing the component On this host Do this Windows Select Edit gt Delete Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear The IDE removes the selected component from the catalog file Working with Menu Editors Perform these tasks to work with the menu editor e Manage menus or menu items e Create and remove menus or menu items e Modify menus or menu items This section explains how to perform each task IDE 304 IDE 5 1 User s Guide Menu Editor Use the Menu Editor to display and edit RAD menus and pop up menus To open a Menu Editor double click any menubar or pop up menu component in the layout editor Figure 27 2 Menu Editor window Menu Editor menuBarl fe x Component Editing Working with Menu Editors me Table 27 5 Menu Editor window items Item Menu Icon Explanation A named menu in the menu bar Menu placeholder An unnamed menu in the menu bar Menu Item placeholder IDE 5 1 User s Guide An unnamed menu item in the menu IDE 305 Component Editing Working with Menu Editors Creating a Menu or Menu Item Use the Menu Editor to add menus and menu items to a menubar component in the layout 1 Select the menu compo
84. nothing to project windows 378 Hide non debugging windows 378 Minimize non debugging windows 378 Monitor for debugging 378 Move open windows to debugging monitor when debugging starts 378 Open windows on debugging monitor during debugging 378 Use Debugging Monitor 378 Windows creating files 61 windows Array 221 Breakpoints 231 256 Browser Contents 172 Class Browser 155 Code Completion 110 dock bars in dockable windows 76 dockable 69 dockable about 69 dockable turning off 76 dockable working with 71 docking the same kind of 73 docking with a contextual menu 72 docking with drag and drop 72 editor 91 252 editor other 97 Expressions 210 IDE 5 1 User s Guide Find single file 126 Find and Replace multiple file 129 Find and Replace single file 127 floating 75 Global Variables 213 hierarchy 168 IDE Preferences 349 Log 218 making into an MDI child 76 Memory 223 New C Class 179 New C Data Member 187 New C Member Function 184 Processes 208 project window 45 Registers 214 Remove Markers 119 Search results 136 Symbolics 205 249 261 Target Settings 385 Thread 245 247 259 undocking 74 unfloating 75 Variable 247 248 variable 220 Watchpoints 242 Windows menu layout 451 WinHelp Windows 121 wire defined 309 wires creating with contextual menus 312 creating with menus 312 deleting with the layout editor 314 drawing 311 modifying with the layout editor 313 sorting the Wires tab in the object inspector
85. number of pixels to space between markings on the y axis of the Layout Editor grid Hide non debugging windows Select the Hide non debugging windows option to hide but not close non debugging windows when starting a debugging session To reveal the hidden windows do one of these tasks Use the Window menu or e Double click the names of the hidden files in the Project window or e Perform lookups for symbols within the hidden windows At the end of the debugging session the IDE automatically reveals the hidden windows Host Application for Libraries amp Code Resources The Host Application for Libraries amp Code Resources field lets you specify a host application to use when debugging a non executable file such as a shared library dynamic link library DLL or code resource The application that you specify in this field is not the debugger application but rather the application with which the non executable file interacts IDE 5 1 User s Guide IDE 427 Preference and Target Settings Options IDE 428 Host Flags The Host Flags list pop up defines the host platforms which can use the selected access path The settings include e None no host can use this access path e All all hosts can use this access path e Windows only use this path for Windows build targets e Mac OS only use this path for Mac OS build targets NOTE Multiple hosts can be selected Import Panel Click Import Panel to load the content
86. of the Access Paths settings panel displays either User Paths or System Paths depending on the selected radio button The Macintosh Solaris and Linux versions of the Access Paths settings panel display both User Paths and System Paths IDE 5 1 User s Guide IDE 389 Working with Target Settings Target Panels Figure 32 3 Access Paths settings panel Windows Ada Werau snanger ReMay Figure 32 4 Access Paths settings panel Macintosh Access Paths a Always Search User Paths A Interpret DOS and Unix Paths D Require Framework Style Includes va B HProject 40S X Volume usr lib Compiler MacOS Support OS X Volume System Library Frameworks BHOS X Volume System Library PrivateFrameworks i f System Library Frameworks IDE 390 Add Default Host Flags f Add gt f Change Remove IDE 5 1 User s Guide Working with Target Settings Target Panels Table 32 3 Access Paths settings panel items Item User Paths Explanation Click the radio button to display the User Paths list those paths searched by include statements System Paths Click the radio button to display the System Paths list those paths searched by include lt gt statements Always Search User Paths Select to treat include lt gt statements the same as include statements Interpret DOS and Unix Paths Maci
87. option 412 Auto Repeat 329 Auto Target Libraries option 412 auto complete code See code completion 107 automatic code completion activating 107 automatic code completion deactivating 109 Automatic Invocation option 413 Automatically Launch Applications When SYM File Opened option 413 Auto target Libraries option 412 B Background option 414 Balance Flash Delay option 414 Editor Settings panel 414 Balance menu command 483 Balance While Typing option 414 balancing punctuation 105 balancing punctuation 105 balancing punctuation toggling 106 Balloon Help 340 421 478 Base Classes field 180 basic debugging 193 Bottom Edges button in layout editor 287 Bottom Edges command 483 Branch Optimizations 400 Break command 197 Break menu command 483 Break On C Exception menu command 483 Break on Java Exceptions command 483 IDE 522 breakpoints clearing all 235 clearing in source panes 234 defined 231 icon for active 232 icon for inactive 232 purpose of 231 setting conditional 236 setting in source panes 234 setting temporary 236 status 232 tasks 233 using 231 viewing 233 breakpoints column in editor window 98 Breakpoints menu command 483 Breakpoints window 231 256 259 Class column 232 clearing breakpoints 235 Condition column 232 Location column 232 opening 233 Breakpoints Window menu command 483 Bring To Front command 289 Bring To Front menu command 484 Bring Up To Date command 54 55 Bring Up To Date menu command
88. or the debugger terminates the program and reset next time the program runs Multi core Debugging The IDE allows simultaneous debugging of multiple projects This feature provides multi core debugging capability for some embedded processors By configuring each project to operate on a single core the IDE can debug multiple cores by debugging multiple projects Configuring multi core debugging involves these tasks e Configuring specific target settings for each project IDE 228 IDE 5 1 User s Guide Advanced Debugging Multi core Debugging e For some cores specifying a configuration file for initializing multi core debugging For more information see the Targeting documentation IDE 5 1 User s Guide IDE 229 Advanced Debugging Multi core Debugging IDE 230 IDE 5 1 User s Guide 20 Using Breakpoints This chapter explains how to use breakpoints in the CodeWarrior IDE Breakpoints alter normal program execution optionally according to specified conditions or events This chapter contains these sections e About Breakpoints on page 231 e Breakpoints Window on page 231 e Common Breakpoint Tasks on page 233 About Breakpoints Breakpoints change the flow of normal program execution Use them to suspend execution examine current program state and trigger specific actions The IDE recognizes these major breakpoint types e Regular breakpoints halt program execution on specifi
89. panel options Documents 420 Find Reference using 425 Launch Editor 429 IDE 538 Launch Editor w Line 430 Menu bar layout 431 Projects 434 Symbolics 440 Use Default Workspace 442 Use External Editor 443 Use Multiple Document Interface 444 Use Script menu 444 Use ToolServer menu 445 Workspaces 447 Zoom windows to full screen 447 IDE Extras preference panel 354 options Context popup delay 356 Documents 356 Enable automatic Toolbar help 357 Find Reference using 357 Launch Editor 356 Launch Editor w Line 356 Menu bar layout 356 Projects 356 Recent symbolics 356 Use Default workspace 357 Use External Editor 356 Use Multiple Document Interface 356 Use Script menu 356 Use Third Party Editor 356 Use ToolServer menu 356 Zoom windows to full screen 356 Use Third Party Editor option 444 IDE Preference Panels list 350 IDE Preference Panels Font amp Tabs 370 IDE Preference Panels Font Settings 370 IDE preferences Activate Browser Coloring 372 Activate Syntax Coloring 372 Add 360 362 381 Attempt to use dynamic type of C Object Pascal and SOM objects 377 Auto Indent 369 Auto Target Libraries 380 Automatic Invocation 366 Automatically launch applications when SYM file opened 379 Background 372 Balance Flash Delay 368 Balance while typing 368 Browser Commands 367 Browser Path 358 IDE 5 1 User s Guide Build before running 353 Cache Edited Files Between Debug Sessions 379 Case sensitive 366 Change 361 362 3
90. reminder message to update source tree references in the project appears Click OK Apply or Save The IDE saves the source tree changes Removing Remote Connections Remove a remote connection that the project no longer uses 1 Choose Edit gt Preferences The IDE Preferences window appears Select the Remote Connections panel from the IDE Preference Panels list Select from the Remote Connections list the obsolete remote connection Click Remove The IDE updates the Remote Connections list Click OK Apply or Save The IDE saves the remote connection changes 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 on page 366 Editor Settings on page 366 Font amp Tabs on page 368 Text Colors on page 371 IDE 5 1 User s Guide IDE 365 Working with IDE Preferences Editor Panels Code Completion The Code Completion preference panel provides options for customizing the IDE code completion behavior including e automatic invocation and indexing e window positioning and appearance delay e case sensitivity Figure 31 11 Code Completion preference panel Code Completion Code Completion wal Automatic Invocation a Window follows insertion point al Display deprecated items a Case sensitive Code Completio
91. resize Resize handles appear around the component 2 Click and drag one of the resize handles The heavy outline appears 3 Release the cursor after resizing the component The component changes size Object Inspector Use the Object Inspector to display and edit these items in the layout e component properties e events e wires Use dialog boxes list pop up menus contextual menus or the keyboard to enter information about these items IDE 294 IDE 5 1 User s Guide Layout Editing Object Inspector Figure 26 3 Object Inspector B Object Inspector x z javatest Frame1 z Properties Events wires Name i background fwe O constraints null omo eau enabled True S Bion Poig PLAINAZ foreground black a layout o NND locale JUS location 0 0 menuB ar lt none gt __fesizable Tue 1 o oo 28S A6 OO ttle _ javatest Frame Table 26 7 Object Inspector items Component Icon Description Object list pop up Bivas E Select an object to edit its properties and events Properties tab Click to show and edit properties for the component shown in the Object list pop up IDE 5 1 User s Guide IDE 295 Layout Editing Object Inspector Table 26 7 Object Inspector items continued Component Icon Description Events tab Click to show and edit events for the component shown in the Object list pop up Wires tab Click to display and edit the wires defin
92. screen 356 IDE Preferences window 328 349 350 Apply button 351 Cancel button 351 Factory Settings button 328 350 IDE Preference Panels list 350 Import Panel 428 Import Panel button 328 350 OK button 351 opening 351 Revert Panel button 328 350 Save button 328 351 Ignored By Make File flag 397 Import button 347 Import Commands 347 Import Components menu command 499 Import Panel 428 Import Project command 39 Import Project menu command 499 CGV EG CG Ge Geena importing projects saved as XML files 39 In Files 131 In Files tab 134 In Folders 131 In Folders tab 131 IDE 540 In Projects 131 In Projects tab 132 In Symbolics 131 In Symbolics tab 133 Inactive Eventpoint icon 252 Include file cache option Build Settings panel 428 Include Files 185 Include files 181 include files caching 428 indenting text blocks 104 information debugging 245 259 symbolics 249 261 Initial Directory field Build Extras panel 428 Initializer 187 Insert Reference Template 123 Insert Reference Template menu command 499 Insert Template Commands option Editor Settings panel 428 inserting a reference template 123 inspecting project files 36 inspecting wires 317 Installed Products button 481 Instruction Scheduling 401 Integrated Development Environment See IDE interface files locating 115 116 Interface menu 54 Interfaces list pop up in Files view of Project window 48 using 116 interfaces list pop up 95 introduction debugger 191
93. source code This chapter contains these sections e About Object Wiring on page 309 e Working with Object Wires on page 310 e Using the Create Wire Wizard on page 315 e Inspecting Wires on page 317 About Object Wiring A wire is a one way relationship between two RAD components The wire connects a source component to a destination component A dot on one end of the wire denotes the source An arrow at the other end of the wire denotes the destination An action is the operation that the destination component performs after an event on the source component occurs The wire is a visual representation of this action Figure 28 1 on page 310 shows a sample wire connecting a source component to a destination component Table 28 1 on page 310 defines the source component destination component and wire in terms of Figure 28 1 on page 310 IDE 5 1 User s Guide IDE 309 Object Wiring Working with Object Wires Figure 28 1 Sample wire button Table 28 1 Sample wire items Item Icon Explanation Source component button4 The component on which an event triggers an operation utton on the destination component Wire Connects the source component to the destination component The dot denotes the source and the arrow denotes the destination Destination The component on which an operation occurs as a result component of an event on the source component
94. source code editing within the Implementation pane The pane also shows the path to the source file Browser RAD Wizards The Browser menu contains commands for accessing various RAD wizards Use these wizards to create new RAD items for which the browser generates information These are sample browser RAD wizards e New Property create a new property for a selected component e New Method create a new method for a selected component e New Event Set create a new event set for a selected component Event sets contain one or more events e New Event create a new event for a selected event set The selected browser RAD wizard steps through the process of creating the new item After completing the wizard the browser window updates to display information for the newly created item Invoking the New Wizard Use the New Wizard command on a selected component to assist in the creation of new e properties e methods e event sets e events for that component 1 Select the component to modify 2 Choose the appropriate new wizard Browser gt New Property to add a new property Browser gt New Method to add a method Browser gt New Event Set to add an event set IDE 5 1 User s Guide IDE 323 RAD Browsing Browser RAD Wizards e Browser gt New Event to add an event 3 Enter the requested information into the window text boxes 4 Click Add The new property method event set or event is added
95. text or disassembly not available NOTE Use the Source pane in the Symbolics window to view source code copy source code and set breakpoints Use an editor window to modify the source code Use a Thread window to view the currently executing statement IDE 5 1 User s Guide IDE 207 Advanced Debugging Processes Window Processes Window The Processes window manipulates processes on the host computer e running processes e tasks for selected processes e some hidden processes The debugger also controls manually added processes Figure 19 4 shows the Processes window Table 19 2 explains the items in the window Figure 19 4 Processes window ioi x Local Windows PC k svchost 0 lt 001f0 tvscan 000220 regsve 000268 mstask 000278 Wink gmt 000248 Win NC O002d0 mspmsps OX002e4 E xO E Status Running Running Running Running 8 tid lt 001d0 464 0 tid lt 001ec 492 1 tid O001F8 504 2 tid 000258 600 4 tid 00270 624 Running 3 tid 000280 640 Running 04 Running Table 19 2 Processes window items Item Processes selector Icon B Local Windows PC Explanation Select an item for which to display active processes Debugger toolbar gt E x oo Toolbar buttons represent common debugging commands such as debugging the program and killing execution Attach to Process IDE 208 B Click to use
96. the IDE removes the wire from the layout 1 2 Open the object inspector for the active RAD project Click the Wires tab in the object inspector The Wires tab appears Select in the Wires tab the wire that you want to delete IDE 5 1 User s Guide IDE 319 Object Wiring Inspecting Wires 4 Press Delete The IDE removes the wire from the layout Sorting the Wires Tab by Using a Contextual Menu Use a contextual menu to change wire sorting in the Wires tab of the object inspector 1 Open the object inspector for the active RAD project 2 Click the Wires tab in the object inspector The Wires tab appears 3 Right click inside the Wires view A contextual menu appears 4 Select the sorting method that you want to apply to the Wires tab Table 28 3 explains the resulting hierarchy after selecting each sorting method Table 28 3 Selecting a sorting method Sorting Method Resulting Hierarchy View By Source Object Source components Wires associated with each source component M View By Source Object And Event Source components Events associated with each source component Wires associated with each event On View By Destination Object Destination components Wires associated with each destination component M 5 The IDE applies to the Wires tab the sorting method that you select IDE 320 IDE 5 1 User s Guide 29 RAD Browsing This chapter exp
97. the current build target See the Targeting documentation for additional information FPU Registers The FPU Registers are the register contents of the floating point unit FPU of the host computer The exact listing of these registers depends on the host FPU and on the current build target See the Targeting documentation for additional information IDE 5 1 User s Guide IDE 215 Advanced Debugging Registers Window Host specific Registers The Registers window also lists additional register contents for registers specific to the host computer The exact listing of these registers depends on the host computer and on the current build target See the Targeting documentation for additional information Opening the Registers Window Open the Registers window to inspect and modify various register contents Figure 19 7 explains how to open the Registers window Table 19 6 Opening the Registers window On this host Do this Windows Select View gt Registers Macintosh Select Window gt Registers Window Solaris Select Window gt Registers Window Linux Select Window gt Registers Window Viewing Registers View registers to inspect and modify their contents 1 Open the Registers window 2 Expand the hierarchical list to view register groups Expanding the list shows the register groups that you can view or change 3 Expand a register group Expanding a group shows its contents by regis
98. the program counter The Variables pane uses these display settings e Variables All shows all local variables in the code e Variables Auto only shows the local variables of the routine to which the current statement arrow currently points e Variables None does not show variables Use this setting to improve stepping performance for slow remote connections Show message after building up to date project Select the Show message after building up to date project option to have the IDE display a message after building an up to date project Show tasks in separate windows Select the Show tasks in separate windows option to open a separate Thread window for each task Clear the option to use one Thread window to display multiple tasks When cleared use the Task list pop up at the top of the Thread window to choose a task to display Show the component palette when opening a form Select the Show the component palette when opening a form option to automatically display the Component Palette after opening a form in the Layout Editor Clear the option to require manual opening of the Component Palette Show the object inspector when opening a form Select the Show the object inspector when opening a form option to automatically open an Object Inspector window when opening a layout in the Layout Editor Clear the option to require manual opening of the Object Inspector IDE 5 1 User s Guide Preference and Target Settings Optio
99. the replace string in the Replace text box with the selected text Replace and Find Next Replaces the selected text with the Replace text box string then performs a Find Next operation When using the Windows menu layout on a Macintosh host hold down the Shift key to change this command to Replace and Find Previous IDE 456 IDE 5 1 User s Guide IDE Menus Windows Menu Layout Table 34 4 Search menu commands continued Menu command Replace All Explanation Finds all matches of the Find text box string and replaces them with the Replace text box string Find Definition Searches for the definition of the routine name selected in the active editor window using the project s source files When using the Windows menu layout on a Macintosh host hold down the Option key to change this command to Find Reference Go Back Returns to the previous CodeWarrior browser view Go Forward Moves to the next CodeWarrior browser view 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 destinati
100. the text insertion position in each source file low position and size Select to retain the location and dimensions of each editor window dit Command Select to add Edit menu commands to contextual menus Browser Commands Select to add Browser menu commands to contextual menus Also select in order to use the Insert Template Commands option IDE 5 1 User s Guide IDE 367 Working with IDE Preferences Editor Panels Table 31 11 Editor Settings preference panel items continued Item Insert Template Commands Macintosh Explanation Select to add the Insert Template submenu to contextual menus The submenu displays source defined function templates Project Commands Select to add Project menu commands to contextual menus VCS Commands Select to add VCS Version Control System menu commands to contextual menus Debugger Commands Select to add Debug menu commands to contextual menus Balance while typing Select to flash the matching or after typing or in an editor window Use multiple undo Select to allow multiple undo and redo operations while editing text Relaxed C popup parsing Select to allow the C parser to recognize some non standard function formats and avoid skipping or misinterpreting some definition styles Drag and drop editing Select to allow drag and drop text editing Left margin click selects line
101. these resource files when building the final output file Use the Flags pop up menu to toggle this flag Launchable flag A bullet in this column denotes a launchable file The IDE opens launchable files with the application that created them Double click launchable files from the Project window Use the Flags pop up menu to toggle this flag Precompiled File flag es A 8 A bullet in this column denotes a precompiled file The IDE builds precompiled files before building other files Use the Flags pop up menu to toggle this flag Ignored By Make flag A bullet in this column denotes a file ignored by the compiler during builds For example use this option to ignore text txt files or document doc files Use the Flags pop up menu to toggle this flag Compiler Choose from this list pop up the plug in compiler to associate with the selected file mapping This compiler selection also appears in the corresponding column of the File Mappings list Flags Choose from this pop up menu the desired flags for the selected file mapping A checkmark indicates an active flag Bullets appear in the corresponding columns of the File Mappings list to reflect flag states Edit Language Choose from this list pop up the desired language to associate with the selected file mapping The IDE applies the appropriate syntax coloring for the selected language Add IDE 5 1 User s Guide Click to add
102. these steps 1 Open the Class Browser window as explained in Table 16 2 on page 183 Table 16 2 Opening the Class Browser window Windows Select View gt Class Browser Macintosh Select Window gt Class Browser IDE 5 1 User s Guide IDE 183 Using Browser Wizards The New Member Function Wizard Table 16 2 Opening the Class Browser window continued Solaris Select Window gt Class Browser Linux Select Window gt Class Browser 2 Select Browser gt New Member Function 3 In the New C Member Function window enter the Member Function Declaration a Name Type a name for the member function b Return Type Enter an appropriate function return type c Parameters Type a list of function parameters d Namespaces required for parameters optional Type a list of namespaces required for parameters 4 Click Next IDE 184 IDE 5 1 User s Guide Using Browser Wizards The New Data Member Wizard Figure 16 6 New Member Function wizard File Locations New C Member Function File Locations m Declaration c Program Files Metrowerks CodeW arrior Win32 x86 Support Headers MFC afxs Definition MemberFunctionD efinition New Existing Include files Include files automatically added for return type and parameters Addtional header include files Example lt string gt YourHeader h YourH eader H lt Back Next gt Finish
103. to a specified group a unit expression enclosed in parentheses in the find string The digit n identifies the nth group from left to right with a number from 1 to 9 alternation Matches one of a choice of regular expressions If this operator appears between two regular expressions the IDE matches the largest union of strings 8 match beginning Matches items from the beginning of a string or following a of line newline character This operator also represents a list operator when enclosed within brackets match end of line Matches items from the end of a string or preceding a newline character IDE 5 1 User s Guide Finding and Replacing Text Regular Expression Find Table 12 7 Regular expression operators recognized by the IDE continued Operator Name E list Explanation Defines a set of items to use as a match The IDE does not allow Matching Any Character empty lists aaa group Defines an expression to be treated as a single unit elsewhere in the regular expression range Specifies a range The range starts with the character preceding the operator and ends with the character following the operator Use the operator to match any character except a newline character The operator effectively becomes a placeholder for a single character in the search string Table 12 8 shows examples of using regular expressions to match any character Table 12 8 Examples of matching any c
104. to configure the color of changed variables that appear in debugger windows Click the color swatch to change the current color 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 IDE 446 Watchpoint indicator Use the Watchpoint indicator option to configure the color of watchpoints that appear in debugger windows Click the color swatch to change the current color Window follows insertion point Select this option to have the Code Completion window follow the insertion point as you edit text in the active editor window Clear the option to leave the Code Completion window in place Window position and size Select the Window position and size option to remember the location and dimensions of each editor window Clear the option to open each editor window according to default settings IDE 5 1 User s Guide Preference and Target Settings Options NOTE The IDE must be able to write to the file in order to remember window position and size Working Directory Enter in this field the path to the default directory to which the current project has access Debugging occurs in this location If this field is blank debugging occurs in the same directory as the executable file Workspaces Enter in this
105. to the destination component The wire appears as you drag the cursor Draw the wire so that it begins on top of the source component and ends on top of the destination component 5 Release the cursor The Create Wire wizard appears Complete this wizard to specify the details of the wire IDE 5 1 User s Guide IDE 311 Object Wiring Working with Object Wires Creating a Wire by Using a Menu Use the New Wire menu command to create a wire in the layout editor To view the layout editor open a RAD project and open a layout from the Design tab in the project window 1 Select a source component in the layout Handles appear on the selected component NOTE You do not need to select a source component in order to create a wire In this case the Create Wire wizard substitutes the layout itself in place of the missing source component 2 Select Layout gt New Wire The Layout menu becomes visible after you open the layout The Create Wire wizard appears Complete this wizard to specify the details of the wire such as the destination component and action Creating a Wire by Using a Contextual Menu Use the New Wire command in the layout editor contextual menu to create a wire in the layout To view the layout editor open a RAD project and open a layout from the Design tab in the project window 1 Select a source component in the layout Handles appear on the selected component 2 Open the Layout Editor contextua
106. upon closing the Thread window or quitting the IDE Clear the option to kill processes without prompting Context popup delay Enter in this field the minimum time in ticks to hold down the mouse button before IDE contextual menus appear Each tick represents 1 60 of a second 16 67 milliseconds Sample tick values include e 0 zero disables appearance of contextual menus e 40 default popup delay value 2 3 of a second e 240 maximum popup delay value IDE 418 Debugger Commands Select this option to add Debug menu commands to IDE contextual menus Clear the option to remove the commands from the contextual menus Default file format Choose from this list pop up the default end of line EOL conventions used by the IDE to save files e Macintosh lt CR gt e DOS lt LF gt lt CR gt e UNIX lt LF gt IDE 5 1 User s Guide Preference and Target Settings Options Default language entry point Select this option to halt program execution upon entering a default point defined by the programming language For example C defines the main function as the default point Default size for unbounded arrays Enter in this field the default number of elements to display in View Array windows for unbounded arrays Disable third party COM plugins Select this option to prevent the IDE from loading third party Component Object Model COM plugins Clear the option to have the IDE load the plugins at start up ti
107. used for printing CodeWarrior IDE files Paste The Paste command replaces the selected text with the 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 IDE 5 1 User s Guide IDE 503 Menu Commands Processes Processes Window These commands open the Processes window for those platforms that support it 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 Properties The Properties command opens the Object Inspector Use this window to view or modify the properties of the selected component in a RAD project Quit Quit CodeWarrior Mac OS command equivalent of Exit See Exit on page 493
108. variable or memory range Enabled watchpoints are indicated by an underline of the selected variable or range of memory Disabled watchpoints do not have the underline The underline s color can be configured in the Display Settings preference panel of the IDE Preference window Enter Find String The Enter Find String command copies the selected text in the active window directly into the target search string It will then appear in the Find text box of both the Find and Replace and Find in Files windows Once done use any of the find commands to search for matches without opening any Find related windows Enter Replace String The Enter Replace String command copies the selected text in the active window directly into the target search string It will then appear in the Replace with text box of both the Find and Replace and Find in Files windows Once done use any of the find commands to search for matches without opening any Find related windows NOTE Macintosh Press the Shift key to change the Enter Find String command to the Enter Replace String menu command Errors amp Warnings Errors amp Warnings Window These commands open the Errors and Warnings window Exceptions in Targeted Classes The Exceptions in Targeted Classes command of the Java submenu to tell the debugger to break only on exceptions thrown by your own classes in the project IDE 5 1 User s Guide Menu Commands Choose this command to break on the ex
109. when the project data folder cannot be created on read only volumes IDE 352 IDE 5 1 User s Guide Working with IDE Preferences General Panels Table 31 2 Build Settings preference panel items Item Play sound after Bring Up To Date amp Make Macintosh Solaris and Linux Explanation Select to have the IDE play an alert sound after completing a Bring Up To Date or Make command Success Macintosh Solaris and Linux Choose the sound the IDE plays after successfully completing a Bring Up To Date or Make command Failure Macintosh Solaris and Linux Choose the sound the IDE plays after failing to complete a Bring Up To Date or Make command 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 building up to date project Select to have the IDE display a message after successfully building a project Include file cache Macintosh Enter the kilobytes of memory to allocate to the file cache used for include files during a project build Compiler thread stack Windows and Macintosh Enter the kilobytes of memory to allocate to the stack for execution of the IDE compiler thread Increase the size when compiling heavily op
110. you view or edit all global variables for each project that contains symbolics information The Symbolics window appears once you open a file that contains symbolics information IDE 5 1 User s Guide IDE 261 Using Eventpoints Using Eventpoints in the Symbolics Window Figure 22 8 Symbolics window e Symbolics Window Sex th C Console Debug exe Functions allocate_from_fixed_po lt allocate_from_var_pools ie ret Find and Open File k Go to function declaration of size gt Go to Function definition of size gt Find all implementations of size salloc c E Source C Program Files Metrower Preprocess static Set Breakpoint void Block _ construct Bloc Set Pause Point eaan Set Script Point SubBlock sb Seki irdi Eadie Set Skip Point Set Sound Point Copy To Expression ths gt size_ 3 Line 784 Col 22 Source Setting an Eventpoint in the Symbolics Window To set an eventpoint in the Symbolics window follow these steps 1 Choose Project gt Debug The Thread window appears 2 Open the Symbolics window as explained in Table 22 5 IDE 262 IDE 5 1 User s Guide Using Eventpoints Using Eventpoints in the Symbolics Window Table 22 5 Opening the Symbolics window On this platform Do this Windows Select View gt Symbolics Macintosh Select Window gt Symbolics Window Solaris Select Window gt
111. 0 Customize button in layout editor 288 Customize command 289 Customize IDE Commands window 327 344 346 Action 329 Appears in Menus 329 330 Auto Repeat 329 Key Bindings 329 Name field 329 New Binding 329 New Group 330 Customize menu command 490 IDE 5 1 User s Guide Cut command 490 CVS 361 Cycle View menu command 490 D Data column in Files view of Project window 48 data members completing code 113 creating 164 186 identifier icons 163 Data Members pane 164 in Class Browser window 157 Data menu 461 473 database navigation for browser 151 deactivating automatic code completion 109 Dead Code Elimination 400 Dead Store Elimination 400 Debug column in Files view of Project window 48 Debug command 54 55 195 Debug menu 418 459 471 Clear All Breakpoints command 460 472 Disable Watchpoint command 460 473 Enable Breakpoint command 460 472 Enable Watchpoint command 460 472 473 Hide Breakpoints command 460 472 Debug menu command 490 debugger 434 advanced techniques 201 attaching to a process 210 choosing for an opened symbolics file 381 overview 26 starting 195 Debugger Commands option 418 Debugger section of IDE preference panels 375 Debugger section of Target Settings panels 403 Debugger Settings panel 218 406 options Auto target Libraries 407 Cache symbolics between runs 407 Default language entry point 407 419 Location of Relocated Libraries and Code Resources 407 431 Log System Messages 408 431
112. 000000 00000000 00000000 00000000 s s sooo 00132468 00000000 00000000 00000000 00000000 e eens sooo Setting a Watchpoint in the Memory Window To set a Watchpoint using the Memory window follow these steps 1 Run Debug your program 2 From the Main Toolbar choose Data gt View Memory This opens the Memory window 3 Select a range of bytes in the Memory window Do not double click the range of bytes 4 From the Main Toolbar choose Debug gt Set Watchpoint IDE 5 1 User s Guide IDE 241 Using Watchpoints Using Watchpoints in the Watchpoints Window NOTE A red line appears under the selected variable in the Variable window indicating that you have set a Watchpoint You can change the color of this line in the Display Settings panel of the IDE Preferences window Edit gt IDE Preferences Clearing Watchpoints from the Memory window To clear a Watchpoint from the Memory window follow these steps 1 Select a range of bytes in the Memory window 2 Choose Debug gt Clear Watchpoint To clear all Watchpoints from the Memory window 1 Open the Memory window You do not have to select a range of bytes 2 Choose Debug gt Clear All Watchpoints NOTE All Watchpoints clear automatically when the target program terminates or the debugger terminates the program and reset next time the program runs Using Watchpoints in the Watchpoints Window The Watchpoints window lists the Watchpoints in
113. 06 creating a menu item in a menubar component 306 creating anew class 162 177 178 creating a new data member 164 185 186 creating a new member function 163 182 183 creating a wire by drawing it 311 creating a wire by using a contextual menu 312 creating a wire by using a menu 312 creating custom project stationery 40 creating empty projects 35 creating new projects from makefiles 33 creating new projects using project stationery 33 deactivating automatic code completion 109 deleting a wire by using the layout editor 314 deleting wires by using the object inspector 319 docking a window by using a contextual menu 72 docking a window by using drag and drop 72 docking windows of the same kind 73 expanding a docked window 78 expanding browser panes 160 expanding the editor window toolbar 94 exporting projects to XML files 38 floating a window 75 for managing files 61 generating project link maps 274 going to a particular line 118 hiding the classes pane 162 importing projects saved as XML files 39 indenting text blocks 104 inserting a reference template 123 looking up symbol definitions 122 making a summation of two variables 212 making a window an MDI child 76 modifying a wire by using the layout editor 313 modifying wires by using the object inspector 318 moving a component in a layout 293 moving a docked window 78 navigating browser data 151 navigating Code Completion window 111 navigating to a marker 120 openi
114. 1 Hold down the Shift key 2 Choose a function name from the Function list menu This action selects the function Overstriking Text Windows Use the Overstrike command to toggle between text insertion and text overwriting mode when entering text 1 Press the Ins key to toggle overstrike mode 2 Overstrike mode toggles Using Virtual Space Use the Virtual Space feature to place the cursor anywhere in the white space of a line of source code and enter text at that position For example consider the line of C code shown in Listing 10 1 Listing 10 1 Sample C source code void aFunction const char inMessage virtualspace Toggling virtual space changes the cursor behavior e enabled clicking in the virtualspace places the cursor at the location that you clicked You can enter text at that location IDE 5 1 User s Guide IDE 103 Editing Source Code Text Manipulation disabled clicking in the virtualspace places the cursor just after the last character on the line in the example just after the closing parenthesis To place the cursor beyond this character you must repeatedly press the space bar on your keyboard To use virtual space follow these steps 1 Select Edit gt Preferences The IDE Preferences window opens Select Editor Settings in the IDE Preference Panels list The Editor Settings preference panel appears Configure the Enable Virtual Space option select to u
115. 10 Select stack crawl window when task is stopped option Global Settings panel 437 selecting Code Completion window items 112 text in editor windows 102 selecting entire routines 103 selecting lines 102 IDE 554 selecting multiple lines 102 selecting rectangular portions of lines 102 Selection position option Editor Settings panel 437 selections searching text 138 searching multiple windows text 139 Send To Back command 289 Send To Back menu command 510 set Watchpoint 260 watchpoint 246 Set 1 Set 2 Set 3 Set 4 372 Set Breakpoint menu command 510 Set Default Project command 38 Set Default Project menu command 510 Set Default Target menu command 511 Set Eventpoint menu command 511 set Watchpoint in Thread window 260 set watchpoint in Thread window 246 Set Watchpoint menu command 511 setting browser options 147 eventpoints 255 temporary breakpoints 236 setting breakpoints in 234 setting eventpoint Symbolics window 262 Thread window 260 setting Watchpoint Symbolics window 250 Variable window 247 setting watchpoint Thread window 246 settings Add 362 391 395 397 Add Default 391 Always Search User Paths 391 Application 394 Apply button 387 Arguments 394 Auto target Libraries 407 Cache subprojects 393 Cache symbolics between runs 407 Cancel button 387 Change 362 391 396 398 Choose 362 389 IDE 5 1 User s Guide Clear 389 Code Generation 398 Compiler 397 Debugger 403 Default language entry point 407
116. 3 Customizing the IDE Customize Key Bindings Table 30 6 Resetting a toolbar by using a contextual menu On this host Do this to reset the Do this to reset the main toolbar window toolbar Windows Right click the toolbar and select Right click the toolbar and select Reset Toolbar Reset Toolbar Macintosh Control click the toolbar and select Control click the toolbar and select Reset Toolbar Reset Toolbar Solaris Click and hold on the toolbar then Click and hold on the toolbar then select Reset Toolbar select Reset Toolbar Linux Click and hold on the toolbar then Click and hold on the toolbar then select Reset Toolbar select Reset Toolbar Customize Key Bindings IDE 344 You can customize the keyboard shortcuts known as key bindings for various commands in the CodeWarrior IDE You can bind a set of keystrokes to virtually any command To activate the command type its associated key binding Use the Customize IDE Commands window to change IDE key bindings You can also use the Customize IDE Commands window to look up default key bindings for specific commands as well as change existing key bindings to better suit your needs Click the Commands tab at the top of the Customize IDE Commands window to display the Commands view Use this view to configure the key bindings for menu commands editor actions and other actions You can also specify prefix keys This section has these topics
117. 32 1 Target Settings window C Console App Debug Settings 2f x Target Settings Panels N Target Settings Target Settings Target Name C Console App Debug Access Paths Coo Build Extras inl er win32 x86 Linker 7 Runtime Settings Predinker None File Mappings ae Saira Tress Postlinker None 7 x86 Target Output Directory Language Settings Choose C C Language Project C C Warnings Clear Windows RC Code Generation x86 Processor Global Optimizations Linker x86 Disassembler x86 Linker I Save project entries using relative paths Factor Settings Import Panel Export Panel OK Cancel Table 32 1 Target Settings window items Item Explanation Target Settings Panels list Lists settings panels organized by group Click the hierarchical control next to a group name to show or hide individual settings panels Settings panel Shows the options for the selected item in the Target Settings Panels list Factory Settings Click to restore the default options for the current settings panel IDE 386 IDE 5 1 User s Guide Working with Target Settings Target Panels Table 32 1 Target Settings window items continued Item Explanation 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 options for the current settings
118. 320 using the object inspector to delete 319 using the object inspector to modify 318 using the object inspector to re order 318 using the object inspector to view 318 Wires tab in object inspector 296 wires inspecting 317 Wizards Browser 177 wizards Create Wire using 315 New Class 162 177 178 New Data Member 164 185 186 New Member Function 182 183 IDE 565 New Member Functions 163 working with IDE preferences 349 with IDE target settings 385 Working Directory option Runtime Settings panel 447 working with 71 browser 147 class browser windows 155 class hierarchy windows 167 working with dockable windows 71 working with files 61 working with object wiring 310 working with projects 29 workspace defined 81 workspaces 81 closing 84 opening 83 opening recent 84 saving 82 saving copies of 83 using 81 using default 82 Workspaces option IDE Extras panel 447 workspaces about 81 X XML exporting projects 38 importing projects 39 Z Zoom Window menu command 520 Zoom windows to full screen option IDE Extras panel 447 IDE 566 IDE 5 1 User s Guide
119. 368 Project Commands 368 Relaxed C popup parsing 368 Selection position 367 Sort function popup 368 Use multiple undo 368 VCS Commands 368 Window position and size 367 editor toolbar 93 IDE 5 1 User s Guide IDE 531 editor window 91 252 adding panes to 98 breakpoints column 98 collapsing toolbar in 94 expanding toolbar in 94 line and column indicator 98 pane splitter controls 98 removing panes from 99 resizing panes 99 text editing area 98 editor windows other 97 selecting text in 102 Emacs text editor 429 430 empty designs creating 281 empty projects creating 35 Empty Target option 56 Enable Automatic Toolbar Help option 421 Enable Breakpoint menu command 491 Enable Browser option 484 Enable Remote Debugging option 421 Enable Virtual Space option 421 Enable Watchpoint menu command 492 enabling plug in diagnostics 481 enabling and disabling Watchpoint Thread window 247 end of line format 418 enlarging panes in browser 160 Enter Find String command 139 Enter Find String menu command 492 Enter Replace String menu command 492 Enums option 372 Environment Settings option 421 Environment Variable option of Source Trees preference panel 442 Environment Variable option in Type pop up menu 442 environment variables Macintosh limitations 442 EOL format 418 Errors And Warnings menu command 492 Errors And Warnings Window menu command 492 Errors Only option of Plugin Diagnostics 430 IDE 532 eventpoint clearing in
120. 387 Templates 372 TypeDefs 373 IDE 547 Use Multiple Document Interface 69 User Paths list 391 User specified 407 Window Follows Insertion Point 446 Windowing preference panel 377 Options list pop up in object inspector 296 other editor windows 97 Other Executables settings panel 403 Other option 373 Output Directory option Target Settings panel 433 Overlays tab 51 overstrike 103 overstriking text Windows 103 overtype See overstrike 103 overview of browser 25 of build system 25 of CodeWarrior 21 of debugger 26 of editor 25 of IDE project manager and build targets 29 of IDE tools 24 of IDE User Guide 17 of project manager 25 of RAD tools 26 of search engine 25 P Page Setup command 503 PalmQuest reference 425 pane Source 250 263 Variables 246 260 Pane Collapse 160 Pane Expand 160 pane splitter controls in editor window 98 panels Font amp Tabs 370 for IDE preferences 350 for targets 386 panes adding to editor window 98 removing from editor window 99 resizing in an editor window 99 parameter lists completing code 114 IDE 548 path caption 97 Pause Point 251 254 Pause Point icon 252 Peephole Optimization 400 Play sound after Bring Up To Date amp Make option Build Settings panel 433 Plugin Diagnostics All Info option 430 Errors Only option 430 None option 430 plug in diagnostics disabling 481 enabling 481 Plugin Settings panel options Level 430 Plugin Settings preference panel 35
121. 416 Catalog list pop up in component palette 291 Change button 391 Change Program Counter menu command 484 changing line views in a hierarchical window 170 register data views 217 register values 217 remote connections 382 source trees 364 Check Syntax command 485 Checkbox Numeric Keypad Bindings 346 Checkout Status column in Files view of Project window 48 child windows defined 69 choosing a default project 38 linkers 273 one character from many in regular expressions 142 class browser purpose of windows 155 working with windows 155 Class Browser menu command 485 Class Browser window 155 Classes pane 157 Data Members pane 157 Member Functions pane 157 Source pane 157 Status area 157 Class column in Breakpoints window 232 class data viewing from hierarchy windows 159 Class Declaration 166 IDE 524 Class Hierarchy 156 Class Hierarchy menu command 485 Class Hierarchy Window menu command 485 class hierarchy windows purpose of 167 working with 167 classes creating 162 177 178 hiding pane for 162 showing pane for 162 sorting list of 163 Classes option 372 Classes pane 161 in Class Browser window 157 classes zip 482 clear Watchpoint 261 watchpoint 246 Clear All Breakpoints menu command 486 Clear All Watchpoints menu command 486 Clear Breakpoint menu command 486 Clear Eventpoint menu command 486 Clear Floating Toolbar command in Toolbar submenu 486 Clear Main Toolbar menu command 486 Clear menu command 485 clear W
122. 484 Bring Up To Date option 425 Browse In Processes Window option 381 382 browser 151 Class Browser window 155 Classes pane 161 collapsing panes 160 creating new classes 162 177 178 creating new data members 186 creating new member functions 182 183 185 expanding panes 160 hierarchy windows 168 Member Functions pane 163 overview 25 printing class hierarchies 169 purpose of 147 setting options 147 Source pane 165 status area 165 using contextual menu 152 viewing data by contents 173 IDE 5 1 User s Guide viewing data by inheritance 168 working with 147 Browser Access Filters 157 Browser Commands option 415 Editor Settings panel 428 Browser Contents 156 Browser Contents command 484 Browser Contents window 172 Symbols list 172 browser database defined 147 Browser menu 415 479 Browser Path option 415 Browser Wizard 177 bug defined 191 Build Before Running option 415 Build Extras panel options Initial Directory field 428 Use External Debugger 443 Use modification date caching 443 Build Extras settings panel 205 392 options Application 394 Arguments 394 Cache Subprojects 393 Dump internal browse information after compile 393 Generate Browser Data From 393 Initial directory 394 Use External Debugger 394 Use modification date caching 393 Build Extras target settings panel 494 Build Progress menu command 484 Build Progress Window menu command 484 Build Settings panel options Include file cache 428 Play sound after
123. 484 Build Progress 484 Build Progress Window 484 Can t Redo 453 466 Can t Undo 453 466 Cascade 484 Change Program Counter 484 Check Syntax 485 Class Browser 485 Class Declaration 166 Class Hierarchy 156 485 Class Hierarchy Window 485 Clear 485 Clear All Breakpoints 486 Clear All Watchpoints 486 Clear Breakpoint 486 Clear Eventpoint 486 Clear Main Toolbar 486 Clear Watchpoint 486 Close 39 487 Close All 487 Close All Editor Documents 487 Close Catalog 487 Close Workspace 487 CodeWarrior Glossary 488 CodeWarrior Help 488 Collapse Window 488 Commands amp Key Bindings 487 Compare Files 488 Compile 488 Complete Code 488 Component Catalog 488 Component Palette 489 Connect 489 Copy 489 Copy To Expression 489 Create Design 489 Create Group 489 Create Target 490 Customize 490 Cut 490 Cycle View 490 Debug 195 490 Delete 491 IDE 526 Diagonal Line 170 Disable Breakpoint 491 Disable Watchpoint 491 Disassemble 491 Display Grid 491 Enable Breakpoint 491 Enable Watchpoint 492 Enter Find String 139 492 Enter Replace String 492 Errors And Warnings 492 Errors And Warnings Window 492 Exit 493 Expand Window 493 Export Project 38 493 499 Export Project as GNU Makefile 493 Expressions 493 Expressions Window 493 File Path 49 Find 127 494 Find and Open Filename 495 Find and Open File 495 Find And Replace 496 Find Definition 494 Find Definition amp Reference 122 494 Fin
124. 53 Project Commands 368 Project operations 360 Projects 356 Purge Cache 379 Recent symbolics 356 Recommended 354 Regular Expression 360 Relaxed C popup parsing 368 Remote Connection list 381 Remove 361 362 381 Save open files before build 353 Script 369 Select stack crawl window when task is stopped 379 Selection position 367 SEt 358 Set 1 Set 2 Set 3 Set 4 372 Shielded folder list 360 Show all locals 376 Show message after building up to date project 353 Show tasks in separate windows 377 Show the component palette when opening a form 384 Show the object inspector when opening a form 384 Show values as decimal instead of hex 376 Show variable location 376 Show variable types 376 Show variable values in source code 377 Size 369 Sort function popup 368 Sort functions by method name in symbolics window 377 Source Tree list 362 Strings 372 IDE 539 Success 353 Tab indents selection 369 Tab Inserts Spaces 369 Tab Size 369 Templates 372 Type 362 TypeDefs 373 se Concurrent Compiles 354 se Debugging Monitor 378 se Default workspace 357 se External Editor 356 se Local Project Data Storage 353 se Multiple Document Interface 356 se multiple undo 368 se Script menu 356 se Third Party Editor 356 se ToolServer menu 356 ser Specified 354 Variable values change 376 VCS Commands 368 Watchpoint indicator 376 Window follows insertion point 366 Window position and size 367 Zoom windows to full
125. 7 Ungroup command 517 unindenting text blocks 104 Untouch command 55 untouching all files 55 all groups 55 files 55 groups 55 in Find and Replace window 128 in Find window 127 Update Data Every n Seconds option Debugger Settings panel 442 Use Concurrent Compiles option Concurrent Compiles panel 435 442 se Debugging Monitor option Windowing panel 442 Use Default Workspace option IDE Extras panel 442 or IDE 5 1 User s Guide Use External Debugger option Build Extras panel 443 Use External Editor option IDE Extras panel 443 Use Local Project Data Storage option Build Settings panel 443 Use modification date caching option Build Extras panel 443 Use Multiple Document Interface option 69 IDE Extras panel 444 se multiple undo option 517 Editor Settings panel 444 Use Script menu option IDE Extras panel 444 se Scripts Menu checkbox of IDE Extras preference panel 477 Use Third Party Editor option of IDE Extras preference panel 444 Use ToolServer Menu checkbox of IDE Extras preference panel 476 Use ToolServer menu option IDE Extras panel 445 User Paths list 391 Framework column 392 Recursive Search column 392 Search Status column 391 User Paths option Access Paths panel 445 User Specified option Concurrent Compiles panel 445 ql User specified option 407 using breakpoints 231 document settings pop up 96 Eventpoints 251 Executables pane Symbolics window 206 207 Files pane Symbolics w
126. 8 508 Revert 508 Run 198 434 509 IDE 5 1 User s Guide Run To Cursor 509 Save Default Window 510 Save Workspace 510 Save Workspace As 510 Select All 510 Send To Back 510 Set Breakpoint 510 Set Default Project 38 510 Set Default Target 511 Set Eventpoint 511 Set Watchpoint 511 Shift Right 511 Show Breakpoints 486 511 Show Classes 162 Show Classes pane 166 Show Inherited 157 Show private 158 Show protected 158 Show public 158 Show Types 512 Show Window Toolbar 498 Single Class Hierarchy Window 156 Snap To Grid 512 Sort Alphabetical 161 163 Sort Hierarchical 161 Stack Editor Windows 512 Step Into 196 Step Out 196 Step Over 197 512 Stop 197 Stop Build 513 Straight Line 170 Switch To Monitor 513 Symbolics 513 Symbolics Window 513 Synchronize Modification Dates 513 Toolbars 515 View Array 517 View as implementor 158 View as subclass 158 View As Unsigned Decimal 517 518 519 View as user 158 View Disassembly 519 View Mixed 520 View Source 520 View Variable 520 Watchpoints 520 Watchpoints Window 520 Zoom Window 520 IDE 527 Commands amp Key Bindings menu command 487 Commands tab 327 329 344 Comments option 417 Common Subexpression Elimination 400 Compare Files menu command 488 Compile menu command 488 compiler avoiding crashes 417 Compiler option 417 Compiler option in Generate Browser Data From menu 426 compiler thread stack and avoiding compiler crashes 417 Compiler
127. 8 options Disable third party COM plugins 359 Level 359 plug ins saving information about those installed in IDE 481 viewing those installed in IDE 481 pop up menus document settings 96 functions 95 interfaces 95 markers 95 VCS 96 pop ups Ancestor 168 Browser Access Filters 157 Symbols 172 VCS 157 Post linker option Target Settings panel 433 Precompile menu command 503 Precompiled File flag 397 precompiled headers caching 428 preference panel 350 preference panels Build Settings 351 Code Completion 366 Concurrent Compiles 353 Display Settings 375 Editor Settings 366 IDE 5 1 User s Guide Font amp Tabs 368 371 Help Preferences 358 IDE Extras 354 Layout Editor 384 Plugin Settings 358 Remote Connections 380 reverting 436 Shielded Folders 359 Source Trees 361 Windowing 377 preferences Activate Browser Coloring 372 Activate Syntax Coloring 372 Add 360 362 381 Apply button 351 Attempt to use dynamic type of C Object Pascal and SOM objects 377 Auto Indent 369 Auto Target Libraries 380 Automatic Invocation 366 Automatically launch applications when SYM file opened 379 Background 372 Balance Flash Delay 368 Balance while typing 368 Browser Commands 367 Browser Path 358 Build before running 353 Cache Edited Files Between Debug Sessions 379 Cancel button 351 Case sensitive 366 Change 361 362 381 Choose 362 Classes 372 Close non debugging windows 378 Code Completion Delay 366 Co
128. 81 Choose 362 Classes 372 Close non debugging windows 378 Code Completion Delay 366 Collapse non debugging windows 378 Comments 372 Compiler thread stack 353 Confirm Kill Process when closing or quitting 379 Confirm invalid file modification dates when debugging 379 Constants 372 Context popup delay 356 Debugger Commands 368 Default file format 368 Default size for unbounded arrays 377 Disable third party COM plugins 359 Display deprecated items 366 Do nothing 378 Do nothing to project windows 378 Documents 356 Don t step into runtime support code 380 Drag and drop editing 368 Edit 372 Edit Commands 367 Enable automatic Toolbar help 357 Enable Virtual Space 368 Enums 372 Failure 353 Find and compare operations 360 Find Reference using 357 Font 369 Font preferences 367 Foreground 372 Functions 372 Globals 372 Grid Size X 384 Grid Size Y 384 Hide non debugging windows 378 Include file cache 353 Insert Template Commands 368 Keywords 372 Launch Editor 356 Launch Editor w Line 356 Left margin click selects line 368 IDE 5 1 User s Guide Level 359 Macros 372 Maintain files in cache 379 Menu bar layout 356 Minimize non debugging windows 378 Monitor for debugging 378 Move open windows to debugging monitor when debugging starts 378 Name 362 Open windows on debugging monitor during debugging 378 Other 373 Play sound after Bring Up To Date amp Make 3
129. 86 console applications about 85 constant adding to a variable 212 Constants option 372 Context Popup Delay option 418 contextual menu using for browser 152 contextual menus 203 File Path command 49 Layout Editor 289 Open In Windows Explorer command 49 using 204 using to dock a window 72 conventions figures 19 for manual 19 keyboard shortcuts 20 Copy And Expression Propagation 400 Copy menu command 489 Copy Propagation 400 Copy To Expression command 489 cores debugging multiple 228 Create Design menu command 489 IDE 5 1 User s Guide Create Group menu command 489 Create Target command 56 Create Target menu command 490 Create Wire wizard completing 315 Create Wire wizard using 315 creating anew data member 164 build targets 56 console application 86 console applications 86 custom project stationery 40 empty designs 281 empty projects 35 files Macintosh 62 files Windows 61 member functions 163 menu items in a menubar component 306 menus in a menubar component 306 new classes 162 177 178 new data member 185 new data members 186 new member function 182 new member functions 183 projects from makefiles 33 projects using stationery 33 subprojects 41 targets 56 creating console applications 85 creating wires with contextual menus 312 creating wires with menus 312 cross platform opening projects 36 Current Target list pop up 46 Current Target menu 341 Custom Keywords settings panel 401 custom project stationery 4
130. A Use modification date caching id Cache Subprojects Generate Browser Data From Language Parser y Prefix file Ftc R Macro file FileName Specify a prefix file and a header that defines macros used in this project s header and source files Applicable only to C C Code Completion the Prefix and Macro files Figure 13 3 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 e 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 gt 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 Disabling Browser Data Select None to disable browser data and stop the IDE from generating browser information for the project IDE 150 IDE 5 1 User s Guide Using the Browser Browser Symbols Figure 13 4 Generate browser data from none Build Extras Extras A Use modification date caching wal Cache Subprojects Generate Browser Data From None PA R 1 Choose Edit gt Target Settings 2 Select Build Extras from the Target Settings Panels list 3 In
131. Breakpoint command to set a breakpoint A breakpoint suspends execution of the target program at a specified line and returns control to the debugger The debugger does not execute the line that contains the breakpoint Set breakpoints in any window that displays source code such as these examples e editor windows e the Thread window with Stack Crawl Variable and Source panes Figure 20 2 Setting Breakpoints The red marker indicates int mainf void an active breakpoint en printf Hello World n return 0 The dash indicates a J line that can contain a breakpoint Line 6 Cal 1 Source bl 4 1 In the source code find the line at which you want to set the breakpoint 2 Click the dash in the Breakpoint column left edge of window next to the line of source code The breakpoint appears During the next program run execution proceeds normally until reaching the breakpoint The debugger then suspends program execution NOTE Specifying a breakpoint in a file affects all other targets that include that file Clearing Breakpoints in Source Panes Use the Clear Breakpoints command to clear an individual breakpoint Clear breakpoints in any window that displays source code such as these examples editor windows IDE 234 IDE 5 1 User s Guide Using Breakpoints Common Breakpoint Tasks e the Thread window with Stack Crawl Variable and Source panes 1 Open any window that displays source code
132. CodeWarrior Development Tools IDE 5 1 User s Guide metrowerks Software Starts Here lt Metrowerks the Metrowerks logo and CodeWarrior are registered trademarks of Metrowerks Corp in the US and or other countries All other tradenames and trademarks are the property of their respective owners Copyright Metrowerks Corporation 2002 ALL RIGHTS RESERVED The reproduction and use of this document and related materials are governed by a license agreement media it may be printed for non commercial personal use only in accordance with the license agreement related to the product associated with the documentation Consult that license agreement before use or reproduction of any portion of this document If you do not have a copy of the license agreement contact your Metrowerks representative or call 800 377 5416 if outside the US call 1 512 997 4700 Subject to the foregoing non commercial personal use no portion of this documentation may be reproduced or transmitted in any form or by any means electronic or mechanical without prior written permission from Metrowerks Metrowerks reserves the right to make changes to any product described or referred to in this doc ument without further notice Metrowerks makes no warranty representation or guarantee regard ing the merchantability or fitness of its products for any particular purpose nor does Metrowerks assume any liability arising out of the application or use of any product d
133. DE 5 1 User s Guide Customizing the IDE Customizing IDE Commands Figure 30 2 New Command group Customize IDE Commands 21x Commands Toolbar Items File Edit Name New Group View JV Appears in Menus Search Project Debug Data Memory OCD Multi Core Debug Browser indi New Binding Miscellaneous Editor Commands F Auto Repeat Help Catalog Layout Action Prefix Key Timeout fi 20 J Numeric Keypad Bindings New Group Window Export Import 7AHRAR RRR RRR ES New Group New Command Delete Factory Settings Revert Save Creating a New Menu Command To create a new menu command follow these steps 1 Select the command group you want to contain the new menu command You must select an existing command group in the Commands list 2 Click the New Command button The IDE creates a new menu command named New Command and places it within the selected command group The information for the new menu command appears in the Customize IDE Commands window 3 Enter a name for the new menu command You can change the default name of New Command Enter a new name in the Name field of the Customize IDE Commands window IDE 5 1 User s Guide IDE 331 Customizing the IDE Customizing IDE Commands 4 Use the Appears in Menus checkbox to toggle the a
134. DULE_STATE AFX_MODULE_THRE viv Show Inherited Data Members m_pModuleState m_pPrevModuleState m_pSafetyPoolBuffer m_exceptionContext m_pWndlnit y Source C Program Files Metrowerks Cod afxstat_ h EI CAchive class _AFX THREAD STATE public CE C rchiveE xception CBitmap public CBrush _AFK THREAD STATE vr CButton aid a BJ gt _AFx_THREAD_STATE lt CNoTrackObject R426 s Table 14 1 Class Browser window items Item Icon Explanation Go Back button Click to return to the preceding browser view Go Forward button Click to move to the succeeding browser view Browser Contents button Click to open the Browser Contents window Class Hierarchy button Click to open the Multi class Hierarchy window Single Class Hierarchy Window button IDE 156 AS Click to open the Single class Hierarchy window for the selected class IDE 5 1 User s Guide Using Class Browser Windows Class Browser window Table 14 1 Class Browser window items continued Item Browser Access Filters list box Icon amp View as implementor Explanation Select filters for displaying items in class browser panes Show Inherited J Show Inherited Select to show inherited items in the Member Functions pane and Data Members pane Clear to hide inherited items from these panes Classes pane Lis
135. Details 399 Dump internal browse information after compile 393 Edit Language 397 Editor 401 Environment Settings 395 Export Panel button 387 Extension 397 Factory Settings button 386 Faster Execution Speed 399 File Mappings list 397 File Type 397 Flags 397 Generate Browser Data From 393 Host Application for Libraries amp Code Resources 395 Host Flags 391 IDE window 385 Ignored By Make flag 397 Import Panel button 387 Initial directory 394 Interpret DOS and Unix Paths 391 Launchable flag 397 Linker 388 Location of Relocated Libraries and Code Resources 407 Log System Messages 408 Name 362 OK button 387 Optimization Level slider 399 Output Directory 389 Post linker 388 Precompiled File flag 397 Pre linker 388 Program Arguments 395 Program entry point 407 Remove 362 391 396 398 Require Framework Style Includes 391 Resource File flag 397 Revert Panel button 387 Save button 387 Save project entries using relative paths 389 Smaller Code Size 399 Source Tree list 362 IDE 5 1 User s Guide Stop at Watchpoints 408 Stop on application launch 407 System Paths 391 System Paths list 391 Target 387 Target Name 388 Target Settings Panels list 386 Type 362 Update data every n seconds 408 Use External Debugger 394 Use modification date caching 393 User Paths 391 User Paths list 391 User specified 407 Value 396 Variable 396 Working Directory 395 settings panel 386 sett
136. E 16 IDE 5 1 User s Guide 1 IDE User s Guide Overview M This chapter of the CodeWarrior IDE User s Guide is a high level description of documentation and training resources for learning to use the IDE e CodeWarriorU com free Internet based instruction for CodeWarrior products Use this resource to learn more about the CodeWarrior Integrated Development Environment IDE and computer programming e Documentation structure a guide to the various CodeWarrior manuals available This guide notes the location of generic and specific product documentation e Common conventions some common typographical conventions used in this manual and other Metrowerks documentation This chapter contains these sections e Release Notes on page 17 e CodeWarriorU com on page 17 e Documentation Structure on page 18 e Manual Conventions on page 19 Release Notes Please read the release notes They contain important last minute additions to the documentation The Release Notes folder on the CodeWarrior CD contains the information 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 feature IDE 5 1 User s Guide IDE 17 IDE User s Guide Overview Documentation Structur
137. E 476 VCS Menu The VCS Version Control System menu appears in the IDE s menu bar when the Use Version Control option is enabled The CodeWarrior IDE can operate with many difference version control systems including CVS Visual SourceSafe and others This icon represents the VCS menu in the Macintosh hosted IDE menu bar Refer to the documentation that came with the version control system to learn about using it with the CodeWarrior IDE Tools Menu The Tools menu appears in the IDE s menu bar after you enable the Use ToolServer menu checkbox in the IDE Extras preference panel The Tools menu contains IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout commands for controlling Apple ToolServer and Macintosh Programmer s Workbench MPW Macintosh This icon represents the Tools menu in the Macintosh hosted IDE menu bar Refer to Targeting Mac OS to learn about using ToolServer and MPW with projects Scripts Menu The Scripts menu appears in the IDE s menu bar after you enable the Use Scripts menu checkbox in the IDE Extras preference panel and creates a Scripts folder in the Metrowerks CodeWarrior folder of your CodeWarrior installation The Scripts menu uses the directory structure of the Scripts folder to create a hierarchical menu This hierarchical menu lists all of the scripts in the Scripts folder Open a script editing utility or a text editor to learn more about the scripts that migh
138. FileName symFileName is the full filename to the symbolics file of the front project can be the same as targetFile such as CodeView Using a Pre defined Variable To use a pre defined variable follow these steps 1 Create anew menu command The IDE creates a new menu command named New Command and places it within your selected command group The information for the new menu command appears in the Customize IDE Commands window 2 Enter a name for the new menu command You can change the default name of New Command Enter a new name in the Name field of the Customize IDE Commands window IDE 5 1 User s Guide IDE 335 Customizing the IDE Customizing IDE Commands 3 Use the Appears in Menus checkbox to toggle the appearance of the new command within its command group 4 Define the Action for the new menu command a Enter in the Execute field a command line to run an application b Next to the Arguments field click on the arrow icon and select an argument listed in the pop up menu Le c Next to the Directory field click on the arrow icon and select a directory listed in the pop up menu 5 Click Save The IDE saves your new menu command with the pre defined variables If you enabled the Appears in Menus checkbox the new menu command appears within the selected command group Defining Command Actions Mac OS After you create a new menu command the Customize IDE Commands window shows the Run App
139. Guide IDE 253 Using Eventpoints About Eventpoints Pause Point A Pause Point suspends program execution just long enough to refresh debugger data In a typical debugging session the debugger cannot refresh the data unless it stops program execution A Pause Point however lets you set an eventpoint to see if memory changes for example without stopping the debugging session Script Point You can configure the program to run a script application or other item when it reaches the eventpoint in a line of code The eventpoint triggers when execution reaches that line in the code For example the Mac OS can launch AppleScripts or applications Windows can execute a file as if you had used a Windows command line Skip Point You can set a Skip Point so that the IDE does not execute a source line on which you set the eventpoint This eventpoint is especially useful when you are aware of a line that you need to fix but would like to go ahead and debug the rest of the program You can set a Skip Point and the debugger will debug the rest of the application but skip that particular line NOTE Skip Points do not currently work in Java Sound Point A Sound Point is an audible alert You can set a Sound Point so that when you step or run through code the IDE plays a sound when it finds an eventpoint Unlike a Log Point set to Speak Message which speaks the message you specify the Sound Point plays a simple notification sound IDE 254
140. IDE 5 1 User s Guide Menu Commands 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 e the active Editor window is empty e no project file is open Check Syntax does not generate object code Table 35 1 explains how to abort the syntax checking process Table 35 1 Aborting the syntax checking process On this host Do this Windows Press Esc Macintosh Press Command Command Period Solaris Press Esc Linux Press Esc Class Browser The Class Browser command opens a Class Browser window This command is unavailable if the Enable Browser option is not enabled Class Hierarchy Class Hierarchy Window These commands open a Multi 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 IDE 5 1 User s Guide IDE 485 Menu Commands IDE 486 Clear All Breakpoints The Clear All Breakpoints command clears all breakpoints in all source files belonging to the target program Clear All Watchpoints The Clear All Watchpoints command clears all watchpoints in the current program
141. IDE 5 1 User s Guide Using Eventpoints About Eventpoints Figure 22 3 Sound point settings Sound Point Settings xi Sound to Play I Stop in Debugger Cancel You can configure the sound you would like to hear when the program finds an eventpoint To configure speech use a Log Point Figure 22 4 Sound point settings drop down menu Sound Point Settings xj Sound to Play chimes chimes chord dine ir_begin ir_end ir_inter notify Setting Eventpoints You can use the editor and debugger windows to set eventpoints 1 Open either an editor or debugger window that contains source code 2 Inthe source code find the line on which you want to set the eventpoint IDE 5 1 User s Guide IDE 255 Using Eventpoints Using Eventpoints in the Breakpoints Window 3 Double click the line or symbol on which you want to set the eventpoint 4 Choose Debug gt Set Eventpoint Alternately right click the symbol and select Set Eventpoint Choose one of the eventpoints Log Pause Script Skip or Sound in the drop down menu You can choose more than one eventpoint for the same line or symbol 5 Debug the program During subsequent debugging runs the eventpoints trigger their associated tasks as defined by their IDE plug ins Clearing Eventpoints You can clear eventpoints from most IDE windows 1 Open any window that displays source code and has an eventpoint 2 Click on the e
142. Makefile location field or click Browse to navigate to the makefile Choose the tool set used for makefile conversion and linker selection Tool Set Used In Makefile Choose the tool set whose build rules form the basis of the makefile Metrowerks Tool Set Choose the linker tool set to use with the generated project Select the desired diagnostic settings Log Targets Bypassed Select to log information about makefile build targets that the IDE fails to convert to project build targets Log Build Rules Discarded Select to log information about makefile rules that the IDE discards during conversion Log All Statements Bypassed Select to log targets bypassed build rules discarded and other makefile items that the IDE fails to convert Click Finish then Generate The Makefile Importer wizard performs the conversion process and displays additional information IDE 34 IDE 5 1 User s Guide Working with Projects Managing Projects Creating Empty Projects Unlike project stationery empty projects do not contain a pre configured collection of template source files library files or build targets Empty projects allow advanced software engineers to custom build new projects from scratch NOTE Avoid creating empty projects Instead modify a project created with project stationery Project stationery pre configures complicated settings to quickly get started 1 Choose File gt New 2 Click the Project tab and
143. NOTE This chapter covers options for the core IDE preference or target setting panels described in this manual See the Targeting documentation for additional panel information Activate Browser Coloring Select this option to activate coloring of browser symbols in editor windows Clear the option to apply the default text color to all symbols Click the color swatch next to a symbol to modify its color Activate Syntax Coloring Select this option to activate coloring of Comments Keywords Strings and Custom Keyword Sets symbols in editor windows Clear the option to apply the default text color to all the symbols Click the color swatch next to a symbol to modify its color Add Default Click this button to restore the default user path or system path to the Access Paths panel IDE 5 1 User s Guide IDE 411 Preference and Target Settings Options IDE 412 Always Search User Paths This option controls the search criteria the IDE uses to find system and user files When e selected the IDE treats searching for system files such as include lt gt the same as user files include e disabled the IDE treats system paths differently from user paths Application Enter in this field 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 Enter in this field c
144. None d m Language Keyword Ps Package cz Local Variable Variable Navigating the Code Completion Window Navigate the Code Completion window by mouse or keyboard You can perform these tasks e Resize the window IDE 5 1 User s Guide IDE 111 Editing Source Code Code Completion e Navigate the window by keyboard e Refine the Code Completion list by keyboard 1 Bring forward an editor window 2 Place the insertion point at the end of the source code to complete 3 Choose Edit gt Complete Code The Code Completion window appears 4 Use the mouse to resize the Code Completion window The new window size remains in effect until you refine the Code Completion list or close the Code Completion window You refine the Code Completion list by typing additional characters in the active editor window 5 Use the keyboard to navigate the Code Completion list Table 10 5 explains how to navigate the Code Completion list by keyboard Table 10 5 Navigating the Code Completion list by keyboard Key Action Up Arrow Select the previous item Down Arrow Select the next item Page Up Scroll to the previous page Page Down Scroll to the next page 6 Use the keyboard to refine the Code Completion list The Code Completion list updates as you add or delete characters in the active editor window Continue adding characters to narrow the list or delete existing characters to broaden the l
145. Open the file to rename 2 Choose File gt 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 Rename one or more groups 1 Click the Files tab in the Project window 2 Select the group s to rename 3 Press the Enter key 4 Type anew name into the Enter Group Name text box of the Rename Group window IDE 5 1 User s Guide IDE 53 Project Window File Group Layout and Target Management 5 Click OK The IDE renames the group For selections of more than one group the Rename Group window appears for each group Rename build targets 1 Click the Targets tab in the Project window 2 Choose Edit gt targetname Settings 3 Select Target Settings in the Target Settings Panels list 4 Type anew name in the Target Name text box 5 Click Save The Project window displays the new build target name Touching Files and Groups The Touch command manually selects source files or groups for compilation during the next Bring Up To Date Make Run or Debug operation A red check mark in the Touch column of the Project window indicates a touched file 1 Click the Files tab in the Project window 2 Touch a source file or group for compilation e Click the Touch column next to the file or group name OR e Choose Touch from t
146. Open windows on debugging monitor during debugging Select the Open windows on debugging monitor during debugging option to display on the debugging monitor any window that opens during the debugging session The IDE does not save the positions of windows closed on the debugging monitor during the debugging session This behavior prevents window positions from gravitating to the debugging monitor 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 Use the Choose control to specify the location path Play sound after Bring Up To Date amp Make Select the Play sound after Bring Up To Date amp Make option to play a sound after a build operation completes Choose different sounds for successful and unsuccessful builds using the Success and Failure pop up options respectively See also e Failure on page 425 e Success on page 440 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 IDE 5 1 User s Guide IDE 433 Preference and Target Settings Options For more information see the appropriate Targeting manual 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
147. Out of a Routine Use the Step Out command to execute the rest of the current routine and stop program execution after the routine returns to its caller This command causes execution to return up the calling chain 1 Step out of a routine Choose Debug gt Step Out or e Click Step Out gy on the debugger toolbar 2 The current routine executes and returns to its caller then program execution stops IDE 196 IDE 5 1 User s Guide Basic Debugging Common Debugging Actions Stepping Over a Routine Use the Step Over command to navigate linearly through the source code executing each statement along the way Use this command to observe a program as it executes each line of code The command executes a routine call without displaying its lines in the Thread window 1 Step over a routine call e Choose Debug gt Step Over or e Click Step Over a on the debugger toolbar 2 Program execution continues through the routine call NOTE After program execution steps over code and reaches the end of a routine the current statement arrow points to the next statement that executes Stopping Program Execution Use the Break or Stop commands to suspend program execution during a debugging session 1 Stop program execution e Windows Choose Debug gt Break or e Macintosh Solaris and Linux Choose Debug gt Stop or Click Stop W on the debugger toolbar 2 The operating system surrenders control to the
148. Resources Explanation Click Choose to select the application program for debugging non executable files Alternatively enter in the field the path to the application program Click Clear to delete the current field entry Working Directory Enter the path to a directory used for debugging the non executable files Leave this field blank to use the same directory that contains the non executable files Program Arguments Enter a command line of program arguments to pass to the host application when the IDE transfers control Environment Settings Lists the environment variables that have been added to the build target Add IDE 5 1 User s Guide Click to add the current Variable and Value pair to the Environment Settings list IDE 395 Working with Target Settings Target Panels Table 32 6 Runtime Settings panel items continued Item Explanation Change Click to replace the selected entry in the Environment Settings list with the current Variable and Value pair Remove Click to delete the selected environment variable from the Environment Settings list Variabl Enter a name for the environment variable This name pairs with the information in the Value field Value Enter a value for the environment variable This value pairs with the information in the Variable field File Mappings The File Mappings settings panel associates file name extensions with
149. Script field This field appears in the Action section of the window 1 Click the Choose button next to the field to display a standard Open dialog box 2 Use the dialog box to select an application or script The IDE launches this application or script each time you choose the menu command The path to the selected application or script appears in the Run App Script field Deleting Command Groups and Menu Commands You can delete the command groups and menu commands that you create for the IDE Once removed the command groups no longer appear in the IDE s menu bar and the menu commands no longer activate their associated command lines Windows or applications or scripts Mac OS IDE 336 IDE 5 1 User s Guide Customizing the IDE Customizing IDE Commands 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 Figure 30 6 Delete Command group Customize IDE Commands Commands Toolbar Items Step Naive Name Test Group 4 Step Next IV Appears in Menus tk Step Forward Action H Step Into 1 Step Out Multi Core Debug Browser Miscellaneous pE Ten Jiran Editor Commands Help F Auto Repeat Catalog Layout New Group Prefix Key Timeout 120 I Numeric Keypad Bindings ius ation ki 5 Window Export Import New Group
150. Shortcut for selecting the next item that appears in the Code Completion window Complete Code Opens the Code Completion window Insert Reference Template Inserts a routine template corresponding to the selected Mac OS Toolbox call in the active window When using the Macintosh menu layout on a Windows host this command does not appear Preferences Opens the IDE Preferences window where you can set general IDE editor debugger and layout options Target Settings the name changes based on the name of the active build target Opens the project s Target Settings window where you can set target language code generation linker editor and debugger options Version Control Settings Opens the VCS Settings window to enable the activation of a version control system and its relevant settings Commands amp Key Bindings Opens the Customize IDE Commands window where you can create modify remove menus menu commands and key bindings Search Menu The Search menu contains commands for finding text replacing text comparing files navigating code and finding routine definitions IDE 5 1 User s Guide IDE 467 IDE Menus Macintosh Menu Layout Table 34 13 Search menu commands Menu command Find and Replace Explanation Opens the Find and Replace window for performing find and replace operations on the active editor window Find in Files Opens the
151. Variable 396 Working Directory 395 447 Program Arguments field Windows 434 S Save a Copy As command 65 Save All command 64 Save command 64 Save Default Window menu command 510 Save open files before build option Build Settings panel 436 Save project entries using relative paths option Target Settings panel 436 Save Workspace As menu command 510 Save Workspace menu command 510 saving IDE 553 a copy of a workspace 83 all files 64 file copies 65 files 64 information about installed plug ins 481 information about installed products 481 projects 36 workspaces 82 Script Point 251 254 Script Point icon 252 Scripts folder 477 502 Scripts menu 477 Scripts option Font amp Tabs panel 437 search matching line beginnings and endings with regular expressions 143 single characters with regular expressions 141 using finds strings in replace strings with regular expressions 144 search engine overview 25 Search menu 122 455 467 Search Results window 136 Search selection only 126 128 Search Status column in Access Paths panel 391 searching choosing one character from many in regular expressions 142 grouping regular expressions 142 multiple files 134 multiple folders 131 multiple projects 132 multiple symbolics files 133 single characters with regular expressions 141 single files 127 using finds strings in replace strings with regular expressions 143 using regular expressions 140 Segments tab 51 Select All menu command 5
152. Vv b M E H Path C Documents and Settings sald Framel java lt gt setLayout null setTitle javatest Framel Q to Line 35 Cog 4 4 BetSize new java awt Dimension 350 450 event handling addWindowListener new java awt event WindowAd public void windowClosing java awt event IDE 136 IDE 5 1 User s Guide Finding and Replacing Text Text Selection Find Table 12 6 Search Results window items Item Messages caption Icon tepe Explanation Shows the total number of search results Search Information caption Shows the search criteria Warnings button Al Click to display complier and linker warnings in the Results pane Stop button Click to stop the search in progress Previous Message button Click to select the previous search result Next Message button Click to select the next search result Results pane Lists individual search results Source Code disclosure triangle Click to show or hide the Source Code pane Pane resize bar Drag to resize the Results and Source Code panes Source Code pane Shows the source code corresponding to the selected item in the Results pane Text Selection Find Search for text without having to use the Find Find and Replace or Find in Files windows The IDE assumes that the most recent criteria defined in these windows also applies to the current se
153. Windows Select to use an external debugger instead of the CodeWarrior debugger Application Windows Click Browse to select the external debugger application Alternatively enter in the field the path to the external debugger Arguments Windows Enter in this field any program arguments to pass to the external debugger when the IDE transfers control Initial directory Windows Click Browse to select an initial directory for the external debugger Alternatively enter in the field the path to the initial directory Runtime Settings The Runtime Settings panel specifies a debugging application for non executable files Dynamic linked libraries DLLs shared libraries and code resources are sample non executable files For example use this panel to specify a debugging application for Adobe Photoshop plug ins IDE 394 IDE 5 1 User s Guide Working with Target Settings Target Panels Figure 32 6 Runtime Settings panel Runtime Settings Host Application for Libraries amp Code Resources Choose D Program Files Metrowerks CodeW arion Helper 4pps runjava e g Helper Apps runj Clear M General Settings Working Directory Program Arguments m Environment Settings P4SSWORD beta USER tester Hanae RenGve Variable USER Value tester Table 32 6 Runtime Settings panel items Item Host Application for Libraries amp Code
154. a e restricted to the client area e resizable e has a dock bar instead of a title bar Floating e Rests above all docked windows and MDI child windows e movable outside the client area like a floating palette e has a thin title bar e does not have Minimize or Maximize buttons MDI Child e Normal child window of the client area when running in MDI mode e restricted to the client area Figure 6 1 Window states 0 x Metrowerks CodeWarrior File Edit Yiew Search Project Debug Window Help Bee Boe x ROAR ERE EE zix memory mcp memory JBB y A Files Link Order Targets o Chkbook static release m y B X gt A Fies Link Order Targets v File Code Data lg 7 C MSL ANSI Libraries 139K 36K 2 cme get geek a C Win32 Libraries 0 22 xm C Win32 Libraries K Ke m 27 files 340K pfontview mcp i x fontview m y B y gt Files Link Order Targets g Fie Code Data Source 30K 25K at A MSL ANSI Libraries 139K 36K z E Win32 Libraries 0 242 xl E 41K Docked window MDI child window Floating window IDE 70 IDE 5 1 User s Guide Dockable Windows Working with Dockable Windows Table 6 2 explains the difference between dockable windows and non dockable windows In this table the ter
155. 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 Figure 32 7 File Mappings settings panel File Type Extension P g Compiler APPL None 4 Appl None MDBYL Lib Import Mach O MLIB Lib Import Mach O MMLB Lib Import Mach 0 MPLF Lib Import Mach 0 MwWCD None RSRC Rez TEXT c Metrowerks C C 7 TEXT C Metrowerks C C v Mapping Info File Type APPL Choose Extension Flags 7 Compiler None B Edit Language None Ea Add Change o ame IDE 396 IDE 5 1 User s Guide Working with Target Settings Target Panels Table 32 7 File Mappings settings panel items Item File Mappings list Icon Explanation Displays a list of currently defined mappings between file name extensions and plug in compilers File Type Enter in this field 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 in this field the file name extension such as cpp for the file mapping This file name extension also appears in the corresponding column of the File Mappings list Resource File flag A bullet in this column denotes a resource file The IDE includes
156. a Member window enter the Name Type Namespaces required for type optional Initializer and Modifiers a Name Type a name for the data member in this field b Type Enter an appropriate data member type in this field c Namespaces required for type optional Optional Enter a list of namespaces required for the type in the Type field A sample namespace is std d Initializer Optional Enter an initial value for the data member in this field Sample initializers are 100 and inConstructorParameterName e Modifiers Select the access level and type for the new data member 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 not available in this wizard 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 shows you if 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 lt string gt and YourHeader h 6 Click Finish IDE 5 1 User s Gu
157. a RAD project The IDE uses RAD plug ins to display the layout in the Layout Editor Use the Layout Editor in conjunction with the Component Palette to perform these tasks e add components like controls lists and menus to an interface e position interface components e resize interface components e view components in an interface e remove components from an interface Figure 26 1 shows the Layout Editor Table 26 1 on page 287 explains the items in the Layout Editor Figure 26 1 Layout Editor javatest Framel Burt i u SRS Ren a Frame textdreal java awt TextArea E buttont java awt Button E button2 java awt Button iavatest Frame1 Location 0 0 Size 265 416 IDE 286 IDE 5 1 User s Guide Layout Editing Layout Editor Table 26 1 Layout Editor items Item Group button Icon a Description Select two or more components in the layout then click this button to combine those selected components so that they move together as a group Clicking this button is equivalent to selecting Layout gt Group Ungroup button Select a group in the layout then click this button to separate the Tg components so that they move independently of one another Clicking this button is equivalent to selecting Layout gt Ungroup Left Edges button Select two or more components in the layout then click this button to align the selected components along their left edges Click
158. achine 1 7 Machine Selector IDE 338 Name Z Appears in Menus Action New Binding P Auto Repeat Prefix Key Timeout fi 20 I Numeric Keypad Bindings Esport Import Factory Settings Revert Save IDE 5 1 User s Guide Customizing the IDE Customize Toolbars This section explains these topics e Kinds of Toolbars on page 339 e Toolbar Elements on page 340 e Modify a Toolbar on page 340 Kinds of Toolbars The CodeWarrior IDE uses two toolbar types e Main toolbar This toolbar also known as the floating toolbar is always available e 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 Figure 30 8 Main toolbar File Edit Search Project Window Help Figure 30 9 Project window toolbar 0 xi C Console App Debug i0 y A b e IDE 5 1 User s Guide IDE 339 Customizing the IDE Customize To
159. al components Customize Opens an editor for the selected component if one is available Properties Opens or brings to the front the Object Inspector window to enable editing of the selected component s properties New Wire Opens the Create Wire wizard Use this wizard to create a new wire in the layout Edit Wire Opens the Create Wire wizard for the selected wire Use this wizard to modify the wire details Show All Wires Toggles visibility of all wires in the layout Show Incoming Wires Select a component in the layout then select this command to view all wires that define the selected component as their destination component Show Outgoing Wires Select a component in the layout then select this command to view all wires that define the selected component as their source component Resize Menu The Resize menu contains commands for resizing components in a layout editor to set sizes The Resize menu is only visible when editing components within a RAD project s layout window IDE 5 1 User s Guide IDE 479 IDE Menus Rapid Application Development RAD Menus Table 34 21 Resize menu commands Menu command Description To Smallest Width Resizes the selected components to match the width of the component with the smallest width To Largest Width Resizes the selected components to match the width of the component with the largest width To Smallest Height Resizes the selected components to match the height o
160. also provides different methods for saving edited files IDE 464 IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout Table 34 11 File menu commands Menu command New Text File Explanation Creates a new text file and displays it in a new editor window New Creates new projects using the New Project wizard or from project stationery files Open Opens source and project files for editing and project modification operations Open Recent Displays a submenu of recently opened files and projects that can be chosen to open in the IDE Find and Open File Opens the file specified in the Find and Open File dialog or from the selected text in the active window Close Closes the active window When using the Macintosh menu layout on a Macintosh host hold down the Option key to change this command to Close All U fS lt D Saves the active file using the editor window s filename When using the Macintosh menu layout on a Macintosh host hold down the Option key to change this command to Save All 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 Open Workspace Opens a workspace that you previously saved Close Workspace Closes the current workspace You canno
161. ame at the bottom Variables pane Displays the local and global variables used by the current routine Click the Variables Pane Listing icon W to switch between these display states e All show all local and global variables in the code e Auto show only the local variables of the routine to which the current statement arrow points e None show no variables Use this type to improve stepping performance for slow remote connections Source pane Displays the source files in the current build target including any comments and white space IDE 194 IDE 5 1 User s Guide Basic Debugging Common Debugging Actions Table 18 1 Thread window items continued Item Explanation Functions list box Displays a list of functions declared in the file Line and Column Displays the current line and column number of the text insertion cursor Indicator Source list box Select how to display the source code in the Sources pane The options consist of e Source source code appears in the programming language instructions used to create it e Assembler source code appears in the assembly language instructions used to implement each line e Mixed source code alternates with the assembly language instructions that implement each line of code Common Debugging Actions Using the debugger involves a common set of debugging tasks Use this set of tasks to correct source code errors control program execu
162. an XML file IDE 38 IDE 5 1 User s Guide Working with Projects Advanced Projects Importing Projects Saved as XML Files The IDE can import a project previously saved in Extensible Markup Language XML format Use this capability to recreate projects stored in text oriented environments such as a version control system 1 Choose File gt Import Project 2 Create a new folder in which to save the converted project and all of its generated files 3 Find the XML file that you want to import 4 Save the XML file in the newly created folder The IDE converts the XML file to a project 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 e Choose File gt Close e Click the close box in the Project window The IDE closes the project Advanced Projects Advanced projects deal with these topics e Custom project stationery modified project stationery tailored to advanced programming needs e Subprojects projects within projects e Strategies obtaining the maximum benefit from advanced projects IDE 5 1 User s Guide IDE 39 Working with Projects Advanced Projects Custom Project Stationery Use custom project stationery to develop streamlined templates to meet advanced programming needs Pre configure new project sta
163. anel 441 Tab Size option Font amp Tabs panel 441 Target column in Files view of Project window 48 target management 51 Target Name option Target Settings panel 441 Target section of Target Settings panels 387 target settings Add 362 391 395 397 Add Default 391 Always Search User Paths 391 Application 394 Apply button 387 Arguments 394 Auto target Libraries 407 Cache subprojects 393 Cache symbolics between runs 407 Cancel button 387 Change 362 391 396 398 Choose 362 389 Clear 389 IDE 558 Compiler 397 Connection pop up menu 408 Default language entry point 407 Details 399 Dump internal browse information after compile 393 Edit Language 397 Environment Settings 395 Export Panel button 387 Extension 397 Factory Settings button 386 Faster Execution Speed 399 File Mappings list 397 File Type 397 Flags 397 for IDE 385 Generate Browser Data From 393 Host Application for Libraries amp Code Resources 395 Host Flags 391 Ignored By Make flag 397 Import Panel button 387 Initial directory 394 Interpret DOS and Unix Paths 391 Launchable flag 397 Linker 388 Location of Relocated Libraries and Code Resources 407 Log System Messages 408 Name 362 OK button 387 Optimization Level slider 399 Output Directory 389 Post linker 388 Precompiled File flag 397 Pre linker 388 Program Arguments 395 Program entry point 407 Remove 362 391 396 398 Require Framework Style Includes 391 Resour
164. anel to build on the general connections defined in the Remote Connections preference panel of the IDE Preferences window Figure 32 12 Remote Debugging settings panel Remote Debugging Enable remote debugging Connection Remote Windows Connection Remote download path CAT emp Downloads J Launch remote host application CAR emote Hostapp exe Table 32 13 Remote Debugging settings panel items Enable remote debugging Select to define for the current build target a remote debugging Connection pop up menu the desired general connection IDE 408 connection in terms of a general connection Choose from the IDE 5 1 User s Guide Working with Target Settings Debugger Panels Table 32 13 Remote Debugging settings panel items continued Remote download path Enter the path to the directory in which to store downloaded files Launch remote host application Select to launch an application on the remote computer to serve as a host application Enter in the corresponding field the path to the remote application IDE 5 1 User s Guide IDE 409 Working with Target Settings Debugger Panels IDE 410 IDE 5 1 User s Guide 33 Preference and Target Settings Options Use this chapter to look up CodeWarrior IDE preference panel or target setting options and learn more about their capabilities Option names are arranged in alphabetical order
165. appears but the program executes without stopping in the debugger IDE 5 1 User s Guide Menu Commands Delete The Delete command removes the selected text without placing it on the system clipboard This menu command is equivalent to pressing the Backspace or Delete key Disable Breakpoint The Disable Breakpoint command de activates the breakpoint at the currently selected line Disable Watchpoint The Disable Watchpoint command de activates a watchpoint for the selected variable or memory range 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 Enable Breakpoint The Enable Breakpoint command activates a breakpoint at the currently selected line The breakpoint appears in the left side of the editor window if the Breakpoint column is visible The states of the breakpoint marker include e enabled breakpoint disabled breakpoint IDE 5 1 User s Guide IDE 491 Menu Commands IDE 492 e no breakpoint in line Enable Watchpoint The Enable Watchpoint command activates a watchpoint for the selected
166. arch Select text in the active editor window to define the search string Using the Find Previous Command When searching for text you can use the Find Previous command to have the IDE find a previous match Follow these steps to use the Find Previous command IDE 5 1 User s Guide IDE 137 Finding and Replacing Text Text Selection Find Select Edit gt Commands amp Key Bindings The Customize IDE Commands window opens Click the Commands tab in the Customize IDE Commands window The window shows a customizable list of IDE commands Expand the Search item in the Commands list the left hand pane Select the Find Previous item in the expanded list If necessary scroll in order to see the Find Previous item Information about the Find Previous item appears in the right hand pane Select the Appears in Menus checkbox in the right hand pane The Find Previous command will appear in the Search menu in the main IDE menu bar Click Save to confirm your changes Close the Customize IDE Commands window You can now select the Find Previous command in the Search menu You can also use the key binding associated with Find Previous Searching with a Text Selection IDE 138 Use the Find Selection command to search the active editor window for selected text Select the text to use as the search string 2 Choose Search gt Find Selection 3 If desired find preceding or succeeding matches e Choo
167. arch menu contains commands for finding text replacing text comparing files and navigating code IDE 5 1 User s Guide IDE 455 IDE Menus Windows Menu Layout Table 34 4 Search menu commands Menu command Explanation 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 When using the Windows menu layout on a Macintosh host hold down the Shift key to change this command to Find Previous Find In Next File Finds the next occurrence of the find string in the next file listed in the Find window s File Set When using the Windows menu layout on a Macintosh host hold down the Shift key to change this command to Find In Previous File Enter Find String Replaces the Find text box string with the selected text When using the Windows menu layout on a Macintosh host hold down the Shift key to change this command to Enter Replace String Find Selection Finds the next occurrence of the selected text in the active editor window When using the Windows menu layout on a Macintosh host hold down the Shift key to change this command to Find Previous Selection Replace Selection Replaces
168. arranges open editor windows horizontally so that none overlap Figure 35 2 Tile horizontally example Tile Vertically This command resizes open editor windows vertically and arrange them so that none overlap IDE 514 IDE 5 1 User s Guide Menu Commands Figure 35 3 Tile vertically example 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 Choose Toolbars reveals the Toolbars submenu See also e Show Window Toolbar on page 512 e Hide Window Toolbar on page 498 e Reset Window Toolbar on page 508 e Clear Window Toolbar on page 487 e Show Main Toolbar on page 512 e Hide Main Toolbar on page 498 e Reset Main Toolbar on page 507 e Clear Main Toolbar on page 486 IDE 5 1 User s Guide IDE 515 Menu Commands IDE 516 e Hide Floating Toolbar on page 498 e Show Floating Toolbar on page 511 e Reset Floating Toolbar on page 507 e Clear Floating Toolbar on page 486 ToolServer W
169. at contain special code designed to work together with a particular programming language or operating environment e Generated files files created by the IDE while building or debugging the project This chapter contains these sections e About Projects on page 29 e Managing Projects on page 32 e Advanced Projects on page 39 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 on page 30 diagrams Project Manager interactions with IDE tools Table 3 1 on page 30 explains the interactions IDE 5 1 User s Guide IDE 29 Working with Projects About Projects Figure 3 1 Project Manager Main IDE tool Support tool Information generated by the IDE The build system generates symbolics information for a program The debugger generates a database from the information Debugger Source Symbolics Browser Information Legend Development flow IDE internal data flow Additional information Table 3 1 Project Manager interactions IDE Tool Editor Project Manager Interactions Coordinating internal data flow among editor windows the search engine and th
170. atchpoint 249 clear Watchpoint from Variable window 249 clear Watchpoint in Thread window 261 clear watchpoint in Thread window 246 Clear Watchpoint menu command 486 Clear Window Toolbar command in Toolbar submenu 487 clearing all breakpoints 235 breakpoints in Breakpoints window 235 breakpoints in source panes 234 eventpoints 256 clearing eventpoint Symbolics window 263 Thread window 261 clearing watchpoint Thread window 246 client area defined 69 Clone Existing Target option 56 Close All command 65 Close All Editor Documents menu command 487 IDE 5 1 User s Guide Close All menu command 487 Close Catalog button in component palette 291 Close Catalog menu command 487 Close command 39 65 Close menu command 487 Close Non debugging Windows option 416 Close Workspace menu command 487 closing all files 65 dockable windows 79 files 65 projects 39 workspaces 84 Cmds amp Bindings file 347 Code 400 code adding markers to 120 locating 115 setting breakpoints in 234 Code column in Files view of Project window 48 code completion 107 configuration 107 Code Completion Delay option 416 Code Completion preference panel 366 options Automatic Invocation 366 Case sensitive 366 Code Completion Delay 366 Display deprecated items 366 Window follows insertion point 366 Code Completion window 110 code completion activating automatic behavior 107 code completion deactivating automatic behavior 109 code completion for data members 113 c
171. ation formats 18 structure 18 types 19 Documents option IDE Extras panel 420 Don t Step Into Runtime Support Code 420 Don t Step Into Runtime Support Code option 420 Done button in Remove Markers window 120 Down in Find and Replace window 128 in Find window 127 drag and drop using to dock a window 72 Drag And Drop Editing option 420 drawing wires 311 Dump Internal Browse Information After Compile option 420 dump memory 519 E Edit button 372 Edit Commands option 420 Edit Language option 421 Edit menu 420 453 466 Edit Wire button in layout editor 287 Edit Wire command 290 479 editing source code 101 symbols shortcuts for 105 editing layouts 285 editor 91 overview 25 third party support 444 Editor section of IDE preference panels 365 Editor section of Target Settings panels 401 Editor Settings panel options Balance Flash Delay 414 Browser Commands 428 Font Preferences 426 Insert Template Commands 428 Left margin click selects line 430 Project Commands 434 Relaxed C popup parsing 435 Selection position 437 Sort function popup 440 Use multiple undo 444 VCS Commands 446 Window position and size 446 Editor Settings preference panel 366 options Balance Flash Delay 368 Balance while typing 368 Browser Commands 367 Debugger Commands 368 Default file format 368 Drag and drop editing 368 Edit Commands 367 Enable Virtual Space 368 Font preferences 367 Insert Template Commands 368 Left margin click selects line
172. ave the debugger show only variables near the program counter Show values as decimal Select to always show decimal values instead of instead of hex hexadecimal values IDE 5 1 User s Guide Working with IDE Preferences Debugger Panels Table 31 14 Display Settings preference panel items continued Item Explanation Sort functions by method name_ Select to sort functions of the form className methodName in in symbolics window the Symbolics window by methodName Clear to sort by className Attempt to use dynamic type of Select to attempt to display the runtime type of the specified C Object Pascal and SOM language objects Clear to display the static type objects Show tasks in separate Select to display tasks in separate Thread windows Clear to shows windows all tasks in one window with a list pop up to choose a task to display Restart active debugging sessions in order for changes to take effect Show variable values in source Select to show variable values in contextual menus in the code source code Default size for unbounded Enter the default number of unbounded array elements to display in arrays a View Array window Windowing The Windowing preference panel provides options for customizing how the debugger displays windows during debugging sessions including non debugging and project windows Figure 31 16 Windowing preference panel Windowing W
173. bar command conceals the toolbar in the active window After concealing the window toolbar the command changes to Show Window Toolbar Horizontal Center The Horizontal Center command of the Align submenu aligns the horizontal centers of the selected components IDE 5 1 User s Guide Menu Commands 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 extensible markup language XML file with the Export Project command into the IDE Insert Reference Template This command inserts a routine template corresponding to the selected Mac OS Toolbox call in the active window The IDE uses the online reference database application specified in the Find Reference Using list pop up to search for the routine s definition Kill The Kill command permanently terminates execution of the target program and returns control to the debugger Left Edges The Left Edges command of the Align submenu aligns the left edges of the selected components IDE 5 1 User s Guide IDE 499 Menu Commands IDE 500 Make The Make command builds the selected project by compiling and linking its modified and touched files The results of a successful build depend on the selected project type Maximize Window Windows equivalent of Expand Window See also e Expand Window o
174. ble 19 7 on page 218 Table 19 7 Changing the data format by using a contextual menu On this host Do this Windows Right click the register value and select View as format Macintosh Control click the register value and select View as format Solaris Click and hold on the register value and select View as format Linux Click and hold on the register value and select View as format Opening Registers in a Separate Registers Window Open registers in a separate Register Window to narrow the scope of registers that appear in a single window 1 2 3 4 Open the Registers window Expand the hierarchical list to view the register or register group that you want to view in a separate Registers window Double click the register or register group A new Registers window opens The new Registers window lists the name and value of the register that you double clicked or the names and values of the register group that you double clicked Log Window The Log window displays messages during program execution Select the Log System Messages option in the Debugger Settings panel to activate the Log window IDE 218 The IDE allows saving Log window contents to a txt text file and copying text from the Log window to the system clipboard IDE 5 1 User s Guide Advanced Debugging Log Window Windows hosted Log window messages include e Dynamic Link Library DLL loading and unloading e debug
175. c source lines e Conditional breakpoints halt program execution after meeting specified conditions e Temporary breakpoints halt program execution and then remove the breakpoint that caused the halt Breakpoints Window The Breakpoints window shows all breakpoints defined in the active project For each breakpoint the window shows this information The source file that contains the breakpoint The line that contains the breakpoint The current status of the breakpoint The breakpoint class IDE 5 1 User s Guide IDE 231 Using Breakpoints Breakpoints Window e Optional The condition associated with the breakpoint Use the Breakpoints window to perform these tasks e Manipulate breakpoint conditions e Change breakpoint status e View the source line that contains each breakpoint e View the class of each breakpoint Figure 20 1 shows the Breakpoints window Table 20 1 explains the items in the window Figure 20 1 Breakpoints window Breakpoints Iof x g Location Condition DrawSample line 493 topPart gt 6 Drawa scil line 75 Table 20 1 Breakpoints window items Item Explanation Status Click the displayed marker to toggle breakpoint status e indicates an active breakpoint e indicates an inactive breakpoint Location A list of all breakpoints currently set in the project files Class Indicates the breakpoint class e regular e conditional e temporary Condit
176. cation To specify the external editor to use 1 Find and open the CodeWarrior folder 2 Create a folder named Helper Apps inside the CodeWarrior folder if it does not already exist 3 Make an alias of the desired edito r application 4 Place the alias file inside the Helper Apps folder 5 Rename the alias file External IDE 5 1 User s Guide Editor IDE 357 Working with IDE Preferences General Panels 6 Restart the IDE in order for changes to take effect The IDE now uses the aliased external editor Help Preferences The Help Preferences panel available on the Solaris and Linux IDE hosts specifies the browser used for viewing IDE online help Figure 31 7 Help Preferences panel Table 31 5 Help Preferences panel items Browser Path Enter a path to the browser to use for viewing IDE online help Alternatively use the Set button Set Click to select the path to the browser to use for viewing IDE online help Plugin Settings The Plugin Settings preference panel contains options for troubleshooting third party IDE plug ins IDE 358 IDE 5 1 User s Guide Working with IDE Preferences General Panels Figure 31 8 Plugin Settings preference panel Plugin Settings _ Plugin Diagnostics Level None M Keep the level set to None unless you are developing plugins for the CodeWarrior IDE Other Settings _ IV Disable third party COM plugins
177. ce File flag 397 Revert Panel button 387 Save button 387 Save project entries using relative paths 389 Smaller Code Size 399 Source Tree list 362 Source Trees 361 Stop at Watchpoints 408 Stop on application launch 407 IDE 5 1 User s Guide System Paths 391 System Paths list 391 Target Name 388 Target Settings Panels list 386 Type 362 Update data every n seconds 408 Use External Debugger 394 Use modification date caching 393 User Paths 391 User Paths list 391 User specified 407 Value 396 Variable 396 Working Directory 395 Target Settings command 513 Target Settings panel 58 388 options Choose 389 Clear 389 Linker 388 431 Output Directory 389 433 Post linker 388 433 Pre linker 388 434 Save project entries using relative paths 389 436 Target Name 388 441 target settings panel 386 target settings panels Access Paths 389 Build Extras 392 494 Custom Keywords 401 Debugger Settings 218 406 File Mappings 396 Global Optimizations 398 Other Executables 403 Remote Debugging 408 Runtime Settings 394 Target Settings 388 Target Settings Panels list 386 Target Settings toolbar button 46 Target Settings window 385 386 Apply button 387 Cancel button 387 Export Panel button 387 Factory Settings button 386 Import Panel button 387 OK button 387 opening 387 Revert Panel button 387 IDE 5 1 User s Guide Save button 387 Target Settings Panels list 386 targets 31 configuring 58 creating 56 files 51 manag
178. ce trees 364 re order wires by using the object inspector 318 replace text across multiple items 135 replace text in a single file 129 resize a component in a layout 293 resize panes in an editor window 99 run a program 198 save a copy of a workspace 83 save a workspace 82 save projects 36 search a single file 127 search across multiple files 134 search across multiple folders 131 search across multiple projects 132 search across multiple symbolics files 133 search with a text selection 138 IDE 5 1 User s Guide I icon search with a text selection across multiple window 139 select entire routines 103 select item in Code Completion window 112 select lines 102 select multiple lines 102 select rectangular portions of lines 102 select text in editor windows 102 set breakpoints in source panes 234 set conditional breakpoints 236 set temporary breakpoints 236 show the classes pane 162 sort the classes list 163 sort the Wires tab by using a contextual menu 320 suppress dockable windows 76 toggle automatic punctuation balancing 106 toggle the symbol hint 203 trigger code completion by keyboard 108 trigger code completion from IDE menu bar 108 undock a window 74 unfloat a window 75 unindent text blocks 104 use an external editor on the Macintosh 357 use contextual menus 204 use the browser contextual menu 152 use the default workspace 82 use the document settings pop up 96 use the Executabl
179. ceptions thrown by your classes rather than on the exceptions that Java programs throw in the normal course of execution Exit The Exit command exits the CodeWarrior IDE immediately provided that e 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 extensible markup language XML format The IDE prompts for a name and location to save the new XML file Export Project as GNU Makefile This command exports a CodeWarrior project to a GNU makefile The IDE displays a message that tells you the name of the makefile and its location on the hard disk Expressions Expressions Window These commands open an Expressions window IDE 5 1 User s Guide IDE 493 Menu Commands Find The Find command opens the Find and Replace window to perform find operations within the active file Find Definition amp Reference The Find Definition amp Reference command searches for the definition of the selected routine
180. ch for source files choose the 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 return control to the IDE Reset Floating Toolbar The Reset Floating Toolbar command restores the default state of the floating toolbar Use this command to return the floating toolbar to its original default settings Reset Main Toolbar The Reset Main Toolbar command restores the default state of the main toolbar Use this command to return the main toolbar to its original default settings Reset Project Entry Paths The Reset Project Entry Paths command resets the location information stored with each project entry and forces the IDE to re search for the project entries in the access paths This command does nothing if the Save project entries using relative paths option is disabled IDE 5 1 User s Guide IDE 507 Menu Commands IDE 508 Reset Window Toolbar The Reset Window Toolbar command restores the default state of the toolbar in the active window Use this command to return the toolbar to its original default settings Resize Choose Resize reveals the Resize submenu See also e To Largest Height on page 515 e To Largest Width on page 515 e To Smallest Height on page 516 e To Smallest Width on page 516 Restart The Restart c
181. child making a window into 76 MDI child window type 70 MDI mode and dockable windows 69 MDI See Multiple Document Interface 444 Member Function Declaration 184 member functions creating 163 183 identifier icons 163 Member Functions pane 163 in Class Browser window 157 memory dump 519 Memory window 223 239 Menu Current Target 341 menu Search 122 Menu bar layout option IDE Extras panel 431 menu commands About Metrowerks CodeWarrior 481 Add Files 481 Add Window 481 Apply Difference 482 Balance 483 Bottom Edges 483 Break 483 Break On C Exception 483 Break on Java Exceptions 483 Breakpoints 483 Breakpoints Window 483 Bring To Front 484 Bring Up To Date 484 Browser Contents 484 Build Progress 484 Build Progress Window 484 Can t Redo 453 466 Can t Undo 453 466 Cascade 484 Change Program Counter 484 Check Syntax 485 Class Browser 485 Class Hierarchy 485 Class Hierarchy Window 485 Clear 485 Clear All Breakpoints 486 Clear All Watchpoints 486 IDE 5 1 User s Guide Clear Breakpoint 486 Clear Eventpoint 486 Clear Watchpoint 486 Close 487 Close All 487 Close All Editor Documents 487 Close Catalog 487 Close Workspace 487 CodeWarrior Help 488 Collapse Window 488 Commands amp Key Bindings 487 Compare Files 488 Compile 488 Complete Code 488 Component Catalog 488 Component Palette 489 Connect 489 Copy 489 Copy To Expression 489 Create Design 489 Create Group 489 Create Target 490 Customize
182. ck 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 click Existing to use a standard dialog box to select the file To create a new separate file click New and save the new file to a location on your hard disk 4 Click Next IDE 5 1 User s Guide IDE 179 Using Browser Wizards The New Class Wizard Figure 16 2 New Class wizard Base Class and Methods New C Class Base Classes and Methods Base Classes public FirstBaseClass IV Generate Constructor and Destructor Access Public x Constructor parameters Example int inSuperParam1 bool inNewParam int inSuperParami IV Virtual destructor Example public FirstBaseClass virtual SecondBaseClass Namespaces required for base classes and constructor parameters optional nspace1 IDE 180 Example nspace1 nspace2
183. ct a symbol and choose the Find Reference command CodeWarrior searches the online documentation for the symbol definition After you select a symbol and choose the Find Definition amp Reference command the IDE searches both the project files and the online documentation for the symbol definition If CodeWarrior does not find a definition or reference it notifies you with a beep IDE 5 1 User s Guide IDE 122 Navigating Source Code Reference Templates Macintosh Reference Templates Macintosh If you look up a routine such as an operating system call in the QuickView or THINK Reference online viewers you can paste the template for the call into the active editor window at the text insertion point If you know the name of the call that you want to add to your source code but are not familiar with the call parameters this technique is useful Listing 11 1 shows a sample routine template Listing 11 1 Sample routine template SetRect r left top right bottom Inserting a Reference Template To insert a reference template into your code follow these steps 1 From the online viewer window type the routine name that you want to insert 2 Select the name you just typed 3 Choose Insert Reference Template from the Edit menu The IDE searches for the routine in either QuickView Mac OS or THINK Reference Mac OS starting the required application if it is not already running If the IDE finds the routine th
184. cution again This behavior is equivalent to killing execution then starting a new debugging session 1 Choose Debug gt Restart 2 The debugger returns to the beginning of the program and begins controlled execution IDE 5 1 User s Guide IDE 199 Basic Debugging Common Debugging Actions IDE 200 IDE 5 1 User s Guide 19 Advanced Debugging This chapter explains how to perform advanced debugging tasks in the Code Warrior IDE This is a sample list of advanced tasks Use the Processes window the Processes window shows individual processes and tasks that the debugger can control Use the Expressions window the Expressions window lets you monitor and edit frequently used variables structure members and array elements Use the Register window the Register window lets you monitor and edit register contents of a processor Use the Memory window the Memory window lets you monitor and edit memory usage of an application This chapter contains these sections What is Advanced Debugging on page 202 Symbol Hint on page 202 Contextual Menus on page 203 Symbolics Window on page 205 Processes Window on page 208 Expressions Window on page 210 Global Variables Window on page 213 Registers Window on page 214 Log Window on page 218 Variable Window on page 220 Array Window on page 221 Memory Windo
185. d In Files 495 Find In Next File 495 Find In Previous File 495 Find Next 495 Find Previous 496 Find Previous Selection 496 Find Reference 122 496 Find Selection 138 496 Get Next Completion 497 Get Previous Completion 497 Global Variables 497 Global Variables Window 497 Go Back 156 497 Go Forward 156 497 Go To Line 497 Group 498 Hide Breakpoints 498 Hide Classes 162 Hide Classes pane 166 Hide Window Toolbar 498 Import Components 499 Import Project 39 499 Insert Reference Template 499 Kill 198 499 Make 500 IDE 5 1 User s Guide Maximize Window 500 Metrowerks Website 500 Minimize Window 500 New 500 New Class 500 New Class Browser 501 New Data 501 New Event 501 New Event Set 501 New Expression 501 New Item 161 New Member Function 501 New Method 501 New Property 501 New Text File 502 Object Inspector 502 Online Manuals 502 Open 502 Open File 165 Open In Windows Explorer 49 Open Recent 502 Open Scripts Folder 502 Open Workspace 503 Page Setup 503 Pane Collapse 160 Pane Expand 160 Precompile 503 Preferences 503 Print 503 Processes 504 Processes Window 504 Project Inspector 36 Properties 504 RAD 282 Redo 504 Refresh All Data 505 Register Details Window 505 Register Windows 505 Registers 505 Remove Object Code 505 Remove Object Code amp Compact 505 Remove Toolbar Item 342 Replace 129 135 506 Replace All 135 506 Replace and Find Next 506 Restart 199 Resume 19
186. d Party Editor 356 Use ToolServer menu 356 User Specified 354 Variable values change 376 VCS Commands 368 Watchpoint indicator 376 Window follows insertion point 366 Window position and size 367 Zoom windows to full screen 356 Preferences menu command 503 Prefix file option in Generate Browser Data From menu 427 Pre linker option Target Settings panel 434 print file selections 67 Print command 66 67 503 printing class hierarchies 169 files 66 projects 37 process attaching debugger to 210 suspended 245 259 process cycle of software development 21 Process pane using 209 Processes menu command 504 Processes window 208 381 opening 209 210 Processes Window menu command 504 products saving information about those installed in IDE 481 viewing those installed in IDE 481 program running 198 Program Arguments field of Runtime Settings panel Windows 434 Program Arguments option IDE 5 1 User s Guide Runtime Settings panel 434 Program Entry Point option Debugger Settings panel 434 Program windows See Thread window 245 259 Project Commands option Editor Settings panel 434 project data folder 443 Project Inspector command 36 project manager 29 overview 25 Project menu 434 457 469 Remove Object Code command 458 471 Stop Build command 458 470 Project operations option Shielded Folders panel 434 project stationery creating 40 custom 40 Project window about Files view 47 Current Target list pop up 46 Files view C
187. d and replace strings as regular expressions Search selection only Select to search only the currently selected text and not the entire file IDE 126 IDE 5 1 User s Guide Finding and Replacing Text Single File Find and Replace Table 12 1 Find window items continued Item Explanation Stop at end of file Select to stop a search at the end of a file and not wrap around to the beginning of the file Up Click to perform a search operation back from the current selection point Down Click to perform a search operation forward of the current selection point Searching Text in a Single File Use the Find command to search text in the active editor window 1 Choose Search gt Find NOTE Mac OS Solaris and Linux Use the Customize IDE Commands window to activate the Find menu command 2 Type search text into Find text box 3 Set search options 4 Start the Find or Find All operation e Click Find to find a single match e Click Find All to find all matches The IDE searches the current file and displays matching text or beeps if no matching text occurs Single File Find and Replace Use the single file Find and Replace window to perform these tasks e Search a single file e Replace found text in a single file IDE 5 1 User s Guide IDE 127 Finding and Replacing Text Single File Find and Replace Figure 12 2 Find and Replace window Find and Replace xi Find Find Re
188. d debugging 1 Arrange your workspace Move windows to your favorite positions and start or finish a debugging session 2 Choose File gt 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 IDE 82 example myworkspace cww This extension helps you readily identify the workspace file Furthermore the Windows hosted IDE requires this extension to recognize the file as a CodeWarrior workspace IDE 5 1 User s Guide Workspaces Using Workspaces 4 Save the workspace to a location on your hard disk The IDE now uses your saved workspace In subsequent programming sessions you can open the workspace and apply its settings to the IDE Opening a Workspace Open a workspace to apply its settings to the IDE 1 Choose File gt Open Workspace An Open dialog box appears 2 Open the workspace Use this dialog box to navigate your hard disk and select a workspace file These files end in the cww extension The IDE opens the selected workspace and applies its settings Saving a Copy of a Workspace Save a copy of a current workspace to save an existing workspace under a different name 1 Open an existing workspace 2 Choose File gt Save Workspace As A Save As dialog box appears 3 Enter a name for the copy of the current workspace NOTE Add the extension cww to the end of the workspace name for exampl
189. d others See also e Bottom Edges on page 483 e Horizontal Center on page 498 e Left Edges on page 499 e Right Edges on page 508 e To Grid on page 515 e Top Edges on page 516 e Vertical Center on page 517 All Exceptions The All Exceptions command of the Java submenu to tell 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 Anchor Floating Toolbar The Anchor Floating Toolbar command attaches the floating toolbar beneath the menu bar Once attached the anchored toolbar can not be moved again until it is unanchored See also e Unanchor Floating Toolbar on page 516 Apply Difference The Apply Difference command applies the selected difference from the source file into the destination file IDE 5 1 User s Guide Menu Commands Balance The Balance command selects all the 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 return
190. d plug in such as problems with plug in loading optional plug in information and plug in IDE 5 1 User s Guide Preference and Target Settings Options 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 available to the CodeWarrior IDE To learn more about the linkers see the appropriate Targeting manual Location of Relocated Libraries and Code Resources Enter in this field the path to the relocated libraries and code resource files required for debugging the project Alternatively click Choose to display a dialog box Use the dialog box to select the required files Log System Messages Select this option to have the IDE maintain a log of all system messages generated during the debugging session The Log window displays this platform specific information Clear the option to disable the log Maintain files in cache Enter in the Maintain files in cache text box the number of days that the IDE maintains files in the file cach
191. d stopping the program at the next line of code Step Into Executes each source line in the program following any subroutine calls Step Out Executes each source line in the subroutine and stops the program when the routine returns to its caller Stop Pauses execution of the program in a debugging session to enable examination of register and variable contents Set Breakpoint or Clear Breakpoint Sets a breakpoint on the source line containing the insertion point Clears the breakpoint on the source line containing the insertion point Set Eventpoint Sets an eventpoint on the source line containing the insertion point Clear Eventpoint Clears the breakpoint on the source line containing the insertion point Set Clear Breakpoint Displays the Set Clear Breakpoint dialog for setting or clearing breakpoints by address or symbol Enable Breakpoint or Disable Breakpoint Activates the disabled breakpoint on the source line containing the insertion point De activates the breakpoint on the source line containing the insertion point Clear All Breakpoints Clears all breakpoints currently set in the default build target of the active project Show Breakpoints or Hide Breakpoints Adds a Breakpoint Column to all project editor windows where breakpoints can be set viewed and cleared Removes the Breakpoint Column from all project editor windows Set Watchpoin
192. d to display text in editor windows This setting behaves in two different ways depending on the current IDE state e No editor windows open the setting modifies the default script system All editor windows take on the default script system e 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 Select stack crawl window when task is stopped Select the Select stack crawl window when task is stopped option to automatically bring the Thread window to the foreground after the debugger stops a task Clear the option to leave the Thread window in its previous position This option is useful for watching variable values change in multiple Variable windows as the debugger steps through code Selection position Select the Selection position option to remember these items for each editor window e visible text e insertion point location e 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 IDE 5 1 User s Guide IDE 437 Preference and Target Settings Options IDE 438 NOTE The IDE must be able to write to the file in order to remember selection position Show all locals Select the Show all locals option to display all local variables in Variable windows Clear the option to show only variables near
193. dit gt Delete or Edit gt Clear or e Select the expression to remove and press the Backspace or Delete key The Expressions window updates to reflect the removed expression NOTE Unlike the Variable window the Expressions window does not remove a local variable after program execution exits the routine that defines the variable Global Variables Window The Global Variables window shows all global and static variables used by the executing program Use this window to observe changes in variable values as the program executes TIP Use multiple Variable windows to observe global variables in separate windows Figure 19 6 on page 214 shows the Global Variables window Table 19 5 on page 214 explains the items in the window IDE 5 1 User s Guide IDE 213 Advanced Debugging Registers Window Figure 19 6 Global Variables window pw Global Variables for fontview EXE ascii 000418120 bZoomed DISPLAY C cntStatusField Fontview c cntT oolCtrls STATUS C cxFrame TOOLS C cxStatusB order cxT oolBorder cyFrame cyStatusB order 0 0 0 0 0 0 0 0 Table 19 5 Global Variables window items Item Explanation File Lists source files that declare global or static variables Click a source file to view its static variables Click Global Variables to view all global variables declared in the program Variables Lists variables according to the file selected in the File pane Double click a variable to display it
194. does the action of the last cut paste clear or typing operation If you cannot undo the action this command changes to Can t Undo Redo Redoes the action of the last Undo operation If you cannot redo the action this command changes to Can t Redo Cut Removes the selected text and places a copy of it on the Clipboard Copy Copies the selected text and places a copy of it on the Clipboard Paste Places the contents of the Clipboard at current insertion point or replaces the selected text Clear Removes the selected text without placing a copy on the Clipboard When using the Macintosh menu layout on a Windows host this command does not appear Instead use the Delete command IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout Table 34 12 Edit menu commands continued Menu command This command saves a copy of an existing workspace Use this command to save the workspace under a different name Select All Explanation Selects all the text in the current editor window or text box for cut copy paste clear or typing operations Balance Selects the text between the nearest set of parenthesis braces or brackets Shift Left Moves the selected text one tab stop to the left Shift Right Moves the 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
195. e Menu bar layout Choose from the Menu bar layout options the desired configuration of menus listed in the IDE IDE 5 1 User s Guide IDE 431 Preference and Target Settings Options e Windows organizes the menu bar according to a typical Microsoft Windows arrangement e Macintosh organizes the menu bar according to a typical Apple Mac OS arrangement Minimize non debugging windows Select the Minimize non debugging windows option to minimize non debugging windows to a reduced size when a debugging session starts At the end of the debugging session the IDE automatically restores the minimized windows NOTE The Minimize non debugging windows option is only available in MDI mode See also e Use Multiple Document Interface on page 444 Monitor for debugging Choose from the Monitor for debugging options the specific monitor to use during debugging sessions The IDE displays debugging windows in the selected monitor The coordinates in parentheses identify the selected monitor in QuickDraw space Move open windows to debugging monitor when debugging starts Select the Move open windows to debugging monitor when debugging starts option to move all open windows to the selected debugging monitor after a debugging session starts At the end of the debugging session the IDE restores the moved windows to their original positions IDE 432 IDE 5 1 User s Guide Preference and Target Settings Options
196. e Text based instruction Expert instructors A variety of self assessment and study materials Interactive message boards for communicating with instructors and fellow students Courses now available at CodeWarriorU include e Learn Programming in C For beginning programmers It teaches how to create C software Introduction to Java For beginning and experienced programmers It teaches how to create Java software Introduction to C For beginning and experienced programmers It teaches how to create C software Intermediate C For programmers who completed the Introduction to C course and have basic C programming knowledge It provides the foundation needed to create more sophisticated C software To find out more visit this web site http www CodeWarriorU com Documentation Structure CodeWarrior products include an extensive documentation library of user guides targeting manuals and reference manuals Take advantage of this library to learn how to efficiently develop software using the CodeWarrior programming environment Documentation Formats CodeWarrior documentation presents information in various formats e Print Printed versions of CodeWarrior manuals including the IDE User s Guide MSL C Reference C C Reference and product focused Targeting manuals IDE 5 1 User s Guide IDE 18 IDE User s Guide Overview Manual Conventions PDF Portable Document Format Electronic v
197. e client area The window undocks and becomes the chosen window type Alternately double click the tab to undock the corresponding window to a floating window Floating a 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 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 a 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 Choose Docked or MDI Child from the contextual menu Docked dock the floating window IDE 5 1 User s Guide IDE 75 Dockable Windows Dock Bars e 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 Making a Window an MDI Child Use a contextual menu to make a docked window or floating window an MDI child window 1 Right click the tab in the docked window or the title bar of the floating window A contextual menu
198. e myworkspace cww This extension helps you readily identify the workspace file Furthermore the Windows hosted IDE requires this extension to recognize the file as a CodeWarrior workspace 4 Save the workspace to a location on your hard disk IDE 5 1 User s Guide IDE 83 Workspaces Using Workspaces The IDE saves a copy of the current workspace under the name you specified Closing a Workspace Close the current workspace after you finish working with it 1 Choose File gt 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 You can now open a different workspace or quit the IDE Opening a Recent Workspace You can have the IDE display recently used workspaces in the Open Recent submenu The IDE Extras preference panel contains an option that determines the number of recent workspaces that the IDE displays 1 Choose File gt Open Recent A submenu appears This submenu lists recently used workspaces A checkmark appears next to the active workspace 2 Choose a recent workspace from the Open Recent submenu The IDE applies the workspace that you select IDE 84 IDE 5 1 User s Guide Creating Console Applications This chapter explains how to work with console applications in the CodeWarrior IDE Console applications provide these be
199. e 4 5 explains the items in the Link Order view Table 4 5 Link Order view items Item Synchronize Modification Dates Explanation To update the modification dates of the files stored in a project file click the checkmark icon Use the Synchronize Modification Dates command to update files modified outside of the CodeWarrior IDE perhaps by a third party editor which cannot notify the CodeWarrior IDE of the changes Synchronize Status To update version control status information click the Pencil icon Targets View The Targets view presents information about the build targets in a project Use this view 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 6 explains the items in the Targets view Table 4 6 Targets view items Item Explanation Targets Displays all build targets and subprojects that the IDE processes to create a binary file These icons denote build target status s a active build target e inactive build target tn active build target with RAD designs g inactive build target with RAD designs Link Indicates the dependencies between build targets and subprojects IDE 50 IDE 5 1 User s Guide Project Window File Group Layout and Targe
200. e Code Completion window now appears automatically to help you complete code in editor windows Triggering Code Completion from the IDE Menu Bar Trigger code completion from the main IDE menu bar to open the Code Completion window 1 Bring forward an editor window 2 Place the insertion point at the end of the source code that you want to complete 3 Choose Edit gt Complete Code The Code Completion window appears Use it to complete the symbol at the insertion point Triggering Code Completion from the Keyboard Trigger code completion from the keyboard to bypass opening the Code Completion window 1 Bring forward an editor window 2 Place the insertion point at the end of the source code to complete IDE 108 IDE 5 1 User s Guide Editing Source Code Code Completion 3 Press the appropriate code completion key binding Table 10 2 on page 109 lists the default code completion key bindings for each IDE host Use the Customize IDE Commands window to change these key bindings Table 10 2 Code Completion key bindings Get Next Get Previous Complete Code Completion Completion Windows Alt Alt Shift Alt Macintosh Control Control Shift Control Deactivating Automatic Code Completion Deactivate automatic code completion to prevent the IDE from displaying the Code Completion window as you edit source code The Code Completion preference panel configures Code Completion window behavior
201. e Double click the Pane Resize control to remove the pane OR e Click and drag the Pane Resize control to the left or top edge of the editor window 2 The IDE removes the view pane from the editor window IDE 5 1 User s Guide IDE 99 The CodeWarrior Editor Other Editor Window Components IDE 100 IDE 5 1 User s Guide 10 Editing Source Code This chapter explains how to edit source code in the CodeWarrior IDE The IDE provides these features to help you edit source code e Select and indent text the editor can select text by line routine or rectangular selection The editor also handles text indentation e Balance punctuation the editor can find matching pairs of parentheses brackets and braces Most programming languages such as C produce syntax errors for punctuation that lacks a counterpart e Complete code the IDE can suggest ways to complete the symbols you enter in a source file Read this chapter to learn more about editing source code This chapter contains these sections e Text Manipulation on page 101 e Punctuation Balancing on page 105 e Code Completion on page 107 Text Manipulation Manipulate text files to manage their contents from the IDE Use these tasks to manipulate text files e Select text e Overstrike text e Use virtual space e Indent text This section explains how to perform each task IDE 5 1 User s Guide IDE 101 Editing Source Code
202. e Find or Find All operation e Click Find to find a single match e Click Find All to find all matches The IDE searches the specified files and displays matching text or beeps if no matching text occurs Replacing Text Across Multiple Items Use the Replace and Replace All commands to search text and replace matching text 1 Choose Search gt Find in Files 2 Type search text into the Find text box 3 Type replacement text into the Replace text box 4 Set general search options IDE 5 1 User s Guide IDE 135 Finding and Replacing Text Search Results Window 5 Set additional search options in the In Folders In Projects In Symbolics or In Files tabs 6 Start the Replace or Replace All operation e Click Replace to replace a single match e Click Replace All to replace all matches The IDE searches the specified items and replaces matching text or beeps if no matching text occurs Search Results Window Use the Search Results window to explore matches found by the IDE during multiple file search operations Also use the window to stop searches in progress Figure 12 4 shows the Search Results window Table 12 6 on page 137 explains the items in the window Figure 12 4 Search Results window Search Results set a l 15 x 13 Occurrences of set Afio Stop e vane 4 anys a A JE Framel java line 55 Move components to account for insets Fe Framel java line 56 Md gt
203. e IDE Customize Toolbars Clear Floating Toolbar On this host Do this to clear the Do this to clear the main toolbar window toolbar Solaris Select Window gt Toolbar gt Select Window gt Toolbar gt Clear Floating Toolbar Clear Window Toolbar Linux Select Window gt Toolbar gt Select Window gt Toolbar gt Clear Window Toolbar Reset Toolbars Reset a toolbar to restore its default button set explains how to reset the main floating toolbar and window toolbar by using menu commands Table 30 5 Resetting a toolbar by using menu commands On this host Do this to reset the Do this to reset the main toolbar window toolbar Windows Select View gt Toolbars gt Select View gt Toolbars gt Reset Main Toolbar Reset Window Toolbar Macintosh Select Window gt Toolbar gt Select Window gt Toolbar gt Reset Floating Toolbar Reset Window Toolbar Solaris Select Window gt Toolbar gt Select Window gt Toolbar gt Reset Floating Toolbar Reset Window Toolbar Linux Select Window gt Toolbar gt Select Window gt Toolbar gt Reset Floating Toolbar 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 explains how to reset the main floating toolbar and window toolbar by using a contextual menu IDE 5 1 User s Guide IDE 34
204. e IDE copies the template to the active editor window and replaces the text you selected with the template IDE 5 1 User s Guide IDE 123 Navigating Source Code Reference Templates Macintosh IDE 124 IDE 5 1 User s Guide 12 Finding and Replacing Text This chapter explains how to work with the find and replace features in the TM CodeWarrior IDE Use these features to perform these tasks Find text the IDE provides several ways to find text in a single file or in a collection of files Replace text the IDE substitutes found text with replacement text Replace one or more occurrences of found text This chapter contains these sections About Find and Replace on page 125 Single File Find on page 126 Single File Find and Replace on page 127 Multiple File Find and Replace on page 129 Search Results Window on page 136 Text Selection Find on page 137 Regular Expression Find on page 140 About Find and Replace The IDE provides find and replace operations that streamline repetitive text modifications and enhance common word processing features Search multiple files change recurring text within more than one file For example use this feature to change a function name throughout the files that comprise a project Search specific files perhaps a required change only affects certain files in the project Create a file set that contains these
205. e IDE removes all markers Symbol Definitions You can find a symbol definition in your project s source code For the Mac OS you can also look up a symbol definition using the online documentation viewer in the IDE Extras selection in the IDE Preferences panel Supported online reference viewers include HTMLHelp Windows and QuickHelp Mac OS as well as older online help systems such as QuickView Mac OS and THINK Reference Mac OS TIP You can also use the browser to look up symbol definitions IDE 5 1 User s Guide IDE 121 Navigating Source Code Symbol Definitions Figure 11 2 Find Definition Find Definition x Find definition for s ymbolD efinition Cancel Looking Up Symbol Definitions To look up the definition of a selected symbol follow these steps 1 From the Search menu in the Main Toolbar choose Find Definition 2 Enter the symbol definition 3 Click OK CodeWarrior searches all of the files in your project for the symbol definition If CodeWarrior finds a definition it opens an editor window and highlights the definition for you to examine TIP To return to your original location after viewing a symbol definition press Shift Ctrl B Windows or Shift Command B Mac OS This key binding is equivalent to the Go Back menu command Mac OS Solaris and Linux You can also use the Find Reference and Find Definition amp Reference commands to look up symbol definitions After you sele
206. e Multi Class Hierarchical window A Single Class Hierarchical window appears IDE 5 1 User s Guide IDE 171 Using Other Browser Windows Browser Contents window Browser Contents window Use the Browser Contents window to view browser data sorted by category into an alphabetical list This section explains how to use the Browser Contents window to view browser data assuming knowledge about activating the browser Figure 15 3 shows the Browser Contents window Table 15 4 explains the items in the window Figure 15 3 Browser Contents window id Win32 x86 Debug contents loiz o EAEN __file_kinds __io_modes __io_resultts __io_states __open_modes time_base dateorder ios_base event float_round_style ios_base fmt_flags Table 15 4 Browser Contents window items Item Icon Explanation Symbols list box Erm deal Select the type of symbol to display in the Symbols list Symbols list Double click a symbol name to display the source file in a new editor window that defines the symbol IDE 172 IDE 5 1 User s Guide Using Other Browser Windows Browser Contents window Viewing Browser Data by Contents Use the Browser Contents window to display symbol information stored in the browser database listed in alphabetical order You can choose from these categories classes constants enumerations functions global variables macros function templates type definitions Activate the browser
207. e a dynamic linked library DLL shared library library code resource or tool 1 Select the project to run 2 Choose Project gt Run Synchronizing File Modification Dates Use the Synchronize Modification Dates command to update the modification dates of all files stored in a project This command is useful for handling files from a third party editor that does not share file status information with the IDE 1 Select the project window 2 Choose Project gt Synchronize Modification Dates The IDE checks the file modification dates and marks modified files for re compilation Removing Object Code Use the Remove Object Code command to remove binary object code stored in the project file and reduce project size 1 Open the desired project to remove object code 2 Choose Project gt Remove Object Code IDE 270 IDE 5 1 User s Guide Compilers Compiling Projects 3 Set compaction options as desired e Select Recurse subprojects to remove object code from all subprojects in the project file e Select Compact targets to remove these items Target data files with the tdt extension Browser data Dependency information Additional data cached by the IDE 4 Select the method by which the IDE removes the object code e Click All Targets to remove object code from all build targets e Click Current Target to remove object code only from the active build target The IDE removes the spec
208. e base address bound to the array The base address can bind to an address a variable or a register An array bound to a local variable closes after the routine that defines the variable returns to the calling routine For array elements cast as structured types a hierarchical control appears to the left of each element Use these hierarchical controls to expand or collapse the display of each element s contents Figure 19 10 shows an Array window Table 19 9 explains the items in the window IDE 5 1 User s Guide IDE 221 Advanced Debugging Array Window Figure 19 10 Array window e cout basic_ios tiestr_ V basic_ostream cout basic_ios tiestr Bind To Address Variable Register Array size fi 00 Struct Member Show all members 7 Element Value Location 0x1 001EBBO Ox1001EBF4 Ox1001EC38 tre 0x1001EC3C Ox1001EC C Ox1001ECCO 0x1 001EBBO 0x1 001EBF4 Ox1001EC38 01001EC3C Ox1001EC C Ox1001ECCO Table 19 9 Array window items Item Icon Explanation Hierarchical control v Click to collapse the view of the information pane Bind To Select the base address of the array Address Variable or Register Array size Enter the number of elements to display in the Array size fio Struct Member Show all members 7 Array window Select a specific member to show in each element or show all members Struct Member Element Shows the array elements in
209. e commands to open specific browser IDE and debugger windows e names of all open file and project windows A check mark appears beside the active window and an underline denotes a modified and unsaved file Table 34 17 Window menu commands Menu command Stack Editor Windows Description Arranges all editor windows so that only the title bar is visible Tile Editor Windows Tiles all editor windows horizontally on the screen so none overlap Tile Editor Windows Vertically Tiles all editor windows vertically on the screen so none overlap Zoom Window Restores the active editor window to its previous size and position Collapse Window Minimize Window or Expand Window Maximize Window Collapses the active editor window so that only its title bar is visible Expands the collapsed editor window to its previous size and position Save Default Window Saves the current browser window settings for later re use Toolbars Use the Toolbars submenu to show hide reset and clear window main and floating toolbars Browser Contents Opens or brings to the front a Browser Contents window Class Hierarchy Window Opens or brings to the front a Class Hierarchy window New Class Browser Opens or brings to the front a New Class Browser window Build Progress Window Opens or brings to the front a Build Progress window Errors amp Warnin
210. e items 135 replacing text in a single file 129 resizing a component in a layout 293 resizing panes in an editor window 99 running a program 198 saving a copy of a workspace 83 saving a workspace 82 saving projects 36 searching a single file 127 searching across multiple files 134 searching across multiple folders 131 searching across multiple projects 132 searching across multiple symbolics files 133 searching with a text selection 138 IDE 5 1 User s Guide searching with a text selection across multiple window 139 selecting entire routines 103 selecting item in Code Completion window 112 selecting lines 102 selecting multiple lines 102 selecting rectangular portions of lines 102 selecting text in editor windows 102 setting breakpoints in source panes 234 setting conditional breakpoints 236 setting temporary breakpoints 236 showing the classes pane 162 sorting the classes list 163 sorting the Wires tab by using a contextual menu 320 suppressing dockable windows 76 toggling automatic punctuation balancing 106 toggling the symbol hint 203 triggering code completion by keyboard 108 triggering code completion from IDE menu bar 108 undocking a window 74 unfloating a window 75 unindenting text blocks 104 using an external editor on the Macintosh 357 using contextual menus 204 using the browser contextual menu 152 using the default workspace 82 using the document settings pop up 96 using the Execu
211. e source browser Matching find and replace results between related header files and source files Associating functions and variables with their corresponding source code Compiler IDE 30 Synchronizing with source code a symbolics database of program functions variables and values Coordinating internal data flow between the symbolics database and the source browser Determining the files to include in the build process IDE 5 1 User s Guide Working with Projects About Projects Table 3 1 Project Manager interactions continued IDE Tool Project Manager Interactions Linker e Sending compiled object code to the linker for conversion to executable code e Setting the link order for processing compiled object code Debugger e Matching debugging data to source code e Updating the symbolics database to reflect changing values during a debugging session Build Targets For any given build the project manager tracks e files and libraries e link order e dependencies e 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 o
212. e source tree path type Choose Click to select or modify a source tree path Add Click to add a new source tree path to the Source Tree list Change Click to modify the selected source tree name or path Remove Click to delete the selected source tree from the Source Tree list IDE 362 IDE 5 1 User s Guide Working with IDE Preferences General Panels Adding Source Trees Add source trees that define root paths for access paths and build target output 1 Choose Edit gt Preferences The IDE Preferences window appears Select the Source Trees panel from the IDE Preference Panels list Enter in the Name field a name for the new source tree Choose the source tree Type Absolute Path defines a path from the root level of the hard drive to a desired folder including all intermediate folders Environment Variable Windows Solaris and Linux defines an environment variable in the operating environment Registry Key Windows defines a key entry in the operating environment registry Enter the source tree definition For Absolute Path Click Choose to display a subordinate dialog box Use the dialog box to select the desired folder The absolute path to the selected folder appears in the Source Trees preference panel For Environment Variable Enter the path to the desired environment variable For Registry Key Enter the path to the desired key entry in the registry Click Add The IDE adds the new source tr
213. e steps 1 Run Debug your program 2 Open the Watchpoints window as explained in Table 21 1 Table 21 1 Opening the Watchpoints window On this platform Do this Windows Select View gt Watchpoints Macintosh Select Window gt Watchpoints Solaris Select Window gt Watchpoints Linux Select Window gt Watchpoints Using Watchpoints in the Memory Window The Memory window displays the contents of memory in hexadecimal and corresponding ASCII character values IDE 240 IDE 5 1 User s Guide Using Watchpoints Using Watchpoints in the Memory Window Figure 21 1 Memory Window m gdidemo EXE Memory 1 5 x Display hwndFrame View Raw data 7 Hex 00131B9B8 00132B9B 00132396 JOOABABAB ABABABAB ABEEFEEE FEQOOOOO f e sess sess sess 001323AB 100000000 00882613 s Zes sose soe A 001323BB 006882913 00000026 000C0O00O0O OOACDS23 Op E E EEA aes 001323CB 00000000 00000000 00000000 00000000 s wee soss 001323D8 00000000 00000000 00000000 00000000 s sooo sooo 001323EB 00000000 00000000 00000000 00000000 s soss soso 001323FB 00000000 00000000 00000000 00000000 ee soss sooo 00132408 00000000 00000000 00000000 oooooooo a 00132418 00000000 00000000 00000000 00000000 sss sooo 00132428 00000000 00000000 00000000 oooooooo s s seee 00132438 00000000 00000000 00000000 00000000 sesso soso 00132448 00000000 00000000 00000000 oooooooo s s sooo 00132458 100
214. e that you previously saved 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 Save Workspace As Saves an existing workspace under a different name Import Components Imports the components from another catalog into the current catalog Close Catalog IDE 452 Closes the current catalog and its associated Catalog Components window and Component Palette IDE 5 1 User s Guide IDE Menus Windows Menu Layout Table 34 1 File menu commands continued Menu command Import Project Explanation Imports a project file previously saved in extensible markup language format XML and converts it into project file format 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 amp Warning window contents Open Recent Displays a submenu of recently opened files and projects that can be chosen to open in the IDE m x Edit Menu Quits the CodeWarrior IDE When using the Windows menu layout on a Macintosh host this command does not appear Instead use the Quit command
215. eader files and sub targets 8 Edit the file list at the bottom of the In Projects tab as desired The list reflects the previously selected search options TIP Select remove and open files directly from the file list 9 Start the Find or Find All operation e Click Find to find a single match e Click Find All to find all matches The IDE searches the specified projects and displays matching text or beeps if no matching text occurs Searching Text Across Multiple Symbolics Files Use the In Symbolics tab to search text within project files that contain symbolics information To generate symbolics information for most files e Activate the browser for the project and choose Project gt Make e Choose Project gt Debug to debug the project NOTE The IDE does not generate symbolics information for some files such as libraries IDE 5 1 User s Guide IDE 133 Finding and Replacing Text Multiple File Find and Replace 1 Choose Search gt Find in Files 2 Type search text into the Find text box 3 Set general search options 4 Click the In Symbolics tab 5 Choose the symbolics to search from the Symbolics list box e Choose All Symbolics to search all symbolics files in the project e Choose by name a specific symbolics file to search NOTE Choose Project gt Make to update the project data to correctly list symbolics files 6 Edit the file list at the bottom of the In Symbolics tab as desired The list
216. ect Relocatable Library or Kernel Module Solaris and Linux obj Object File pch Precompiled Header Source File pch Precompiled Header Source File SO Shared Library Linux Script sh Shell Script Linux psh Precompile Shell Script Linux pl Perl Script Linux Mac OS X dylib Mach O Dynamic Library a Mach O Static Library O Mach O Object File plist Property List F Factory Settings Click this button to change all modified options to their default values in the current preference or settings panel IDE 424 IDE 5 1 User s Guide Preference and Target Settings Options 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 Find and compare operations P A bullet in the Find and compare operations column whose label appears at left indicates that the IDE ignores matching folders for find and compare operations Such operations include dragging a folder into fields in the Find window or comparing folder contents Find Reference using Choose from the Find Reference using options an online browser application to look up references and definitions For example use this option to look up documentation for language keywords 1 Select an online browser application such as THINK Reference with the Find Reference using option 2 Select a lan
217. ect 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 Close non debugging windows Select this option to close non debugging windows except for the active project window when starting a debugging session At the end of the debugging session the IDE automatically re opens the closed windows Code Completion Delay Enter in this field the number of ticks to have the IDE wait from the time you type a trigger character to the time the Code Completion window opens A tick is 1 60 of a second Performing any activity during this delay time cancels opening of the Code Completion window IDE 5 1 User s Guide Preference and Target Settings Options See also e Automatic Invocation on page 413 Collapse non debugging windows Select this option to collapse non debugging windows when starting a debugging session At the end of the debugging session the IDE automatically restores the collapsed windows 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
218. ection sourceSelection is the path to a temporary file containing the currently selected text YsourceSelUpdate sourceSel Update is like sourceSelection except the IDE waits for the command to finish and updates the selected text with the contents of the file IDE 334 IDE 5 1 User s Guide Customizing the IDE Customizing IDE Commands Table 30 2 Pre defined variables in command definitions continued Variable Command line output YprojectFilePath projectFilePath is the full path of the front project window projectFileDir projectFileDir is the directory of the front project window projectFileName projectFileName is the filename of the front project window projectSelectedFiles projectSelectedFiles passes the selected filenames in the project window targetFilePath targetFilePath is the full path of the output file of the front project YetargetFileDir targetFileDir is the directory of the output file of the front project YtargetFileName targetFileName is the filename of the output file of the front project currentTargetName currentTargetName passes the name of the current target of the frontmost window 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 sym
219. ed device to start a debugging session When using the Windows menu layout on a Macintosh host this command does not appear The Data menu contains commands that control how the CodeWarrior debugger displays data values This menu appears only during a debugging session Table 34 7 Data menu commands Menu command Show Types Explanation Toggles the appearance of the data type on local and global variables displayed in Variable panes and Variable windows Refresh All Data Updates data displays New Expression Creates a new expression entry in the Expressions window Copy to Expression Copies the selected variable to the Expressions window View As Displays the View As dialog where the data type of the selected variable can be specified View Variable Displays the selected variable in a new Variables window View Array Displays the selected array variable in a new Arrays window View Memory Displays the selected variable in a new Memory window View Memory As Displays the View As dialog where the data type of the selected variable can be specified then shown in a new Memory window Cycle View IDE 5 1 User s Guide Toggles the data view among View Source View Disassembly View Mixed and View Raw Data IDE 461 IDE Menus Windows Menu Layout Table 34 7 Data menu commands continued Menu command View Source Explanation View data a
220. ed in the layout Options list pop up zi Select a preset value and assign it to a property Show Options button Ej Click to assign a set of values to the property Opening the Object Inspector Open the Object Inspector to examine and modify component properties and events 1 Open the Object Inspector as explained in Table 26 8 Table 26 8 Opening the Object Inspector On this host Do this Windows Select View gt Object Inspector Macintosh Select Window gt Object Inspector Solaris Select Window gt Object Inspector Linux Select Window gt Object Inspector 2 The object inspector appears Alternatively use a contextual menu to open the Object Inspector as explained in Table 26 9 Table 26 9 Opening the Object Inspector by using a contextual menu Windows Right click the component and select Properties Macintosh Control click the component and select Properties IDE 296 IDE 5 1 User s Guide Layout Editing Object Inspector Table 26 9 Opening the Object Inspector by using a contextual menu continued Solaris Click and hold on the component then select Properties Linux Click and hold on the component then select Properties IDE 5 1 User s Guide IDE 297 Layout Editing Object Inspector IDE 298 IDE 5 1 User s Guide 27 Component Editing This chapter explains how to edit Rapid Application Development RAD components in the CodeWarrio
221. ee to the Source Trees list Click OK Apply or Save The IDE saves the source tree changes IDE 5 1 User s Guide IDE 363 Working with IDE Preferences General Panels Changing Source Trees Change a source tree to update path information for a project The IDE must be able to resolve source trees before building the project 1 Choose Edit gt Preferences The IDE Preferences window appears Select the Source Trees panel from the IDE Preference Panels list Select the desired source tree in the Source Trees list If needed enter in the Name field a new name for the selected source tree If needed choose from the Type options a new path type for the selected source tree Click Change The IDE updates the source tree and displays changes in the Source Trees list A reminder message to update source tree references in the project appears Click OK Apply or Save The IDE saves the source tree changes Removing Source Trees Remove source trees that the project no longer uses The IDE must be able to find the remaining source trees before building the project 1 IDE 364 Choose Edit gt Preferences The IDE Preferences window appears Select the Source Trees panel from the IDE Preference Panels list Select the obsolete source tree from the Source Trees list IDE 5 1 User s Guide 4 Working with IDE Preferences Editor Panels Click Remove The IDE updates the Source Trees list A
222. ees Code Generation Panels Global Optimizations Editor Panels Custom Keywords Debugger Panels Other Executables Debugger Settings Remote Debugging IDE 5 1 User s Guide Table of Contents 361 365 366 366 368 371 375 375 377 378 380 383 384 385 385 387 388 389 392 394 396 398 398 398 401 401 403 403 406 408 IDE 11 Table of Contents 33 Preference and Target Settings Options IX Menus 34 IDE Menus Windows Menu Layout File Menu Edit Menu View Menu Search Menu Project Menu Debug Menu Data Menu Window Menu Help Menu Macintosh Menu Layout Apple Menu CodeWarrior Menu File Menu Edit Menu Search Menu Project Menu Debug Menu Data Menu Window Menu VCS Menu Tools Menu Scripts Menu Help Menu Rapid Application Development RAD Menus Align Menu IDE 12 411 451 451 451 453 454 455 457 459 461 462 463 464 464 464 464 466 467 469 471 473 415 476 476 411 411 418 478 IDE 5 1 User s Guide Table of Contents Layout Menu 478 Resize Menu 479 35 Menu Commands 481 Index 521 IDE 13 IDE 5 1 User s Guide Table of Contents IDE 14 IDE 5 1 User s Guide Introduction This section contains these chapters e IDE User s Guide Overview e CodeWarrior IDE Overview IDE 5 1 User s Guide IDE 15 ID
223. efault size for unbounded arrays 419 Disable third party COM plugins 419 Display Deprecated Items 419 Display Settings preference panel 375 IDE 5 1 User s Guide Do nothing 419 Do nothing to project windows 419 Drag and drop editing 420 Dump internal browse information after compile 420 Edit Commands 420 Edit Language 421 Editor preference panels 365 Editor settings panels 401 Editor Settings preference panel 366 Enable automatic Toolbar help 421 Enable remote debugging 421 Enable Virtual Space 421 Enums 372 Environment Settings 421 Failure 425 File Mappings settings panel 396 File Type 417 Font amp Tabs preference panel 368 371 Functions 372 General preference panels 351 Generate Browser Data From 426 Global Optimizations settings panel 398 Globals 372 Help Preferences panel 358 IDE Extras preference panel 354 Import Panel 428 Layout Editor preference panel 384 Macros 372 Maintain files in cache 415 Make 425 Other 373 Other Executables settings panel 403 Plugin Settings preference panel 358 Purge Cache 415 RAD Tools preference panels 383 Remote Connections preference panel 380 Remote Debugging settings panel 408 Require Framework Style Includes 436 Runtime Settings panel 394 Set 1 Set 2 Set 3 Set 4 372 setting for browser 147 Shielded Folders preference panel 359 Source Trees preference panel 361 System Paths list 391 Target Settings panel 388 Target settings panels
224. election point IDE 128 IDE 5 1 User s Guide Finding and Replacing Text Multiple File Find and Replace Replacing Text in a Single File Use the Replace command to search text in source files and replace matching text on a case by case basis 1 Open the Find and Replace window as explained in Table 12 3 Table 12 3 Opening the Find and Replace window On this host Do this Window Select Search gt Replace Macintosh Select Search gt Find and Replace Solaris Select Search gt Find and Replace Linux Select Search gt Find and Replace 2 Type search text into the Find text box 3 Type replacement text into the Replace with text box 4 Set replacement options 5 Start the Replace or Replace All operation e Click Replace to replace a single match e Click Replace All to replace all matches The IDE searches the current file and replaces matching text or beeps if no matching text occurs Multiple File Find and Replace Use the multiple file Find in Files window to perform these tasks e Search several files e Replace found text in multiple files e Replace found text in files within a specific build target IDE 5 1 User s Guide IDE 129 Finding and Replacing Text Multiple File Find and Replace Figure 12 3 shows the Find in Files window Table 12 4 explains the items in the window Figure 12 3 Find in Files window Find fstatdpplet O Find Replace with frestartspplet OOO
225. em with the Replace text box string IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout Table 34 13 Search menu commands continued Menu command Find Definition Explanation Searches for the definition of the routine name selected in the active editor window using the project s source files When using the Macintosh menu layout on a Macintosh host hold down the Shift key to change this command to Find Definition amp Reference Find Reference Searches for the definition of the routine name selected in the active editor window using the specified online help system When using the Macintosh menu layout on a Windows host this command does not appear Go Back Returns to the previous CodeWarrior browser view Go Forward Moves to the next CodeWarrior browser view 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 buildin
226. ember available symbols Code Completion Configuration You can activate deactivate and customize code completion operation Use these tasks to configure code completion e Activate automatic code completion Trigger code completion from the IDE menu bar Trigger code completion from the keyboard e Deactivate automatic code completion Activating Automatic Code Completion Activate automatic code completion to have the IDE display a Code Completion window that helps you complete the symbols you enter in source code The Code Completion preference panel configures the Code Completion window behavior 1 Choose Edit gt Preferences The IDE Preferences window appears 2 Select the Code Completion preference panel in the IDE Preference Panels list The Code Completion preference panel appears 3 Select the Automatic Invocation option Selecting this option configures the IDE to automatically open the Code Completion window IDE 5 1 User s Guide IDE 107 Editing Source Code Code Completion 4 Enter a delay in the Code Completion Delay field This delay determines how long the IDE waits between the time you type a trigger character and the time the Code Completion window appears If you perform any action during this delay time the IDE cancels the Code Completion operation 5 Save your preferences Click the Save or Apply button 6 Choose File gt Close The IDE Preferences window closes Th
227. en menu command 502 Open Recent menu command 502 Open Scripts Folder menu command 502 Open windows on debugging monitor during debugging option Windowing panel 433 Open Workspace menu command 503 opening 175 a layout 289 a recent workspace 84 a single class hierarchical window 171 component catalog window 301 component palette 291 files 62 IDE Preferences window 351 IDE 546 object inspector 296 projects 35 projects from other hosts 36 subprojects 42 Symbolics window 206 symbols window 175 Variable window 220 workspaces 83 opening last project default workspace 442 opening last project preventing default workspace 443 openings registers in a separate Registers window 218 optimizations Arithmetic Optimizations 400 Branch Optimizations 400 Common Subexpression Elimination 400 Copy And Expression Propagation 400 Copy Propagation 400 Dead Code Elimination 400 Dead Store Elimination 400 Expression Simplification 400 Global Register Allocation 400 Global Register Allocation Only For Temporary Values 400 Instruction Scheduling 401 Lifetime Based Register Allocation 401 Live Range Splitting 400 Loop Transformations 400 Loop Unrolling 401 Loop Unrolling Opt For Speed Only 401 Loop Invariant Code Motion 400 Peephole Optimization 400 Register Coloring 401 Repeated 401 Strength Reduction 400 Vectorization 401 options 420 Access Paths settings panel 359 389 Activate Browser 494 Activate Browser Coloring 411 Activate Synta
228. ened symbolics files for the IDE to display in the Open Recent submenu Enter zero to disable this feature Workspaces Enter the number of recently opened workspaces for the IDE to display in the Open Recent submenu Enter zero to disable this feature Context popup delay Macintosh Solaris and Linux Enter the number of ticks to wait before displaying contextual menus A tick is 1 60 of a second Use Third Party Editor Windows Select to use a third party text editor to edit source files Launch Editor Windows Enter a command line expression that runs the desired third party text editor Launch Editor w Line Windows Enter a command line expression that runs the desired third party text editor and passes to that editor an initial line of text to display Use Multiple Document Interface Windows Select to have the IDE use the Multiple Document Interface MDI Clear to have the IDE use the Floating Document Interface FDI Restart the IDE in order for interface changes to take effect Zoom windows to full screen Macintosh Solaris and Linux Select to have zoomed windows fill the entire screen Clear to have zoomed windows in a default size Use Script menu Macintosh Solaris and Linux Select to display the Scripts menu in the menu bar Clear to remove the Scripts menu from the menu bar Use External Editor Macintosh Solaris and Linux Select to
229. ening 42 strategies for 42 Success option Build Settings panel 440 summation of two variables 212 suspended process 245 259 Switch To Monitor menu command 513 symbol definitions 121 122 symbol definitions looking up 122 Symbol hint 202 symbol hint toggling 203 turning off 203 turning on 203 using 203 symbol implementations viewing all 175 symbol editing shortcuts 105 symbolics file defined 192 symbolics files choosing a debugger for 381 searching multiple 133 symbolics information 249 261 Symbolics menu command 513 Symbolics option IDE Extras panel 440 Symbolics window 205 239 249 261 clear eventpoint 263 opening 206 set eventpoint 262 set Watchpoint 250 using the Executables pane 206 207 using the Files pane 207 using the Functions pane 207 Symbolics Window menu command 513 symbols shortcuts for editing 105 IDE 557 viewing all implementations 175 Symbols list in Browser Contents window 172 Symbols pane 175 Symbols pop up 172 Symbols window 174 Source pane 176 Symbols pane 175 toolbar 175 symbols window 175 Synchronize Modification Dates command 50 Synchronize Modification Dates menu command 513 Synchronize Modification Dates toolbar button 46 System Paths list 391 Framework column 392 Recursive Search column 392 Search Status column 391 System Paths option Access Paths panel 440 T Tab indents selection option Font amp Tabs panel 441 Tab Inserts Spaces option Font amp Tabs p
230. ent value of the variable wi IDE 202 IDE 5 1 User s Guide Advanced Debugging Contextual Menus Toggling the Symbol Hint Enable the symbol hint to view information about program variables in source views 1 Select Edit gt Preferences The IDE Preferences window appears 2 Select Display Settings in the IDE Preference Panels list The Display Settings preference panel appears 3 Toggle Show variable values in source code e Selected enables the symbol hint e Cleared disables the symbol hint 4 Click Apply or Save to confirm your changes to the preference panel 5 Close the IDE Preferences window Using the Symbol Hint During a debugging session use the symbol hint to view information about program variables 1 Rest the cursor over a variable in a source view 2 After a brief pause the symbol hint appears and shows the current variable value Contextual Menus The contextual menu provides a shortcut to frequently used menu commands The available menu commands change based on the context of the selected item Sample uses of the contextual menu for debugging tasks include e Changing the format of variables displayed in variable panes or the General Registers window e Manipulating breakpoints and the program counter in source panes IDE 5 1 User s Guide IDE 203 Advanced Debugging Contextual Menus e Viewing memory in separate windows TIP Experiment using the contextual men
231. ents of a particular memory location by double clicking on that location in either the hexadecimal or ASCII pane of the Memory window Replace the current value by entering a hexadecimal value in the Hex pane or a string of ASCII characters in the ASCII pane Alternatively use a contextual menu to view and change memory as explained in Table 19 12 Table 19 12 Opening a Memory window by using a contextual menu On this host Do this Windows Right click the item and select View Memory Macintosh Control click the item and select View Memory Solaris Click and hold on the item then select View Memory Linux Click and hold on the item then select View Memory Viewing Memory Referenced by a Pointer Use the View Memory command to inspect the memory referenced by a pointer including an address stored in a register 1 Select a pointer in a source window 2 Choose Data gt View Memory A new Memory window appears IDE 226 IDE 5 1 User s Guide Advanced Debugging Memory Window 3 Select Raw data from the View list pop up The contents of memory referenced by the pointer appears in both hexadecimal and ASCII Viewing Different Memory Spaces Use the Page list pop up to view a particular memory space NOTE This feature is available only for processors that support multiple memory spaces 1 Select the name of a variable or a function in a source window 2 Choose Data gt View Memory
232. eplace 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 The menu command to replace 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 IDE 5 1 User s Guide Menu Commands Re search for Files The Re search for Files command speeds up builds and other project operations the IDE caches the locations of project files after finding them in the access paths Re search for Files forces the IDE to forget the cached locations of files 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 finds the source files in the same location the exception is if the file no longer exists in the old location In this case the IDE only re searches for header files To force the IDE to also re sear
233. er Data You can select an option in the Generate Browser Data From drop down menu to establish where the IDE generates browser data for a project file To generate browser data follow these steps 1 Choose Edit gt Target Settings 2 From the Target Settings Panels list select Build Extras IDE 148 IDE 5 1 User s Guide Using the Browser Browser Database 3 Choose Compiler or Language Parser from the Generate Browser Data From menu a Compiler The compiler generates browser data Figure 13 2 NOTE Some compilers do not generate browser data Figure 13 2 Generate browser data from compiler Build Extras Extras al Use modification date caching Al Cache Subprojects Generate Browser Data From f Compiler ITEN EE A R amp Dump internal browse information after compile This seeting is used by compiler developers to debug generated browser data If you enable Dump internal browse information after compile the generated browser data does not appear in a log window after you compile a file e Language Parser The Code Completion plug in associated with the project s programming language generates the browser data Browser data and the include pop up window update as you edit NOTE Choose Language Parser for C C code completion IDE 5 1 User s Guide IDE 149 Using the Browser Browser Database Figure 13 3 Generate browser data from language parser Build Extras Extras Z
234. er the MyMenu command group e Action This section shows information about the action the selected item performs For default menu commands this section shows the command type such as Command or Hierarchical Menu For customized menu commands that you create this section lets you specify a command line Windows Solaris and Linux or a script Mac OS that runs after you choose the customized menu command e Key Bindings This area consists of the Key Bindings list the New Binding button and the Auto Repeat checkbox IDE 5 1 User s Guide IDE 329 Customizing the IDE Customizing IDE Commands Creating a New Command Group To create a new command group for menu commands follow these steps 1 Click the New Group button The IDE creates a new command group called New Group adds it to the Commands list and displays its information in the Customize IDE Commands window 2 Rename the new command group in the Name field Change the default name of New Group to describe your new command group 3 Use the Appears in Menus checkbox to toggle the appearance 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 IDE 330 I
235. ersions of CodeWarrior manuals The CodeWarrior CD Documentation folder contains the electronic PDF manuals e HTML Hypertext Markup Language HTML or Compressed HTML CHM versions of CodeWarrior manuals Documentation Types Each CodeWarrior manual focuses on a particular information type e User guides User guides provide basic information about the CodeWarrior user interface User guides include information that supports all host platforms on which the software operates but do not include in depth platform specific information An example is the PowerParts User Guide e Targeting manuals Targeting manuals provide specific information required to create software that operates on a particular platform or microprocessor Examples include the Targeting Windows Targeting Java and Targeting DSP56800 manuals e Reference manuals Reference manuals provide specialized information that supports coding libraries programming languages and the IDE Examples include the C Compiler Reference MSL C Reference and Extending the CodeWarrior IDE manuals e Core manuals Core manuals explain the core technologies available in the CodeWarrior IDE Examples include IDE User s Guide C C Compilers Reference MSL C Reference and MSL C Reference Extending the CodeWarrior IDE Command Line Tools Reference Manual Conventions This section explains conventions in the IDE User s Guide Figure Conventions The CodeWa
236. es pane Symbolics window 206 207 use the Files pane Symbolics window 207 use the Find Previous command 137 use the Functions list pop up 116 use the Functions pane Symbolics window 207 use the Interfaces list pop up 116 use the Process pane 209 use the symbol hint 203 use the Version Control System VCS pop up 97 use virtual space 103 view a file path 49 view browser data by contents 173 view browser data by inheritance 168 view class data from hierarchy window 159 view registers 216 view wires by using the object inspector 318 for Tools menu 477 for VCS menu 476 IDE 537 icons eventpoints 256 file modification 97 for data members 163 for member functions 163 Inactive Eventpoint 252 Log Point 252 Pause Point 252 Script Point 252 Skip Point 252 Sound Point 252 IDE advantages 23 and threading 417 Apple menu 464 Browser menu 479 Code Completion window 110 CodeWarrior menu 464 Data menu 461 473 Debug menu 459 471 defined 17 Edit menu 453 466 editing source code 101 editor 91 File menu 451 464 Help menu 463 477 Layout menu 478 linkers 273 Mac hosted 340 menu reference 451 preferences working with 349 project manager and build targets 29 Project menu 457 469 Scripts menu 477 Search menu 455 467 target settings working with 385 Tools menu 476 tools overview 24 User Guide overview 17 VCS menu 476 Window menu 454 462 475 Windows hosted 341 workspaces 81 IDE Extras 476 477 IDE Extras
237. escribed herein and spe cifically disclaims any and all liability Metrowerks software is not authorized for and has not been designed tested manufactured or intended for use in developing applications where the failure malfunction or any inaccuracy of the application carries a risk of death serious bodily injury or damage to tangible property including but not limited to use in factory control systems medical devices or facilities nuclear facilities aircraft or automobile navi gation or communication emergency systems or other applications with a similar degree of potential hazard USE OF ALL SOFTWARE DOCUMENTATION AND RELATED MATERIALS ARE SUB JECT TO THE METROWERKS END USER LICENSE AGREEMENT FOR SUCH PRODUCT How to Contact Metrowerks Corporate Headquarters Metrowerks Corporation 9801 Metric Blvd Austin TX 78758 U S A World Wide Web http www metrowerks com Ordering amp Technical Support Voice 800 377 5416 Fax 512 997 4901 Table of Contents Introduction 1 IDE Users Guide Overview 17 Releas Not s 2 4 4 5 amp pa 8 o ee be eR hw Ge ake we et eo TY CodeWarriorU com 2 2 ee ee ee ee ee ee NT Documentation Structure 2 2 ee ee ee ee ee ee 18 Documentation Formats 22 444 18 Documentation Types 2 2 ee eee 19 Manual Conventions a a eee ee ee ee ee ee AYO Figure Conventions a ee ee eee 19 Keyboard Conventions
238. ession 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 Relaxed C popup parsing Use the Relaxed C popup parsing option to control the strictness of C coding conventions e Select the option to have the IDE recognize some non standard functions that interfere with Kernighan and Ritchie conventions The IDE displays the non standard functions in the Routine list pop up e Clear the option to have the IDE recognize only functions that conform to Kernighan and Ritchie conventions The IDE displays only the standard functions in the Routine list pop up For more information refer to Reference Manual of The C Programming Language Second Edition by Kernighan and Ritchie published by Prentice Hall NOTE Toggle the Relaxed C popup parsing option to maximize recognition of functions macros and routine names in the source code Remote download path Enter in this field the path to the directory in which to store files downloaded from the remote host application IDE 5 1 User s Guide IDE 435 Preference and Target Settings Options Require Framework Style Includes This option determines the strictness with which the IDE treats include statements for frameworks e selected the IDE requires the framework in addition to the referenced header file In the example i
239. ession 2 Open the Breakpoints window 3 Double click the condition column of the breakpoint 4 Enter a conditional expression in the Condition text box 5 Choose Project gt Debug During subsequent debugging runs the debugger evaluates the conditional breakpoint to determine whether to stop the program at that breakpoint NOTE Alternatively drag and drop an expression from a source view or from the Expression window into the Breakpoints window IDE 5 1 User s Guide IDE 237 Using Breakpoints Common Breakpoint Tasks IDE 238 IDE 5 1 User s Guide 21 Using Watchpoints This chapter explains how to use Watchpoints in the CodeWarrior IDE and contains these sections e About Watchpoints on page 239 e Using Watchpoints in the Memory Window on page 240 e Using Watchpoints in the Watchpoints Window on page 242 e Using Watchpoints in Other Windows on page 245 About Watchpoints A Watchpoint tracks locations in memory that you want the debugger to observe Set a Watchpoint when you want the IDE to alert you to which part of the program changed a particular location in memory Unlike a Breakpoint a Watchpoint can detect when any part of the program affects the global data When the program writes a new value to that location or area of memory the debugger suspends program execution and notifies you with an alert Typically the variables or memory locations on which you se
240. ew Catalog Click to create a new catalog file New Folder Click to create a new folder within the active catalog Open Catalog Click to open a catalog file and add it to the All Catalogs list Close Catalog Click to close the selected catalog in the All Catalogs list Import Components Click to import jar files beans and add it to the All Catalogs list Toggle Index View Click to toggle the appearance of the Catalog list ee Ee IDE 300 IDE 5 1 User s Guide Component Editing Component Catalog Window Table 27 1 Component Catalog window items continued Component Icon Description Edit Item Properties To open an Object Inspector window for editing of the selected GUI ff component click Edit Item Properties Component Palette To open the active catalog s GUI component palette click Component Palette All Catalogs list Displays a list of all current open catalog files Components list Displays a list of all GUI components stored in the active catalog file To edit a component select it then click Edit Item Properties List View a Click the List View icon to display the active catalog s GUI components in the Components list in list format Live View amp Click the Live View icon to display the active catalog s GUI components in the Components list in active graphic form Opening the Component Catalog Open the Component Catalog to c
241. ews Viewing a File Path To distinguish between two files that have identical names but reside in different folders examine the file path To view the complete file path of a file perform the task explained in Table 4 3 Table 4 3 Viewing a file path On this host Do this Windows Right click the filename and select Open in Windows Explorer Macintosh Control click the filename and select File Path Solaris Click and hold on the filename then select File Path Linux Click and hold on the filename then select File Path The File Path submenu displays the path to the file Designs View The Designs view presents information about designs for projects that use Rapid Application Development RAD Layout files typically appear in the Designs view These files describe the graphical user interface for a computer program Table 4 4 explains the items in the Files view Table 4 4 Designs view items Object Displays all design objects available in the current build target of the project Class Displays the class type of each object Link Order View The Link Order view presents information about the order in which the IDE links project files Manipulate the files in this view to change the link order For example if IDE 5 1 User s Guide IDE 49 Project Window Project Window Views file B depends on file A in order to function move file B below file A in the Link Order view Tabl
242. f a source line on which you set the eventpoint Sound Point g The IDE plays a sound when it finds an eventpoint Inactive eventpoint This icon shows that an eventpoint is inactive disabled IDE 252 IDE 5 1 User s Guide Using Eventpoints About Eventpoints Log Point A Log Point is an eventpoint that logs or speaks a string or expression A Log Point records messages to the log window You can configure the message that appears in the log window Figure 22 2 Log Point settings Log Point Settings xj Message Write a message here V Log Message IV Treat as Expression MV Speak Message M Stop in Debugger Select at least one of these Log Point settings e Log Message the default setting for Log Point the IDE writes the message you type in the Message field in an IDE log window when it finds an eventpoint e Speak Message select to have the debugger use the operating system to speak the message you type in the Message field NOTE Windows Install the Speech software development kit SDK in order to use the Speak Message option Treat as Expression evaluates the text you typed in the Message field For example if you enter n 100 in the Message field the debugger parses that text as an expression TIP Include quotation marks around your expression for example n 100 Stop in Debugger select to have the debugger stop when it finds an eventpoint IDE 5 1 User s
243. f el B hello cpp 7903 2269 fx HA MSL ANSI Libraries 176K 38K oe a aE Win32 SDK Libraries 0 180 a B dG files 184K 41K A Table 4 1 Project window items Item Icon Explanation Current Target Debug wind x86 gt Choose the current build target with which to work Target Settings Click to view and edit the settings for the current build target Synchronize Modification Dates Click to check the modification dates of each project file and mark those files that need compilation Make Click to compile and link all modified and manually selected touched project files Debug Click to debug the current build target Run Click to compile and link the current build target then run the program Project Inspector Click to view project information and edit file specific information shee ko IDE 46 IDE 5 1 User s Guide Project Window Project Window Views Table 4 1 Project window items continued Item Icon Explanation Files Click this tab to display a list of files in the project and their properties Designs Click this tab to display the rapid application development RAD designs in the project The Designs tab appears only in projects that support RAD development Link Order Click this tab to display the link order of files in the current build target Frameworks Click this tab to display available programming frameworks to link agai
244. f found the file is opened in an editor window If not found an alert sounds 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 Using the Functions Menu Use the Functions menu in editor windows to quickly navigate to specific functions or routines in the current source file 1 Click the Functions menu 2 Select the routine name to view IDE 116 IDE 5 1 User s Guide Navigating Source Code Finding Interface Files Functions and Lines The editor scrolls to display the selected routine Alphabetizing Functions Menu with the Mouse and Keyboard The default behavior of the Functions menu is to list functions in order of appearance in the source file You can use the mouse and keyboard to list functions in alphabetical order Table 11 1 Alphabetizing the Functions listexplains how to use the mouse and keyboard to alphabetize functions in the Functions menu Table 11 1 Alphabetizing the Functions list On this host Do this Windows Ctrl click the Functions menu Macintosh Option click the Functions menu Solaris Alt click the Functions menu
245. f the component with the smallest height To Largest Height Resizes the selected components to match the height of the component with the largest height IDE 480 IDE 5 1 User s Guide 35 Menu Commands This section presents an alphabetical listing of all available menu commands in the CodeWarrior IDE Menu commands that appear only on certain host platforms are documented A menu command that has no host information is available on all hosts Use this listing as a reference to find information about a specific menu command About Metrowerks CodeWarrior This command displays the CodeWarrior IDE version and build number 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 IDE 5 1 User s Guide IDE 481 Menu Commands IDE 482 Align Reveals the Align submenu with component alignment commands like Right Edges Vertical Centers an
246. f the Find text box string in the next file listed in the Find in Files window The menu command as an alternative to using the Find in Files window itself Find In Previous File This command searches for the next occurrence of the Find text box string in the previous file listed in the Find in Files window The menu command as an alternative to using the Find in Files window itself NOTE Macintosh Press the Shift key to change the Find In Next File menu command to the Find In Previous File menu command Find Next The Find Next command searches for the next occurrence of the Find text box string in the active window Find and Open File Uses the Find and Open File command opens the Find and Open File dialog Enter a filename click OK and the IDE searches the current project access paths as specified in the Access Paths panel of the Target Settings window Find and Open Filename The Find and Open Filename command opens an existing text file using the currently selected text in the Editor window as the target filename IDE 5 1 User s Guide IDE 495 Menu Commands IDE 496 Find Previous The Find Previous command searches for the previous occurrence of the Find text box string in the active window NOTE Macintosh Press the Shift key to change the Find Next menu command to the Find Previous menu command Find Previous Selection The Find Previous Selection searches for the previous occurrence of the selec
247. faces list pop up 48 Sort Order button 48 IDE 533 Target column 48 Touch column 48 Files view about 47 files tasks for managing 61 Find 126 128 130 by text selection 137 single file 126 Find All 126 130 Find and compare operations option Shielded Folders panel 425 Find And Open Filename menu command 495 Find and Open File command 495 Find and Replace multiple file 129 single file 127 Find And Replace menu command 496 Find command 127 494 Find Definition amp Reference command 122 Find Definition amp Reference menu command 494 Find Definition menu command 494 Find In Files menu command 495 Find in Files window In Files tab 134 In Folders tab 131 In Projects tab 132 In Symbolics tab 133 Find In Next File menu command 495 Find In Previous File menu command 495 Find list pop up 126 128 130 Find Next menu command 495 Find Previous using 137 Find Previous menu command 496 Find Previous Selection menu command 496 Find Reference command 122 Find Reference menu command 496 Find Reference using option IDE Extras panel 425 Find Selection command 138 Find Selection menu command 496 Find symbols with prefix 105 Find symbols with substring 105 Find text box 126 128 130 finding text explained 125 overview 125 Flags pop up menu 397 IDE 534 Ignored By Make flag 397 Launchable flag 397 Precompiled File flag 397 Resource File flag 397 floating a window 75 Floating Document Interface 444 floating window type 70
248. fied Program entry point Select to halt program execution upon entering the program Default language entry point Select to halt program execution upon entering a default point defined by the programming language User specified Select to halt program execution at a specified function Enter the desired function name in the corresponding field Auto target Libraries Select to debug dynamically linked libraries DLLs loaded by the target application at the expense of slower performance Cache symbolics between runs Select to have the IDE cache the symbolics information it generates for a project Clear to have the IDE discard the information after each debugging session ends IDE 5 1 User s Guide IDE 407 Working with Target Settings Debugger Panels Table 32 12 Debugger Settings panel items continued Item Explanation Log System Messages Select to log all system messages to a Log window Stop at Watchpoints Select to halt program execution at every watchpoint Clear to halt program execution at watchpoints with changed values Update data every n seconds Enter the number of seconds n to wait before updating the data displayed in debugging session windows Remote Debugging The Remote Debugging settings panel configures target specific network settings for remote debugging connections between the host computer and other computers Use this target specific p
249. field the number of recent workspace files to display in the Open Recent submenu Zoom windows to full screen Use the Zoom windows to full screen option to configure the behavior of the zoom box in the upper right hand corner of all editor windows e Select the option to have the IDE resize a zoomed window to fill the entire screen e Clear the option to have the IDE resize a zoomed window to its default size IDE 5 1 User s Guide IDE 447 Preference and Target Settings Options IDE 448 IDE 5 1 User s Guide IX Menus This section contains these chapters IDE Menus e Menu Commands IDE 5 1 User s Guide IDE 449 IDE 450 IDE 5 1 User s Guide 34 IDE Menus This chapter provides an overview of CodeWarrior IDE menus and their commands The IDE provides two different arrangements of IDE menus configurable in the IDE Extras preference panel e Windows menu layout e Macintosh menu layout This chapter lists the IDE menus under each menu layout For each menu a table shows this information e Menu command the name of each command in the menu e Description a short description of each command This chapter has these sections e Windows Menu Layout on page 451 e Macintosh Menu Layout on page 464 e Rapid Application Development RAD Menus on page 478 Windows Menu Layout This section provides an overview of the menus and menu commands available in the Windows menu
250. file paths 49 registers 216 viewing installed plug ins 481 viewing installed products 481 views in project window 47 virtual icon for 163 virtual space using 103 W Watchpoint 239 Conditional 248 enabling and disabling in the Thread window 247 setting in the Symbolics window 250 watchpoint clearing in the Thread window 246 setting in the Thread window 246 Watchpoint Indicator option Display Settings panel 446 watchpoint clear 246 watchpoint set 246 Watchpoints clear 249 purpose of 239 using 239 Watchpoints menu command 520 Watchpoints window 240 242 Watchpoints Window menu command 520 what is a debugger 191 a symbolics file 192 advanced debugging 202 Window Customize IDE Commands 344 window Breakpoints 259 Memory 239 Symbolics 239 Variable 239 247 Watchpoints 240 Window Follows Insertion Point option 446 Window Menu Restore Window command Windows 508 Window menu 454 462 475 IDE 5 1 User s Guide Window position and size option Editor Settings panel 446 window types docked 70 floating 70 MDI child 70 Windowing panel options Hide non debugging windows 427 Minimize non debugging windows 432 Monitor for debugging 432 Move open windows to debugging monitor when debugging starts 432 Open windows on debugging monitor during debugging 433 Use Debugging Monitor 442 Windowing preference panel 377 options Close non debugging windows 378 Collapse non debugging windows 378 Do nothing 378 Do
251. files The IDE improves efficiency by searching only the specified files in the file set The IDE provides different windows for find operations replace operations and find and replace operations IDE 5 1 User s Guide IDE 125 Finding and Replacing Text Single File Find 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 e The Find All operation returns all instances of matching text Figure 12 1 shows the Find window Table 12 1 explains the items in the Find window Figure 12 1 Find window Find stat ppet ssts sisS Find I Match whole word F Stop at end of file Find All I Case sensitive Direction Regul Cancel Regular expression C Up mR ance I Search selection only Table 12 1 Find window items Item Explanation Find text box Enter the search string Find list box Select a previously searched string to insert into the Find text box Find Click to start a search operation using the string in the Find text box Find All Click to search for all matches in the active editor window Cancel Click to close the Find window without performing a search Match whole word Select to search for whole word matches only ignoring matches within words Case sensitive Select to search for matches of the search string according to text case Regular expression Select to interpret fin
252. finition in the Source pane IDE 5 1 User s Guide IDE 175 Using Other Browser Windows Symbols window Source pane The Source pane used in the Symbols window is identical to the one used by the Class Browser window See Source pane on page 165 for more details IDE 176 IDE 5 1 User s Guide 16 Using Browser Wizards When you create a new class member function or data member in the IDE you use browser wizards These wizards provide the steps to help you complete the process This chapter provides information on these wizards e The New Class Wizard on page 177 e The New Member Function Wizard on page 182 e The New Data Member Wizard on page 185 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 the 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 The New Class Wizard Use the New Class wizard to specify the name declaration and location for a new class Click Finish in any screen to apply default values to remaining parameters to complete the process The New Class wizard creates the files that define the class IDE 5 1 User s Guide IDE 177 Using Browser Wizards The New Class Wizard Figure 16 1 New Class wizard Name and Location Class Name New
253. focus bar 53 folders searching multiple 131 Font amp Tabs panel 370 options Font 426 Scripts 437 Size 439 Tab indents selection 441 Tab Inserts Spaces 441 Tab Size 441 Font amp Tabs preference panel 368 371 options Auto Indent 369 Font 369 Script 369 Size 369 Tab indents selection 369 Tab Inserts Spaces 369 Tab Size 369 Font option Font amp Tabs panel 426 Font Preferences option Editor Settings panel 426 Font Settings 370 Foreground option Text Colors panel 426 format for end of line EOL 418 formats for documentation 18 FPU Registers 215 Framework column in Access Paths panel 392 function New Data Member 164 functions creating new member 163 locating 115 116 Functions list pop up 95 sorting alphabetically 117 using 116 Functions option 372 IDE 5 1 User s Guide G General Registers 215 General section of IDE preference panels 351 Generate Browser Data From option 426 Compiler 426 Language Parser 427 Language Parser Macro file 427 Language Parser Prefix file 427 None 426 Generate Constructor and Destructor 180 Get Next Completion menu command 497 Get next symbol 105 Get Previous Completion menu command 497 Get previous symbol 105 Global Optimizations settings panel 398 options Details 399 Faster Execution Speed 399 Optimization Level slider 399 Smaller Code Size 399 Global Register Allocation 400 Global Register Allocation Only For Temporary Values 400 Global Settings panel options Maintain
254. for the layout editor Table 26 2 Contextual menu commands in the layout editor Command Description Align Aligns selected objects first with the grid in the layout window then second in relation to other selected objects You can show or hide the grid in the layout editor Resize Resizes selected components in relationship to other selected components Send To Back Moves selected objects so that they appear behind all other objects in the layout Bring To Front Moves selected objects so that they appears in front of all other objects in the layout Display Grid If checked a grid appears in the layout window If not checked the grid does not appear Snap To Grid If checked the layout editor automatically aligns objects with the graphical grid If not checked you can freely move objects in the layout Customize Opens a customization utility for the selected component This command is available only for those components that support customization utilities Properties Opens the object inspector which shows the properties and events for the selected component IDE 5 1 User s Guide IDE 289 Layout Editing Component Palette Table 26 2 Contextual menu commands in the layout editor New Wire Opens the Create Wire wizard Use this wizard to create a new wire in the layout Edit Wire Opens the Create Wire wizard for the selected wire Use this wizard to modify the wire details Follo
255. g hwnd GWL_HINSTAb telse hInst GetWindowWJord hwnd GWW_HINSTANCE endif if hbrBtnFace 0 hbrBtnFace CreateSolidBrush GetSysColc if hbrWindow 0 hbrWindow CreateSolidBrush GetSysColor Line 1 Coll lal TZ Table 9 1 Editor window items Item Explanation Interfaces Menu Displays a list of referenced interface files or header files for the source file z s 4 Functions Menu Displays a list of functions defined in the source file hf oo Markers Menu Displays a list of markers defined in the file Document Settings Menu Displays file format options and a syntax coloring toggle a a IDE 92 IDE 5 1 User s Guide The CodeWarrior Editor Editor Toolbar Table 9 1 Editor window items continued Item Icon Explanation Version Control System Displays a list of available Version Control System Menu d T VCS commands Choose a command to apply to the source file Path Caption Path Displays the complete path to the file File Modification Icon y This icon indicates an unchanged file since the last save This icon indicates a file with modifications not yet saved Breakpoints Column Displays breakpoints for the file Text Editing Area Shows the text or source code content of the file Line and Column Line 1 Col 1 Displays the current line and column number of the Indicator text insertio
256. g projects and linking projects Table 34 14 Project menu commands Menu command Add Window the name changes based on the name of the selected item Explanation Adds the active window to the project Add Files IDE 5 1 User s Guide Opens a dialog that you can use to add multiple files to the active project IDE 469 IDE Menus Macintosh Menu Layout Table 34 14 Project menu commands continued Menu command Create Group or Create Target or Create Overla or Create Segment Explanation Displays the Create Group dialog where you can add a new file group to the active project immediately after the selected file or group Displays the Create Target dialog where you can add a new build target to the active project immediately after the selected build target Displays the Create Overlay dialog where you can add a new memory overlay to the active project immediately after the selected overlay Displays the Create Segment dialog where you can add a new segment to the active project immediately after the selected segment Create Design Opens the Create New Design dialog box that you can use to add a design to the active project The new design appears in the Design tab of the project window Check Syntax Checks the active editor window or selected files in the project window for compilation errors Preprocess Preprocesses the active editor window or se
257. g the text insertion point past the end of a line of text using either the arrow keys or the mouse After moving to the desired position begin entering text The editor automatically inserts spaces between the former end of the line and the newly entered text e cleared the editor requires manual insertion of spaces to move past the end of a line of text 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 IDE 5 1 User s Guide IDE 421 Preference and Target Settings Options 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 Enter in this field a file name extension such as the c or h for a selected File Type in the File Mappings list Table 33 2 on page 422 lists default file name extensions Table 33 2 Default file name extensions Type Extension Explanation Minimum iSYM CodeWarrior Intel Symbols CodeWarrior Installation mch CodeWar
258. g this button the Edit Key Binding dialog box appears Figure 30 11 Edit Key Bindings Edit Key Bindings xj seo O E x E 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 IDE 346 IDE 5 1 User s Guide Customizing the IDE Customize Key Bindings Exporting Commands and Key Bindings You can export commands and key bindings for later use if you do not want to delete them To export a command or key binding 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 a computer or network folder to save the Cnds amp Bindings file 3 Click Save The IDE exports the current commands and key bindings to a file at that location TIP Complete the name of the Cmds amp Bindi
259. 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 the targets you frequently use IDE 5 1 User s Guide IDE 147 Using the Browser Browser Database 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 13 1 in the Build Extras target settings panel to enable and disable browser data generation This drop down menu provides these options which determine where the IDE generates browser data e None The IDE does not generate browser data Use None to disable browser data Select None to generate faster compiles with no browser features e Compiler The Compiler generates the browser data While it compiles more slowly the compiler generates the most accurate browser data e Language Parser The Code Completion plug in associated with the project s programming language generates the browser data Figure 13 1 Generate Browser Data From menu Build Extras Extras Vv Use modification date cachin None bprojects Generate Browser Data From pcom EA Language Parser EIEII IANN A A IES f F Dump internal browse information after compile This seeting is used by compiler developers to debug generated browser data Generating Brows
260. gger to observe how a program uses memory to complete tasks The CodeWarrior debugger provides these levels of control over a computer program e Execution of one statement at a time e Suspension of execution after reaching a specific point in the program e Suspension of execution after changing a specified memory location After the debugger suspends program execution use various windows to perform these tasks e View the function call chain e Manipulate variable values IDE 5 1 User s Guide IDE 191 Introduction to Debugging What is a Symbolics File e View register values in the computer processor What is a Symbolics File A symbolics file contains debugging information generated by the IDE for a computer program The debugger uses this information to provide control over program execution For example the debugger uses the symbolics file to find the source code that corresponds to the executing object code of the computer program Symbolics files usually contain this information e Routine names e Variables names e Variable locations in source code e Variable locations in object code The IDE supports several types of symbolics files Some programs generate separate symbolic files while others do not For example when using CodeView on Windows the IDE places the symbolics file inside the generated binary file IDE 192 IDE 5 1 User s Guide 18 Basic Debugging This chapter explains how to perform basic debugging
261. ging printf messages Macintosh hosted Log window messages include PowerPC code fragments e DebugStr messages Figure 19 8 shows the Log window Figure 19 8 Log window e Log for C Console Debug exe Win32 Debug Session 02 Program load 0x00400000 PID 0x00000518 Loading ntdll dll 0x77F80000 Loading KERNEL32 d11 0x 77E80000 Loading USER32 d11 0277E10000 Loading GDI32 d11 0x77F40000 Opening the Log Window Use the Debugger Settings preference panel to enable message logging The Log window records these types of messages for a program during a debugging session IDE 5 1 User s Guide IDE 219 Advanced Debugging Variable Window e the start of new tasks e routine entry and exit e Windows DLL loading and unloading and debug printf messages e Macintosh PowerPC code fragment loading and DebugStr messages 1 Select the Log System Messages option in the Debugger Settings preference panel 2 Select Project gt Debug The Log window appears It allows selecting copying and saving logged text to a file for later analysis See the Targeting documentation for additional information Variable Window A Variable window allows manipulation of a single variable used in source code For a local variable the window closes after program execution exits the routine that defines the variable Figure 19 9 shows the Variable window Figure 19 9 Variable window msg
262. gs Window Opens or brings to the front an Errors amp Warnings window Project Inspector IDE 5 1 User s Guide Opens or brings to the front a Project Inspector window IDE 475 IDE Menus Macintosh Menu Layout Table 34 17 Window menu commands continued Menu command Description ToolServer Worksheet Opens or brings to the front a ToolServer Worksheet window When using the Macintosh menu layout on a Windows host this command does not appear Symbolics Window Opens or brings to the front a Symbolics window Processes Window Opens or brings to the front a Processes window Expressions Window Opens or brings to the front an Expressions window Use to view create modify and remove expressions Global Variables Window Opens or brings to the front a Global Variables window Breakpoints Window Opens or brings to the front a Breakpoints window Use to view create modify and remove breakpoints Watchpoints Window Opens or brings to the front a Watchpoints window Use to view create modify and remove watchpoints Register Window Opens or brings to the front a Register window Component Catalog Opens or brings to the front a Component Catalog window Component Palette Opens or brings to the front a Component Palette Object Inspector Opens or brings to the front an Object Inspector window Use to view or modify object s properties ID
263. guage keyword such as boolean in the source code 3 Choose the Find Reference menu command The IDE looks up reference information for the boolean keyword in the THINK Reference documentation Although they are not included with the CodeWarrior product the IDE supports these online browser formats e Apple Help Viewer CW manuals e Apple Help Viewer Mac OS X API Ref e PalmQuest Reference Palm Pilot e QuickView such as Macintosh Programmer s Toolbox Assistant MPTA THINK Reference IDE 5 1 User s Guide IDE 425 Preference and Target Settings Options 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 e No editor windows open the setting modifies the default font All editor windows take on the default font e 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 amp 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 optio
264. hapter See Preference and Target Settings Options on page 411 for more information on preference panel options IDE Preferences Window The IDE Preferences window lists global IDE preference options These preferences unless superseded by a Target Settings option apply to every open project file The IDE Preferences window lists preferences by group General configures overall IDE preferences such as project builds recent items and third party tools Editor configures editor preferences such as fonts tabs and syntax coloring Debugger configures debugger preferences such as window hiding during debugging sessions low level interactions and variable highlighting RAD Tools configures Rapid Application Development preferences such as Layout Editor operation IDE 5 1 User s Guide IDE 349 Working with IDE Preferences IDE Preferences Window Figure 31 1 IDE Preferences window x IDE Preference Panels Font amp Tabs General a Build Settings m Font settings IDE Extras Font Courier Size 9 7 Plugin Settings er Shielded Folders Script westem Source Trees Sample Editor A I program therefore I am Code Completion Editor Settings Font amp Tabs Text Colors m Tab settings Debugger IV Tab indents selection Tab Size je id rnin JV Auto Indent Global Settings Tab Inserts Spaces Remote Connections Java Settings x86 Settings Factory
265. haracter Repeating Expressions Use the and operators to indicate recurring characters in the search string The IDE matches the largest possible string with the regular expression This regular matches this text in this text sample expression var varl cout lt lt varl var2 cout lt lt var2 Git cut cin gt gt cutF cot cin gt gt cotG Table 12 9 shows examples using repeating text in regular expressions IDE 5 1 User s Guide IDE 141 Finding and Replacing Text Regular Expression Find Table 12 9 Examples of repeating expressions This regular matches this text in this text sample expression s ion ion information ssion the session st ion sion confusion ssion the session Grouping Expressions Use the and operators to group regular expressions into a single unit in the search string The IDE applies operators to the unit Table 12 10 shows examples of grouping text in regular expressions Table 12 10 Examples of grouping expressions This regular matches this text in this text sample expression ris ris surprise r i s ris the value of theVar is Choosing One Character from Many Use the and operators to define a list of possible character matches The IDE matches the search string with text that contains any character in the list Precede the list with to match text with any character not in the list Any operator immed
266. hat appears as a visual cue that the IDE will dock the second window to the same edge as the first window 3 Dock subsequent windows to the same edge as the first window Each additional docked window appears as a tab inside the first docked window Click a tab to view its contents The frontmost tab appears in bold font Figure 6 2Figure 6 2 shows two projects represented as tabs in a single docked window IDE 5 1 User s Guide IDE 73 Dockable Windows Working with Dockable Windows Figure 6 2 Two projects in a single docked window xx javatest mcp emptytest mep javatest Debug NE y A A m Files Design Link Order Targets g H System Classes o AB Framel java 1526 0s gf B Application java 854 O gf Undocking a 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 Figure 6 3 Contextual menu ax javatest mc ae pl Docked Floating MDI Child javatest Det Files Design az IDE 74 IDE 5 1 User s Guide Dockable Windows Working with Dockable Windows Choose Floating or MDI Child from the contextual menu Floating undock the window so that it becomes a floating window MDI child undock the window so that it becomes an MDI child window of th
267. he project access paths Synchronize Modification Dates Updates the modification dates of all source files in the active project Debug Compiles and links all marked or modified files in the current build target of the active window then runs the built executable file or Resume Compiles and links all marked or modified files in the current build target of the active window then runs the built executable file 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 Debug Menu The Debug menu contains commands for managing program execution Table 34 15 Debug menu commands Menu command Explanation Kill Terminates the current debugging session returning control to he IDE Restart Terminates the current debugging session then restarts the program from the beginning IDE 5 1 User s Guide IDE 471 IDE Menus Macintosh Menu Layout Table 34 15 Debug menu commands continued Menu command Explanation Step Over Executes each source line in the program treating routine calls as a single statement an
268. he Interface menu for the file or group A red check mark appears in the Touch column next to the file or group name Touch all project files for recompiling 1 Perform the task explained in Table 4 9 on page 55 IDE 54 IDE 5 1 User s Guide Project Window File Group Layout and Target Management Table 4 9 Touching all project files for recompiling On this host Do this Windows Alt click the Touch column Macintosh Option click the Touch column Solaris Alt click the Touch column Linux Alt click the Touch column 2 Red check marks appear next to all files and groups Untouching Files and Groups The Untouch command manually excludes source files or groups from compilation during the next Bring Up To Date Make Run or Debug operation 1 Click the Files tab in the Project window 2 Untouch a source file or group to remove it from the compilation list e Click the red check mark in the Touch column next to the file or group name OR e Choose Untouch from the Interface menu for the file or group The red check mark disappears from the Touch column next to the file or group name Untouch all project files 1 Perform the task explained in Table 4 10 Table 4 10 Untouching all project files On this host Do this Windows Alt click a red checkmark in the Touch column Macintosh Option click a red checkmark in the Touch column Solaris Alt click a red checkmark in the Touch col
269. he Set Default Project command sets a particular project as the default project when more than one project is open This is the project that all commands are directed IDE 5 1 User s Guide Menu Commands Set Default Target The Set Default Target command works with a different build target within the current project Choose the build target to work with from the submenu This menu command is useful for switching between multiple build targets in a project and performing a build for each target Set Eventpoint This command opens a submenu that lets you set an eventpoint at the currently selected line If the Show Breakpoints option is active the Breakpoints column in the editor windows shows a marker next to each line with an eventpoint The marker represents the eventpoint type Set Watchpoint The Set Watchpoint command sets a watchpoint for the selected variable or memory range Watchpoint variables are identified using an underline 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 Breakpoints The Show Breakpoints command displays the Breakpoints column in editor windows When active the Breakpoints column appears along the left edge of all editor windows Show Floating Toolbar
270. he 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 Symbolics Symbolics Window These commands open the Symbolics window Use this window to examine the executable files in a project Synchronize Modification Dates The Synchronize Modification Dates command updates the modification dates stored in the project file The IDE checks the modification date of each file in the project and marks for recompiling those files modified since the last successful compile process 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 IDE 5 1 User s Guide IDE 513 Menu Commands Tile Editor Windows The Tile Editor Windows command arranges and resizes all open editor windows so that none overlap on the monitor Figure 35 1 Tile Editor windows example oe e Ed Tile Editor Windows Vertically The Tile Editor Windows Vertically command resizes all open editor windows to be vertically long and arranged horizontally across the monitor so that all are viewable Tile Horizontally This command
271. he print options in the print dialog 5 Print the Project window contents as explained in Table 3 3 Table 3 3 Printing the Project window contents Windows Click OK Macintosh Click Print IDE 5 1 User s Guide IDE 37 Working with Projects Managing Projects Table 3 3 Printing the Project window contents continued Solaris Click Print Linux Click Print The IDE prints the contents of the selected tab in the Project window Choosing a Default Project The IDE allows multiple open projects at the same time However a given source file can belong to more than one open project making it ambiguous as to which project a source file operation applies To resolve ambiguity choose the default project to which the IDE applies operations 1 If only one project is open it automatically becomes the default project 2 Ifmore than one project is open choose Project gt Set Default Project to select the desired default project In ambiguous situations the IDE applies operations to the selected default project Exporting Projects to XML Files The IDE can export a project to an Extensible Markup Language XML file Use this capability to store projects in text oriented environments such as a version control system 1 Bring forward the project to export 2 Choose File gt Export Project 3 Name the exported XML file and save it in the desired location The IDE converts the project to
272. heckout Status column 48 Code column 48 Data column 48 Debug column 48 File column 48 Interfaces list pop up 48 Sort Order button 48 Target column 48 Touch column 48 Make toolbar button 46 Synchronize Modification Dates toolbar button 46 Target Settings toolbar button 46 project window 45 Designs view 49 Link Order view 49 Targets view 50 views 47 project window about 45 project defined 29 projects about subprojects 41 advanced topics 39 choosing default 38 closing 39 creating custom stationery 40 creating empty 35 IDE 5 1 User s Guide creating subprojects 41 creating using makefiles 33 creating using stationery 33 data folder 443 exporting to XML files 38 generating link maps for 274 importing XML versions of 39 inspecting files 36 linking 274 managing 32 opening 35 opening from other hosts 36 printing 37 project window 45 project window views 47 project window about 45 reopening last one used default workspace 442 reopening last one used preventing default workspace 443 saving 36 searching multiple 132 strategies for 42 subprojects strategies for 42 working with 29 Projects option IDE Extras panel 434 Properties button in layout editor 288 Properties command 289 Properties menu command 504 Properties tab in object inspector 295 punctuation balancing toggling 106 punctuation balancing 105 pure virtual icon for 163 Purge Cache button 434 Purge Cache option 415 purging cache 434 purpose of Br
273. hen Debugging Starts _ O Do nothing O Collapse non debugging windows Hide non debugging windows Close non debugging windows wl Do nothing to project windows IDE 5 1 User s Guide IDE 377 Working with IDE Preferences Debugger Panels Table 31 15 Windowing preference panel items Item Explanation Do nothing Select to leave all windows in place when starting a debugging session Minimize non debugging_ Select to minimize all non debugging windows when starting a windows Windows debugging session Collapse non debugging_ Select to collapse all non debugging windows when starting a windows Macintosh Solaris debugging session and Linux Hide non debugging windows Select to hide but not close all non debugging windows when starting a debugging session Close non debugging windows Select to close all non debugging windows except for the active project window when starting a debugging session Do nothing to project windows Select to prevent the IDE from hiding project windows when starting a debugging session Use Debugging Monitor Select to use a second monitor during debugging sessions Classic Macintosh Monitor for debugging Choose the monitor to display debugging windows The coordinates Classic Macintosh in parentheses identify the selected monitor in the QuickDraw coordinate space Move open windows to Select to move all open windows to the selected
274. hese sections e Target Settings Window on page 385 e Target Panels on page 387 e Code Generation Panels on page 398 e Editor Panels on page 401 e Debugger Panels on page 403 Abbreviated descriptions appear in this chapter See Preference and Target Settings Options on page 411 for more information on target settings panel options Target Settings Window The Target Settings window lists settings for the current project s build targets These target settings supersede global IDE preferences defined in the IDE Preferences window The Target Settings window lists settings by group e Target configures overall build target settings such as names browser caching file mappings and access paths e Language Settings configures programming language settings Consult the Targeting documentation for more information about these settings panels e Code Generation configures processor disassembler and optimization settings for generating code IDE 5 1 User s Guide IDE 385 Working with Target Settings Target Settings Window e Linker configures linker settings for transforming object code into a final executable file Consult the Targeting documentation for more information about these settings panels e Editor configures custom keyword sets and colors e Debugger configures settings for executable files program suspension and remote debugging Figure
275. hs IDE 458 Resets the location of all source files in the active project using the project access paths IDE 5 1 User s Guide IDE Menus Windows Menu Layout Table 34 5 Project menu commands continued Menu command Synchronize Modification Dates Explanation Updates the modification dates of all source files in the active project Debug Compiles and links all marked or modified files in the current build target of the active window then runs the built executable file or Resume Compiles and links all marked or modified files in the current build target of the active window then runs the built executable file 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 Debug Menu The Debug menu contains commands for managing program execution Table 34 6 Debug menu commands IDE 5 1 User s Guide Menu command Explanation Break Pauses execution of the program in a debugging session to enable examination of register and variable contents Kill Terminates the current debugging se
276. iately following the operator becomes a literal character Use the operator to define a range of possible character matches The IDE matches the search string with text that contains any character in the defined range The operator becomes a literal character when placed at the beginning or end of a list Table 12 11 shows examples of using regular expressions to choose one character from many characters IDE 142 IDE 5 1 User s Guide Finding and Replacing Text Regular Expression Find Table 12 11 Examples of choosing one character from many This regular matches this text in this text sample expression bls ag sag bag lag the sagging bag lagged aeiou 0 9 2 u9 cout lt lt a 2 lt lt u9 bls ag rag the sagging rag lagged ab V av V aVal Val Matching Line Beginnings and Endings Use the operator to identify a search string to match only with the beginning of a line Similarly use the operator to identify a search string to match only with the end of a line Table 12 12 shows examples of using regular expressions to match line beginnings and endings Table 12 12 Examples of matching line beginnings and endings This regular matches this text in this text sample expression t cout cout cout lt lt no tab cout cout lt lt tab 1 l a ct a battLvl i b ct Using the Find String in the Replace String Use the amp operat
277. ide IDE 187 Using Browser Wizards The New Data Member Wizard 7 Review settings summary then click Generate IDE 188 IDE 5 1 User s Guide Debugger This section contains these chapters Introduction to Debugging e Basic Debugging e Advanced Debugging e Using Breakpoints e Using Watchpoints e Using Eventpoints IDE 5 1 User s Guide IDE 189 IDE 190 IDE 5 1 User s Guide 17 Introduction to Debugging TM This chapter explains how to work with the debugger in the CodeWarrior IDE Use the debugger to perform these tasks e Find problems in source code the debugger helps you find errors or bugs in source code Bugs prevent a computer program from performing tasks as expected e Control program execution the debugger provides control over a computer program as it executes Choose to execute an entire program a single operation or the individual machine level instructions that carry out a single operation e View memory use in the program the debugger includes windows that show how a computer program manipulates memory For example use a window to view changes to variables used in the program This chapter contains these sections e What is a Debugger e What is a Symbolics File What is a Debugger A debugger controls program execution and shows the internal operation of a computer program Use the debugger to find problems while the program executes Also use the debu
278. ified object code from the project IDE 5 1 User s Guide IDE 271 Compilers Compiling Projects IDE 272 IDE 5 1 User s Guide 24 Linkers IM This chapter explains how to work with linkers in the CodeWarrior IDE The IDE uses linkers to complete these tasks e Combine code the linker combines source file object code with object code from library files and other related files The combined code represents a complete computer program e Create a binary file the linker processes the complete computer program and generates a binary file Sample binary files include applications and shared libraries Read this chapter to learn more about typical tasks for working with linkers This chapter contains these sections e Choosing Linkers Linking Projects Choosing Linkers Choose a linker to determine the binary file type produced by the IDE This list describes common binary files e Applications applications or executable files represent a wide body of computer programs Common applications include word processors web browsers and multimedia players e Libraries libraries contain code for use in developing new computer programs Libraries simplify programming tasks and enhance re usability e 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 f
279. ify the Debug merged executable option as desired 6 Click Done The IDE modifies the executable file Removing an Executable File from the File List To remove an executable file from the File list follow these steps 1 Select the obsolete path 2 Click Remove The IDE removes the executable file from the File list Debugger Settings The Debugger Settings panel configures activity logs data update intervals and other debugger related options IDE 406 IDE 5 1 User s Guide Working with Target Settings Debugger Panels Figure 32 11 Debugger Settings panel Debugger Settings m Location of Relocated Libraries and Code Resources Choose Stop on application launch Program entry point Default language entry point C User specified main Other Settings I Auto target Libraries MV Cache symbolics between runs IV Log System Messages IV Stop at Watchpoints I Update data every 5 seconds Table 32 12 Debugger Settings panel items Item Explanation Location of Relocated Libraries Enter in this field the path to code resources or relocated libraries and Code Resources required for debugging the project Alternatively click Choose to select the required files Stop on application launch Select to halt program execution at the beginning of a debugging session Select the desired stop point Program entry point Default language entry point or User speci
280. in Table 27 7 Table 27 7 Removing a menu or a menu item On this host Do this Windows Select Edit gt Delete Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear 4 Click OK The IDE removes the menu or menu item Alternatively select the item that you want to remove and press Delete Modifying a Menu or Menu Item Use the Menu Editor to modify menus and menu items on a menubar component in a RAD layout 1 Double click a menubar component in the Layout Editor 2 Double click the menu or menu item in the Menu Editor window to modify 3 Change the menu or menu item information in the Menu Item Attributes window IDE 5 1 User s Guide IDE 307 Component Editing Working with Menu Editors 4 Click OK The modified menu or menu item is shown in the Menu Editor window IDE 308 IDE 5 1 User s Guide 28 Object Wiring This chapter explains how to use object wiring in the CodeWarrior IDE Object wiring establishes interactions between Rapid Application Development RAD components To establish these relationships you draw wires onscreen to connect one component to a related component Object wiring has these benefits e Visual metaphor wires between objects indicate an interaction between those objects e Source code generation after you draw each wire the IDE generates a basic function or method that implements the wire in
281. in a RAD project s layout window Table 34 19 Align menu commands Menu command Description To Grid Aligns the selected components to the grid in the layout window Left Edges Aligns the selected components by the left edges Vertical Center Aligns the selected components by their vertical centers Right Edges Aligns the selected components by the right edges Top Edges Aligns the selected components by the top edges Horizontal Center Aligns the selected components by their horizontal centers Bottom Edges Aligns the selected components by the bottom edges Layout Menu The Layout menu contains commands that manipulate objects in a Rapid Application Development RAD layout window This menu only appears when a RAD project is open IDE 478 IDE 5 1 User s Guide IDE Menus Rapid Application Development RAD Menus Table 34 20 Layout menu commands Menu command Description Align Use this submenu to align selected components by component edge or center properties Resize Use this submenu to resize selected components by different heights and widths Display Grid Toggles the visibility of the grid in layout windows Snap To Grid Toggles the alignment of components with the grid in layout windows Group Combines the selected components into a single grouped object for ease of manipulation Ungroup Separates an object of grouped components into the individu
282. in the IDE User s Guide Stage Description Related Sections Create Create the initial project source files and e Projects on page 27 build targets that implement an idea for new e Preferences and Target Settings software on page 325 e Menus on page 449 Edit Transform the idea into working source e Editor on page 89 code organize interface elements and e Browser on page 145 correct errors e RAD Rapid Application Development on page 275 Compile Compile the source code into machine Compilers and Linkers on page 265 format that operates on the target host Link Link the separate compiled modules into a Compilers and Linkers on page 265 single binary executable file Debug Find and resolve all coding and logic errors Debugger on page 189 that prevent the program from operating as designed Release Release for public use Beyond the scope of this manual CodeWarrior IDE Advantages Software developers take advantage of CodeWarrior IDE features during software development e Cross platform development Develop software to run on multiple operating systems or use multiple hosts to develop the same software project The IDE runs on popular operating systems including Windows Macintosh Solaris and Linux The IDE uses virtually the same graphical user interface GUT across all hosts Multiple language support Choose from mul
283. 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 Supported hosts IDE 5 1 User s Guide Preference and Target Settings Options e Windows available e Macintosh not available Tab indents selection Use the Tab indents selection option to control how the editor inserts tabs into the currently selected lines of text e Select the option so that pressing Tab causes the editor to insert tab characters in front of each selected line of text The editor thereby indents the selected text e Clear the option so that pressing Tab causes the editor to replace selected text with a tab character The editor thereby overwrites the selected text Tab Inserts Spaces Select the Tab Inserts Spaces option to have the editor insert spaces instead of tab characters into text Clear the option to have the editor use tab characters The Tab Size option determines the number of spaces inserted by the editor 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 T
284. ince the last build Maintain files in cache Enter the number of days that the IDE maintains its file cache Pur h Click to delete the file cache maintained by the IDE freeing memory and disk space Confirm invalid file modification dates when debugging Select to have the IDE display a warning message when debugging a project with mis matched file modification dates Automatically launch applications when SYM file opened Select to automatically launch the application program associated with an opened symbolics file Confirm Kill Process when closing or quitting Select to prompt for confirmation before killing processes upon quitting a debugging session Select stack crawl window when task is stopped IDE 5 1 User s Guide Select to bring forward the Stack Crawl window also known as the Thread window after the debugger stops tasks IDE 379 Working with IDE Preferences Debugger Panels Table 31 16 Global Settings preference panel items continued Item Explanation Don t step into runtime support Select to have the IDE skip stepping into Metrowerks Standard code Library MSL runtime support code and instead directly step into your own code Auto Target Libraries Select to have the IDE attempt to debug dynamically linked libraries DLLs loaded by the target application Remote Connections The Remote Connections p
285. indow Item Next Memory Block Icon E2 Explanation Click to view the succeeding block of memory for processors that support multiple pages Address Displays a contiguous range of memory addresses beginning with the address entered in the Display field Hex Displays a hexadecimal representation of the memory addresses shown in the Address pane Ascii Displays an ASCII representation of the memory addresses shown in the Address pane Word Size Word szej H Select the bit size of displayed words Page Select the memory space page in which to view source Page Ik Memory Viewing and Changing Raw Memory Use the View Memory command to view and change the raw contents of memory 1 Select an item or expression that resides at the memory address to be examined 2 Choose Data gt View Memory A new Memory window appears IDE 5 1 User s Guide IDE 225 Advanced Debugging Memory Window 3 Select Raw data from the View list pop up The contents of memory at the selected location appears in both hexadecimal and ASCII Scroll through memory by selecting the Address Hex or ASCII pane of the Memory window and then using the up and down arrow keys Display a different memory location by changing the expression in the Display field Change the word size displayed in the Memory window by using the Word Size list pop up The choices are 8 16 and 32 bits Change the cont
286. indow 207 Find Previous command 137 Functions list pop up 116 Functions pane Symbolics window 207 Interfaces list pop up 116 symbol hint 203 Version Control System VCS pop up 97 virtual space 103 Watchpoints 239 using workspaces 81 IDE 563 Vv Variable setting a Watchpoint in the Variable window 247 variable adding a constant to 212 Variable Values Change option Display Settings panel 446 Variable window 220 239 247 248 clear Watchpoint 249 opening 220 set Watchpoint 247 variables making a summation of 212 symbol hint 202 Variables pane 246 260 Variables pane in the Thread window 246 260 VCS Commands option Editor Settings panel 446 VCS list pop up 157 VCS menu 165 446 476 icon 476 VCS pop up 96 using 97 Vectorization 401 version control 446 476 Version Control Settings command 517 Version Control System VCS pop up 96 Version Control System menu See VCS menu 476 Vertical Center button in layout editor 287 Vertical Center command in Align submenu 508 515 516 517 View Array menu command 517 View as implementor 158 View as subclass 158 View As Unsigned Decimal menu command 517 518 519 View as user 158 View Disassembly menu command 519 View Memory As command 519 View Memory command 519 View Mixed menu command 520 View Source menu command 520 View Variable menu command 520 viewing all symbol implementations 175 breakpoints 233 IDE 564 browser data by contents 173 browser data by inheritance 168
287. indow toolbar to open the Symbolics window Using the Executables Pane The Executables pane lists recently opened executable files for which the IDE generated symbolics information To use the pane select an executable file in the list The Files pane updates to display information for the selected executable file IDE 206 IDE 5 1 User s Guide Advanced Debugging Symbolics Window Using the Files Pane The Files pane lists the source files in the build target being debugged for the selected executable file in the Executables pane To use the pane select a file in the list The Functions pane and Source pane update to display information for the selected file Using the Functions Pane The Functions pane lists functions declared in the selected file in the Files pane TIP The Sort functions by method name in symbolics window option changes the order in which the Functions pane lists functions To use the pane select a function in the list The Source pane updates to display source code for the selected function Using the Source Pane The Source pane displays source code for the selected function in the Functions pane using the fonts and colors specified in the IDE Preferences window To use the pane select a function in the Functions pane The corresponding source code appears in the Source pane If the selected function does not contain source code the Source pane displays the message Source
288. ing 56 moving 52 removing 51 56 renaming 53 54 58 setting default 57 strategies for 42 Targets tab 58 Targets view 37 50 52 56 tasks activating automatic code completion 107 adding a component to a layout 292 adding a constant to a variable 212 adding a keyword to a keyword set 402 adding an executable file 405 adding components to a component catalog 302 adding expressions Expressions window 211 adding markers to a source file 120 adding panes to an editor window 98 adding remote connections 381 adding source trees 363 adding subprojects to a project 41 alphabetizing Functions list pop up order 117 attaching the debugger to a process 210 balancing punctuation 105 breakpoints 233 changing an executable file 405 changing line views in a hierarchical window 170 changing register data views 217 changing register values 217 changing remote connections 382 changing source trees 364 choosing a default project 38 clearing all breakpoints 235 clearing breakpoints in source panes 234 clearing breakpoints in the Breakpoints window 235 closing a docked window 79 closing a workspace 84 closing projects 39 collapsing a docked window 78 collapsing browser panes 160 collapsing the editor window toolbar 94 completing code for data members 113 IDE 559 completing code for parameter lists 114 completing the Create Wire wizard 315 creating a console application 86 creating a menu in a menubar component 3
289. ing the object inspector 318 move a docked window 78 move components in a layout 293 navigate browser data 151 navigate Code Completion window 111 navigate to a marker 120 open a layout 289 open a recent workspace 84 open a single class hierarchical window 171 open a workspace 83 open an Array window 223 open projects 35 IDE 5 1 User s Guide open projects created on other hosts 36 open registers in a separate Registers window 218 open subprojects 42 open the Breakpoints window 233 open the component catalog window 301 open the component palette 291 open the Expressions window 211 open the Global Variables window 214 open the IDE Preferences window 351 open the Log window 219 open the object inspector 296 open the Processes window 209 210 open the Registers window 216 open the Symbolics window 206 open the symbols window 175 open the Target Settings window 387 open the Variable window 220 overstrike text Windows 103 print class hierarchies 169 print projects 37 remove a component from a layout 292 remove a keyword from a keyword set 403 remove a layout from a design 283 remove a marker from a source file 120 remove a menu from a menubar component 307 remove a menu item from a menubar component 307 remove all markers from a source file 121 remove an executable file 406 remove components from a catalog 304 remove panes from an editor window 99 remove remote connections 365 383 remove sour
290. ing this button is equivalent to selecting Layout gt Align gt Left Edges Vertical Center button ia Select two or more components in the layout then click this button to align the selected components along their vertical centers Clicking this button is equivalent to selecting Layout gt Align gt Vertical Center Right Edges button A Select two or more components in the layout then click this button to align the selected components along their right edges Clicking this button is equivalent to selecting Layout gt Align gt Right Edges Top Edges button Select two or more components in the layout then click this button to align the selected components along their top edges Clicking this button is equivalent to selecting Layout gt Align gt Top Edges Horizontal Center button E Select two or more components in the layout then click this button to align the selected components along their horizontal centers Clicking this button is equivalent to selecting Layout gt Align gt Horizontal Center Bottom Edges button e Select two or more components in the layout then click this button to align the selected components along their bottom edges Clicking this button is equivalent to selecting Layout gt Align gt Bottom Edges New Wire button Click this button then create a wire by clicking in the layout or by dragging the cursor from one component to another in the layout
291. ings IDE Extras i J Font preferences IV Selection position Plugin Settings IV Window position and size Shielded Folders Source Trees Contextual Menus E Editor IV Edit Commands IV Browser Commands Code Completion IV Project Commands J Insert Template Commands IV YES Commands I Debugger Commands Editor Settings Font amp Tabs Text Colors m Other Settings Er Debugger J Balance while typing IV Use multiple undo Display Settings i Windowing Iv 8elaxed C popup parsing IV Drag and drop editing Global Settings IV Left margin click selects line J Sort function popup Remote Connections J Enable Virtual Space E RAD Tools Balance Flash Delay ticks jao Default file fomat DOS Factory Settings Revert Import Panel Export Panel OK Cancel Apply Layout Editor To toggle automatic punctuation balancing follow these steps 1 From the Edit menu in the Main Toolbar select Preferences This opens the IDE Preferences window 2 Inthe IDE Preference Panels list select Editor 3 Choose Editor Settings IDE 106 IDE 5 1 User s Guide Editing Source Code Code Completion 4 In the Other Settings area of Editor Settings select or clear the Balance While Typing checkbox 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 rem
292. ings panels Access Paths 359 389 Build Extras 392 494 Custom Keywords 401 Debugger Settings 218 406 File Mappings 396 Global Optimizations 398 Other Executables 403 Remote Debugging 408 reverting 436 Runtime Settings 394 Source Trees 361 Target Settings 388 setup code completion 107 Shielded Folders panel options Find and compare operations 425 Project operations 434 Regular Expression 435 Shielded Folders preference panel 359 options Add 360 Change 361 Find and compare operations 360 Project operations 360 Regular Expression 360 Remove 361 Shielded folder list 360 Shift Right menu command 511 shortcut conventions 20 IDE 555 Show all locals option Display Settings panel 438 Show All Wires button in layout editor 288 479 Show Breakpoints menu command 486 511 Show Classes 162 Show Classes pane 166 Show Floating Toolbar command 498 Show Floating Toolbar command in Toolbar submenu 511 512 Show Incoming Wires button in layout editor 288 479 Show Inherited 157 Show Main Toolbar command 498 Show message after building up to date project option Build Settings panel 438 Show Options button in object inspector 296 Show Outgoing Wires button in layout editor 288 479 Show private 158 Show protected 158 Show public 158 Show tasks in separate windows option Display Settings panel 438 Show the component palette when opening a form option Layout Editor panel 438 Show the object inspector when opening a f
293. ints About Breakpoints Breakpoints Window Common Breakpoint Tasks 21 Using Watchpoints About Watchpoints bie ed a3 Using Watchpoints in the Memory Window Using Watchpoints in the Watchpoints Window Using Watchpoints in Other Windows Using Watchpoints in the Thread Window Using Watchpoints in the Variable Window Using Watchpoints in the Symbolics Window 22 Using Eventpoints About Eventpoints Log Point Pause Point Script Point Skip Point Sound Point etd a eke ay Bid Using Eventpoints in the Breakpoints Window Using Eventpoints in Other Windows Using Eventpoints in the Thread Window Using Eventpoints in the Symbolics Window IDE 8 216 218 220 221 223 228 231 231 231 233 239 239 240 242 245 245 247 249 251 251 253 254 254 254 254 256 259 259 261 IDE 5 1 User s Guide VI Compilers and Linkers 23 Compilers Choosing a Compiler Compiling Projects 24 Linkers Choosing Linkers Linking Projects Table of Contents 267 273 274 VII RAD Rapid Application Development 25 Creating RAD Projects RAD Wizards Working with Designs Working with Layouts 26 Layout Editing Layout Wizards Layout Editor Component Palette Object Inspector 27 Component Editing Component Catalog Window Working with Catalogs Working with Menu Editors Menu Editor 28 Object Wiring
294. ion 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 e Choose Edit gt Balance OR e 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 IDE 5 1 User s Guide IDE 105 Editing Source Code Punctuation Balancing 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 Toggling Automatic Punctuation Balancing Use the Editor Settings to enable or disable the punctuation balancing feature Figure 10 1 Editor Settings Balance While Typing BIDE Preferences IDE Preference Panels E General Editor Settings r Remember Build Sett
295. ion Displays the condition attached to the breakpoint To attach a condition to a breakpoint double click the Condition column then type a conditional expression IDE 232 IDE 5 1 User s Guide Using Breakpoints Common Breakpoint Tasks Common Breakpoint Tasks You can perform these breakpoint tasks e opening the Breakpoints window e setting breakpoints in source panes e clearing breakpoints in source panes e clearing all breakpoints e clearing breakpoints in the Breakpoints window e setting temporary breakpoints e setting conditional breakpoints NOTE The Solaris and Linux hosted IDEs rely on an external debugger to provide breakpoint support The tasks in this section do not apply to these IDE hosts Opening the Breakpoints Window Use the Breakpoints window to view all breakpoints currently set in the program 1 Open the Breakpoints window as explained in Table 20 2 Table 20 2 Opening the Breakpoints window On this host Do this Windows Select View gt Breakpoints Macintosh Select Window gt Breakpoints Window Solaris Select Window gt Breakpoints Window Linux Select Window gt Breakpoints Window 2 The Breakpoints window appears NOTE Double click a breakpoint in the Breakpoints window to display its associated source line in the Browser window IDE 5 1 User s Guide IDE 233 Using Breakpoints Common Breakpoint Tasks Setting Breakpoints in Source Panes Use the Set
296. ist Press the Backspace key to delete characters Selecting an Item in the Code Completion Window Select an item in the Code Completion window to have the IDE enter that item in the active editor window at the insertion point IDE 112 IDE 5 1 User s Guide Editing Source Code Code Completion Bring forward an editor window Place the insertion point at the end of the source code to complete Choose Edit gt Complete Code The Code Completion window appears The Code Completion list in this window shows possible symbol matches for the text in the active editor window Select an item in the Code Completion list Use the mouse or the keyboard to navigate the Code Completion list and select an item Enter the item into the active editor window Press the Return or Enter keys on the keyboard or double click the item to have the IDE insert that item into the editor window Completing Code for Data Members Complete code for data members for those programming languages that support it For example in the Java programming language you can complete code for data members through the character 1 2 Bring forward an editor window Place the insertion point at the end of the class to complete Type a data member trigger character The character depends on the programming language you use In the Java programming language for example type a period The Code Completion window appears Use this window to complete the
297. king with IDE Preferences Editor Panels Table 31 13 Text Colors preference panel items continued 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 Setting the Foreground Text Color Use the Foreground Color option to configure the foreground text color displayed in editor windows 1 Choose Edit gt Preferences 2 Select the Text Colors panel in the Editor selection in the IDE Preference Panels list 3 Click the Foreground color box to set the editor s foreground color 4 Pick color 5 Click OK in the Color Picker window 6 Save your colors in the IDE Preferences window Windows Click OK Macintosh Click Save The foreground text color changes to the new color Setting the Background Text Color Use the Background Color option to configure the background color displayed by all editor windows 1 Choose Edit gt Preferences IDE 5 1 User s Guide IDE 373 Working with IDE Preferences Editor Panels Select the Text Colors panel in the Editor selection in the IDE Preference Panels list Click the Background color box to set the editor s background color Pick color Click OK in the Color Picker window Save your colors in the IDE Preferences window Windows Click OK Macintosh Click Save The background
298. kips Concurrent Versions System CVS data files _ Data Matches the names of folders generated by the IDE that store target data information such as a folder named MyProject_Data 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 e 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 IDE 5 1 User s Guide IDE 361 Working with IDE Preferences General Panels Figure 31 10 Source Trees panel Source Trees _ Source Tree Info Warrior Examples Name SampleSourceTree Type Absolute Path D Program Files Metrowerks CodeWarrior CodeWarior Examples Choose Ada cimen Remove Table 31 9 Source Trees panel items Item Explanation Source Tree list Contains the Name and Path of currently defined source trees Name Enter in this field a name for a new source tree or modify the name of a selected source tree Type Choose th
299. l menu as explained in Table 28 2 Table 28 2 Opening the Layout Editor contextual menu Windows Right click the selected component Macintosh Control click the selected component IDE 312 IDE 5 1 User s Guide Object Wiring Working with Object Wires Table 28 2 Opening the Layout Editor contextual menu continued Solaris Control click the selected component Linux Ctrl click the selected component 3 Select New Wire from the contextual menu Figure 28 2 shows the contextual menu The Create Wire wizard appears Complete this wizard to specify the details of the wire such as the destination component and action Figure 28 2 Layout Editor contextual menu New Wire a RAL AEE 4 4 italic He vr eeeeeeene Align ae 8 ue Resize b ee Send To Back na ok Bring To Front coe nes v Display Grid ca eed v Snap To Grid aes Gustomize os ess Properties Edit Wire Modifying a Wire by Using the Layout Editor Modify an existing wire as you develop your layout in the layout editor Use the Create Wire wizard to make changes to the wire data 1 Bring forward the layout editor window 2 Select the wire that you want to modify IDE 5 1 User s Guide IDE 313 Object Wiring Working with Object Wires TIP You can click different parts of a particular wire to select it quickly If few wires connect the same source and destination component try clicking the d
300. l menu appears 2 Choose Docked from the contextual menu 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 Docking a Window By Using Drag and Drop IDE 72 You can drag a docked window or a floating window to one of the four edges of the client area to dock it 1 Drag the window to one edge of the client area Drag a floating window by its title bar Drag a docked window by its dock bar 2 A window outline appears near the client area edge showing the final position after you release the window Use the outline as a visual cue that the IDE will dock the window If an outline does not appear you cannot dock the window 3 Release the window to dock it to the edge The window appears in the position indicated by the window outline IDE 5 1 User s Guide Dockable Windows Working with Dockable Windows Docking Windows of the Same Kind You can dock two or more windows of the same kind inside a single docked window In this arrangement tabs inside the single docked window represent each of the original docked windows You can undock each tab individually from the single docked window 1 Dock the first of two or more windows of the same kind to an edge of the client area 2 Dock the second window to the same edge as the first window Use the window outline t
301. lains how to browse Rapid Application Development RAD projects in the CodeWarrior IDE The browser generates additional information for RAD projects e Properties the properties of a selected component in the RAD project View the property names and their implementations in source code e Methods the functions or methods of a selected component in the RAD project View the method names and their implementations in source code e Events the actions or events of a selected component in the RAD project View the event names and their groupings within event sets Read this chapter to learn more about typical tasks for browsing RAD projects This chapter contains these sections e RAD Browser Window on page 321 e Browser RAD Wizards on page 323 RAD Browser Window The Browser window displays additional items for RAD projects e Tab control e Properties tab e Methods tab e Events tab This section explains each item Tab Control The browser displays a tab control for browsing the additional information generated for RAD projects The tab control shows a series of tabs with different names For example the tab control for a Java RAD application contains these tabs IDE 5 1 User s Guide IDE 321 RAD Browsing RAD Browser Window IDE 322 e Java e Properties e Methods e Events Click a tab to view its browser information For example click the Properties tab to view information about component pr
302. layout 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 IDE 5 1 User s Guide IDE 451 IDE Menus Windows Menu Layout Table 34 1 File menu commands Menu command Explanation New Creates new projects using the New Project wizard or from project stationery 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 When using the Windows menu layout on a Macintosh host hold down the Option key to change this command to Find Closes the active window Saves the active file using the editor window s filename When using the Windows menu layout on a Macintosh host hold down the Option key to change this command to Save All Save All Saves all open editor windows When using the Windows menu layout on a Macintosh host hold down the Option key to substitute this command for the Save command 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 Open Workspace Opens a workspac
303. lbar command 498 511 512 Show Main Toolbar command 498 Show Window Toolbar command 512 Toolbars Add element 340 341 Clear Elements 342 Customize 338 Elements 338 340 Icons 341 Instances of 339 Main floating 339 Modify 340 Project and Window 339 Remove element 342 Remove single element 340 Toolbar Items tab 340 Types 339 toolbars editor 93 for Symbols window 175 resetting 343 Toolbars menu command 515 tools browser 25 build system 25 debugger 26 editor 25 project manager 25 RAD 26 search engine 25 Tools menu 476 icon 477 ToolServer menu 445 ToolServer Worksheet command 516 ToolTip 340 Top Edges button in layout editor 287 touch defined 48 Touch column 54 55 in Files view of Project window 48 Touch command 54 touching all files 54 all groups 54 files 54 groups 54 triggering IDE 5 1 User s Guide code completion by keyboard 108 code completion from IDE menu bar 108 turning off symbol hint 203 turning on symbol hint 203 Type option Source Trees panel 441 Type pop up menu Absolute Path option 441 Environment Variable option 442 Registry Key option 442 TypeDefs option 373 types of documentation 19 U nanchor Floating Toolbar command 516 napply Difference command 516 unbounded arrays setting default size for viewing 419 ncaught Exceptions Only command in Java Exceptions submenu 517 Undo command 517 U U S undocking windows 74 unfloating a window 75 Ungroup button in layout editor 28
304. ld target limit Organize related build targets into different subprojects to improve build speed IDE 5 1 User s Guide Working with Projects Advanced Projects IDE 5 1 User s Guide IDE 43 Working with Projects Advanced Projects IDE 44 IDE 5 1 User s Guide Project Window This chapter explains how to work with the Project window in the CodeWarrior IDE The Project window provides these features e Organization view and modify all files created for use with a computer program e Views manipulate files arranged by type e Management control the way the IDE handles files This chapter contains these sections e About the Project Window on page 45 e Project Window Views on page 47 e File Group Layout and Target Management on page 51 e Build Target Management on page 56 About the Project Window The Project window organizes files in a computer program Use this window to control various aspects of each file The window includes these items e Project window toolbar e View tabs e Columns Figure 4 1 on page 46 shows a sample Project window Table 4 1 on page 46 explains the items in the Project window IDE 5 1 User s Guide IDE 45 Project Window About the Project Window Figure 4 1 Project window mprojectmep E Debug Win32 x86 ia y BR Pp Files Link Order Targets y Fie Code Data v Ey Source 7K Ke e x
305. le Breakpoint menu command 491 Disable Third Party COM Plugins option 419 Disable Watchpoint menu command 491 disabling plug in diagnostics 481 Disassemble menu command 491 Display Deprecated Items option 419 Display Grid command 289 Display Grid menu command 491 Display Settings panel options Show all locals 438 Show tasks in separate windows 438 Show values as decimal instead of hex 439 Show variable location 439 Show variable types 439 Show variable values in source code 439 Sort functions by method name in symbolics window 439 Variable Values Change 446 Watchpoint Indicator 446 Display Settings preference panel 375 options Attempt to use dynamic type of C Object Pascal and SOM objects 377 Default size for unbounded arrays 377 Show all locals 376 Show tasks in separate windows 377 Show values as decimal instead of hex 376 Show variable location 376 Show variable types 376 Show variable values in source code 377 IDE 5 1 User s Guide Sort functions by method name in symbolics window 377 Variable values change 376 Watchpoint indicator 376 DLL 380 412 Do Nothing option 419 Do Nothing To Project Windows option 419 dock bars 76 dock defined 69 dockable windows 69 71 closing 79 collapsing 78 dock bars 76 expanding 78 moving 78 suppressing 76 turning off 76 dockable windows about 69 docked window type 70 docking windows of the same kind 73 Document Settings list pop up 96 document settings pop up using 96 document
306. le types Text files files that contain any type of text Example text files include Read Me files and source files e Source files files that contain source code only Example source files include C files and Java files Managing Files These tasks manage files e Create a new file e Open an existing file e Save a file e Close a file e Print a file e Revert a file to a previously saved state Creating Text Files Windows The New command opens a window from which you create new text files You can use new text files as source files in a project or as plain text files 1 Select File gt New The New window appears 2 Click the File tab in the New window 3 Select Text File in the list IDE 5 1 User s Guide IDE 61 Working with Files Managing Files 4 Type a filename into the File name text box 5 Click Set to specify the location to save the new file 6 Click OK The IDE creates the new text file and displays its contents in a new editor window 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 gt New Text File See Customizing the IDE on page 327 for more information about using the Customize IDE Commands window Creating Text Files Macintosh Solaris Linux The New Text File command creates new text files You can use new text
307. lected files in the project window and displays the results in a new editor window Precompile Precompiles the active editor window or selected files in the project window and stores the results in a new header file Compile Compiles the active editor window or selected files in the project window Disassemble Disassembles the active editor window or selected files in the project window and displays the results in a new editor window 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 IDE 470 IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout Table 34 14 Project menu commands continued Menu command Explanation Remove Object Code Removes the object code from one or more build targets in the project When using the Macintosh menu layout on a Macintosh host hold down the Option key to change this command to Remove Object Code amp Compact Re search for Files Resets the cached locations of source files using the project access paths and storing them for faster builds and project operations Reset Project Entry Paths Resets the location of all source files in the active project using t
308. led breakpoint on the source line containing the insertion point De activates the breakpoint on the source line containing the insertion point Clear All Breakpoints Clears all breakpoints currently set in the default build target of the active project Show Breakpoints or Hide Breakpoints Adds a Breakpoint Column to all project editor windows where you can set view or clear breakpoints Removes the Breakpoint Column from all project editor windows Set Watchpoint or Clear Watchpoint Sets a watchpoint on the source line containing the insertion point Clears the watchpoint on the source line containing the insertion point Enable Watchpoint or Disable Watchpoint IDE 460 Activates the disabled watchpoint on the source line containing the insertion point De activates the watchpoint on the source line containing the insertion point IDE 5 1 User s Guide IDE Menus Windows Menu Layout Table 34 6 Debug menu commands continued Menu command Clear All Watchpoints Explanation Clears all watchpoints currently set in the default build target of the active project Break on C Exception Configures the debugger to break at__ throw each time a C exception occurs Break on Java Ex Use this menu to select the Java exceptions on which the debugger breaks Connect Data Menu Establishes communication with an embedd
309. les that comprise a computer program and generate object code The compiler flags syntax errors in the source files Use these tasks to compile projects e Compile source files e Set the build order or link order e Update a project or its files e Create an executable file from a project e Run an application created from the project e Remove object code This section explains how to perform each task Compiling Source Files Use the Compile commands to compile source files into binary files The IDE can compile a single file multiple files or all files in an open project 1 Enable the Project window that contains the desired files to be compiled 2 Select one or more files 3 Choose Project gt Compile The IDE compiles the selected 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 Setting the Build and Link Order of Files Use the Link Order view in the Project window to specify the order in which the compiler and linker process files Establishing the proper link order prevents link IDE 268 IDE 5 1 User s Guide Compilers Compiling Projects errors caused by file dependencies The Link Order view is sometimes called the Segments view or Overlays view depending on the target 1 Click the Link Order tab in a Project window 2 Click and drag files into the desired link order The IDE cha
310. llapse non debugging windows 378 Comments 372 Compiler thread stack 353 Confirm Kill Process when closing or quitting 379 Confirm invalid file modification dates when debugging 379 Constants 372 Context popup delay 356 Debugger 375 Debugger Commands 368 Default file format 368 Default size for unbounded arrays 377 IDE 5 1 User s Guide Disable third party COM plugins 359 Display deprecated items 366 Do nothing 378 Do nothing to project windows 378 Documents 356 Don t step into runtime support code 380 Drag and drop editing 368 Edit 372 Edit Commands 367 Editor 365 Enable automatic Toolbar help 357 Enable Virtual Space 368 Enums 372 Export Panel button 328 350 Factory Settings button 328 350 Failure 353 Find and compare operations 360 Find Reference using 357 Font 369 Font preferences 367 for IDE 349 Foreground 372 Functions 372 General 351 Globals 372 Grid Size X 384 Grid Size Y 384 Hide non debugging windows 378 IDE Preference Panels list 350 IDE window 349 Import Panel button 328 350 Include file cache 353 Insert Template Commands 368 Keywords 372 Launch Editor 356 Launch Editor w Line 356 Left margin click selects line 368 Level 359 Macros 372 Maintain files in cache 379 Menu bar layout 356 Minimize non debugging windows 378 Monitor for debugging 378 Move open windows to debugging monitor when debugging starts 378 Name 362 OK button 351 Open
311. llass i its OOS C CS SS Declaration File NewFile C Program Files Metrowerks CodeW arrior CodeW arrior Examples Win32 Ey Set Namespace v Use separate file for member definitions C Program Files Metrowerks CodeW arion CodeWarrior Examples Win32 Exame New Existing ph cen Using the New Class Wizard To use the New Class Wizard follow these steps 1 Open the Class Browser window as explained in Table 16 1 Table 16 1 Opening the Class Browser window Windows Select View gt Class Browser Macintosh Select Window gt Class Browser IDE 178 IDE 5 1 User s Guide Using Browser Wizards The New Class Wizard Table 16 1 Opening the Class Browser window continued Solaris Select Window gt Class Browser Linux Select Window gt Class Browser 2 Select Browser gt New Class 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 enabled field the path where you want to save the file Alternatively cli
312. llow these steps 1 Click Add The Debug Additional Executable dialog box appears Enter in the File Location field the path to the executable file Alternatively click Choose to display a dialog box Use the dialog box to select the executable file The path to the selected executable file appears in the File Location field Select Download file during remote debugging as desired When selected the IDE downloads the executable file from a remote computer during the debugging session Enter in the corresponding field the path to the remote file Alternatively click Choose to select the file Click Clear to delete the current entry Select Debug merged executable as desired When selected the IDE debugs an executable file that merged with the project output Enter in the corresponding field the path to the original executable file prior to merging Alternatively click Choose to select the file Click Clear to delete the current entry Click Done The IDE adds the executable file to the File list Changing an Executable File in the File List To change an executable file in the File list follow these steps 1 2 Select the desired path Click Change The Debug Additional Executable dialog box appears IDE 5 1 User s Guide IDE 405 Working with Target Settings Debugger Panels 3 Modify the File Location field as desired 4 Modify the Download file during remote debugging option as desired 5 Mod
313. lumns continued development Name icon Explanation Recursive search B A folder icon indicates that the IDE recursively searches the subdirectories of the access path No folder icon indicates that the IDE does not recursively search the access path Framework f An f icon indicates that the access path points to a framework Mac OS X Framework paths are implicitly recursive No f icon indicates that the access path does not point to a framework Access path Shows the full access path to the selected directory Access paths have these types e Absolute the complete path from the root level of the hard drive to the directory including all intermediate directories e Project the path from the project file relative to the designated directory e CodeWarrior the path from the CodeWarrior IDE relative to the designated directory e System the path from the operating system s base directory relative to the designated directory e 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 IDE 5 1 User s Guide IDE 392 Working with Target Settings Target Panels Figure 32 5 Build Extras settings panel Build Extras Extras IV Use modification date caching V Cache Subprojects Generate Browser Data From Compiler v _
314. m non modal refers to a window that does not require your attention before allowing the IDE to proceed with other operations Table 6 2 Differences between dockable and non dockable windows Window Type Required Criteria Sample Windows Dockable All of these e Thread non modal e Project e resizable e Component Catalog e maximizable Non dockable Any of these e IDE Preferences e modal e Find non resizable e About Box e non maximizable 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 Working with Dockable Windows You can dock windows in one of two ways dragging a floating window to a docking position e using a contextual menu to dock a window You can resize docked windows and undock them to floating windows or MDI child windows This section explains how to perform tasks with dockable windows IDE 5 1 User s Guide IDE 71 Dockable Windows Working with Dockable Windows Docking a Window By Using a Contextual Menu Use a contextual menu to dock a floating window or MDI child window to one of the four edges of the client area 1 Right click the window title bar A contextua
315. me Use this option to help troubleshoot problems with the IDE If the problem goes away after disabling the plug ins then a conflict exists between the third party plugins and the IDE plugins Display deprecated items Select this option to have the Code Completion window display obsolete programming language items Clear the option to have the window hide the obsolete items Deprecated items appear in gray text in the Code Completion window Do nothing Select this option to leave all windows in place during a debugging session Do nothing to project windows Select this option to prevent the IDE from manipulating project windows when starting a debugging session Use this option to help debug multiple build targets or multiple projects IDE 5 1 User s Guide IDE 419 Preference and Target Settings Options Documents Enter in this field the number of recent documents to display in the Open Recent submenu Don t step into runtime support code Select this option to have the IDE bypass stepping into the Metrowerks Standard Library MSL runtime support code and instead directly step into your own code Clear the option to have the IDE step into the MSL runtime setup code then step into your own code Drag and drop editing Select this option to allow dragging and dropping of text in editor windows Clear the option to disable drag and drop text editing Dump internal browse information after compile Select this op
316. ment Interface 444 Field Run App Script 336 field Base Classes 180 fields Application 412 Arguments 412 Compiler thread stack 417 Condition 248 259 Declaration File 179 Extension 422 File Type 425 IP Address 382 383 Relative to class 179 figure conventions 19 File Cmds amp Bindings 347 File column in Files view of Project window 48 file command line string 429 file management 51 File Mappings list 417 File Mappings settings panel 396 options Add 397 Change 398 Compiler 397 Edit Language 397 Extension 397 File Mappings list 397 File Type 397 Flags 397 Ignored By Make flag 397 Launchable flag 397 IDE 5 1 User s Guide Precompiled File flag 397 Remove 398 Resource File flag 397 File menu 451 464 New Text File command 465 file modification icon 97 File Path command 49 file paths viewing 49 file set defined 134 File Type field 425 File Type option 417 file name extensions default settings 422 files close all 65 closing 65 creating Macintosh 62 creating Windows 61 file set definition of 134 inspecting 36 moving 52 opening 62 print selections 67 printing 66 renaming 53 replacing text in 129 reverting 67 save all 64 saving 64 saving copies 65 searching multiple 134 searching single 127 touching 54 touching all 54 untouching 55 untouching all 55 working with 61 Files tab 51 Files view 37 52 55 Checkout Status column 48 Code column 48 Data column 48 Debug column 48 File column 48 Inter
317. ments by intuitive names IDE 5 1 User s Guide IDE 95 The CodeWarrior Editor Editor Toolbar See Using Markers on page 119 for information on navigating source code with Markers Document Settings Menu The Document Settings menu shows whether the IDE applies syntax coloring to the window text as well as the format in which the IDE saves the file Using the Document Settings Menu IDE 96 Use the Document Settings pop up in editor windows to toggle syntax coloring on or off for the current file and set the EOL end of line format for saving a text file The EOL formats are e Macintosh lt CR gt e DOS lt CR gt lt LF gt e UNIX lt LF gt To toggle syntax coloring e Choose Document Settings gt Syntax Coloring The editor window updates to display the new syntax color setting To specify the EOL format for the file e Choose the EOL format for the file The IDE applies the specified EOL format to the file the next time it gets saved Version Control System Menu The version control system pop up in editor windows lists options provided by a version control system VCS compatible with the IDE Use a VCS to manage multiple versions of files VCS packages are available separately for use with the IDE IDE 5 1 User s Guide The CodeWarrior Editor Other Editor Window Components Using the Version Control System Menu Use the Version Control System VCS pop up in editor windows to access versi
318. mmand creates a new group in the current project This command is only active when the Files view is visible in the project window Create Overlay Create Segment These commands create a new segment or overlay in the current project This command is only active when the Segments view or Overlays view is visible in the project window IDE 5 1 User s Guide IDE 489 Menu Commands Create Target The Create Target command creates a new build target in the current project This command is only active when the Targets view is visible in the project window Customize The Customize command opens a customizing utility for the selected component within a RAD project For example after selecting a menu component and choosing this menu command the Menu editor opens 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 Cycle View Toggles view among various data formats See also e View Disassembly on page 519 e View Mixed on page 520 e View Raw Data on page 520 e View Source on page 520 IDE 490 Debug This command compiles and links a project then run the CodeWarrior debugger with the project s code If debugging is active The Threads window to examine program information and step through the code as it executes If debugging is not active the Threads window
319. mplates 372 TypeDefs 373 text editing area in editor window 98 text manipulation 101 text selection Find 137 THINK Reference 121 123 425 third party editor support 444 third party text editors IDE 561 Emacs 429 430 Thread window 245 247 259 clear eventpoint 261 clear Watchpoint 261 clear watchpoint 246 enable and disable Watchpoint 247 set eventpoint 260 set Watchpoint 260 set watchpoint 246 Variables pane 246 260 threading in IDE 417 __throw 483 Tile Editor Windows command 514 Tile Editor Windows Vertically command 514 Tile Horizontally command 514 Tile Vertically command 514 To Smallest Height command in Resize submenu 516 To Smallest Width command in Resize submenu 516 toggling symbol hint 203 toolbar collapsing in editor window 94 expanding in editor window 94 Toolbar Editor Window Elements Document Settings 341 File Dirty Indicator 341 File Path field 341 Functions 341 Header Files 341 Markers 341 Version Control Menus 341 toolbar buttons Browser Contents 156 Class Hierarchy 156 Go Back 156 Go Forward 156 Make 46 Single Class Hierarchy Window 156 Synchronize Modification Dates 46 Target Settings 46 Toolbar Items 327 341 Toolbar submenu Anchor Floating Toolbar command 482 Clear Floating Toolbar command 486 Clear Main Toolbar command 486 Clear Window Toolbar command 487 Hide Floating Toolbar command 498 Hide Main Toolbar command 498 IDE 562 Reset Window Toolbar command 507 508 Show Floating Too
320. mple tick values include e 0 zero disables balance flashing e 30 the default flash value 1 2 of a second e 999 the maximum flash delay value Balance while typing Select this option to have the editor check for balanced parentheses brackets and braces in editor windows For each closing parenthesis bracket or brace the editor attempts to find the opening counterpart The IDE behaves differently depending on whether it finds the counterpart e 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 IDE 5 1 User s Guide Preference and Target Settings Options Browser Commands Select this option to add Browser menu commands to contextual menus Clear the option to remove the commands from the contextual menus Browser Path Enter in this field 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 enter in the Browser Path field a path to an alternate browser Alternatively click Set to select the path Build before running Choose from this pop up menu the way in which the IDE handles project builds before running the compiled applicatio
321. n e Always always build projects before running them e Never never build projects before running them e Ask ask each time how to proceed Cache Edited Files Between Debug Sessions Select this option to maintain a cache of edited files between debugging sessions Use this option to debug through the original source code for files modified since the last build Enter in the Maintain files in cache field the number of days to keep the cached files Click Purge Cache to delete the current cache See also e Maintain files in cache on page 431 e Purge Cache on page 434 IDE 5 1 User s Guide IDE 415 Preference and Target Settings Options IDE 416 Cache Subprojects Use this option to improve multi project updating and linking When e selected the IDE increases its memory requirements in order to generate symbolics information for both the build targets and the subprojects within each build target e cleared the IDE does not increase its memory requirements and does not generate symbolics information Cache symbolics between runs Select this option to have the IDE maintain a cache of symbolics information generated for the project The IDE refers to this cached symbolics information during subsequent debugging sessions The cache improves IDE performance Clear the option to force the IDE to discard the symbolics information at the end of each debugging session Case sensitive Sel
322. n Delay ticks 50 Table 31 10 Code Completion preference panel items Item Explanation Automatic Invocation Select to automatically open the Code Completion window to complete programming language symbols Clear to manually open the window 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 Case sensitive Select to have the IDE consider case when completing code Clear to have the IDE ignore case 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 Editor Settings The Editor Settings preference panel provides options for customizing the editor including IDE 366 IDE 5 1 User s Guide Working with IDE Preferences Editor Panels e fonts window locations and insertion point positions e contextual menus e additional editor window features Figure 31 12 Editor Settings preference panel Table 31 11 Editor Settings preference panel items Item Explanation 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
323. n cursor Pane Splitter Controls I Drag to split the window into panes Editor Toolbar Use the editor toolbar to complete these tasks e Open interface and header files e Find function definitions e Set and clear markers e Modify file formats e Control syntax coloring e Execute version control operations e Determine a file s save state This section explains how to expand and collapse the toolbar and how to perform each toolbar task IDE 5 1 User s Guide IDE 93 The CodeWarrior Editor Editor Toolbar Expanding and Collapsing the Editor Window Toolbar To expand the editor window toolbar click this icon in the right hand top corner of the editor window Figure 9 2 on page 94Figure 9 2 shows an editor window with an expanded toolbar i Figure 9 2 Editor window toolbar expanded m HellowWin32 cpp o xl b M E i Path C Documents and Settings nmoorefield My Documents Metr HelloWin32 cpp lt gt Win32 GUI app skeleton lt windows h gt LRESULT CALLBACK WndProc HWND hWnd UINT messg WPARAM wParam LPARAM lParam char szProgName Hello Win32 char message Hello from Win32 gt name of application message to be printed in int WINAPI WinMain HINSTANCE hInst eWin32 entry point rout HINSTANCE hPreInst LPSTR lpszCmdLine int nCmdShow HWND hWnd MSG lpMsg WNDCLASS we z Line 3 Colt IZ To c
324. n evaluates to false zero program execution continues past the watchpoint 6 Choose Project gt Debug NOTE When the debugger reaches a Watchpoint it stops execution before it executes the statement IDE 5 1 User s Guide Using Watchpoints Using Watchpoints in Other Windows Clearing Watchpoints from the Variable window To clear a watchpoint from the Variable window follow these steps 1 Select a Watchpoint in the Variable window 2 Choose Debug gt Clear Watchpoint Using Watchpoints in the Symbolics Window The Symbolics window lets you view any file in the build target for which the IDE generated a symbolics file and lets you view or edit all global variables for each project that contains symbolics information The Symbolics window appears once you open a file that contains symbolics information Figure 21 4 Symbolics window m Symbolics Window i Copy exe aod Find and Open File Executables 4 Preprocess Set Beskpees Enable D cable Watchpol Run to Cursor Change Program Counter View As Source C Program Files Metrowerks CodeWarriors View Variable View Array View Memory hPalette NULL View Memory As if GetDeviceCaps HDC hDC RAS m Copy To Bakinin nReserved ESMS 5 _ nSize GatDavicecans HDC hDC SIZEPALETTE _ IDE 5 1 User s Guide IDE 249 Using Watchpoints Using Watchpoints in Other Windows
325. n page 493 Metrowerks Website The Metrowerks Website command launches a web browser and display the Metrowerks web site Minimize Window Windows equivalent of Collapse Window See also e Collapse Window on page 488 New The New command opens the New window 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 IDE 5 1 User s Guide Menu Commands New Class Browser The New Class Browser command opens a Browser window The IDE grays out this menu command if the CodeWarrior browser is not activated This menu command is equivalent to the Class Browser menu command New Data Member The New Data Member command opens the New Data Member wizard Use this wizard to help create new data members for a class 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 Event Set The New Event Set command opens the New Event Set window to create a new event set for a selected class in a project New Expression The New Expression command creates a new entry in the Expressions window prompting entry of a new expression New Member Function The New Member Function command opens the New Member Function wizard Use this wizard to help create new member functions for a class New Method The New Me
326. n the 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 32 shows a sample project with debug and release build targets IDE 5 1 User s Guide IDE 31 Working with Projects Managing Projects Figure 3 2 Project with multiple build targets Build Target Debug File 1 File 2 File 3 Object Code Settings Browser Data Note Both build targets share File 1 and File 2 Build Target Release File 1 File 2 File 4 Object Code Settings Browser Data Managing Projects Use these tasks to manage projects e Create a new project IDE 32 IDE 5 1 User s Guide Working with Projects Managing Projects e Open an existing project e Save an existing project e Close an open project e Inspect an open project e Print an open project Creating New Projects using Project Stationery Use the project stationery provided with the IDE to quickly create new projects The stationery contains everything
327. n 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 you cancel opening the Code Completion window See also e Code Completion Delay on page 416 Automatically launch applications when SYM file opened Select this option to launch the application associated with an opened symbolics file The IDE sets an implicit breakpoint at the main entry point of the application Clear the option to open the symbolics file without launching the associated application Table 33 1 explains how to skip launching the target program Table 33 1 Bypass launching the target program Windows Press Alt while the IDE opens the symbolics file Macintosh Press Option while the IDE opens the symbolics file IDE 5 1 User s Guide IDE 413 Preference and Target Settings Options Table 33 1 Bypass launching the target program continued Solaris Press Alt while the IDE opens the symbolics file Linux Press Alt while the IDE opens the symbolics file IDE 414 Background Click this color swatch to configure the background color of editor windows Balance Flash Delay Enter in this field the time in ticks to highlight a matching punctuation character during a Balance while typing check Each tick represents 1 60th of a second 16 67 milliseconds Sa
328. name in the active Editor window Searching starts within the source files belonging to the open project If the IDE does not find a definition a system beep sounds If the IDE does not find the routine definition within the project files searching continues using the online help system specified in the IDE Extras preference panel NOTE Macintosh Press the Option key to change the Find Definition menu command to the Find Definition amp Reference menu command 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 IDE 494 IDE 5 1 User s Guide Menu Commands Find in Files The Find in Files command opens the Find in Files window Once open The Find in Files window to perform find and replace operations across multiple files using specified search criteria Find In Next File The Find in Next File command searches for the next occurrence o
329. nclude lt Cocoa CocoaHeaders h gt the IDE requires the presence of Cocoa in order to find the CocoaHeaders h file e cleared the IDE requires only the referenced header file Using the same example Cocoa becomes optional 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 Save open files before build Select the Save open files before build option to automatically save files during project operations e Preprocess e Precompile e Compile e Disassemble e Bring Up To Date e Make e Run Save project entries using relative paths Use the Save project entries using relative paths option to store the location of a file using a relative path from one of the access paths The settings include IDE 436 IDE 5 1 User s Guide Preference and Target Settings Options e enabled the IDE stores extra location information to distinctly identify different source files with the same name The IDE remembers the location information even if it needs to re search for files in the access paths e disabled the IDE remembers project entries only by name This setting can cause unexpected results if two or more files share the same name In this case re searching for files could cause the IDE to find the project entry in a different access path Script Choose from the Scripts options the script system language use
330. ncludes C files and Java files Object code represents the same source instructions in a language that the computer directly understands e Flag syntax errors the compiler highlights source code with syntax errors Syntax errors result from failing to follow valid structure in a programming language In C a common syntax error is to forget to conclude a statement with a semicolon Read this chapter to learn more about typical tasks for working with compilers This chapter contains these sections e Choosing a Compiler e Compiling Projects Choosing a 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 e 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 e Flexibility as new programming languages develop the IDE can use new compiler plug ins The IDE associates common file name extensions with various plug in compilers For example most Java files have the file name extension java The IDE associates these files with the Java compiler The File Mappings panel provides control over such associations IDE 5 1 User s Guide IDE 267 Compilers Compiling Projects Compiling Projects Compile projects to process the source fi
331. nd RAD options To open the IDE Preferences window select Edit gt Preferences General Panels The General section of the IDE Preference Panels list defines the basic options assigned to a new project The General preference panels available on most IDE hosts include e Build Settings on page 351 e Concurrent Compiles on page 353 e IDE Extras on page 354 e Help Preferences on page 358 e Plugin Settings on page 358 e Shielded Folders on page 359 e Source Trees on page 361 Build Settings The Build Settings preference panel provides options for customizing various aspects of project builds including IDE 5 1 User s Guide IDE 351 Working with IDE Preferences General Panels e file actions during project builds e memory usage to accelerate builds e local data storage of projects stored on read only volumes Figure 31 2 Build Settings preference panel Windows Snmooser Figure 31 3 Build Settings preference panel Macintosh Build S OO Oe E Play sound after Bring Up To Date amp Make Success System Beep F Fallure System Beep A Other Settings Build before running F Save open files before build D Show message after building up to date project Include file cache K 2048 Compiler thread stack K 325 Use Local Project Data Storage Compi ler Local_Data_Storage Choose Used
332. ndow 1 Debug Run your program The Thread window opens In the Source pane in the Thread window double click the variable Choose Debug gt Set Watchpoint Alternately right click the variable and Set Watchpoint Clearing a Watchpoint in the Thread Window To clear a watchpoint in the Thread window follow these steps 1 IDE 246 Debug Run your program The Thread window opens In the Source pane in the Thread window double click the variable Choose Debug gt Clear Watchpoint Alternately right click the variable and Clear Watchpoint IDE 5 1 User s Guide Using Watchpoints Using Watchpoints in Other Windows Enabling and Disabling Watchpoints in the Thread window To enable a Watchpoint in the Thread window follow these steps 1 Debug Run your program The Thread window opens 2 Inthe Source pane in the Thread window double click the variable 3 Choose Debug gt Enable Disable Watchpoint Alternately right click the variable and Enable Disable Watchpoint While intact a disabled Watchpoint is grayed out and the program does not stop or alert you when data changes An enabled Watchpoint suspends program execution and alerts you when data changes Using Watchpoints in the Variable Window The Variable window displays a single variable and lets you edit its contents Setting a Watchpoint in the Variable Window To set a Watchpoint in the Variable window follow these steps
333. ndow Select the option to use this style e FDI Floating Document Interface In this interface style the IDE does not use a main application window Multiple IDE document windows appear above the desktop Clear the option to use this interface style Use multiple undo Select the Use multiple undo option to remember several undo and redo operations in editor windows Clear the option to remember only the most recent undo or redo action The IDE stores undo and redo actions on a stack in first in last out FILO order however the stack size and capability are limited For example assume there are five undo actions on the stack ABCDE If the IDE redoes two actions ABC then performs a new action ABCF the undo events DE are no longer available Use Script menu Select the Use Script menu option to display the Scripts menu in the IDE menu bar Clear the option to remove the Scripts menu from the menu bar The Scripts menu provides convenient access to IDE scripts For more information about scripting the IDE refer to the CodeWarrior Scripting Reference Use Third Party Editor Select the Use Third Party Editor option to use a third party text editor to modify text files Clear the option to use the text editor included with the IDE Enter in the Launch Editor and Launch Editor w Line fields command line expressions that specify information that the IDE passes to the third party editor IDE 5 1 User s Guide Prefe
334. ndow to activate the Find Previous menu command For more information see the task Using the Find Previous Command IDE 5 1 User s Guide IDE 139 Finding and Replacing Text Regular Expression Find 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 become operators with special meanings in a regular expression TIP For an in depth description of regular expressions refer to the World Wide Web for information on regexp 3 by Henry Spencer and Mastering Regular Expressions by Jeffrey E F Friedl published by O Reilly amp Associates Inc Table 12 7 explains the regular expression operators that the IDE recognizes Table 12 7 Regular expression operators recognized by the IDE IDE 140 Operator Name Explanation match any Matches any single printing or non printing character except newline andnull match zero Replaces the smallest preceding regular expression with a or more sub expression match one Repeats the preceding regular expression at least once and then as or more many times as necessary to match the pattern match zero Repeats the preceding regular expression once or not at all or one n back reference Refers
335. ndow to print 2 Choose File gt Print 3 Set print options in the Print dialog 4 Print the file as explained in Table 5 3 Table 5 3 Printing a source file On this host Do this Windows Click OK Macintosh Click Print Solaris Click Print Linux Click Print The IDE prints the selected file IDE 66 IDE 5 1 User s Guide Working with Files Managing Files NOTE Use the same process to print the contents of a window such as a Project window Printing Source File Selections The Print command prints the currently selected contents in an editor window 1 Activate the desired editor window to print 2 Select the portion of text to print 3 Choose File gt Print 4 Set print options in the Print dialog 5 Print the file as explained in Table 5 4 Table 5 4 Printing a source file selection On this host Do this Windows Click OK Macintosh Click Print Solaris Click Print Linux Click Print The IDE prints the selected text in the file Reverting Files Use the Revert command to replace the current file with its previously saved version 1 Choose File gt Revert 2 Click OK in the Revert changes to file dialog The IDE replaces the file with its previous version The replaced file appears in the editor window IDE 5 1 User s Guide IDE 67 Working with Files Managing Files IDE 68 IDE 5 1 User s Guide Dockable Windows This chapter e
336. nection Choose from the Debugger pop up menu the desired debugger for use with the remote connection Configure the Browse in processes window option as desired selected the IDE filters the Processes window list and the list of available debuggers for an opened symbolics file The filter prevents an unavailable remote connection from appearing in either list cleared the IDE does not filter the Processes window list or the list of available debuggers for an opened symbolics file Both available and unavailable remote connections appear in the lists IDE 5 1 User s Guide IDE 381 Working with IDE Preferences Debugger Panels 7 8 9 Choose from the Connection Type pop up menu the desired network protocol for the remote connection Enter in the IP Address field the Internet Protocol address of the remote computer Click OK The IDE adds the new remote connection to the Remote Connections list 10 Click OK Apply or Save The IDE saves the remote connection changes Changing Remote Connections IDE 382 Change a remote connection to update network connection information between the host computer and a remote computer 1 Choose Edit gt Preferences The IDE Preferences window appears Select the Remote Connections panel from the IDE Preference Panels list Select from the Remote Connections list the remote connection that requires modification Click Change A dialog box appears with
337. needed for a minimal ready to run project Use project stationery as a foundation upon which to add features for each new programming endeavor 1 Choose File gt New 2 Click the Project tab and select a project type 3 Enter a project name include the mcp extension in the Project Name field and set the Location for the new project 4 Click OK in the New window 5 Select the appropriate project stationery from the New Project window 6 Click OK in the New Project window The IDE uses the selected project stationery as a template to create a new project Creating New Projects from Makefiles Use the Makefile Importer wizard provided with the Windows Solaris and Linux IDE to convert most Visual C nmake or GNU make files into projects The wizard performs these tasks e Parses the makefile to determine source files and build targets e Creates a project e Adds the source files and build targets determined during parsing IDE 5 1 User s Guide IDE 33 Working with Projects Managing Projects 9 Matches makefile information such as output name output directory and access paths with the newly created build targets Selects a project linker Choose File gt New Click the Project tab Select Makefile Importer Wizard Enter a project name include the mcp extension in the Project Name field and set the Location for the new project Click OK in the New window Enter the path to the makefile in the
338. nefits to novice programmers e Simplicity console applications are computer programs that use a simple text mode interface The simplicity of console mode applications free novice programmers to learn a programming language without having to learn graphical user interface programming at the same time e Foundation understanding console applications provides the basis for more advanced computer programming Advanced programmers readily understand console applications Read this chapter to learn more about typical tasks for working with console applications This chapter contains these sections e About Console Applications e Creating Console Applications About Console Applications A console application is a simple text based computer program Console applications do not usually employ a graphical user interface GUT Instead the applications rely on plain text input and output to complete tasks Console applications are ideal for novice programmers The applications are easier to program because they lack a GUI If problems arise the programmer can use text based feedback together with the debugger to correct problems Figure 8 1 on page 86 shows output from a sample console application IDE 5 1 User s Guide IDE 85 Creating Console Applications Creating Console Applications Figure 8 1 Console application Console Debug exe LLES This part of the application demonstrates text based input and outp
339. nel Target Settings Target Name Linker fwin32 x86Linker we Pre linker Noe O H Post linker i Output Directory ae Choose Clear J HProject IV Save project entries using relative paths Table 32 2 Target Settings panel items Item Explanation Target Name Enter a name 26 or fewer characters for the selected build target as it will appear in the project window Linker Select the linker to use on the current build target Pre linker Select the pre linker to use on the current build target Post linker Select the post linker to use on the current build target IDE 388 IDE 5 1 User s Guide Working with Target Settings Target Panels Table 32 2 Target Settings panel items continued Item Explanation Output Directory Shows the location where 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 Clear Click to delete the current Output Directory path Save project entries using_ Select to save project file entries using a relative path from a defined relative paths access path This option is helpful if the project has 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 Windows version
340. nent that you want to edit 2 Select Layout gt Customize 3 The Menu Editor appears 4 Double click the placeholder for the menu or menu item in the Menu Editor the placeholder appears as a rectangle 5 Enter menu or menu item information in the Menu Item Attributes window 6 Click OK The menu or menu item appears in the Menu Editor Continue customizing the menu then close the Menu Editor window Alternatively you can open the Menu Editor by performing one of these tasks e double clicking the menu component in the layout editor e selecting the menu component in the layout and clicking the Customize toolbar button in the layout editor e using a contextual menu as explained in Table 27 6 Table 27 6 Opening the Menu Editor by using a contextual menu On this host Do this Windows Right click the menu component and select Customize Macintosh Control click the menu component and select Customize Solaris Click and hold on the menu component then select Customize Linux Click and hold on the menu component then select Customize IDE 306 IDE 5 1 User s Guide Component Editing Working with Menu Editors Removing a Menu or Menu Item Remove from the Menu Editor the menus and menu items that you no longer use 1 Double click a menubar component in the layout editor 2 Select the menu or menu item in the Menu Editor that you want to remove 3 Remove the menu or menu item as explained
341. ng Choose the Undo Typing command to remove the just 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 Version Control Settings The Version Control Settings command opens the VCS Settings window Vertical Center The Vertical Center command of the Align submenu aligns the vertical centers of the selected components View Array The View Array command to create a separate window displays a selected array View As The View As command displays a selected variable as a value of a specified data type IDE 5 1 User s Guide IDE 517 Menu Commands IDE 518 View As Binary The View As Binary command displays the selected variable as a binary value View As Character The View As Character command displays the selected variable as a character value View As C String The View As C String command displays the selected variable as a C character string View As Default The View As Default command displays the selected variable in its default format based on the variable s type View As Enumeration The View As Enumeration command displays the selected variable as an enumeration View As Fixed The View As Fixed command displays the selected variable as a fixed type numerical value View As Floa
342. ng a layout 289 opening a recent workspace 84 opening a single class hierarchical window 171 opening a workspace 83 opening an Array window 223 opening projects 35 IDE 560 opening projects created on other hosts 36 opening registers in a separate Registers window 218 opening subprojects 42 opening the Breakpoints window 233 opening the component catalog window 301 opening the component palette 291 opening the Expressions window 211 opening the Global Variables window 214 opening the IDE Preferences window 351 opening the Log window 219 opening the object inspector 296 opening the Processes window 209 210 opening the Registers window 216 opening the Symbolics window 206 opening the symbols window 175 opening the Target Settings window 387 opening the Variable window 220 overstriking text Windows 103 printing class hierarchies 169 printing projects 37 removing a component from a layout 292 removing a keyword from a keyword set 403 removing a layout from a design 283 removing a marker from a source file 120 removing a menu from a menubar component 307 removing a menu item from a menubar component 307 removing all markers from a source file 121 removing an executable file 406 removing components from a catalog 304 removing panes from an editor window 99 removing remote connections 365 383 removing source trees 364 re ordering wires by using the object inspector 318 replacing text across multipl
343. ng the files that belong to the project and project settings Remove Selected Items The Remove Selected Items command removes the currently selected items from the Project window CAUTION You cannot undo this command IDE 5 1 User s Guide IDE 505 Menu Commands IDE 506 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 text box string and replaces them with the Replace text box 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 and Find Next This command substitutes selected text with the text in the Replace text box of the Find window and then performs a Find Next operation If no text is selected in the active Editor window and there is no text in the Find field of the Find window the IDE grays out this menu command Replace and Find Previous This command substitutes selected text with the text in the Replace text box of the Find window and then performs a Find Previous operation If no text is selected in the active Editor window and there is no text in the Find field of the Find window the IDE grays out this menu command NOTE Mac OS Press the Shift key to change the Replace and Find Next menu command to the Replace and Find Previous menu command R
344. nges the link order The build begins at the top of the link order processes each file and concludes at the bottom of the link order 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 gt Bring Up To Date The IDE compiles all uncompiled project files Making Executable Files Use the Make command to compile the newly added modified and touched files in a project then link them into a binary file Unlike the Run command the Make command does not execute the binary file The Make command is useful for creating dynamic link libraries DLLs shared libraries code resources or tools 1 Select the project to make 2 Choose Project gt Make The IDE processes the project and creates a binary file IDE 5 1 User s Guide IDE 269 Compilers Compiling Projects Running Application Projects Use the Run command to perform these tasks e Compile and link a project if necessary e Create a standalone application e Change project settings if required e Save the application e Run the application Note the Run command is not available if the project creates a non executable file lik
345. ngs file with a mkb file name extension like this MyCmdsAndkBs mkb This naming convention helps you quickly identify the file as aMetrowerks Key Bindings file Furthermore the Windows hosted version of the CodeWarrior IDE uses this extension to properly recognize the commands and key bindings file Importing Commands and Key Bindings You can import commands and key bindings from a previously exported file To import a command or key binding follow these steps 1 Click Import in the Customize IDE Commands window After you click this button a standard Open dialog box appears 2 Use the dialog box to find and open the Cmds amp Bindings file you want to import The IDE adds the imported commands and key bindings to the Commands list in the Customize IDE Commands window IDE 5 1 User s Guide IDE 347 Customizing the IDE Customize Key Bindings IDE 348 IDE 5 1 User s Guide 31 Working with IDE Preferences This chapter explains core CodeWarrior IDE preference panels and provides basic information on global and project level preference options Consult the Targeting documentation for information on platform specific preference panels This chapter contains these sections IDE Preferences Window on page 349 General Panels on page 351 Editor Panels on page 365 Debugger Panels on page 375 RAD Tools Panels on page 383 Abbreviated descriptions appear in this c
346. nitor is connected to the computer Use default workspace Select this option to have the IDE use the default workspace The IDE uses the default workspace to save and restore window and debugging states from one session to the next For example if you select this option and close the IDE with a project window visible onscreen that project window reappears the next time you start the IDE IDE 5 1 User s Guide Preference and Target Settings Options Clear this option to have the IDE start with the same default state for each new session no windows visible onscreen For example if you clear this option and close the IDE with a project window visible onscreen that project window does not appear the next time you start the IDE Instead the IDE always starts without opening any windows Use External Debugger Select this option to have the IDE use an external debugger application in place of the CodeWarrior debugger Use External Editor Select the Use External Editor option to use an external text editor to modify text files in the current project Clear the option to use the text editor included with the IDE Use Local Project Data Storage Select the Use Local Project Data Storage option to store on the host computer data associated with a project file on a read only volume Clear the option to store project data inside the same folder as the project file itself After loading a project file the IDE creates or updates an as
347. ns Click the color swatch to change the current color IDE 426 Generate Browser Data From Choose from this pop up menu whether the IDE generates browser data and from what source it generates that data Choose from these possibilities e None Disable browser data generation Certain IDE features that use browser data will be unable to work with the project but the project s size will be smaller e Compiler Have the IDE use the compiler to generate the browser data If you choose this option you must Make the project in order to generate the browser data The IDE uses the compiler assigned to the project to generate the browser data during the build process IDE 5 1 User s Guide Preference and Target Settings Options e Language Parser Have the IDE use the language parser to generate the browser data Certain IDE features such as C C Code Completion function more effectively if you choose this option The IDE uses the language parser assigned to the project to generate the browser data 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 Enter in the Grid Size X field the number of pixels to space between markings on the x axis of the Layout Editor grid Grid Size Y Enter in the Grid Size Y field the
348. ns Show values as decimal instead of hex Select the Show values as decimal instead of hex option to display variable values in decimal form Clear the option to display the values in hexadecimal form Show variable location Select the Show variable location option to display the Location column in the Variables pane of the Thread window Clear the option to hide the Location column Show variable types Select the Show variable types option to display the type associated with each variable in Variable windows Clear the option to hide the variable types Show variable values in source code Select the Show variable values in source code option to show current values for variable names displayed in contextual menus Clear the option to show variable names only 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 e No editor windows open the setting modifies the default font size All editor windows take on the default font size e 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 Sort functions by method name in symbolics window Select the Sort functions by method name in symbolics window option to alphabetically sort functions by method name Clear the option to alphabetically s
349. nships the class browser shows the relationships between classes data members and methods The class browser also updates the display to reflect changes in class scope Read this chapter to learn more about typical tasks for working with Class Browser windows This chapter contains these sections e Class Browser window on page 155 e Classes pane on page 161 e Member Functions pane on page 163 e Data Members pane on page 164 e Source pane on page 165 e Status Area on page 165 Class Browser window Use the Class Browser window to view information about the elements of a computer program This section explains how to use the Class Browser window to view browser data assuming knowledge about activating the browser Figure 14 1 on page 156 shows the Class Browser window Table 14 1 on page 156 explains the items in the window Table 14 2 on page 158 explains the options in the Browser Access Filters list box IDE 5 1 User s Guide IDE 155 Using Class Browser Windows Class Browser window Figure 14 1 Class Browser window E Debug Win32 x86 classes e B lt net Fa View as implementor Classes 98 Member Functions 38 E _AFX_DEBUG_STATE CNoTrackObject CN A AFX_THREAD_STAT Ei _AFX_THREAD_STAT _AFX_WIN_STATE _AFX_THREAD_STAT AF_CLASSINIT B CNoTrackObject oper AFx_CLASSINIT_CO B CNoTrackObject oper AFX_EXCEPTION_LINK AFX_MO
350. nst The Frameworks tab appears only in projects that support frameworks Targets Click this tab to display a list of all project build targets sub projects and target linking information Project Window Views The Project window uses views to organize items e Files e Designs for projects supporting rapid application development e Link Order e Targets e Frameworks for projects supporting code frameworks Files View The Files view presents information about individual files in a project The Files view typically contain certain file types e Text files files that contain any type of text Sample text files include Read Me files and source files e Source files files that contain source code only Sample source files include C files and Java files e Library files files that contain special code designed to work together with a particular programming language or operating environment IDE 5 1 User s Guide IDE 47 Project Window Project Window Views Table 4 2 explains the items in the Files view Table 4 2 Files view items Item icon Explanation Touch g 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
351. nst int a 100 IDE 144 IDE 5 1 User s Guide IV Browser This section contains these chapters e Using the Browser i row indow e Using Class Browser Windows e Using Other Browser Windows e Using Browser Wizards IDE 5 1 User s Guide IDE 145 IDE 146 IDE 5 1 User s Guide 13 Using the Browser This chapter explains how to work with the browser in the CodeWarrior IDE Use the browser to perform these tasks e Generate a browser database the browser stores collected symbol information in a browser database for the project You can generate browser data from the compiler or the language parser e Collect symbol information symbols include functions variables and objects Enable the browser to collect information about the symbols in a project Read this chapter to learn more about typical tasks for working with the browser This chapter contains these sections e Browser Database on page 147 e Browser Symbols on page 151 Browser Database The browser database contains information about the symbols in a program which include depending on the 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
352. nt Choose the typeface displayed in editor windows Size Choose the font size displayed in editor windows Script Windows 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 Tab Size Enter the number of spaces to substitute in place of a tab character This number applies to the Tab Inserts Spaces option 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 into text after pressing Tab The Tab Size option determines the number of inserted spaces IDE 5 1 User s Guide IDE 369 Working with IDE Preferences Editor Panels Setting the Text Font To set the text font follow these steps 1 2 Choose Edit gt Preferences Select the Font amp Tabs panel in the Editor selection in the IDE Preference Panels list In the Font Settings area of the IDE Preferences window select a font type in the drop down menu in the Font field Save your font in the IDE Preferences window Windows Click OK Macintosh Click Save The foreground text changes to the new font Setting the Text Size To set the text size follow
353. nt dst_position int length void L class Class KY currentTimeMillis long err PrintSt K3 exit int status K3 getenv String name K3 getPropertiest java ut K3 getProperty String key String K3 getProperty String key String def String K getSecurityManagerl Securit KJ identityHashCode Object x int sin Input colt 4 Us load String filename void Y Runs the garbage collector 4 IDE 110 IDE 5 1 User s Guide Editing Source Code Code Completion Table 10 3 Code Completion window items Item Icon Code Completion list Explanation Lists available variables and methods or functions along with their corresponding return types or parameters This list changes based on the context of the insertion point in the active editor window Icons help distinguish items in the list Disclosure Triangle Click to toggle display of the Documentation pane for those programming languages that support it Resize Bar Drag to resize the Code Completion list and the Documentation pane Documentation pane Displays summary information or documentation for the selected item in the Code Completion list This pane appears only for programming languages that support summary information or documentation Table 10 4 Code Completion window icons Icon Code Type Icon Code Type Class re Method Function gB Namespace FPN Global Variable
354. ntosh Select to treat and as subfolder separator characters Clear to treat and as ordinary text Require Framework Style Includes Mac OS X Select to require include statements of the form LibraryName HeaderFile h Clear to allow statements of the form HeaderFile h User Paths list Displays a list of currently defined user level access paths System Paths list Displays a list of currently defined system level access paths Add Default Click to restore the default user and system level access paths Host Flags list pop up Choose the host platforms that can use the selected access path Add Click to add a user or system level access path Change Click to modify the selected user or system level access path Remove Click to remove the selected user or system level access path The User Paths and System Paths lists display columns with status icons for each access path Furthermore there are different types of access paths Table 32 4 explains these items Table 32 4 User Paths and System Paths list columns Name Icon Search status va Explanation A checkmark icon indicates an active access path that the IDE searches IDE 5 1 User s Guide No checkmark icon indicates an inactive access path that the IDE does not search IDE 391 Working with Target Settings Target Panels Table 32 4 User Paths and System Paths list co
355. nts window as explained in Table 21 3 Table 21 3 Opening the Watchpoints window On this platform Do this Windows Select View gt Watchpoints Macintosh Select Window gt Watchpoints Solaris Select Window gt Watchpoints Linux Select Window gt Watchpoints 2 Select an existing Watchpoint in the Watchpoints window 3 Choose Debug gt Disable Watchpoint The Watchpoint grays out The Watchpoint remains intact however the program does not stop at this Watchpoint or alert you when data changes Alternately you can right click the Watchpoint and select Disable Watchpoint Enabling a Watchpoint from the Watchpoints window To enable a Watchpoint from the Watchpoints window follow these steps 1 Open the Watchpoints window as explained in Table 21 4 Table 21 4 Opening the Watchpoints window On this platform Do this Windows Select View gt Watchpoints Macintosh Select Window gt Watchpoints Solaris Select Window gt Watchpoints Linux Select Window gt Watchpoints IDE 244 IDE 5 1 User s Guide Using Watchpoints Using Watchpoints in Other Windows 2 Select an existing disabled Watchpoint in the Watchpoints window While intact the disabled Watchpoint is grayed out and the program will not stop or alert you when data changes 3 Choose Debug gt Enable Watchpoint The program now stops at this Watchpoint and alerts you when data changes Alternately
356. nu command 500 modifying wires with the layout editor 313 Monitor for debugging option Windowing panel 432 Move open windows to debugging monitor when debugging starts option Windowing panel 432 moving build targets 52 dockable windows 78 files 52 groups 52 layouts 52 targets 52 Multi Class Hierarchy window 167 170 multi core debugging 228 Multiple Document Interface 444 multiple files searching 134 multiple folders searching 131 multiple items replacing text in 135 multiple projects searching 132 multiple Redo 504 multiple symbolics files searching 133 multiple Undo 504 multiple file Find and Replace window 129 N Name field 329 navigating browser data 151 Code Completion window 111 to markers 120 navigating data 151 IDE 5 1 User s Guide navigating source code 115 New Binding 329 346 New C Class window 179 New C Data Member window 187 New C Member Function window 184 New Class Browser menu command 501 New Class menu command 500 New Class wizard 162 177 178 New Command 331 New command 61 86 New Command Group Create 330 New Connection dialog box 381 New Data Member 164 184 187 new data member functions creating 185 New Data Member wizard 164 185 186 New Data menu command 501 New Event menu command 501 New Event Set menu command 501 New Expression menu command 501 New Group 330 New Item 161 New Layout 282 New Layout command 282 New Member Function menu command
357. nu only appears during a debugging session Table 34 16 Data menu commands Menu command Show Types Description Toggles the appearance of the data type on local and global variables displayed in Variable panes and Variable windows Refresh All Data Updates data displays New Expression Creates a new expression entry in the Expressions window Copy to Expression IDE 5 1 User s Guide Copies the selected variable to the Expressions window IDE 473 IDE Menus Macintosh Menu Layout Table 34 16 Data menu commands continued Menu command View As Description Displays the View As dialog where the data type of the selected variable can be specified View Variable Displays the selected variable in a new Variables window View Array Displays the selected array variable in a new Arrays window View Memory Displays the selected variable in a new Memory window View Memory As Displays the View As dialog where the data type of the selected variable can be specified then shown in a new Memory window Cycle View Toggles the data view among View Source View Disassembly View Mixed and View Raw Data View Source View data as source code View Disassembly View data as language disassembly View Mixed View data as source code and its disassembly View Raw Data View data without applied formatting View As Default Views the selec
358. o a particular line 118 locating 115 source code navigating 115 source file adding markers to 120 source files removing all markers from 121 removing markers from 120 Source pane 165 250 263 in Class Browser window 157 in Symbols window 176 source trees adding 363 IDE 5 1 User s Guide changing 364 removing 364 Source Trees panel options Add 362 Change 362 Choose 362 Name 362 Remove 362 Source Tree list 362 Type 362 441 Source Trees preference panel 361 Absolute Path option 441 Environment Variable option 442 Registry Key option 442 Source Trees settings panel 361 Stack Crawl window See Thread window 245 259 Stack Editor Windows menu command 512 starting debugger 195 static icon for 163 stationery creating for projects 40 creating projects 33 custom 40 status of breakpoints 232 Status area in Class Browser window 157 status area 165 Step Into command 196 Step Out command 196 Step Over command 197 Step Over menu command 512 Stop at end of file 127 128 Stop at Watchpoints option Debugger Settings panel 440 Stop Build menu command 513 Stop command 197 513 Stop On Application Launch option Debugger Settings panel 440 Straight Line 170 strategies for build targets 42 for projects 42 for subprojects 42 IDE 5 1 User s Guide Strength Reduction 400 Strings option Text Colors panel 440 structure of documentation 18 submenus Align 482 483 subproject defined 41 subprojects creating 41 op
359. obal Optimizations settings panel items Item Faster Execution Speed Explanation Select to favor optimization routines that increase the execution speed of the final object code at the expense of larger code size Smaller Code Size Select to favor optimization routines that reduce the size of the final object code at the expense of slower execution speed Optimization Level slider Move to the desired optimization level The IDE applies more optimization routines at higher optimization levels The Details field lists the active optimization routines The Details field se inewiaval Gpinization routines applied at the selected optimization level 0 explains these optimizations and their availability at certain eee ievelk IDE 5 1 User s Guide IDE 399 Working with Target Settings Code Generation Panels Table 32 9 Optimization routines IDE 400 Optimization Routine Explanation Optimization Level Global Register Allocation Stores working values of heavily used variables 1 2 3 4 or in registers instead of memory Global Register Allocation Only for Temporary Values Dead Code Elimination Removes statements never logically executed 1 2 3 4 or referred to by other statements Branch Optimizations Merges and restructures portions of the 1 2 3 4 intermediate code translation in order to reduce branch instructions Arithmetic Operation
360. ode completion for parameter lists 114 code completion navigating window 111 code completion selecting items 112 code completion triggering by keyboard 108 code completion triggering from IDE menu bar 108 Code Generation section of Target Settings panels 398 code navigating 115 CodeWarrior menu reference 451 overview 21 CodeWarrior Glossary command 488 CodeWarrior Help menu command 488 IDE 5 1 User s Guide CodeWarrior IDE Apple menu 464 Browser menu 479 CodeWarrior menu 464 Data menu 461 473 Debug menu 459 471 Edit menu 453 466 File menu 451 464 Help menu 463 477 Layout menu 478 Project menu 457 469 Scripts menu 477 Search menu 455 467 Tools menu 476 VCS menu 476 Window menu 454 462 475 CodeWarrior menu 464 CodeWarriorU com 17 Collapse Non debugging Windows option 417 Collapse Window menu command 488 collapsing browser panes 160 dockable windows 78 COM See Component Object Model 419 command Run 239 Command Actions Arguments 333 Defining Mac OS 336 Defining Windows 332 Directory 333 Execute 332 Command Group Delete 337 Command Groups 336 Delete 336 Commands Import 347 Modify 329 commands 163 About Metrowerks CodeWarrior 481 Add Files 481 Add Window 481 Apply Difference 482 Balance 483 Bottom Edges 483 Break 197 483 Break On C Exception 483 IDE 525 Break on Java Exceptions 483 Breakpoints 483 Breakpoints Window 483 Bring To Front 484 Bring Up To Date 484 Browser Contents 156
361. olbars Toolbar Elements A toolbar can contain these elements e Commands buttons that you click to execute IDE menu commands e Controls menus such as Document Settings Functions Header Files Markers Version Control and Current Target e Miscellaneous other elements such as the File Dirty Indicator and File Path field e Scripts Mac OS buttons that you click to execute one of the scripts available through the Scripts menu 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 e Add a toolbar element e Remove a toolbar element e Clear all elements on a toolbar e 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 On the Mac OS 9 hosted IDE activate Balloon Help and rest the cursor over the element IDE 340 IDE 5 1 User s Guide
362. ollapse the Editor Window Toolbar click this icon in the right hand top corner of the Editor window Figure 9 3 on page 95 shows an editor window with a collapsed toolbar IDE 94 IDE 5 1 User s Guide The CodeWarrior Editor Editor Toolbar Figure 9 3 Editor window toolbar collapsed m HelloWin32 cpp eT o x b M gt E Of Path C Documents and Settings nmoorefield My Documents Metr Hellowin32 cpp Win32 GUI app skeleton lt windows h gt LRESULT CALLBACK WndProc HWND hWnd UINT messg WPARAM wParam LPARAM lParam char szProgName Hello Win32 name of application char message Hello from Win32 message to be printed in int WINAPI WinMain HINSTANCE hInst eWin32 entry point rout HINSTANCE hPreInst LPSTR lpszCmdLine int nCmdShow HWND hWnd MSG 1pMsg WNDCLASS we Line 3 Coll lt Interfaces Menu The Interfaces menu lists the source files included in the current source file See Finding Interface Files on page 116 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 on page 116 for information on navigating source code with the Functions pop up Markers Menu The Marker menu in lists the markers placed in the current file Use markers to scroll to specific items in source code and find code seg
363. olor cursorfjava awt Cursor enabled boolean font java awt Font foreground java awt Color iconlmage java awt I mage layout java awt LayoutM anager locale java util Locale locationfjava awt Point menuB ar java awt MenuB ar resizable boolean size java awt Dimension title java lang String 4 Specify the event that triggers the wire a Scroll though the list of available events b Select an event NOTE Clear the Show events by group checkbox to list available events in alphabetical order Select the checkbox to arrange available events by group IDE 316 IDE 5 1 User s Guide Object Wiring Inspecting Wires 5 Specify the destination component If you selected a destination component when creating the wire the Create Wire wizard already has this information 6 Specify the action performed on triggering the wire a Select an action type from the pop up menu Set a Property on the destination component Call a Method on the destination component e Perform an Action predefined action on the destination component Execute Your Own Code after the wire triggers b Select an action The available actions depend on the selected action type 7 Complete additional information presented in the Create Wire wizard This information completes the data the IDE needs to implement the wire in source code 8 Click Finish The Create Wire wizard displays a Summary dialog box 9
364. ommand line arguments to pass to the external debugger at the beginning of a debugging session Attempt to use dynamic type of C Object Pascal and SOM objects Select this option to display runtime types for C Object Pascal and SOM objects Clear the option to display static types 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 Auto target Libraries Auto Target Libraries Select this option to have the IDE attempt to debug dynamically linked libraries DLLs loaded by the target application The IDE debugs the DLLs that have symbolics information IDE 5 1 User s Guide Preference and Target Settings Options This option applies to non project debugging sessions such as debugging an attached process 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 triggers opening of the Code Completio
365. ommand on the source file Status Area Use the status area to perform these tasks e Toggle viewing of the Classes pane e View class declarations e View classes according to public private or protected access Figure 14 1 on page 156 shows the status area Table 14 8 on page 166 explains the items in the status area IDE 5 1 User s Guide IDE 165 Using Class Browser Windows Status Area Table 14 8 Status area items Item Show Classes Pane Icon Explanation 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 Class Declaration Click to show the declaration of the current class Access Filter Display IDE 166 Displays the access state of the current class IDE 5 1 User s Guide 15 Using Other Browser Windows This chapter explains how to work with the Class Hierarchy windows in the CodeWarrior IDE Use Class Hierarchy windows to perform these tasks e View hierarchical browser data the class hierarchy window shows a graphical representation of hierarchical structure Object oriented languages such as C and Java allow hierarchical relationships between classes e Analyze inheritance structure the class hierarchy window shows the inheritance structure of classes This structure reveals the data handling capabilities of a particular class Read this cha
366. ommand 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 Resume The Resume command switches from the IDE to the running application This menu command only appears after the IDE starts a debugging session and the application being debugged is currently running 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 IDE 5 1 User s Guide Menu Commands Run The Run command compiles links and creates a standalone application and run that application This command is unavailable if the project creates libraries shared libraries code resources and other non application binaries Run to Cursor The Run to Cursor command sets a temporary breakpoint at the line of source code that has the text insertion point then runs the program 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 NOTE Mac OS Press the Option key to change the Save command to the Save All menu command Save As
367. on control commands related to the editor window s file If a version control system is not enabled for a project the only item on the VCS menu is No Version Control Available e Choose VCS gt VCScommand The IDE executes the VCS command Other Editor Window Components Use other editor window components to perform these tasks Determine the path to a file e Determine the modification status of a file e Set or clear breakpoints e Edit text or source code e Find the text insertion point This section explains these additional editor window components Path Caption The Path caption shows the path to the active file The directory delimiters follow host conventions For example slashes separate directories for a path on a Windows computer File Modification Icon The File Modification icon indicates the save status of the file e The icon indicates an unchanged file since the last Save e The Sa icon indicates a file with modifications not yet saved IDE 5 1 User s Guide IDE 97 The CodeWarrior Editor Other Editor Window Components Breakpoints Column The Breakpoints column shows breakpoints defined in the current file Each marker in the column indicates the line of source code at which the debugger suspends program execution See Using Breakpoints on page 231 for information on using breakpoints Text Editing Area The text editing area behaves the same way as it does in a word process
368. on 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 Table 34 5 Project menu commands Menu command Explanation Add Window Adds the active window to the project 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 IDE 5 1 User s Guide 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 IDE 457 IDE Menus Windows Menu Layout Table 34 5 Project menu commands continued Menu command Create Segment or Create Overla Explanation Opens the Create Segment Overlay dialog box that you can use to add a new segment or overlay to the active project The new segment or overlay appears below the selected one Create Design Opens the Create New Design dialog box that you can use to add a design to the active project The new design appears in the Design tab of the project window Export Project as GNU Makefile Exports the current project to a GNU makefile When using the Windows menu layout on a Macinto
369. ons In Folders Click to search specific folders in the host computer s file system In Projects Click to search active projects and build targets In Symbolics Click to search files containing symbolics debugging and browsing information generated by the IDE In Files Click to search files contained in custom file sets Searching Text Across Multiple Folders Use the In Folders tab to search text within folders on the host computer 1 Choose Search gt Find in Files 2 Type search text into the Find text box 3 Set general search options 4 Click the In Folders tab 5 Select the folder to search e Enter in the Search in field the path to the folder to search e Choose a recently searched folder from the Search in list box e Click Choose to navigate the computer s file system and select the folder to search 6 If desired select Search sub folders to search all folders inside the selected folder 7 Select file types to search as explained in Table 12 5 Separate items in the file type list with commas IDE 5 1 User s Guide IDE 131 Finding and Replacing Text Multiple File Find and Replace Table 12 5 Selecting file types to search On this host Do this Windows Edit the By type list Macintosh Edit the Ends with list Solaris Edit the Ends with list Linux Edit the Ends with list 8 Start the Find or Find All operation e Click Find to find a single match e Click
370. operties and source code implementations NOTE Some tabs display information only for public data not inherited from other member functions For these tabs the Browser Access Filters pop up menu and the Show Inherited checkbox gray out Properties Tab The Properties tab displays information for a selected component in the Classes pane of the browser window The tab contains these panes e Properties view the properties of the selected component Implementation view the property implementation in the source code The browser allows source code editing within the Implementation pane The pane also shows the path to the source file Methods Tab The Methods tab displays information for a selected component in the Classes pane of the browser window The tab contains these panes e Methods view the functions or methods of the selected component Implementation view the method implementation in the source code The browser allows source code editing within the Implementation pane The pane also shows the path to the source file Events Tab The Events tab displays information for a selected component in the Classes pane of the browser window The tab contains these panes e Event Sets view a list of event sets for the selected component Each event set contains one or more events IDE 5 1 User s Guide RAD Browsing Browser RAD Wizards e Events view the events within the selected event set The browser allows
371. or Enter text or source code perform edits and copy or paste selections See Editing Source Code on page 101 for information on using special editor features Line and Column Indicator The Line and Column indicator shows the current position of the text insertion point Click the indicator to specify a line to scroll into view See Going Back and Forward on page 118 for information on navigating source code with the Line and Column indicator Pane Splitter Controls Use the pane splitter controls to perform these tasks e Add panes to editor windows e Adjust pane size e Remove panes from editor windows This section explains how to perform each task Adding Panes to an Editor Window Use the Pane Splitter controls to add additional view panes in an editor window and view two or more sections of a source file at the same time 1 Click and drag a Pane Splitter control to add a view pane IDE 98 IDE 5 1 User s Guide The CodeWarrior Editor Other Editor Window Components 2 The IDE adds a new view pane to the editor window Resizing Panes in an Editor Window Use the Pane Resize controls to resize the panes in an editor window 1 Click and drag a vertical or horizontal Pane Resize control 2 The IDE resizes the selected view pane Removing Panes from an Editor Window Use the Pane Resize controls to remove additional view panes from an editor window 1 Remove an editor window pane
372. or software development The Target Settings panel contains an option for selecting a linker The IDE maps to each linker a group of recognized file name extensions These mappings determine how the IDE interprets each file IDE 5 1 User s Guide IDE 273 Linkers Linking Projects 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 Generating Project Link Maps Use the Generate Link Map command to create a link map file that contains function and cross section information about the generated object code The link map reveals the files libraries and functions ignored by the IDE while producing the binary output The IDE stores the link map file in the project folder The file uses the same name as the build target with a MAP or xMAP extension 1 2 Select the project window Choose Edit gt target_name Settings Select the linker panel in the Target Settings Panels list Select the Generate Link Map option Click Save Choose Project gt Make The IDE generates the link map file IDE 5 1 User s Guide IDE 274 VII RAD Rapid Application Development This section contains these chapters e Creating RAD Projects e Layout Editing e Component Editing e Object Wiring e RAD Browsing IDE 5 1 User
373. or to incorporate matching text into a replacement string The IDE substitutes the matching text for the amp operator Use amp to indicate a literal ampersand in the replacement string Table 12 13 shows examples of using the find string in the replace string of regular expressions IDE 5 1 User s Guide IDE 143 Finding and Replacing Text Regular Expression Find Table 12 13 Examples of using the find string in the replace string inden __ he Replace string Matching text After replacement var 0 9 varl my_varl tgt amp target tgt amp target 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 These tables show a sample replacement operation that recalls sub expressions Table 12 14 shows sample find string replacement string and sub expression definitions Table 12 15 shows the result of applying the sample definitions to some text Table 12 14 Sub expression definitions Find string define t t 0 9 Replace string const int 1 2 1 2 0 9 Table 12 15 Remembering sub expressions Sample text 1 matches 2 matches After replacement this text this text define var1 10 varl const int varl define a 100 a 100 co
374. orking with Projects Advanced Projects Opening Subprojects IDE 42 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 e Using multiple build targets inside a single project allows access to all source code for that project e Build targets organize different collections of build settings for a single project e Each project accommodates up to 255 build targets Subprojects Subprojects incorporate separate standalone projects into parent projects Subprojects have these advantages e Subprojects separate distinct parts of a complex program such as an application and its various plug ins e Using subprojects streamlines a complicated build For example create a project that builds all plug ins for an application Add this project as a subproject of the main application The IDE then builds all plug ins before building the main application e Use subprojects to break down a complicated project that approaches the 255 bui
375. orksheet The ToolServer Worksheet command opens the ToolServer Worksheet window for use with the Apple ToolServer application program The IDE can disable this command for these reasons e You did not install ToolServer on your computer e You installed ToolServer on your computer but you did not yet start it 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 the selected components to match the width of the component with the smallest width Unanchor Floating Toolbar The Unanchor Floating Toolbar command detaches the floating toolbar from beneath the menu bar Unapply Difference The Unapply Difference command reverses the action of the Apply Difference command in a file comparison window IDE 5 1 User s Guide Menu Commands Uncaught Exceptions Only The Uncaught Exceptions Only command of the Java submenu tells the debugger to break only on unhandled exceptions 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 Typi
376. orm option Layout Editor panel 438 Show Types menu command 512 Show values as decimal instead of hex option Display Settings panel 439 Show variable location option Display Settings panel 439 Show variable types option Display Settings panel 439 Show variable values in source code option Display Settings panel 439 Show Window Toolbar command 498 Show Window Toolbar command in Toolbar submenu 512 showing classes pane 162 163 shrinking panes in browser 160 Single Class Hierarchy Window 156 single files searching 127 single class hierarchical window opening 171 Single Class Hierarchy window 170 IDE 556 difference from Multi Class Hierarchy window 170 single file Find and Replace window 127 single file Find window 126 size setting default for unbounded arrays 419 Size option Font amp Tabs panel 439 Skip Point 251 254 Skip Point icon 252 Snap To Grid button in layout editor 288 Snap To Grid command 289 Snap To Grid menu command 512 software development process cycle 21 Solaris modifier key mappings 20 Sort Alphabetical 161 163 Sort function popup option Editor Settings panel 440 Sort functions by method name in symbolics window option Display Settings panel 439 Sort Hierarchical 161 163 Sort Order button in Files view of Project window 48 sorting classes list 163 Functions list pop up alphabetically 117 Sound Point 251 254 Sound Point icon 252 Sound Point Speak Message 254 source code 234 editing 101 going t
377. ort by class name The sorting affects functions of the form className methodName that appear in the Symbolics window Since most C and Java source files contain methods that belong to the same class select the option to simplify selection of functions by typing method names IDE 5 1 User s Guide IDE 439 Preference and Target Settings Options IDE 440 Stop at Watchpoints Select this option to halt program execution at every watchpoint regardless of whether the watchpoint value changed Clear the option to halt execution at watchpoints with changed values Stop on application launch Select this option to halt program execution at a specified point each time a debugging session begins 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 Sort function popup Select the Sort function popup option to sort function names by alphabetical order in list pop ups Clear the option to sort function names by order of appearance in the source file Success Choose from the Success options a sound to play after a Bring Up To Date or Make operation succeeds Symbolics Enter in this field the number of recent symbolics files to display
378. ot as tabs in a single docked window 2 Click the collapse button J on the dock bar of the docked window that you want to collapse 3 The docked window collapses to hide its contents Expanding a Docked Window If you previously collapsed a docked window you can expand it and view its contents once again 1 Click the expand button on the dock bar AJ 2 The docked window expands to restore its original view Moving a Docked Window Use the gripper in a docked window s dock bar to move the docked window to a different edge of the client area 1 Drag the docked window by the gripper in its dock bar 2 Release the docked window at its new position IDE 78 IDE 5 1 User s Guide Dockable Windows Dock Bars Closing a Docked Window Close a docked window directly from its dock bar 1 Click the close button on the dock bar xj 2 The docked window closes Re opening the window later restores its docked position IDE 5 1 User s Guide IDE 79 Dockable Windows Dock Bars IDE 80 IDE 5 1 User s Guide Workspaces This chapter explains how to work with workspaces in the CodeWarrior IDE Use workspaces to do these tasks e Organize save the state of all windows onscreen for later reuse e Migrate across computers transfer your workspace from one computer to another This chapter contains these sections e About Workspaces on page 81 e Using Workspaces on page 81
379. ot or arrow of a particular wire to select it quickly If many wires connect the same source and destination component try clicking the wire itself to select it quickly 3 Choose Layout gt Edit Wire Alternatively double click the wire or use the layout editor contextual menu 4 The Create Wire wizard appears Use the wizard to modify the current data for the wire Deleting a Wire by Using the Layout Editor IDE 314 Delete an existing wire in your layout to remove the interaction between its source and destination components While deleting the wire removes it from the layout the IDE does not remove the generated source code that implements the wire This behavior helps preserve your source code For example if you modify the generated functions or methods to offer additional functionality the IDE does not delete your work after you delete the wire Instead the IDE removes the wire from the layout 1 Bring forward the layout editor window 2 Select the wire that you want to delete Handles appear on the selected wire 3 Select Edit gt Clear The IDE removes the selected wire from the layout IDE 5 1 User s Guide Object Wiring Using the Create Wire Wizard Using the Create Wire Wizard After you create a wire in the layout the IDE collects this information source component the object on which an event triggers the wire e destination component the object on which an action occurs as a res
380. other program or the operating system itself Understand the consequences of manipulating memory Figure 19 11 shows the Memory window Table 19 11 on page 224 explains the items in the window Figure 19 11 Memory window g WinSIOUX C GUI Debug exe Memory OF x Display pc View Raw data Hex 00401000 00402000 00401000 ELEI EC COSBSCC CCCCCCSS 04248944 00401010 24042745 FCOCOO00 OOFF4SFC 8B45FCA3 00401020 00E04000 6804E040 OOESA2Z1B 00005988 00401030 00000000 C9c30000 00000000 00000000 00401040 SSS9ES5S3 565783EC 20B8Ccccc Ccccsp3c 00401050 24890800 OOOOF3AB SB450889 4508c645 00401060 JE401c645 ESooce4s EGOOCE45 E70OCE45 00401070 jeEsooc74s Ecooo000 00C745F0 00000000Q 00401080 FF4S088B6 4S080FBE 10895S0c s3700C25 Word Size 32 Page x Memory Table 19 11 Memory window items Item Icon Explanation Display Enter a symbol representing the starting address of memory to display Valid symbols include addresses and non evaluating expressions such as main or x View View Raw dta E Select the data format in which to view memory contents Memory Space Choose the memory space in which to view selected for processors that variables or support multiple source code memory spaces Previous Memory Block Click to view the preceding block of memory B IDE 224 IDE 5 1 User s Guide Table 19 11 Memory window items continued Advanced Debugging Memory W
381. out Remove a component that you no longer use from the layout shown in the layout editor IDE 292 IDE 5 1 User s Guide Layout Editing Component Palette 1 Select the component that you want to remove 2 Remove the component as explained in Table 26 6 Table 26 6 Removing a component On this host Do this Windows Select Edit gt Delete Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear The IDE removes the component from the layout Moving a Component in a Layout Follow these steps to reposition components in the layout editor 1 Select the component that you want to move Shift click additional components that you want to move 2 Reposition the selected components e Click and drag the components to a new position e Press the arrow keys to move the components to a new position The IDE repositions the selected components Resizing a Component in a Layout Use the Resize Component command to resize the selected component in a layout Resize handles appear around a selected component one in each corner and midway along each side Use these resize handles to resize the selected component A heavy outline appears as you drag a resize handle This outline represents the final shape of the component after you release the cursor IDE 5 1 User s Guide IDE 293 Layout Editing Object Inspector 1 Select the component that you want to
382. owser Contents window 172 of Classes pane in browser 161 of Data Members pane 164 of Member functions pane 163 of Multi Class Hierarchy window 167 of Single Class Hierarchy window 170 of Source pane 165 of status area in browser 165 of Symbols window 174 IDE 551 Q QuickDraw 432 QuickHelp Mac OS 121 QuickView 121 123 425 QuickView Mac OS 123 QuickView THINK Reference 123 R RAD object wiring 309 RAD tools overview 26 RAD Tools section of IDE preference panels 383 Recursive Search column in Access Paths panel 392 Redo menu command 504 reference information for IDE menus 451 reference template 123 reference template inserting 123 reference templates Macintosh 123 Refresh All Data menu command 505 Register Coloring 401 Register Details Window menu command 505 Register Windows menu command 505 registers changing data views of 217 changing values of 217 FPU Registers 215 General Registers 215 host specific 216 viewing 216 Registers menu command 505 Registers window 214 opening 216 opening more than one 218 Registry Key option of Source Trees preference panel 442 Registry Key option in Type pop up menu 442 Regular expression 126 128 131 Regular Expression option Shielded Folders panel 435 regular expressions 140 _ Data 361 361 choosing one character from many 142 CVS 361 IDE 552 defined 140 grouping 142 matching any character 141 matching line beginnings and endings 143 using the find s
383. panel Import Panel Click to open an XML file that contains options for the current settings panel OK Windows Click to save modifications to all settings panels and close the window Cancel Windows Click to discard modifications to all settings panels and close the window Apply Windows Click to confirm modifications to all settings panels Save Macintosh Solaris and Click to save modifications to all settings panels Linux Opening the Target Settings Window Use the Target Settings window to modify build target options for the current project e Choose Edit gt targetname Settings The Target Settings window appears Target Panels The Target section of the Target Settings Panels list defines the general target settings assigned to a new project The Target settings panels available on most IDE hosts include e Target Settings on page 388 e Access Paths on page 389 e Build Extras on page 392 e Runtime Settings on page 394 IDE 5 1 User s Guide IDE 387 Working with Target Settings Target Panels e File Mappings on page 396 e Source Trees on page 398 Target Settings The Target Settings panel provides options for e setting the name of the current build target e setting the linker pre linker and post linker for the build target e specifying the project output directory for the final output file Figure 32 2 Target Settings pa
384. pare 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 the differences between the items Component Catalog The Component Catalog command opens a Component Catalog window for use within a RAD project Compile The Compile command compiles selected source files into binary files The IDE compiles source files that are e part of the current project and open in the active Editor window or e selected files segments or groups in a project window IDE 5 1 User s Guide Menu Commands Component Palette The Component Palette command opens a Component Palette window for use within a RAD project Connect The Connect command establishes communications between the IDE and embedded hardware to begin a debugging session Copy The Copy command copies selected text to the system Clipboard If the Message Window is active the Copy command copies all the 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 co
385. place All 130 Replace All command 135 Replace All menu command 506 Replace and Find Next menu command 506 Replace and Find Previous command 506 Replace command 129 135 Replace menu command 506 Replace with list pop up 128 130 Replace with text box 128 130 replacing text across multiple items 135 text in a single file 129 text explained 125 text overview 125 Require Framework Style Includes 436 Reset Window Toolbar command in Toolbar submenu 507 508 resetting toolbars 343 Resize command 289 Resize Component command 293 resize handle 293 Resize submenu To Smallest Height command 516 To Smallest Width command 516 resizing components 293 panes in an editor window 99 Resource File flag 397 Restart command 199 Restore Window command Windows 508 IDE 5 1 User s Guide results of multi file search 136 Resume command 198 Resume menu command 508 Revert command 67 Revert menu command 508 reverting files 67 preference panels 436 settings panels 436 revision control 446 476 Right Edges button in layout editor 287 routine selecting entirely 103 Run App Script 336 Run command 54 55 198 239 Run menu command 434 509 Run To Cursor menu command 509 running a program 198 Runtime Settings panel 394 Host Application For Libraries And Code Resources field 427 options Add 395 Change 396 Environment Settings 395 Host Application for Libraries amp Code Resources 395 427 Program Arguments 395 434 Remove 396 Value 396
386. 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 Program Arguments Use the Program Arguments field to enter command line arguments to pass to the project at the beginning of a debugging session Your program receives these arguments after you choose Project gt Run Program entry point Select this option to halt program execution upon entering the program Projects Enter in this field 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 gt Open Purge Cache Click Purge Cache to delete the contents of the current file cache IDE 5 1 User s Guide IDE 434 Preference and Target Settings Options 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 Expr
387. place with othervar x Replace I Match whole word I Stop at end of file T Case sensitive J Regular expression ae D Cancel Search selection only P em Replace All EM Table 12 2 Find and Replace window items Item Explanation Find text box Enter the search string Find list box Select a previously searched string to insert into the Find text box Find Click to start a search operation using the string in the Find text box Replace with text box Enter the replacement string Replace with list box Select a previously used replacement string to insert into the Replace text box Replace Click to replace the current editor window selection with the replacement string Match whole word Select to search for whole word matches only ignoring matches within words Cancel Click to close the Find and Replace window without performing a search Case sensitive Select to search for matches of the search string according to text case Regular expression Select to interpret find and replace strings as regular expressions Search selection only Select to search only the currently selected text and not the entire file Stop at end of file Select to stop a search at the end of a file and not wrap around to the beginning of the file Up Click to perform a search operation back from the current selection point Down Click to perform a search operation forward of the current s
388. plained in Table 22 2 on page 257 IDE 5 1 User s Guide IDE 257 Using Eventpoints Using Eventpoints in the Breakpoints Window Table 22 3 Opening the Breakpoints window On this platform Do this Windows Select View gt Breakpoints Macintosh Select Window gt Breakpoints Solaris Select Window gt Breakpoints Linux Select Window gt Breakpoints 2 Click the eventpoint icon This action toggles the eventpoint disabling it Click the icon again to enable the eventpoint Enabling an Eventpoint from the Breakpoints window To enable an eventpoint from the Breakpoints window follow these steps 1 Open the Breakpoints window as explained in Table 22 4 Table 22 4 Opening the Breakpoints window On this platform Do this Windows Select View gt Breakpoints Macintosh Select Window gt Breakpoints Solaris Select Window gt Breakpoints Linux Select Window gt Breakpoints 2 Click the icon of a disabled eventpoint This toggles the eventpoint enabling it You can click the icon again to disable the eventpoint Setting a Conditional Eventpoint A conditional eventpoint is an eventpoint that initiates an event at a given point in the source code when a specified condition is met Similar to a conditional breakpoint IDE 258 IDE 5 1 User s Guide Using Eventpoints Using Eventpoints in Other Windows which stops program execution if a condition is met
389. porary breakpoint 3 Set the temporary breakpoint as explained in Table 20 3 Table 20 3 Setting the temporary breakpoint On this host Do this Windows Alt click the dash in the Breakpoint column Macintosh Option click the dash in the Breakpoint column Solaris Alt click the dash in the Breakpoint column Linux Alt click the dash in the Breakpoint column The temporary breakpoint appears NOTE For source code with multiple breakpoints the debugger suspends program execution at each breakpoint Suppose that some source code contains a breakpoint followed by temporary breakpoint The debugger suspends program execution at the breakpoint first and then again at the temporary breakpoint Setting Conditional Breakpoints IDE 236 Use the Conditional Breakpoint command to set a conditional breakpoint A conditional breakpoint is a breakpoint with an associated conditional expression The IDE 5 1 User s Guide Using Breakpoints Common Breakpoint Tasks debugger evaluates the expression to determine whether to suspend program execution at that breakpoint A conditional breakpoint behaves in two different ways e If the expression evaluates to true non zero value the debugger suspends program execution e If the expression evaluates to false zero the breakpoint has no effect Program execution continues without interruption 1 Set a breakpoint that you want to associate with a conditional expr
390. ppearance of the new command within its command group 5 Define the desired Action for the new menu command 6 Click Save The IDE saves your new menu command If you enabled the Appears in Menus checkbox the new menu command appears within the selected command group Figure 30 3 Command action fields m Customize IDE Commands E x Commands Toolbar Items Save Name New Command Save All IV Appears in Menus Action amp Save As Execute fal QB Save A Copy As Arguments P Revert Directory oOo M GA Import Components Kep Bindings New Binding Ga Close Catalog Auto Repeat Bs Import Project I Export Project Prefix Key Timeout fi20 I Numeric Keypad Bindings Export Import Factory Settings Revert Save d New Command New Group New Command Delete Defining Command Actions Windows These fields help you associate an action with the new menu command e Execute Enter in this field a command to run an application Alternatively click the ellipsis button next to the field to select the application using a standard dialog box IDE 332 IDE 5 1 User s Guide Customizing the IDE Customizing IDE Commands e Arguments Enter in this field the arguments that the IDE must pass to the application specified in the Execute field Alternatively choose the desired arguments from the pop up menu next to the field e Direc
391. pter to learn more about typical tasks for working with Class Hierarchy windows This chapter contains these sections e Multiple Class Hierarchy Window on page 167 e Single Class Hierarchy Window on page 170 e Browser Contents window on page 172 e Symbols window on page 174 Multiple Class Hierarchy Window Use the Multi Class Hierarchy window to visually examine the structure of every class in the browser database Each class name appears in a box and lines connect boxes to indicate related classes The left most box is the base class and subclasses appear to the right Figure 15 1 on page 168 shows the Multi Class Hierarchy window Table 15 1 on page 168 explains the items in the window IDE 5 1 User s Guide IDE 167 Using Other Browser Windows Multiple Class Hierarchy Window Figure 15 1 Multi Class Hierarchy window ecrystalberorchy o java appletApplet Crystal4pplet java lang Object gt java lang Runnable PA 4 Crystal4pplet Table 15 1 Multi class hierarchy window items Item icon Explanation Hierarchy Control Click to expand or collapse the subclasses displayed for a specific class Ancestor menu Click and hold on a class or subclass box to display a menu Select a class from this menu in order to display that class Line button Click to toggle the lines that connect classes between diagonal and straight lines l amp
392. r IDE Component editing covers these categories Component catalogs organize related components into groups or catalogs For example create a catalog to store frequently used components Menu editors the IDE provides specialized editors for constructing menus and pop up menus in RAD projects Read this chapter to learn more about typical tasks for editing components This chapter contains these sections Component Catalog Window on page 299 Working with Catalogs on page 302 Working with Menu Editors on page 304 Component Catalog Window Use the Component Catalog window to manage catalog files and their graphical user interface GUI components Use this window to perform these tasks create new component catalog files open and close multiple catalog files import or copy GUI components from one catalog into another view GUI components within catalog files access GUI component properties for editing IDE 5 1 User s Guide IDE 299 Component Editing Component Catalog Window Figure 27 1 Component Catalog window Component catio LE Sehadoars N AWT Components AWT Components gt Swing Components java awt Button Canvas java awt Canvas K Checkbox java awt Checkbox a Choice java awt Choice java awt Label java awt List java awt MenuB ar java awt Panel java awt PopupM Table 27 1 Component Catalog window items Component Icon Description N
393. r Contextual Menu 14 Using Class Browser Windows Class Browser window Classes pane Member Functions pane Data Members pane Source pane Status Area 15 Using Other Browser Windows Multiple Class Hierarchy Window Single Class Hierarchy Window IDE 6 127 129 136 137 140 141 141 142 142 143 143 144 147 147 148 151 x152 155 155 161 163 164 165 165 167 167 170 IDE 5 1 User s Guide Browser Contents window Symbols window Symbols toolbar Symbols pane Source pane 16 Using Browser Wizards The New Class Wizard The New Member Function Wizard The New Data Member Wizard V Debugger 17 Introduction to Debugging What is a Debugger What is a Symbolics File 18 Basic Debugging Thread Window Common Debugging Actions 19 Advanced Debugging What is Advanced Debugging Symbol Hint Contextual Menus Symbolics Window Processes Window Expressions Window Global Variables Window Registers Window General Registers FPU Registers IDE 5 1 User s Guide Table of Contents 172 174 175 175 176 177 x177 182 185 191 191 192 193 193 195 201 202 202 203 205 208 210 213 214 215 215 IDE 7 Table of Contents Host specific Registers Log Window Variable Window Array Window Memory Window Multi core Debugging 20 Using Breakpo
394. r windows Activate Syntax Coloring Select to apply customized colors to comments keywords strings and custom keywords in text Clear to use the Foreground color for all text 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 Edit Click to add modify or remove keywords from the corresponding custom keyword set Activate Browser Coloring Select to apply customized colors to browser symbols in text Clear to use the Foreground color for all text IDE 372 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 Templates Click the color swatch to set the color used for source code templates IDE 5 1 User s Guide Wor
395. reate manipulate and manage component catalog files 1 Open the Component Catalog as explained in Table 27 2 Table 27 2 Opening the Component Catalog On this host Do this Windows Select View gt Component Catalog Macintosh Select Window gt Component Catalog Solaris Select Window gt Component Catalog Linux Select Window gt Component Catalog 2 The Component Catalog appears IDE 5 1 User s Guide IDE 301 Component Editing Working with Catalogs Working with Catalogs Use these tasks to work with catalogs e Manage components e Create and remove catalogs e Add and remove components in catalogs This section explains how to perform each task Creating a Component Catalog Use the New command to create component catalog files for storing frequently used or customized RAD components 1 Open the project 2 Choose File gt New 3 Click the File view tab in the New window 4 Select Component Catalog File from the File list 5 Type a name in the File Name text box 6 Specify a location in the Location text box 7 Click OK The IDE creates the new catalog file and displays it in the component catalog Alternatively click the New Catalog toolbar button in the Component Catalog in order to create a new catalog file Adding Components to a Catalog File Populate a catalog file with the components that you use frequently In adding components to a catalog file you
396. recompile 503 Preferences 503 Print 503 Processes 504 Processes Window 504 Properties 504 IDE 544 Redo 504 Refresh All Data 505 Register Details Window 505 Register Windows 505 Registers 505 Remove Object Code 505 Remove Object Code amp Compact 505 Remove Toolbar Item 342 Replace 129 135 506 Replace All 135 506 Replace and Find Next 506 Resume 508 Revert 508 Run 434 509 Run To Cursor 509 Save Default Window 510 Save Workspace 510 Save Workspace As 510 Select All 510 Send To Back 510 Set Breakpoint 510 Set Default Project 510 Set Default Target 511 Set Eventpoint 511 Set Watchpoint 511 Shift Right 511 Show Breakpoints 486 511 Show Types 512 Show Window Toolbar 498 Snap To Grid 512 Stack Editor Windows 512 Step Over 512 Stop Build 513 Switch To Monitor 513 Symbolics 513 Symbolics Window 513 Synchronize Modification Dates 513 Toolbars 515 View Array 517 View As Unsigned Decimal 517 518 519 View Disassembly 519 View Mixed 520 View Source 520 View Variable 520 Watchpoints 520 Watchpoints Window 520 Zoom Window 520 menu layouts Macintosh 464 IDE 5 1 User s Guide Windows 451 menu reference for IDE 451 menubar component creating menu items in 306 creating menus in 306 removing menu items from 307 removing menus from 307 menus 157 contextual 203 VCS 165 Metrowerks Website command 500 Minimize non debugging windows option Windowing panel 432 Minimize Window me
397. reference panel configures general network settings for remote debugging connections between the host computer and other computers Use these general settings as the basis for defining more specific connections for individual projects in conjunction with the Remote Debugging settings panel The Target Settings window contains the Remote Debugging settings panel Figure 31 18 Remote Connections preference panel Remote Connections Name Type Remote Mac 0S Connection TCP IP Panel Remote Windows Connection TCP IP Panel Add 3 Change Remove IDE 380 IDE 5 1 User s Guide Working with IDE Preferences Debugger Panels Table 31 17 Remote Connections preference panel items Item Explanation Remote Connection list Displays the name and connection type of all remote connections currently defined Add Click to add a new remote connection to the Remote Connection list Change Click to change the settings of the selected remote connection Remove Click to remove the selected remote connection from the Remote Connection list Adding Remote Connections Add a remote connection that defines a general network connection between the host computer and a remote computer Choose Edit gt Preferences The IDE Preferences window appears Select the Remote Connections panel from the IDE Preference Panels list Click Add The New Connection dialog box appears Enter in the Name field the name for the general remote con
398. reflects the previously selected search options TIP Select remove and open files directly from the symbolics file list 7 Start the Find or Find All operation e Click Find to find a single match e Click Find All to find all matches The IDE searches the specified symbolics files and displays matching text or beeps if no matching text occurs Searching Text Across Multiple Files Use the In Files tab to search text in a file set A file set lists specific files to search 1 Choose Search gt Find in Files 2 Type search text into the Find text box 3 Set general search options IDE 134 IDE 5 1 User s Guide Finding and Replacing Text Multiple File Find and Replace 4 Click the In Files tab 5 Select a file set from the File Set options The list at the bottom of the In Files tab shows the files to search e Choose Open Editor Files to search currently open editor files e Choose New File Set to create a set of files to search 6 Edit the file list at the bottom of the In Files tab as desired e Click Add Files to navigate the computer s file system and select a file to add to the current list e Click Clear List to remove all items from the current list e Click Save This Set to save the list as a new file set e Click Remove a Set to remove an existing file set TIP Select remove and open files directly from the file list Also drag and drop files or folders to the list to modify it 7 Start th
399. release build target IDE 5 1 User s Guide IDE 278 Creating RAD Projects Working with Designs Use the Design tab in the Project window to view a list of designs in the RAD project Figure 25 1 Design hierarchy diagram Design 2 Layout 1 Eayout 1 Component 1 Component 2 Layout 2 Layout 3 Layout 2 Build Target 1 Build Target 2 Build Target 3 Build Target 4 Debug Release Debug Release Build Target 5 Build Target 6 Debug Release Adding a Design to a Project Use the New command to add a design to a project 1 Open the project 2 Choose File gt New 3 Click the Project tab to display a list of available wizards 4 Select the appropriate wizard for the design to add IDE 5 1 User s Guide IDE 279 Creating RAD Projects Working with Designs 5 Enable the Add Design to Project checkbox 6 Type a design name in the Design Name text box 7 Choose the project s name from the Project list pop up 8 Click OK 9 Click Finish The design is added to the project and displayed in the Design view of the project window Removing a Design from a Project Use the Remove command to remove a design from a project 1 Click the Targets tab in the project window 2 Select the design that you want to remove 3 Remove the design from the project as explained in Table 25 1 Table 25 1 Removing the design from the project On this host Do this Windows Select Edit gt Delete
400. rence and Target Settings Options Consult the documentation provided with the third party text editor for more information about using command lines See also e Launch Editor on page 429 e Launch Editor w Line on page 430 Use ToolServer menu Select the Use ToolServer menu option to display the ToolServer menu in the IDE menu bar Clear the option to remove the ToolServer menu from the menu bar 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 NOTE The IDE accommodates a maximum of 1024 concurrent compiles However there is a point where the host system becomes compute bound and allowing more processes only adds overhead For a single processor system the practical limit is approximately 12 concurrent compiles 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 IDE 5 1 User s Guide IDE 445 Preference and Target Settings Options 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 Variable values change Use the Variable values change option
401. ression 253 Log Point icon 252 Log System Messages 218 Log System Messages option Debugger Settings panel 431 Log Window Log System Messages option 218 Log window 218 opening 219 looking up symbol definitions 122 Loop Transformations 400 Loop Unrolling 401 Loop Unrolling Opt For Speed Only 401 Loop Invariant Code Motion 400 IDE 542 M Mac OS QuickHelp 121 QuickView 121 123 THINK Reference 123 Mac OS X API 425 Macintosh creating files 62 using an external editor 357 Macintosh menu layout 464 Macro file option in Generate Browser Data From menu 427 Macros option 372 Maintain Files In Cache option 415 Maintain Files in Cache option Global Settings panel 431 Make command 53 54 55 Make menu command 500 Make option 425 Make toolbar button 46 Makefile Importer wizard 33 makefiles converting into projects 33 managing build targets 56 projects 32 targets 56 managing files tasks 61 manipulating text 101 manual conventions 19 markers 119 adding to a source file 120 navigating to 120 removing all from source files 121 removing from source files 120 Markers list pop up 95 Markers list in Remove Markers window 119 Match whole word 126 128 131 matching any character with regular expressions 141 line beginnings and endings with regular expressions 143 replace strings to find strings with regular expressions 143 144 Maximize Window menu command 500 MCp acronym meaning 35 MDI 432 IDE 5 1 User s Guide MDI
402. rior Precompiled Header mcp CodeWarrior Project File SYM CodeWarrior Mac OS 68K Debug Symbols XSYM CodeWarrior Mac OS PPC Debug Symbols dbg CodeWarrior Debug Preferences exp Exported Symbol File iMAP CodeWarrior Link Map MAP CodeWarrior Link Map Assembly a Assembly Source File Windows and Macintosh asm Assembly Source File dump CodeWarrior Disassembled File IDE 422 IDE 5 1 User s Guide Preference and Target Settings Options Table 33 2 Default file name extensions continued Type Extension Explanation C and C C C Source File cc C Source File hh C Header File hpp C Header File i C Inline Source File ea here C Inline Source File m Object C Source File mm Object C Source File Default C and C se C Source File cp C Source File cpp C Source File oh C and C Header File Default Java class Java Class File jar Java Archive File jav Java Source File java Java Source File Java IMAP Java Import Mapping Dump jpob Java Constructor File mf Java Manifest File IDE 5 1 User s Guide IDE 423 Preference and Target Settings Options Table 33 2 Default file name extensions continued Type Extension Explanation Library a Static Archive Library Solaris and Linux lib Library File 0 Object File Windows and Macintosh 0 Obj
403. roject with frequently used settings Configure other project preferences as desired 7 Close the customized project to save it 8 Open the customized project folder inside the Project Stationery folder 9 Find and delete the _Data folder The IDE now treats the customized project as project stationery The descriptive name appears in the Project tab of the New window 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 Adding Subprojects to a Project Use a subproject to organize a separate set of source files and build targets inside a parent project 1 Open the parent project in which to add a subproject The parent Project window opens Click the Files tab in the Project window If the parent project has more than one build target use the build target list box in the Project window toolbar to choose the desired build target Add a separate project to the Project window Drag and drop the mcp file of the separate project into the Project window or Choose Project gt Add Files to add the mcp file of the separate project The IDE treats the added project as a subproject The subproject appears in the Files view of the parent Project window IDE 5 1 User s Guide IDE 41 W
404. rrior IDE employs a virtually identical user interface across multiple hosts For this reason illustrations of common interface elements use images from any IDE 5 1 User s Guide IDE 19 IDE User s Guide Overview Manual Conventions 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 Special note for Solaris users and Linux users The Solaris and Linux IDE use Macintosh symbols to represent modifier keys in key bindings Table 1 1 shows the relationship between the Macintosh symbols and the equivalent modifier keys on Solaris and Linux computers Table 1 1 Macintosh modifier key equivalents for Solaris and Linux Symbol Macintosh Name Solaris Equivalent Linux Equivalent PE Control Control Ctrl ey Option Alt Alt ag Command Meta Alt c Shift Shift Shift Solaris and Linux computers can map a modifier key to any key on the keyboard The preceding table reflects the default modifier key configuration for these computers Remember that custom mappings supersede the default configuration noted in the table IDE 20 IDE 5 1 User s Guide 2 CodeWarrior IDE Overvie
405. s 3 Drag the wires listed in the Wires tab to change their order The order of wire precedence begins at the top of the hierarchical list and proceeds to the bottom of the list For example if Wire A appears above Wire B Wire A has precedence over Wire B IDE 318 IDE 5 1 User s Guide Object Wiring Inspecting Wires Modifying a Wire by Using the Object Inspector In addition to modifying a wire by using the layout editor you can modify the wire by using the object inspector Use the Create Wire wizard to make changes to the wire data 1 2 Open the object inspector for the active RAD project Click the Wires tab in the object inspector The Wires tab appears In the Wires tab find the wire that you want to modify Expand or collapse hierarchical controls in order to find the wire Double click the wire in the Wires tab The Create Wire wizard appears Use the wizard to modify the current data for the wire Deleting a Wire by Using the Object Inspector In addition to deleting a wire by using the layout editor you can delete the wire by using the object inspector While deleting the wire removes it from the layout the IDE does not remove the generated source code that implements the wire This behavior helps preserve your source code For example if you modify the generated functions or methods to offer additional functionality the IDE does not delete your work after you delete the wire Instead
406. s Menu Markers Menu Document Settings Menu Version Control System Menu Other Editor Window Components Path Caption File Modification Icon Breakpoints Column Text Editing Area Line and Column Indicator Pane Splitter Controls 10 Editing Source Code Text Manipulation F Symbol Editing Shortcuts Punctuation Balancing Code Completion Code Completion Configuration Code Completion Window 11 Navigating Source Code Finding Interface Files Functions and Lines Finding Interface Files Locating Functions Going Back and Forward Using Markers Remove Markers Window Symbol Definitions Reference Templates Macintosh 12 Finding and Replacing Text About Find and Replace Single File Find IDE 5 1 User s Guide Table of Contents 95 95 95 96 96 97 97 e OF 98 98 98 98 101 101 105 105 107 107 110 115 115 116 116 118 119 119 121 123 125 125 126 IDE 5 Table of Contents Single File Find and Replace Multiple File Find and Replace Search Results Window Text Selection Find Regular Expression Find Matching Any Character Repeating Expressions Grouping Expressions ee Choosing One Character from Many Matching Line Beginnings and Endings Using the Find String in the Replace String Remembering Sub expressions IV Browser 13 Using the Browser Browser Database Browser Data Browser Symbols Browse
407. s Replaces intensive computational instructions 1 2 3 4 with faster equivalent instructions that produce the same result Expression Simplification Replaces complex arithmetic expressions with 1 2 3 4 simplified equivalent expressions Common Subexpression Replaces redundant expressions with a 2 3 4 Elimination single expression Copy Propagation Replaces multiple occurrences of one variable 2 3 4 or with a single occurrence Copy and Expression Propagation Peephole Optimization Applies local optimization routines to small 2 3 4 sections of code Dead Store Elimination Removes assignments to a variable that goes 3 4 unused before being reassigned again Live Range Splitting Reduces variable lifetimes to achieve optimal 3 4 allocation Shorter variable lifetimes reduce register spilling Loop Invariant Code Motion Moves static computations outside of a loop 3 4 Strength Reduction Inside loops replaces multiplication instructions 3 4 with addition instructions Loop Transformations Reorganizes loop object code in order to reduce 3 4 setup and completion test overhead IDE 5 1 User s Guide Working with Target Settings Table 32 9 Optimization routines continued Editor Panels Optimization Routine Explanation Optimization Level Loop Unrolling Duplicates code inside a loop in order to spread 3 4 or over more operations branch and completion Loop Unrolling Opt for Speed test overhead Only Vec
408. s Website Launches a browser and automatically points you to the Metrowerks web site About Metrowerks CodeWarrior IDE 5 1 User s Guide Displays the CodeWarrior IDE version and build number information IDE 463 IDE Menus Macintosh Menu Layout Macintosh Menu Layout This section provides an overview of the menus and menu commands available in the Macintosh menu layout Apple Menu The Apple menu Mac OS 9 x x and earlier provides access to the CodeWarrior About box shows system applications and lists additional items Select About Metrowerks CodeWarrior to display the IDE version and build number information When using the Macintosh menu layout on a Windows host this menu does not appear CodeWarrior Menu The CodeWarrior Menu visible in Mac OS X only provides access to the CodeWarrior About box IDE preferences and the command that quits the IDE When using the Macintosh menu layout on a Windows host this menu does not appear Table 34 10 Apple menu commands Menu command Explanation About Metrowerks CodeWarrior Displays the CodeWarrior IDE version and build number information Preferences Opens the IDE Preferences window where you can set general IDE editor debugger and layout options Quit Quits the CodeWarrior IDE File Menu The File menu contains commands for opening creating saving closing and printing source files and projects The File menu
409. s chapter to learn more about typical tasks for navigating source code This chapter contains these sections e Finding Interface Files Functions and Lines on page 115 e Going Back and Forward on page 118 e Using Markers on page 119 e Symbol Definitions on page 121 e Reference Templates Macintosh on page 123 Finding Interface Files Functions and Lines Find interface files functions and lines of source code to expedite programming You can find these types of items e interface files e functions e lines of source code This section explains how to perform each task IDE 5 1 User s Guide IDE 115 Navigating Source Code Finding Interface Files Functions and Lines Finding Interface Files Find interface header files to view files referenced by the current source code Some programming languages such as C use interface files in conjunction with source code Interface files typically define functions or objects used in the source code Interface files also separate function or object declarations from implementations This section explains how to find interface files Using the Interface Menu Use the Interface menu in editor windows to open interface or header files referenced by the current file The project file must be open for the Interface menu to operate 1 Click the Interface menu 2 Select the filename of the interface file that you want to open I
410. s control to the debugger See also Stop on page 513 Break on C Exception The Break on C Exception command tells the debugger to break at__ throw each time a C exception occurs Break on Java Exceptions The Break on Java Exceptions command reveals the Java Exceptions submenu See also e Exceptions in Targeted Classes on page 492 e Uncaught Exceptions Only on page 517 Breakpoints Breakpoints Window These commands open the Breakpoints window IDE 5 1 User s Guide IDE 483 Menu Commands 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 Build Progress Build Progress Window These commands open the Build Progress window Use it to monitor the IDE s status as it compiles a project IDE 484 Cascade The Cascade command arranges open editor windows one on top of another with their window titles visible Change Program Counter The Change Program Counter command opens a window that lets you move the current statement arrow to a particular address or symbol
411. s menu to show hide reset and clear window and main toolbars Component Catalog Opens or brings to the front a Component Catalog window Component Palette Opens or brings to the front a Component Palette Object Inspector Opens or brings to the front an Object Inspector window Use to view or modify object s properties Project Inspector Opens or brings to the front a Project Inspector window Browser Contents Opens or brings to the front a Browser Contents window Class Browser Opens or brings to the front a New Class Browser window Class Hierarchy Opens or brings to the front a Class Hierarchy window Build Progress Opens the Build Progress window Errors amp Warnings Opens or brings to the front an Errors amp Warnings window Symbolics Opens the Symbolics window Processes Opens or brings to the front a Processes window Breakpoints Opens or brings to the front a Breakpoints window Use to view create modify and remove breakpoints Watchpoints Opens or brings to the front a Watchpoints window Use to view create modify and remove watchpoints Registers Opens or brings to the front a Register window Expressions Opens or brings to the front an Expressions window Use to view create modify and remove expressions Global Variables Opens or brings to the front a Global Variables window Search Menu The Se
412. s of a previously saved Extensible Markup Language XML file into the active preference or settings panel Include file cache Use the Include file cache option to specify the upper limit of kilobytes of memory used by the IDE for caching include files and precompiled headers The larger the value entered the more memory the IDE uses to accelerate builds Initial directory Enter in this field 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 Insert Template Commands Select the Insert Template Commands option to display the Insert Template submenu in contextual menus The submenu displays source defined function templates Clear to remove the submenu from the contextual menus NOTE Select the Browser Commands option in order to select the Insert Template Commands option Otherwise the Insert Template Commands state has no effect IDE 5 1 User s Guide Preference and Target Settings Options Interpret DOS and Unix Paths This option determines how the IDE treats filenames for interface files e Selected the IDE treats the backslash and the forward slash characters as subfolder separator characters In the example include sys socks h the IDE searches for a subfolder called sys that contains a socks h file e Cleared the IDE treats both the backslash and forward slash characters as part of the filename U
413. s source code View Disassembly View data as language disassembly View Mixed View data as source code and its disassembly View Raw Data View data without applied formatting View As Default Views the selected variable in the default value format View As Binary Views the selected variable as a binary value View As Signed Decimal Views the selected variable as a signed decimal value View As Unsigned Decimal Views the selected variable as an unsigned decimal value View As Hexadecimal Views the selected variable as a hexadecimal value View As Character Views the selected variable as a character value View As C String Views the selected variable as a C string View As Pascal String Views the selected variable as a Pascal string View As Unicode String Views the selected variable as a Unicode string View As Floating Point Views the selected variable as a floating point value View As Enumeration Views the selected variable as an enumerated value View As Fixed Views the selected variable as a 32 bit fixed value 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 IDE 462 IDE 5 1 User s Guide IDE Menus Windo
414. se Search gt Find Previous to find a preceding match e Choose Search gt Find Next to find a subsequent match The IDE searches the active editor window and scrolls to matching text or beeps if no matching text occurs IDE 5 1 User s Guide Finding and Replacing Text Text Selection Find NOTE Macintosh Hold down the Shift key in order to select Search gt Find Previous On the Windows hosted IDE use the Customize IDE Commands window to activate the Find Previous menu command For more information see the task Using the Find Previous Command Searching with a Text Selection Across Multiple Windows Use the Enter Find String command to change the current search string then search through multiple editor windows 1 Select the text to use as the search string 2 Choose Search gt Enter Find String The selected text replaces the search string defined in the Find Find and Replace and Find in Files windows 3 Bring forward the editor window to search 4 Choose Search gt Find Selection 5 If desired find preceding or succeeding matches e Choose Search gt Find Previous to find a preceding match e Choose Search gt Find Next to find a subsequent match The IDE searches the active editor window and scrolls to matching text or beeps if no matching text occurs NOTE Macintosh Hold down the Shift key in order to select Search gt Find Previous On the Windows hosted IDE use the Customize IDE Commands wi
415. se virtual space clear to not use virtual space 4 Click Apply or Save to save your changes to the preference panel 5 Close the IDE Preferences window Indenting and Unindenting Text Blocks Use the Shift Left and Shift Right commands to shift a selected block of text to the left or right You can indent or unindent one or more lines using these commands The Tab Size option specifies the amount of indentation 1 Select the text to be shifted 2 Indent or unindent the selected text To unindent text Choose Edit gt Shift Left To indent text Choose Edit gt Shift Right The IDE shifts the text block IDE 104 IDE 5 1 User s Guide Editing Source Code Punctuation Balancing Symbol Editing Shortcuts You can use the browser contextual menu to enhance source code editing in the IDE Use this menu to streamline text entry in editor windows You can enter the first few letters of a function name then use the browser contextual menu to complete the entry The IDE also provides these keyboard shortcuts with the browser enabled e Find symbols with prefix find symbols matching the selected prefix e Find symbols with substring find symbols matching the selected substring e Get next symbol obtain the next symbol from the browser database e Get previous symbol obtain the previous symbol from the browser database See the IDE Quick Reference card for more information about these keyboard shortcuts Punctuat
416. select Empty Project 3 Enter a project name include the mcp extension in the Project Name field and set the Location for the new project 4 Click OK in the New window The IDE creates an empty project Add files and libraries create build targets and choose the appropriate target settings to complete the new project Opening Projects Use the IDE to open previously saved projects CodeWarrior projects normally end in the Metrowerks 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 gt Open 2 Find and select the project to open 3 Click Open The IDE opens the project and displays its Project window IDE 5 1 User s Guide IDE 35 Working with Projects Managing Projects NOTE The IDE prompts you for confirmation to update projects created in older CodeWarrior versions Opening Projects Created on Other Hosts CodeWarrior projects whose names end in mcp are cross platform However the object code stored inside each project folder is not cross platform Use these procedure to properly open the project on a different host computer 1 If not present add the mcp file name extension to the project name 2 Copy the project folder from the original host to the new host 3 Delete the Data folder inside the newly copied project folder 4 Open the newly copied project on the new host IDE 5 Recompile the projec
417. sh host this command does not appear Check Syntax Checks the active editor window or selected files in the project window for compilation errors Preprocess Preprocesses the active editor window or selected files in the project window and displays the results in a new editor window Precompile Precompiles the active editor window or selected files in the project window and stores the results in a new header file Compile Compiles the active editor window or selected files in the project window Disassemble Disassembles the active editor window or selected files in the project window and displays the results in a new editor window 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 the object code from one or more build targets in the project When using the Windows menu layout on a Macintosh host hold down the Shift key to change this command to Remove Object Code amp Compact Re search for Files Resets the cached locations of source files using the project access paths and storing them for faster builds and project operations Reset Project Entry Pat
418. sign tab in the project window 2 Choose File gt New 3 Click the Object tab IDE 282 IDE 5 1 User s Guide Creating RAD Projects Working with Layouts 4 Select the Java Frame Wizard 5 Select the project from the Project list pop up 6 Select the design from the Design list pop up 7 Click OK 8 Specify the Frame Class information then click Finish A new layout appears in the Design tab Double click this layout to open it and view its contents in the layout editor Removing a Layout from a Design Use the Remove command to remove a layout from a design 1 Click the Designs tab in the project window 2 Select the layout that you want to remove 3 Remove the layout from the project as explained in Table 25 3 Table 25 3 Removing the layout from the project On this host Do this Windows Select Edit gt Delete Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear Alternatively use a contextual menu to remove the layout as explained in Table 25 4 on page 284 IDE 5 1 User s Guide IDE 283 Creating RAD Projects Working with Layouts Table 25 4 Removing a layout by using a contextual menu On this host Do this Windows Right click the layout and select Delete Macintosh Control click the layout and choose Clear Solaris Click and hold on the layout then choose Clear Linux Click and hold on the layout then choose Clear
419. signated as line 1 The Line Number control at the bottom of the editor window shows the number of the line where the text insertion point is positioned 1 Open the Line Number window e Click the Line and Column Indicator control OR e Choose Search gt 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 IDE 5 1 User s Guide Navigating Source Code Using Markers Using Markers Markers behave like labels in the editor identifying specific parts of source code Use these tasks to work with markers e Add markers to a source file e Navigate to a marker e Remove some or all markers from a source file Remove Markers Window Use the Remove Markers window to manage the use of destination markers in source files Figure 11 1 shows the Remove Markers window Table 11 3 explains the items in the window Figure 11 1 Remove Marker window iz Remove Markers Select markers to remove N Markers APIENTR Y Table 11 3 Remove Markers window items Markers list Displays a list of all markers in the current source file Remove button Click to remove all selected markers IDE 5 1 User s Guide IDE 119 Navigating Source Code Using Markers Table 11 3 Remove Markers window items continued Cancel button Click to close the Remove Markers window without applying changes
420. sing the same example the IDE now searches for a sys socks h filename 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 IDE 5 1 User s Guide IDE 429 Preference and Target Settings Options IDE 430 Launch Editor w Line Enter in the Launch Editor w Line field a command line expression that specifies the third party text editor that the IDE runs to edit text files and an initial line of text that the third party editor displays upon running The IDE expands the 1ine variable of the command line expression into an initial line of text for the third party text editor to display For example to run the Emacs text editor
421. sociated project data folder The IDE stores intermediate project data in this folder When building or closing a project the IDE uses the information in the project data folder to update the project file By default the IDE places the project data folder within the same folder as the project file However the IDE cannot create or update a project data folder in a location that grants read only privileges Use modification date caching Use the Use modification date caching option to determine whether the IDE checks the modification date of each project file prior to making the project The settings include e enabled the IDE caches the modification dates of the files in a project At compilation time the IDE refers to this cache to determine whether a specific file should be recompiled This can shorten compilation time significantly for large projects IDE 5 1 User s Guide IDE 443 Preference and Target Settings Options IDE 444 e disabled the IDE checks every file at each recompile of the project Use this setting if using third party editors to ensure that the IDE checks every file at compilation time Use Multiple Document Interface Configure the Use Multiple Document Interface option to change the interface style used by the IDE The choices include e MDI Multiple Document Interface In this interface style the IDE uses a main application window Multiple IDE document windows appear inside the main application wi
422. sorting of functions use of dynamic objects Figure 31 15 on page 376 shows the Display Settings preference panel Table 31 14 on page 376 explains the items in the preference panel IDE 5 1 User s Guide IDE 375 Working with IDE Preferences Debugger Panels Figure 31 15 Display Settings preference panel Display Settings Color Settings Variable values change ay Watchpoint indicator O Variable Default Settings B Show variable types ZA Show variable location fA Show all locals wal Show values as decimal instead of hex Other Settings B Sort functions by method name in symbolics window a Attempt to use dynamic type of C Object Pascal and SOM objects KA Show tasks in separate windows TA Show variable values in source code Default size for unbounded arrays Table 31 14 Display Settings preference panel items IDE 376 Item Explanation Variable values change Click the color swatch to set the color that indicates a changed variable value Watchpoint indicator Click the color swatch to set the color that indicates a changed watchpoint value Show variable types Select to always show the type associated with each variable Show variable location Select to display the Location column in the Variables pane of the Thread window Show all locals Select to always show all local variables Clear to h
423. ssion returning control to the IDE Restart Terminates the current debugging session then restarts the program from the beginning Step Over Executes each source line in the program treating routine calls as a single statement and stopping the program at the next line of code Step Into Executes each source line in the program following any subroutine calls Step Out Executes each source line in the subroutine and stops the program when the routine returns to its caller Run to Cursor Sets a temporary breakpoint on the source line containing the insertion point IDE 459 IDE Menus Windows Menu Layout Table 34 6 Debug menu commands continued Menu command Change Program Counter Explanation Opens the Change Program Counter dialog box that you can use to move the current statement arrow to an address or symbol Set Breakpoint or Clear Breakpoint Sets a breakpoint on the source line containing the insertion point Clears the breakpoint on the source line containing the insertion point Set Eventpoint Sets an eventpoint on the source line containing the insertion point Clear Eventpoint Clears the breakpoint on the source line containing the insertion point Set Clear Breakpoint Opens the Set Clear Breakpoint dialog box that you can use for setting or clearing breakpoints by address or symbol Enable Breakpoint or Disable Breakpoint Activates the disab
424. t or Clear Watchpoint IDE 472 Sets a watchpoint on the source line containing the insertion point Clears the watchpoint on the source line containing the insertion point IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout Table 34 15 Debug menu commands continued Menu command Enable Watchpoint or Disable Watchpoint Explanation Activates the disabled watchpoint on the source line containing the insertion point De activates the watchpoint on the source line containing the insertion point Clear All Watchpoints Clears all watchpoints currently set in the default build target of the active project Run to Cursor Sets a temporary breakpoint on the source line containing the insertion point Change Program Counter Displays the Change Program Counter dialog where you can move the current statement arrow to an address or symbol Break on C Exception Configures the debugger to break at__ throw each time a C exception occurs Break on Java Exceptions Use this menu to select which Java exceptions the debugger should break on Switch to Monitor Data Menu Configures the IDE to use an external debugger instead of the CodeWarrior debugger When using the Macintosh menu layout on a Windows host this command does not appear The Data menu contains commands that control how the CodeWarrior debugger displays data values This me
425. t Management File Group Layout and Target Management Use these tasks to manage files groups layouts and targets e Create an item e Delete an item e Move an item e Rename an item Touch an item e Manage items e Set default items e Configure item settings 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 Removing files groups layouts targets from a project 1 Click the Files Designs or Targets tab in the Project window 2 Select the item to remove 3 Remove the selected item from the project as explained in Table 4 7 Table 4 7 Removing a selected item from a project Windows Select Edit gt Delete Macintosh Select Edit gt Clear IDE 5 1 User s Guide IDE 51 Project Window File Group Layout and Target Management Table 4 7 Removing a selected item from a project continued Solaris Select Edit gt Clear Linux Select Edit gt Clear The IDE removes the selected item from the project For deleted files the IDE updates all build targets that formerly used the file For deleted build targets the IDE deletes build target information and leaves files in
426. t a Watchpoint are underlined in red in the Memory Variable or Symbolics windows However you can change the alert s color to your preference When you get an alert you can examine the call chain inspect or change variables step through your code or use any of the debugger s other facilities In particular from the debugger level you can change the contents of the location that triggered the Watchpoint without triggering it again Use the Run command or the Run button on the debugger toolbar to continue execution from the Watchpoint NOTE Since the debugger cannot detect Watchpoints for variables stored on the stack or in registers you cannot set Watchpoints on local variables IDE 5 1 User s Guide IDE 239 Using Watchpoints Using Watchpoints in the Memory Window While you can view the program s current Watchpoints in the Watchpoints window you can set and clear a Watchpoint in several IDE windows To view set or clear Watchpoints you must first debug your program A project can have a different maximum number of watchpoints depending on the target The IDE generally limits the acceptable range for watchpoints to memory that it can write protect This range also depends on the host and on the application For more information see the Targeting documentation Viewing Watchpoints To see a list of all Watchpoints you have set in your program open the Watchpoints window To view Watchpoints follow thes
427. t already exist in the Scripts folder Refer to the CodeWarrior Scripting Reference to learn more about scripting the CodeWarrior IDE Help Menu The Help menu contains commands for accessing the IDE s online help Table 34 18 Help menu commands Menu command CodeWarrior Hel Description Launches a help viewer to display the CodeWarrior IDE online help Click on a link to view a specific IDE topic Index Windows Opens the online help to the Index tab Search Windows Opens the online help to the Search tab Online Manuals Launches a help viewer to display a list of CodeWarrior manuals Click on a link to view a specific manuals contents Metrowerks Website Launches a browser and automatically points you to the Metrowerks website About Metrowerks CodeWarrior Windows IDE 5 1 User s Guide Displays the CodeWarrior IDE version and build number information IDE 477 IDE Menus Rapid Application Development RAD Menus NOTE Classic Macintosh The Help menu contains additional menu commands for working with Balloon Help and accessing Apple s online help Rapid Application Development RAD Menus These menus are common across all platforms and appear when the RAD layout editor is active Align Menu The Align menu contains commands to align selected components by component edge or center properties The Align menu is only visible when editing components with
428. t close the default workspace Save Workspace Saves the current state of onscreen windows recent items and debugging Save Workspace As Saves an existing workspace under a different name Import Components Imports the components from another catalog into the current catalog Close Catalog IDE 5 1 User s Guide Closes the current catalog and its associated Catalog Components window and Component Palette IDE 465 IDE Menus Macintosh Menu Layout Table 34 11 File menu commands continued Menu command Import Project Explanation Imports a project file previously saved in extensible markup language format XML and converts it into project file format 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 amp Warning window contents Quit Classic Mac OS Edit Menu Quits the CodeWarrior IDE The Edit menu contains all of the customary editing commands along with some CodeWarrior additions This menu also includes the commands that open the Preferences and Target Settings windows Table 34 12 Edit menu commands IDE 466 Menu command Explanation Undo Un
429. t compiles IDE Extras The IDE Extras preference panel provides options for customizing various aspects of the IDE including e menu bar layout e the number of recent projects document files and symbolics files to remember e use of a third party editor IDE 354 IDE 5 1 User s Guide Working with IDE Preferences General Panels Figure 31 5 IDE Extras preference panel Windows Figure 31 6 IDE Extras preference panel Macintosh Men at Context popup del cs e Recen Projects fs Documents fs Symbolics 5 Workspaces fs Other Settings B Zoom windows to full screen A Use Script menu B Use External Editor 8 Use ToolServer menu 9 Enable automatic Toolbar help wv Use Default workspace Find Reference using Apple Help Viewer CW Manuals m n IDE 5 1 User s Guide IDE 355 Working with IDE Preferences General Panels Table 31 4 IDE Extras preference panel items Item Menu bar layout Explanation 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 Projects Enter the number of recently opened projects for the IDE to display in the Open Recent submenu Enter zero to disable this feature Documents Enter the number of recently opened documents for the IDE to display in the Open Recent submenu Enter zero to disable this feature Symbolics Enter the number of recently op
430. t to generate new object code Saving Projects The IDE automatically saves projects and updates project information after performing these actions e Closing the project Applying or saving a preference or target setting option e Adding deleting or compiling a file e Editing group information e Removing or compacting object code e Quitting the IDE Inspecting Project Files Use the Project Inspector command to review and configure source file attributes and target information in the Project Inspector window IDE 36 IDE 5 1 User s Guide Working with Projects Managing Projects 1 Select a file in the Project window 2 Open the Project Inspector window as explained in Table 3 2 Table 3 2 Opening the Project Inspector window On this host Do this Windows Select View gt Project Inspector Macintosh Select Window gt Project Inspector Solaris Select Window gt Project Inspector Linux Select Window gt Project Inspector 3 Examine the source file attributes and target settings e Click the Attributes tab to view the file attributes e Click the Targets tab to view the build targets that use the file 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 gt Print 4 Set t
431. tables pane Symbolics window 206 207 using the Files pane Symbolics window 207 using the Find Previous command 137 using the Functions list pop up 116 using the Functions pane Symbolics window 207 using the Interfaces list pop up 116 using the Process pane 209 using the symbol hint 203 using the Version Control System VCS pop up 97 using virtual space 103 viewing a file path 49 viewing browser data by contents 173 viewing browser data by inheritance 168 viewing class data from hierarchy windows 159 viewing registers 216 viewing wires by using the object inspector 318 techniques for advanced debugging 201 IDE 5 1 User s Guide Templates option 372 templates reference Macintosh 123 temporary breakpoints setting 236 text find by selecting 137 finding 125 finding and replacing explained 125 overstriking Windows 103 replacing 125 searching with a selection 138 searching with a selection across multiple window 139 text blocks indenting 104 text blocks unindenting 104 Text Colors panel options Activate Browser Coloring 426 Activate Syntax Coloring 426 429 440 Foreground 426 Keywords 429 Strings 440 Text Colors preference panel options Activate Browser Coloring 372 Activate Syntax Coloring 372 Background 372 Classes 372 Comments 372 Constants 372 Edit 372 Enums 372 Foreground 372 Functions 372 Globals 372 Keywords 372 Macros 372 Other 373 Set 1 Set 2 Set 3 Set 4 372 Strings 372 Te
432. tact Removing files from a build target 1 Click the Link Order Segments or Overlays tab in the Project window 2 Select the item to remove 3 Remove the selected item from the active build target as explained in Table 4 8 Table 4 8 Removing a selected item from the active build target On this host Do this Windows Select Edit gt Delete Macintosh Select Edit gt Clear Solaris Select Edit gt Clear Linux Select Edit gt Clear The IDE removes the file from the build target but leaves the file itself intact The file can be re assigned to other build targets in the project Moving Files Groups Layouts Targets Reposition files groups layouts or build targets within the Files Design Link Order or Targets views with the pointer 1 Select one or more files groups layouts or build targets to move with the pointer IDE 52 IDE 5 1 User s Guide Project Window File Group Layout and Target Management 2 Drag the selected items to a new position in the current view 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 view repositioning files changes the link order used by the Make command 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
433. tance gt inline istream_iterator lt T charT traits Distance gt istream_i terator is in_stream_ amp s if in_stream_ gt gt value_ instream 0 a JEBE es IDE 174 IDE 5 1 User s Guide Using Other Browser Windows Symbols window Table 15 6 Symbols window items Item Explanation Symbols toolbar Provides one click access to common browser commands and class filtering commands Symbols pane Displays a list of all symbols with multiple declarations Source pane Displays the source code for the currently selected item Opening the Symbols Window Use the Symbols window to list all implementations whether overridden or not of any symbol that has multiple definitions You can access the Symbols window by using a contextual menu 1 Open a contextual menu as explained in Table 15 7 Table 15 7 Opening the Symbols window On this host Do this Windows Right click the symbol name Macintosh Control click the symbol name Solaris Click and hold on the symbol name Linux Click and hold on the symbol name 2 Select Find all implementations of from the contextual menu that appears 3 The Symbols window opens 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 de
434. tasks in the CodeWarrior IDE Basic debugging tasks take place in these windows Thread window use this window to control program execution manipulate memory contents and view source code e Message window use this window to view operation results and general error messages This chapter contains these sections e Thread Window on page 193 e Common Debugging Actions on page 195 Thread Window The debugger suspends the execution of processes in a computer program The Thread window displays information about a suspended process during a debugging session Use the Thread window to perform these tasks e View the call chain for a routine e View routine variables both local and global e View a routine in source assembler or mixed mode code Figure 18 1 on page 194 shows the Thread window Table 18 1 on page 194 explains the items in the window IDE 5 1 User s Guide IDE 193 Basic Debugging Thread Window Figure 18 1 Thread window mC Console Debug exe Thread nn qc x REx OoUodbbok w Variables All Value Location Fl Ox 7E8D326 KERNEL32 dil i 0 0x0012FF48 mainCAT Startup i 0x001 2FF44 main Source hello cpp while 1 lt 10 return 0 Line 21 Col 1 Table 18 1 Thread window items Item Explanation Debugger toolbar Controls the current debugging session Stack pane Displays the current subroutine calling chain with the most current routine n
435. tching the text selection To open a recent file or project 1 Choose File gt Open Recent gt recentfilename recentprojectname 2 The IDE finds and opens the selected source file or project IDE 5 1 User s Guide IDE 63 Working with Files Managing Files Saving Files Use the Save command to save source files to ensure their continued existence between development sessions 1 Choose File gt 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 2 The IDE saves the file Saving All Modified Files Use the Save All command to save the contents of all modified files This command is useful for saving all files at the same time rather than saving each file individually 1 Save all currently opened and modified files as explained in Table 5 1 Table 5 1 Saving all currently opened and modified files On this host Do this Windows Select File gt Save All Macintosh While pressing Option select File gt Save All Solaris While pressing Alt select File gt Save All Linux While pressing Alt select File gt Save All 2 The IDE saves the files IDE 64 IDE 5 1 User s Guide Working with Files Managing Files Saving File Copies Use the Save a Copy As command to save a back up copy of a project or file before modifying the original Working on a copy of the original file provides a way to return
436. ted text in the active editor window NOTE Macintosh Press the Shift key to change the Find Selection menu command to the Find Previous Selection menu command 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 and Replace The Find and Replace command opens the Find and Replace window Use this window to perform find and replace operations within the active file Find Selection The Find Selection command searches for the next occurrence of the selected text in the active Editor window IDE 5 1 User s Guide Menu Commands Get Next Completion The Get Next Completion command acts as a shortcut that bypasses using the Code Completion window Instead of scrolling through the Code Completion window to select the next symbol from the one currently selected use this command to insert that next symbol directly into the active editor window Get Previous Completion The Get Previous Completion command acts as a shortcut that bypasses using the Code Completion window Instead of scrolling through the Code Completion window to select the previous symbol from the one currently selected use this command to insert that previous symbol directly into the active editor window Global Variables Global Variables Window
437. ted variable in the default value format View As Binary Views the selected variable as a binary value View As Signed Decimal Views the selected variable as a signed decimal value View As Unsigned Decimal Views the selected variable as an unsigned decimal value View As Hexadecimal Views the selected variable as a hexadecimal value View As Character Views the selected variable as a character value View As C String Views the selected variable as a C string View As Pascal String Views the selected variable as a Pascal string View As Unicode String Views the selected variable as a Unicode string View As Floating Point Views the selected variable as a floating point value View As Enumeration Views the selected variable as an enumerated value View As Fixed Views the selected variable as a 32 bit fixed value View As Fract IDE 474 Views the selected variable as a fract value When using the Macintosh menu layout on a Windows host this command does not appear IDE 5 1 User s Guide IDE Menus Macintosh Menu Layout Window Menu The Window menu contains commands that manipulate IDE windows The Window menu is divided into several sections e window commands to stack tile zoom collapse and save window positions toolbar submenu for showing hiding resetting and clearing window and floating toolbars
438. tem Icon Explanation 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 operations Regular Expression Enter the regular expression used to shield folders from selected operations Project operations E Select to have the IDE skip folders during project L operations A bullet appears in the corresponding column of the shielded folder list Find and compare operations pe Select to have the IDE skip folders during find and compare operations A bullet appears in the corresponding column of the shielded folder list Add Click to add the current Regular Expression field entry to the shielded folder list IDE 360 IDE 5 1 User s Guide Working with IDE Preferences General Panels Table 31 7 Shielded Folders preference panel items continued Item Icon Explanation Change Click to replace the selected regular expression in the shielded folder list with the current Regular Expression field entry Remove Click to delete the selected regular expression from the shielded folder list Table 31 8 Default regular expressions in Shielded Folders panel Regular Expression Explanation VELEN Matches folders with names that begin and end with parentheses such as the Project Stationery folder CVS Matches folders named CVS With this regular expression the IDE s
439. ter name and corresponding value IDE 216 IDE 5 1 User s Guide Advanced Debugging Registers Window Changing Register Values Change register values during program execution in order to examine program behavior 1 Open the Registers window 2 Expand the hierarchical list to view the names and corresponding values of the register that you want to modify 3 Double click the register value that you want to change The value highlights 4 Enter a new register value 5 Press Enter or Return The register value changes Changing Register Data Views Change register data views to see register contents in a different format For example you can change the view of a register from binary format to hexadecimal format 1 2 Open the Registers window Expand the hierarchical list to view the names and corresponding values of the register that you want to view in a different format Select the register value that you want to view in a different format The value highlights Select Data gt View as format where format is the data format in which you want to view the register value The available formats depend on the selected register value The register value changes format IDE 5 1 User s Guide IDE 217 Advanced Debugging Log Window 6 Select Data gt View as Default to restore the original data format Alternatively you can use a contextual menu to change the data format as explained in Ta
440. text color changes to the new color Activate Syntax and Browser Coloring IDE 374 Use the Activate Syntax Coloring and Activate Browser Coloring options to configure the syntax and browser colors that all your editor windows display 1 2 Choose Edit gt Preferences Select the Text Colors panel in the Editor selection in the IDE Preference Panels list Select the checkbox next to the Activate Syntax Coloring or the Activate Browser Coloring option Click on the colored box next to the item for which you want to configure color Pick color Click OK in the Color Picker window Save your colors in the IDE Preferences window Windows Click OK Macintosh Click Save The colors change to the new colors IDE 5 1 User s Guide Working with IDE Preferences Debugger Panels Debugger Panels The Debugger section of the IDE Preference Panels list defines the basic debugger settings assigned to a new project The Debugger preference panels available on most IDE hosts include Display Settings on page 375 Windowing on page 377 Global Settings on page 378 Remote Connections on page 380 Display Settings The Display Settings preference panel provides options for customizing various aspects of the IDE Debugger including assignment of colors to changed variables and watchpoints view of variable types display of local variables use of decimal values
441. the Classes list in hierarchical order Member Functions pane Use the Member Functions pane to perform these tasks e Create a new member function e Determine the inheritance type of a member function Table 14 6 Member Function and Data Member identifier icons Meaning Icon The member is static B a static member virtual a virtual function that can be overridden or an override of an inherited function pure virtual a a member function that must be overridden in a subclass to create or abstract instances of that subclass Creating a New Member Function Use the New Member Function wizard to specify the name return type and parameters for a new member function Click Finish in any screen to apply default values to any remaining parameters and complete the process IDE 5 1 User s Guide IDE 163 Using Class Browser Windows Data Members pane 1 Click the New Item button 44 in the Member Functions pane 2 Enter the Member Function Declarations in the New Member Function window 3 Click Next 4 Enter Member function file locations and Include Files information 5 Click Finish 6 Review the settings summary then click Generate The IDE adds the new member function to the class declaration Data Members pane Use the Data Members pane to create a new data member This section explains how to create the data member Click the New Item button in the Data Members pane to open the New Data
442. the Generate Browser Data From drop down menu select None 4 Click Save 5 Choose Project gt Make The IDE stops generating browser information Browser Symbols Navigate browser symbols to open browser views find symbol definitions and examine inheritance You can navigate browser symbols in these ways e Use the Browser contextual menu to open various browser windows for a selected symbol e Double click a symbol name in the Class Browser window to open the file that contains the declaration of that symbol e Use the class hierarchy windows to determine the ancestors or descendants of a selected symbol IDE 5 1 User s Guide IDE 151 Using the Browser Browser Symbols Browser Contextual Menu Use the IDE s browser contextual menu to enhance source code editing in the IDE Use this menu to streamline text entry in editor windows You can enter the first few letters of a function name then use the browser contextual menu to complete the entry Using the Browser Contextual Menu Use a contextual menu in the browser to enhance source code editing 1 Open the browser contextual menu as explained in Table 13 1 Table 13 1 Opening a browser contextual menu On this host Do this Windows Right click a symbol name Macintosh Click and hold on a symbol name Solaris Click and hold on a symbol name Linux Click and hold on a symbol name 2 Select a command from the contextual men
443. the Symbolics window 263 clearing in the Thread window 261 conditional 258 setting in the Symbolics window 262 setting in the Thread window 260 eventpoint icon 256 Eventpoints purpose of 251 using 251 eventpoints clearing 256 Log Message 253 Log Point 251 253 Log Point Log Message 253 Log Point Speak Message 253 Log Point Treat as Expression 253 Pause Point 251 254 Script Point 251 254 setting 255 Skip Point 251 254 Sound Point 251 254 Sound Point Speak Message 254 Speak Message 253 Treat as Expression 253 Events tab in object inspector 296 Exceptions In Targeted Classes command in Java Exceptions submenu 492 executable files adding to the Other Executables list 405 changing in the Other Executables list 405 removing from the Other Executables list 406 Exit menu command 493 Expand Window menu command 493 expanding browser panes 160 dockable windows 78 Export 347 Export Panel button 328 350 422 Export Project as GNU Makefile menu command 493 Export Project command 38 Export Project menu command 493 499 exporting projects to XML files 38 Expression Simplification 400 Expressions menu command 493 Expressions window 210 adding expressions 211 IDE 5 1 User s Guide opening 211 Expressions Window menu command 493 Extension field 422 external editor using on the Macintosh 357 external editor support 444 F Factory Settings button 424 Failure option 425 FDI mode and dockable windows 69 FDI See Floating Docu
444. 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 NOTE Macintosh Press the Option key to change Close to Close All Close Catalog The Close Catalog command closes the current catalog and remove 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 Commands amp Key Bindings The Commands and Key Bindings command opens the Customize IDE Commands window IDE 5 1 User s Guide IDE 487 Menu Commands IDE 488 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 display 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 Com
445. the current File Type Extension Flags Compiler and Edit Language entries to the File Mappings list IDE 397 Working with Target Settings Code Generation Panels Table 32 7 File Mappings settings panel items continued 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 supersede the global root paths defined in the Source Trees preference panel of the IDE Preferences window Code Generation Panels The Code Generation section of the Target Settings Panels list provides a single core panel for configuring optimization routines Consult the Targeting documentation for more information about platform specific settings panels Global Optimizations The Global Optimizations settings panel configures how the compiler optimizes object code All optimization routines rearrange object code without affecting its logical execution sequence NOTE Always debug programs with optimization routines disabled The IDE does not provide source views of optimized code IDE 398 IDE 5 1 User s Guide Working with Target Settings Code Generation Panels Figure 32 8 Global Optimizations settings panel Table 32 8 Gl
446. the current network settings for the selected remote connection If needed enter in the Name field a new name for the general remote connection If needed choose from the Debugger pop up menu a new debugger for use with the remote connection If needed toggle the Browse in processes window option If needed choose from the Connection Type pop up menu a new network protocol for the remote connection IDE 5 1 User s Guide Working with IDE Preferences RAD Tools Panels 9 If needed enter in the IP Address field a new Internet Protocol address for the remote computer 10 Click OK The IDE updates the remote connection and displays changes in the Remote Connections list 11 Click OK Apply or Save The IDE saves the remote connection changes Removing Remote Connections Remove a remote connection that the project no longer uses 1 Choose Edit gt Preferences The IDE Preferences window appears 2 Select the Remote Connections panel from the IDE Preference Panels list 3 Select from the Remote Connections list the obsolete remote connection 4 Click Remove The IDE updates the Remote Connections list 5 Click OK Apply or Save The IDE saves the remote connection changes RAD Tools Panels The RAD Tools section of the IDE Preference Panels list defines the Rapid Application Development tool settings assigned to a new project The RAD Tools preference panels available on most IDE hosts include
447. the debugger to control the selected process in the Process pane IDE 5 1 User s Guide Advanced Debugging Processes Window Table 19 2 Processes window items continued Item Icon Explanation Stack Crawl window m Click to open a Thread window for the selected process in the Process pane Process pane Lists active processes for the selected machine Task pane Lists the status of tasks for a selected process in the Process pane Opening the Process Window Use the Process Window command to view and manipulate active processes on a selected machine NOTE The Processes window appears only for those platforms that support it Table 19 3 explains how to open the Processes window Table 19 3 Opening the Processes window On this host Do this Windows Select View gt Processes Macintosh Select Window gt Processes Window Solaris Select Window gt Processes Window Linux Select Window gt Processes Window Using the Process Pane Use the Process pane to view active processes on a selected machine Processes under debugger control appear in bold or with a check mark 1 Use the Processes selector to select the item for which to view active processes IDE 5 1 User s Guide IDE 209 Advanced Debugging Expressions Window 2 Select a process in the Process pane The Task pane displays all tasks assigned to the selected process Using the Task Pane
448. ther include files for the new class in addition to those in the previous field Separate each file in the list with a comma 8 Click Next IDE 5 1 User s Guide IDE 181 Using Browser Wizards The New Member Function Wizard Figure 16 4 New Class wizard Targets Project c Program Files Metrowerks CodeW arrior CodeW arrior Examples Win32 Ex Add file to targets lt Back Next gt Finish Cancel 9 Enter Targets information Select the checkbox next to the build target s name in the list to add the class files to a specific build target 10 Click Finish Review the settings summary 11 Click Generate The New Member Function Wizard Use the New Member Function wizard to specify the name return type and parameters for a new member function Enter additional information in the wizard fields to refine the function definition IDE 182 IDE 5 1 User s Guide Using Browser Wizards The New Member Function Wizard Figure 16 5 New Member Function wizard New C Member Function Member Function Declaration Name MemberFunctionN ame Return type void Parameters Example int inParam1 bool char amp outParam3 int inParam1 Namespaces required for parameters optional Ex nspacel n2 nspacet Modifiers Access Public Me Specifier None b I Inline l Const Using the New Member Function Wizard To use the New Member Function wizard follow
449. these steps 1 2 IDE 370 Choose Edit gt Preferences Select the Font amp Tabs panel in the Editor selection in the IDE Preference Panels list In the Font Settings area of the IDE Preferences window select the Size drop down menu and choose a text point size from 2 points to 24 points Save your text size in the IDE Preferences window Windows Click OK Macintosh Click Save The foreground text changes to the new size IDE 5 1 User s Guide Working with IDE Preferences Editor Panels Text Colors The Text Colors preference panel customizes colors applied to elements of source code displayed in editor windows e default foreground and background in editor windows e standard comments keywords and strings in source code e custom defined keywords e 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 Figure 31 14 Text Colors preference panel IDE 5 1 User s Guide IDE 371 Working with IDE Preferences Editor Panels Table 31 13 Text Colors preference panel items Item Foreground Explanation Click the color swatch to display a subordinate 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 edito
450. thod 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 Use this window to create a new property for a selected class in a project IDE 5 1 User s Guide IDE 501 Menu Commands New Text File The New Text File command creates a new editable text file and open a Editor window No Exceptions The No Exceptions command of the Java submenu sets the debugger to not break when exceptions occur IDE 502 Object Inspector The Object Inspector command opens the Object Inspector for use with RAD projects Online Manuals This command opens a list of online manuals about the CodeWarrior IDE compilers MSL and target specific information 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 Scripts Folder This command opens the Scripts folder This command is only available if the Use Scripts menu option is enabled IDE 5 1 User s Guide Menu Commands Open Workspace This command opens a workspace file that you previously saved P Q Page Setup The Page Setup command sets the options
451. timized code Use Local Project Data Storage Select to specify a location to save project data if the project is ona 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 e optimize resource use e use overlapped input output For those compilers that support concurrency concurrent compiles improve compile time on both single and multiple processor systems IDE 5 1 User s Guide IDE 353 Working with IDE Preferences General Panels Figure 31 4 Concurrent Compiles preference panel v Use Concurrent Campiles Recommended 4 User specified F The recommended value is based on the number of active CPU s Table 31 3 Concurrent Compiles preference panel items Item Explanation Use Concurrent Compiles Select to have the IDE run multiple compilation processes simultaneously Recommended Select to allow the number of concurrent compiles suggested by the IDE User Specified Select to stipulate the number of concurren
452. ting Point The View As Floating Point command displays the selected variable as a floating point value View As Fract This command displays the selected variable as a fractional data type NOTE The fractional data type is specific to the Mac OS IDE 5 1 User s Guide Menu Commands View As Hexadecimal The View As Hexadecimal command displays the selected variable as a hexadecimal value View As Pascal String The View As Pascal String command displays the selected variable as a Pascal character string View As Signed Decimal This command displays the selected variable as a signed decimal value View As Unicode String The View As Unicode String command displays the selected variable as a Unicode character string View As Unsigned Decimal The View As Unsigned Decimal command displays the selected variable as an unsigned decimal 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 IDE 5 1 User s Guide IDE 519 Menu Commands View Mixed This command changes the data view to show source code intermixed with assembly code View Raw Data This command changes the data view to show raw data instead of forma
453. tion and observe memory behavior e Start the debugger e Step into out of or over routines e Stop resume or kill program execution e Run the program e Restart the debugger Starting the Debugger Use the Debug command to begin a debugging session The debugger takes control of program execution starting at the main entry point of the program 1 Click Debug 5 on the debugger toolbar 2 The debugger starts a new debugging session and opens a new Thread window IDE 5 1 User s Guide IDE 195 Basic Debugging Common Debugging Actions NOTE Some projects require additional configuration before the debugging session can begin If needed the IDE prompts for permission to perform this configuration automatically Stepping Into a Routine Use the Step Into command to execute one source code statement at a time and follow execution into a routine call The command follows execution into called routines 1 Step Into a routine e Choose Debug gt Step Into or e Click Step Into H on the debugger toolbar 2 The debugger executes one statement The current statement arrow moves to the next statement Ifthe current statement does not call a routine the current statement arrow moves to the next statement in the source code e Ifthe current statement calls a routine program execution enters the called routine The current statement arrow moves to the next statement in the called routine Stepping
454. tion to view the raw browser information that a plug in compiler or linker provides for the IDE Use this option to help develop plug ins for use with the IDE 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 IDE 420 IDE 5 1 User s Guide Preference and Target Settings Options 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 Enable automatic Toolbar help Select this option to display Balloon Help after resting the cursor over a toolbar button Clear the option to prevent Balloon Help from appearing Enable remote debugging Select this option to define a remote debugging connection specific to the current build target Choose from the Connection pop up menu the general connection to use as the basis for the target specific connection Enable Virtual Space Use this option to configure the editor for handling spaces in different ways When e selected the editor allows movin
455. tionery to include often used files libraries and source code Configure build targets and options to any desired state Set up a reusable template to use for creating 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 Creating Custom Project Stationery IDE 40 Use custom project stationery to develop a convenient template for creating new projects An efficient way to develop custom stationery is to modify existing project stationery and save it under a new name in the Stationery or Project Stationery folder Follow the usual process for creating a project from project stationery See Creating New Projects using Project Stationery on page 33 for more information Choose File gt Save A Copy As Find the Project Stationery folder in the CodeWarrior installation Create a folder inside the Project Stationery folder to store the newly created project Save the project to its new folder Use a descriptive project name with the mcp extension Customize the newly saved project so that it becomes a template for creating other projects IDE 5 1 User s Guide Working with Projects Advanced Projects Add source files to the project Save these files in the same folder as the project itself Add build targets for building the p
456. tiple programming languages when developing software The IDE supports high level languages such as C C and the Java programming language as well as in line assemblers for most processors Consistent development environment Port software to new processors without having to learn new tools or lose an existing code base The IDE supports many common desktop and embedded processor families including x86 PowerPC MIPS and many others IDE 5 1 User s Guide IDE 23 CodeWarrior IDE Overview IDE Tools Overview Plug in tool support Extend the capabilities of the IDE by adding a plug in tool that supports new services The IDE currently supports plug ins for compilers linkers pre linkers post linkers preference panels version controls and other tools Plug ins make it possible for the CodeWarrior IDE to process different languages and support different processor families IDE Tools Overview The CodeWarrior IDE is a tool suite that provides sophisticated tools for software development This section explains the standard tools available in the IDE a project manager an editor a search engine a source browser a build system a debugger Rapid Application Development RAD tools Table 2 2 on page 25 explains the purpose of these tools and lists corresponding CodeWarrior IDE features IDE 5 1 User s Guide IDE 24 Table 2 2 IDE tools and features CodeWarrior IDE Overview IDE Tools Overview Tool Purpose
457. to any toolbar except the Project window toolbar IDE 5 1 User s Guide IDE 341 Customizing the IDE Customize Toolbars Removing a Toolbar element You remove a toolbar element by selecting it and using a contextual menu command to remove it from the toolbar To remove an element from a toolbar follow these steps 1 Display a contextual menu for the button that you want to remove as explained in Table 30 3 on page 342 Table 30 3 Displaying a contextual menu for a toolbar button On this host Do this Windows Right click the button Macintosh Control click the button Solaris Control click the button Linux Ctrl click the button 2 Select the Remove Toolbar Item command from the contextual menu The IDE removes the button from the toolbar Clearing All Buttons on Toolbars You can clear all elements from a toolbar and build your own toolbar from scratch Table 30 4 explains how to clear the main floating toolbar and window toolbars Table 30 4 Clearing toolbars On this host Do this to clear the Do this to clear the main toolbar window toolbar Windows Select View gt Toolbars gt Select View gt Toolbars gt Clear Main Toolbar Clear Window Toolbar Macintosh Select Window gt Toolbar gt Select Window gt Toolbar gt Clear Floating Toolbar Clear Window Toolbar IDE 342 IDE 5 1 User s Guide Table 30 4 Clearing toolbars continued Customizing th
458. to edit a text file and to have the Emacs editor display the line provided to it by the IDE enter this command line expression runemacs file line Consult the documentation provided with the third party text editor for more information about using command lines Launch remote host application Select this option to launch an application on the remote computer to serve as a host application Enter in the corresponding field the path to the remote host application Left margin click selects line Select the Left margin click selects line option to use a right pointing cursor shown at left to select entire lines of text from the left margin Clear the option to disable use of the right pointing cursor With the right pointing cursor active click in the left margin to select the current line or click and drag along the left margin to select multiple 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 e None default The IDE does not activate plug in diagnostics or produce output e Errors Only tThe IDE reports problems encountered while loading plug ins These problems appear in a new text file after the IDE starts up e All Info The IDE reports information for each installe
459. to the component IDE 324 IDE 5 1 User s Guide Vill Preferences and Target Settings This section contains these chapters e Customizing the IDE e Working with IDE Preferences e Working with Target Settings e Preference and Target Settings Options IDE 5 1 User s Guide IDE 325 IDE 326 IDE 5 1 User s Guide 30 Customizing the IDE The CodeWarrior IDE enables you to customize menus toolbars and key bindings to suit your programming preferences Use the Customize IDE Commands window which consists of the Commands Toolbar Items and Key Bindings tabs to build your customizations This chapter contains these sections e Customizing IDE Commands on page 327 e Customize Toolbars on page 338 e Customize Key Bindings on page 344 Customizing IDE Commands You can customize the menu commands in the IDE s menu bar as well as control the appearance of specific menu commands create new command groups to distinguish menu commands and associate a command line Windows Solaris and Linux or a script or application Mac OS with a new menu command The customized menu commands you create have access to IDE information such as the current editor selection the frontmost window and the current project and its output file Figure 30 1 on page 328 shows the Customize IDE Commands window Table 30 1 on page 328 explains the buttons in the window IDE 5 1 User s
460. to the original copy should modifications fail 1 Choose File gt Save A Copy As 2 Type anew filename in the Name text box 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 when you finish working on them Close editor windows to close a file 1 Select an editor window to close 2 Close the file window e Choose File gt Close or e 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 The IDE closes the file window Closing All Files The Close All command closes all currently open files This command is useful for closing all files at the same time rather than closing each file individually IDE 5 1 User s Guide IDE 65 Working with Files Managing Files 1 Close all currently open files as explained in Table 5 2 Table 5 2 Closing all currently open files On this host Do this Windows Select Window gt Close All or Window gt Close All Editor Windows Macintosh While pressing Option select File gt Close All Solaris While pressing Alt select File gt Close All Linux While pressing Alt select File gt Close AIl 2 The IDE closes the files Printing Source Files The Print command prints the entire contents of a selected file window 1 Activate the desired editor wi
461. tomize IDE Commands list IDE 328 IDE 5 1 User s Guide Customizing the IDE Customizing IDE Commands 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 Modifying Existing Commands You can use the Commands tab of the Customize IDE Commands window to examine and modify existing command groups and menu commands This view includes a Commands list This hierarchical list organizes individual menu commands into command groups Click the hierarchical control next to a command group to expand that group and view its contents To examine a particular item select it in the Commands list The information for the selected item appears on the right hand side of the Customize IDE Commands window This window provides this information for each selected item e Name This field shows the name of the selected item If the IDE does not permit you to change the name of the selected items this field is grayed out e Appears in Menus Enable this checkbox to display the selected item in the specified position in the CodeWarrior menu bar For example enabling this checkbox for the RunApp menu command allows that menu command to appear under the MyMenu command group in the menu bar Disabling the checkbox prevents the RunApp menu command from appearing in the menu bar und
462. torization For processors that support vector 3 4 optimizations translates computations with code loop arrays into equivalent vector instructions Lifetime Based Register In a particular routine uses the same processor 3 4 Allocation register to store different variables as long as or no statement uses those variables Register Coloring simultaneously Instruction Scheduling Rearranges the instruction sequence to reduce 3 4 conflicts among registers and processor resources Repeated Iterates the optimization routines listed between 4 and Editor Panels The Editor section of the Target Settings Panels list provides a single core panel for configuring custom keywords within a project Custom Keywords The Custom Keywords settings 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 IDE 5 1 User s Guide IDE 401 Working with Target Settings Editor Panels Figure 32 9 Custom Keywords settings panel Custom Keywords Keyword set 1 I Edit Keyword set 3 Edit Keyword set 2 Edit Keyword set 4 Edit Table 32 10 Custom Keywords settings panel items Keyword set 1 Keyword set 2 Click a color swatch to set the color used for the corresponding Keyword set 3 Keyword set 4 custom keyword set
463. tory Enter in this field the working directory the IDE should use when it executes the application specified in the Execute field Alternatively choose the desired directory from the pop up menu next to the field Pre defined Variables in Command Definitions The IDE provides pre defined variables for Windows Solaris and Linux not Mac OS to associate actions with commands When you create a new command you can use these pre defined variables in command definitions to 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 Figure 30 4 Pre defined Arguments variables oea m Customize IDE Commands 2 xi Commands Toolbar Items a Get next symbol Get previous symbol Add bookmark Go to next bookmark Go to previous bookmark P Editor File Name Toggle overstrike mode cas obmana Editor Line Number Help panang Editor Selected Text Catalog Editor Selected Text With Update Layout New Group Project File Path New Command Name New Command IV Appears in Menus Execute l Arguments Editor File Path Editor File Directory Action Directory z Project File Directory Prefix Key Timeou Project File Name 7 sep Export Project Selected Files New Command ail z Current Target Output File Path New Group New Command
464. tring in the replace string 143 144 Relative to class field 179 Relaxed C popup parsing option Editor Settings panel 435 release notes 17 remembering last project default workspace 442 remembering last project turning off default workspace 443 remote connections adding 381 changing 382 removing 365 383 Remote Connections preference panel 380 options Add 381 Change 381 Remote Connection list 381 Remove 381 Remote Debugging settings panel 408 Connection pop up menu 408 options Launch remote host application 430 Remote download path 435 Remote Download Path option Remote Debugging settings panel 435 Remove button 391 Remove button in Remove Markers window 119 Remove command 51 56 280 Remove Markers window 119 Cancel button 120 Done button 120 Markers list 119 Remove button 119 Remove Object Code amp Compact menu command 505 Remove Object Code menu command 505 Remove Toolbar Item 342 removing a component from a layout 292 build targets 51 56 files 51 groups 51 layouts 51 layouts from a design 283 menu items from a menubar component 307 IDE 5 1 User s Guide menus from a menubar component 307 remote connections 365 383 source trees 364 targets 51 56 Rename command 53 58 renaming build targets 54 58 files 53 groups 53 layouts 53 targets 53 54 58 reopening last project used default workspace 442 reopening last project used preventing default workspace 443 Repeated optimizations 401 Replace 128 130 Re
465. ts all classes in the project browser database Member Functions pane Lists all member functions defined in the currently selected class Data Members pane Lists all data members defined in the selected class Source pane Displays the source code for the currently selected item Status Area Displays various status messages and other information Display toggle buttons Alphabetical Hierarchical Toggles the Classes display between alphabetical and hierarchical listings New Item button 49 Opens wizards to create new items e g classes data members member functions Pane Expand box Expands the pane to the width of the full window Pane Collapse Box Collapses the pane to its original size Classes Pane button Lists all classes in the project browser database Class Declaration button Opens a window that shows declarations for all classes in the project Open File button Opens the current source file in a new editor window VCS list pop up D E g 0 4 a With a version control system enabled choose the version control command to execute on the displayed source file IDE 5 1 User s Guide IDE 157 Using Class Browser Windows Class Browser window Table 14 2 Browser access filters Filter View as implementor Icon Show items with this access Public Private e Protected View as subclass
466. tting that data as source code disassembly or another format View Source This command changes the data view to show source code View Variable The View Variable command creates a separate window displays a selected variable Watchpoints Watchpoints Window These commands open a Watchpoints window 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 IDE 520 IDE 5 1 User s Guide Index Symbols include files caching 428 ile command line string 429 line command line string 430 Scripts folder 477 502 _ Data 361 Mcp acronym meaning 35 361 __throw 483 A about console applications 85 dockable windows 69 Files view in Project window 47 markers 119 object wiring 309 workspaces 81 About Metrowerks CodeWarrior menu command 481 about projects 29 Absolute Path option in Source Trees preference panel 441 in Type pop up menu 441 abstract icon for 163 Access Filter display 166 Access Paths panel options System Paths 440 User Paths 445 Access Paths settings panel 359 389 Framework column 392 options Add 391 Add Default 391 Always Search User Paths 391 Change 391 Host Flags 391 Interpret DOS and Unix Paths 391 Remove 391 Require Framework Style Includes 391 System Paths 391 System Paths list 391 IDE 5 1 User s Guide User Paths 391 User Paths list 391 Recursive
467. u The IDE performs the selected command Identifying Symbols in the Browser Database IDE 152 As a shortcut you can use browser coloring to help recognize if a symbol resides in the browser database When you activate a browser you can see browser database symbols because they appear in the editor and browser windows according to the colors you select 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 IDE 5 1 User s Guide Using the Browser Browser Symbols 1 Choose Edit gt Preferences 2 Select the Text Colors panel from the IDE Preference Panels list 3 Select the Activate Syntax Coloring option 4 Select the Activate Browser Coloring option 5 Click the color swatch next to the symbol name to set that symbol s color 6 Click Save IDE 5 1 User s Guide IDE 153 Using the Browser Browser Symbols IDE 154 IDE 5 1 User s Guide 14 Using Class Browser Windows This chapter explains how to work with the Class Browser windows in the CodeWarrior IDE Use the Class Browser to perform these tasks e View browser data the class browser collects information about the elements of a computer program Such elements include functions variables and classes The class browser displays these elements in organized lists e Show data relatio
468. u in various IDE windows to discover additional features Figure 19 2 Contextual menus int main int i int j 0 QO while H lt 1n Cut Copy Paste Find and Open File J H tou return Symbol completions for ii gt Compile Preprocess Line 16 Col 13 Disassemble Set Breakpoint Set Eventpoint Using Contextual Menus Use contextual menus to more conveniently apply context specific menu commands to selected items e Open the contextual menu e Windows Right click an item e Macintosh Control click or click and hold on an item e Solaris Ctrl click or click and hold on an item IDE 204 IDE 5 1 User s Guide Advanced Debugging Symbolics Window e Linux Ctrl click or click and hold on an item The contextual menu appears displaying menu commands applicable to the selected item Symbolics Window The Symbolics window displays information that the IDE generates for the active file Symbolics information includes program variables functions data structures and source files Select the Activate Browser option in the Build Extras target settings panel in order to generate the symbolics information during the next build or debugging session Figure 19 3 shows the Symbolics window Table 19 1 on page 206 explains the items in the window Figure 19 3 Symbolics window wSymbolics Window oa Sexe tad stest Debug exe abort_exit c exchand cpp globdest c
469. ubmenu 498 Hide non debugging windows option Windowing panel 427 Hide Window Toolbar command 498 hiding IDE 535 classes pane 162 Hierarchy Control 168 hierarchy window 168 hierarchy windows changing line views 170 using to view class data 159 Horizontal Center button in layout editor 287 Horizontal Center command 498 Host Application for Libraries amp Code Resources option Runtime Settings panel 427 Host Application For Libraries And Code Resources field of Runtime Settings panel 427 host specific registers 216 how to activate automatic code completion 107 add a component to a layout 292 add a constant to a variable 212 add a keyword to a keyword set 402 add an executable file 405 add components to a component catalog 302 add expressions Expressions window 211 add markers to a source file 120 add panes to an editor window 98 add remote connections 381 add source trees 363 adding subprojects to a project 41 alphabetize Functions list pop up order 117 attach the debugger to a process 210 balance punctuation 105 change an executable file 405 change line views in a hierarchical window 170 change register data views 217 change register values 217 change remote connections 382 change source trees 364 choose a default project 38 clear all breakpoints 235 clear breakpoints in source panes 234 clear breakpoints in the Breakpoints window 235 close a docked window 79 close a workspace 84 close projects 39 collapse a docked windo
470. ult of triggering the wire source event the event that triggers the wire e action the operation that the destination component performs e action parameters details that qualify the action Depending on how you create the wire the IDE already has some of this information e create a wire between two components source and destination components already identified e create a wire with one component selected source component already identified Use the Create Wire wizard to customize any remaining information Completing the Create Wire Wizard Use the Create Wire wizard to specify details for wires that you create 1 Bring forward the layout editor window 2 Create a wire Draw the wire in the layout itself or use menu commands to create the wire 3 The Create Wire wizard appears Depending on how you created the wire the wizard displays different pages to help you complete the wire Figure 28 3 on page 316 shows a sample page in the Create Wire wizard IDE 5 1 User s Guide IDE 315 Object Wiring Using the Create Wire Wizard Figure 28 3 Create Wire wizard Create Wire Page 1 of 1 mouseE sited mousePressed i mouseReleased E mouseMotion mouseDragged mouseMoved E propertyChange oo propertyChange E window i window ctivated windowClosed windowClosing windowDeactivated windowD eiconified windowlconified i windowO pened background java awt C
471. umn Linux Alt click a red checkmark in the Touch column IDE 5 1 User s Guide IDE 55 Project Window Build Target Management 2 The red checkmarks next to all files and groups disappear Build Target Management These tasks help you manage build targets e Create a build target e Remove a build target e Set the default build target e Rename a build target e Configure build target settings Creating Build Targets The Create Target command adds new build targets to a project 1 Open the Project window 2 Click the Targets tab in the Project window 3 Choose Project gt Create Target 4 Type a name in the Name text box of the New Target window 5 Select the Empty target or Clone Existing Target radio button as desired Empty Target create a new build target from scratch e Clone Existing Target duplicate an existing build target in the New Target window 6 Click OK The IDE adds the new build target to the project Removing Build Targets from a Project The Remove command deletes unneeded build targets from the Project window IDE 56 IDE 5 1 User s Guide 1 Click the Targets tab in the Project window 2 Select the item to remove Project Window Build Target Management 3 Remove the selected item from the active build target as explained in Table 4 11 Table 4 11 Removing the selected item from the active build target On this host Do this Windows Select Edit
472. use a third party text editor to edit text files in the current project Clear to use the editor included with the IDE Use ToolServer menu Classic Macintosh IDE 356 Select to display the ToolServer menu in the menu bar Clear to remove the ToolServer menu from the menu bar IDE 5 1 User s Guide Working with IDE Preferences General Panels Table 31 4 IDE Extras preference panel items continued always start in the Item Explanation Enable automatic Toolbar help Select to display Balloon Help after resting the cursor over a toolbar Classic Macintosh icon Clear to prevent Balloon Help from appearing 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 same state Find Reference using Choose an online Macintosh and definitions browser application to view reference information Using an External Editor on the Mac intosh To use an external editor on the Macintosh the IDE sends AppleEvents to an alias file that points to the editor application Manually configure the IDE to use an external editor 1 Choose Edit gt Preferences The IDE Preferences window appears 2 Select the IDE Extras panel from the IDE Preference Panels list 3 Select the Use External Editor o 4 Click Save ption The IDE is now prepared to use an external editor appli
473. ut Enter a number from 1 to 10 4 The number entered was 4 Enter another number from 1 to 16 Creating Console Applications Create a console application to begin working with a text based computer program The CodeWarrior IDE provides pre configured project stationery for creating console applications Project stationery simplifies the project creation process This section explains how to create a console application Creating a Console Application Use the New command to create a new project The project stores information about the files in the console application 1 Choose File gt New The New window appears 2 Click the Project tab 3 Select a project stationery file For example select Win32 C Stationery to create a C console application IDE 86 IDE 5 1 User s Guide 10 11 Creating Console Applications Creating Console Applications Enter a project name in the Project name field and add the mcp extension For example name the project test mcp Click Set Save the project in the desired location Click OK The New Project window appears Select a specific stationery file For example expand Win32 Console App and select C Console App Click OK The IDE creates a console application from the selected stationery The Project window for the console application appears Expand the Sources group This group contains placeholder source files Remove placeholder source files
474. ve in various ways You can set these types of eventpoints Log Point logs or speaks a string or expression records messages to the log window Pause Point pauses execution just long enough to refresh debugger data Script Point runs a script application or other item when it reaches the eventpoint in a line of code The eventpoint triggers when execution reaches that line in the code Skip Point skips execution on a source line where you set an eventpoint Sound Point plays a sound when the program finds an eventpoint IDE 5 1 User s Guide IDE 251 Using Eventpoints About Eventpoints Figure 22 1 Eventpoints in an editor window loxi b Q M a of Path C Documents and Settings PowerProject01 Shello cpp Ka m Copyright 1997 2002 Metrowerks Corporation All Rights Reserved Questions and comments to lt mailto support metrowerks com gt lt http www metrowerks com gt include lt iostream gt int main using namespace std z cout lt lt Hello World this is CodeWarrior lt lt endl g return 0 Line 17 Col7 4 gt F Table 22 1 Eventpoint icons Eventpoint Icon Explanation Log Point The IDE logs or speaks a string or expression Pause Point Q The IDE pauses execution just long enough to refresh debugger data Script Point The IDE runs a script application or other item Skip Point z The IDE skips execution o
475. ventpoint icon in the window s breakpoints column This clears the eventpoint Alternately to this 1 Double click the line or symbol on which you want to clear the eventpoint 2 Choose Debug gt Clear Eventpoint Using Eventpoints in the Breakpoints Window The Breakpoints window lists the eventpoints in your current build target by memory address IDE 256 IDE 5 1 User s Guide Using Eventpoints Using Eventpoints in the Breakpoints Window Figure 22 5 Breakpoints window sini Location Condition hello cpp line 9 Log Point 4 hello cpp line 11 Pause Point hello cpp line 12 Script Point hello cpp line 15 Skip Point hello cpp line 15 Log Point hello cpp line 17 Sound Point B m M ae Clearing an Eventpoint from the Breakpoints window To clear an eventpoint from the Breakpoints window follow these steps 1 Open the Breakpoints window as explained in Table 22 2 Table 22 2 Opening the Breakpoints window On this platform Do this Windows Select View gt Breakpoints Macintosh Select Window gt Breakpoints Solaris Select Window gt Breakpoints Linux Select Window gt Breakpoints 2 Click on the text that has the eventpoint you want to clear 3 Choose Debug gt Clear Eventpoint Disabling an Eventpoint from the Breakpoints window To disable an eventpoint from the Breakpoints window follow these steps 1 Open the Breakpoints window as ex
476. w The CodeWarrior Integrated Development Environment IDE provides an efficient and flexible software development tool suite This chapter explains the advantages of using the CodeWarrior IDE and provides brief descriptions of the major tools that make up the IDE This chapter contains these sections Development Cycle on page 21 CodeWarrior IDE Advantages on page 23 IDE Tools Overview on page 24 Development Cycle A software developer follows a general development process Begin with an idea for new software Implement the 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 22 depicts the development cycle as a flowchart Table 2 1 on page 23 details the different stages and their corresponding sections in this manual IDE 5 1 User s Guide IDE 21 CodeWarrior IDE Overview Development Cycle Figure 2 1 The Development Cycle diagram Compile Errors Legend Start or End of the process Development cycle stage Release End Decision stage Process flow IDE 22 IDE 5 1 User s Guide CodeWarrior IDE Overview CodeWarrior IDE Advantages Table 2 1 Stage descriptions and related sections
477. w on page 223 Multi core Debugging on page 228 IDE 5 1 User s Guide IDE 201 Advanced Debugging What is Advanced Debugging What is Advanced Debugging In addition to controlling program execution the IDE includes several windows for handling advanced program elements e symbolics files these files contain information generated by the IDE for a project The debugger uses symbolics files to display information about program structure and to control that structure during execution e processes the debugger can control most processes associated with the running program as well as manually assigned processes e expressions the debugger can manipulate various expressions and their changing values during program execution e variables the debugger can monitor and modify global and local variables used during program execution e registers the debugger provides views and manipulation of some register contents e memory the debugger can manipulate memory structures such as array elements used during program execution Symbol Hint The symbol hint shows information about variable values This information appears automatically while the debugger is active Select the Show variable values in source code option in the Display Settings preference panel to use the symbol hint Figure 19 1 Symbol hint int 1 0 int j 0 while i lt 10 j 1 i 1 The symbol hint shows the curr
478. w 78 collapse browser panes 160 collapse the editor window toolbar 94 complete code for data members 113 IDE 536 complete code for parameter lists 114 complete the Create Wire wizard 315 create a console application 86 create a menu in a menubar component 306 create a menu item in a menubar component 306 create anew class 162 177 178 create a new data member 185 186 create a new data members 164 create a new member function 163 182 183 create a wire by drawing it 311 create a wire by using a contextual menu 312 create a wire by using a menu 312 create custom project stationery 40 create empty projects 35 create new projects from makefiles 33 create new projects using project stationery 33 deactivate automatic code completion 109 delete a wire by using the layout editor 314 delete wires by using the object inspector 319 dock a window by using a contextual menu 72 dock a window by using drag and drop 72 dock windows of the same kind 73 expand a docked window 78 expand browser panes 160 expand the editor window toolbar 94 export projects to XML files 38 float a window 75 generate project link maps 274 go to a particular line 118 hide the classes pane 162 import projects saved as XML files 39 indent text blocks 104 insert a reference template 123 look up symbol definitions 122 make a summation of two variables 212 make a window an MDI Child 76 modify a wire by using the layout editor 313 modify wires by us
479. w these steps to use a contextual menu in the layout editor 1 Select an item in the layout 2 Open a contextual menu as explained in Table 26 3 Table 26 3 Using a contextual menu in the layout editor On this host Do this Windows Right click the item Macintosh Control click the item Solaris Click and hold on the item Linux Click and hold on the item 3 Select a command in the contextual menu The IDE applies to the item the command that you select Component Palette Use the Component Palette to find and select components that you want to add to a layout in the layout editor The Component Palette is a tool based version of the Component Catalog The components listed in the Component Catalog appear as buttons in the Component Palette Click these buttons then draw components in the layout IDE 290 IDE 5 1 User s Guide Figure 26 2 Component Palette Component Palette ki m A S Swing Components gt Layout Editing Component Palette Doo t c T ce t3 Table 26 4 Component Catalog window items Component Icon Description Open Catalog button rs Click to open a catalog file and add it to the All EJ Catalogs list in the Component Catalog Close Catalog button Pe Click to close the active catalog shown in the Catalog a list pop up Component Catalog button Click to open the Component Catalog for the active catalog shown in the Catalog list pop up
480. w z Table 19 4 Expressions window items Expression column Lists expressions and expression hierarchies Click the hierarchical controls to expand or collapse the expression view Value column Shows the current value of each corresponding expression in the Expression column Double click a value to change it Opening the Expressions Window Use the Expressions window to inspect frequently used variables as their values change during a debugging session To open the Expressions window select View gt Expressions or Window gt Expressions Window Alternatively click the Expressions button in the Thread window toolbar to open the Expressions window Adding Expressions The Expressions window handles various ways of adding expressions for inspection To add an expression to the Expressions window do this e Select the desired expression and choose Data gt Copy to Expression or e Use the contextual menu with a selected expression or IDE 5 1 User s Guide IDE 211 Advanced Debugging Expressions Window e Drag and drop an expression from another window into the Expressions window The Expressions window updates to reflect the added expression Drag expressions within the window to reorder them Adding a Constant Value to a Variable You can enter an expression in the Expressions window that adds a constant value to a variable Suppose x is a short integer type in the variable context of some function
481. wParam Efel x Variable wParam Opening a Variable Window A Variable window manipulates a single variable or variable hierarchy A Variable window containing a local variable closes after program execution exits the routine that defines that variable 1 Select a variable in any window pane that lists variables IDE 220 IDE 5 1 User s Guide Advanced Debugging Array Window 2 Open a Variable window e Select Data gt View Variable or e Double click the variable A Variable window appears Double click a value to change it TIP Use Variable windows to monitor individual variables independently of other windows For example use a Variable window to continue monitoring a variable that leaves the current scope of program execution in the Thread window Alternatively use a contextual menu to open a variable window as explained in Table 19 8 Table 19 8 Opening a Variable window by using a contextual menu On this host Do this Windows Right click the variable and select View Variable Macintosh Control click the variable and select View Variable Solaris Click and hold on the variable then select View Variable Linux Click and hold on the variable then select View Variable Array Window An Array window allows manipulation of a contiguous block of memory displayed as an array of elements The window lists array contents sequentially starting at element 0 The Array window title shows th
482. windows on debugging monitor during debugging 378 IDE 549 Other 373 Play sound after Bring Up To Date amp Make 353 Project Commands 368 Project operations 360 Projects 356 Purge Cache 379 RAD Tools 383 Recent symbolics 356 Recommended 354 Regular Expression 360 Relaxed C popup parsing 368 Remote Connection list 381 Remove 361 362 381 Revert Panel button 328 350 Save button 328 351 Save open files before build 353 Script 369 Select stack crawl window when task is stopped 379 Selection position 367 Set 358 Set 1 Set 2 Set 3 Set 4 372 Shielded folder list 360 Show all locals 376 Show message after building up to date project 353 Show tasks in separate window 377 Show the component palette when opening a form 384 Show the object inspector when opening a form 384 Show values as decimal instead of hex 376 Show variable location 376 Show variable types 376 Show variable values in source code 377 Size 369 Sort function popup 368 Sort functions by method name in symbolics window 377 Source Tree list 362 Strings 372 Success 353 Tab indents selection 369 Tab Inserts Spaces 369 Tab Size 369 Templates 372 Type 362 TypeDefs 373 Use Concurrent Compiles 354 IDE 550 Use Debugging Monitor 378 Use Default workspace 357 Use External Editor 356 Use Local Project Data Storage 353 Use Multiple Document Interface 356 Use multiple undo 368 Use Script menu 356 Use Thir
483. wizards 285 layouts adding components to 292 layout editor 286 moving 52 opening 289 removing 51 removing components from 292 removing from a design 283 renaming 53 Left Edges button in layout editor 287 Left Edges command 499 Left margin click selects line option Editor Settings panel 430 Level option Plugin Settings panel 430 Lifetime Based Register Allocation 401 line going to in source code 118 line and column indicator in editor window 98 line command line string 430 Line Display 168 lines selecting 102 lines selecting multiple 102 lines selecting rectangular portions of 102 link maps generating for projects 274 Link Order tab 51 Link Order view 37 49 52 53 Linker option Target Settings panel 431 linkers 273 choosing 273 linking projects 274 Linux modifier key mappings 20 list IDE 541 of symbols in Browser Contents window 172 list menus document settings 96 functions 95 interfaces 95 markers 95 VCS 96 list pop up menus Current Target 46 list pop ups Ancestor 168 Browser Access Filters 157 document settings 96 functions 95 interfaces 95 markers 95 Symbols 172 VCS 157 lists File Mappings 417 Live Range Splitting 400 locating functions 115 116 locating interface files 115 116 locating source code 115 Location column in Breakpoints window 232 Location of Relocated Libraries and Code Resources option Debugger Settings panel 431 Log Point 251 253 Log Message 253 Speak Message 253 Treat as Exp
484. ws Menu Layout Table 34 8 Window menu commands Menu command Close Explanation Closes the active window When using the Windows menu layout on a Macintosh host hold down the Option key to change this command to Close All Close All Closes all non project windows When using the Windows menu layout on a Macintosh host hold down the Option key to substitute this command for the Close command Cascade Arranges all editor windows so that only the title bar is visible Tile Horizontally Tiles all editor windows horizontally on the screen so none overlap Tile Vertically Tiles all editor windows vertically on the screen so none overlap Save Default Window Help Menu Saves the active browser windows settings and applies it to other browser windows as they are opened The Help menu contains commands for accessing the IDE s online help Table 34 9 Help menu commands Menu command Explanation CodeWarrior Help Launches a help viewer to display the CodeWarrior IDE online help Click on a link to view a specific IDE topic Index Launches a help viewer to display a glossary of common terms used in the CodeWarrior help and manuals Search Launches a help viewer to a page for searching the CodeWarrior help and manuals Online Manuals Launches a help viewer to display a list of CodeWarrior manuals Click on a link to view a specific manuals contents Metrowerk
485. x Coloring 411 417 Add Default 411 Always Search User Paths 412 Application 412 Arguments 412 Attempt to use dynamic type of C Object Pascal and SOM objects 412 Auto Indent 412 IDE 5 1 User s Guide Auto Target Libraries 412 Automatic Invocation 413 Automatically Launch Applications When SYM File Opened 413 Auto target Libraries 412 Background 414 Balance Flash Delay 414 Balance while typing 414 Bring Up To Date 425 Browse in processes window 381 382 Browser Commands 415 Browser Path 415 Build before running 415 Build Extras settings panel 392 Build Settings preference panel 351 Cache Edited Files Between Debug Sessions 415 Cache Subprojects 416 Cache symbolics between runs 416 Case Sensitive 416 choosing host application for non executable files 427 Classes 372 Close non debugging windows 416 Code Completion Delay 416 Code Completion preference panel 366 Code Generation settings panels 398 Collapse non debugging windows 417 Comments 417 Compiler 417 Compiler thread stack 417 Concurrent Compiles preference panel 353 Confirm Kill Process when closing or quitting 418 Confirm invalid file modification dates when debugging 417 Connection Type 382 Constants 372 Context popup delay 418 Custom Keywords settings panel 401 Debugger Commands 418 Debugger preference panels 375 Debugger Settings 218 Debugger Settings panel 406 Debugger settings panels 403 Default File Format 418 D
486. xplains how to work with dockable windows in the Windows hosted CodeWarrior IDE Use dockable windows to do these tasks e Organize attach or dock various windows to the edges of the screen for quick access e Group dock windows of the same type to create a single window with multiple tabs where each tab represents one of the original docked windows NOTE The dockable windows feature is available in Multiple Document Interface MDI mode only This feature is not available in Floating Document Interface FDI mode Toggle the Use Multiple Document Interface option in the IDE Extras preference panel to change between these two modes This chapter contains these sections e About Dockable Windows on page 69 e Working with Dockable Windows on page 71 e Dock Bars on page 76 About Dockable Windows You can dock certain windows to the edges of the main frame window of the IDE Table 6 1 on page 70 explains possible states for dockable windows Figure 6 1 on page 70 shows the different window states In MDI mode the IDE occupies a main window frame or client area IDE windows normally appear within this client area as you work These windows are called child windows of the IDE s client area IDE 5 1 User s Guide IDE 69 Dockable Windows About Dockable Windows Table 6 1 Window states State Characteristics Docked e Attached to the left right top or bottom edge of the client are
487. y Find All I Match whole word I Regular expression Replace I Case sensitive Addi Replace All In Folders In Projects In Symbolics In Files Project Jai Projects m Target fall Targets v IV Project sources I System headers J Project headers I Search cached sub targets Catest c a Colors c ced ns i Table 12 4 Find in Files window items Item Explanation Find text box Enter the search string Find list box Select a previously searched string to insert into the Find text box Find Click to start a search operation using the string in the Find text box Find All Click to search for all matches to the find string Replace with text box Enter the replacement string Replace with list box Select a previously used replacement string to insert into the Replace text box Replace Click to replace the current editor window selection with the replacement string Replace All Click to replace all matches in the file with the replacement string IDE 130 IDE 5 1 User s Guide Finding and Replacing Text Multiple File Find and Replace Table 12 4 Find in Files window items continued Item Explanation Match whole word Select to search for whole word matches only ignoring matches within words Case sensitive Select to search for matches of the search string according to text case Regular expression Select to interpret find and replace strings as regular expressi
488. your current build target by memory address IDE 242 IDE 5 1 User s Guide Using Watchpoints Using Watchpoints in the Watchpoints Window Figure 21 2 Watchpoints window RE Location Length Description Condition DOUET adidemo EXE Memory 1 a 0x001323FB 4 gdidemo EXE Memory 1 000132407 4 gdidemo EXE Memory 1 000132398 4 gdidemo EXE Memory 1 000132433 4 gdidemo EXE Memory 1 00013245F 4 gdidemo EXE Memory 1 f 0 001 32466 4 adidemo EXE Memory 1 7 Clearing a Watchpoint from the Watchpoints window To clear a Watchpoint from the Watchpoints window follow these steps 1 Open the Watchpoints window as explained in Table 21 2 Table 21 2 Opening the Watchpoints window On this platform Do this Macintosh Select Window gt Watchpoints Solaris Select Window gt Watchpoints Linux Select Window gt Watchpoints 2 Select an existing Watchpoint in the Watchpoints window 3 Choose Debug gt Clear Watchpoint Alternately you can right click the Watchpoint and select Clear Watchpoint You can also highlight a Watchpoint and press the Delete key to clear a Watchpoint in the Watchpoints window The variable disappears from the Watchpoints window IDE 5 1 User s Guide IDE 243 Using Watchpoints Using Watchpoints in the Watchpoints Window Disabling a Watchpoint from the Watchpoints window To disable a Watchpoint from the Watchpoints window follow these steps 1 Open the Watchpoi
489. ype Choose from the Type options the desired source tree path type e Absolute Path This source tree type is based on a file path IDE 5 1 User s Guide IDE 441 Preference and Target Settings Options e Environment Variable This source tree type is based on an existing environment variable definition The Macintosh hosted IDE cannot create or modify this source tree type e Registry Key This source tree type is based on an existing Windows registry key entry IDE 442 Update data every n seconds Select this option to update the information displayed in debugging session windows after a specified time interval Enter in the field the number of seconds n to elapse before the next update Clear this option to prevent data updates and keep the same window information throughout the debugging session Use Concurrent Compiles Select the Use Concurrent Compiles option to run more than one compiling processes at a time Concurrent compiling makes better use of available processor capacity by allowing the operating system to optimize resource utilization such as taking advantage of over lapped input output Both single and multi processor systems benefit from enabling concurrent compiles On multiprocessor systems the speed up is significant Use Debugging Monitor Select the Use Debugging Monitor option to view debugging windows on a second monitor after a debugging session starts This option only appears when the second mo
490. zard uses these options to create a new RAD project IDE 5 1 User s Guide IDE 277 Creating RAD Projects Working with Designs Using a RAD Wizard Use the New command to create a RAD project 1 Open the project Choose File gt New Select the type of RAD project to create These include Java Applet Wizard Java Application Wizard Java Bean Wizard Type a name in the Project name text box and specify Location Click OK For each subsequent wizard window Enter the information requested then click Next OR Click Finish at any time to complete the project using default values The wizard builds the RAD project according to the specified custom or default parameters Working with Designs RAD projects contain one or more designs A design organizes a particular set of user interfaces and components in an application A design typically contains these items e Layouts the layouts visually represent user interfaces that contain one or more interface components For example a design could contain layouts that depict different preference windows used in an application Components individual elements like controls lists or menus that comprise the user interface of a layout For example the design contains the components that make up the various layouts in an application Build targets the build targets used by the IDE to compile the design For example the design contains a debugging build target and a
Download Pdf Manuals
Related Search
Related Contents
LaCie Hard Disk MAX, 4 TB volontaire et heureuse ! Nikon 6MN14111-02 Digital Camera User Manual Riverstone RGB-LE Instructions / Assembly Epson EMP-TWD1 2_ Mode d`emploi 30.03.2011 - Office de la circulation et de la RÈGLEMENT D`EXÉCUTION (UE) 2015/ 244 DE LA COMMISSION Manuale Tecnico - Art.20022611 - interfaccia Copyright © All rights reserved.
Failed to retrieve file