Summary of New FeaturesPlease see What's New in Xcode for a complete guide to these new features: Objective-C 2.0 Objective-C has been enhanced with support for properties, fast enumeration, optional methods in protocols, and garbage collection. Interface Builder A completely new Interface Builder is included in Leopard. See the Interface Builder documentation for complete details. Refactoring Xcode now gives you the ability to refactor Objective-C code and nib files. A global refactoring, Convert to Objective-C 2.0, changes manual iterations to new Objective-C 2.0 syntax. Individual refactorings are currently available for: Refactoring allows you to accept or reject offered refactorings on a file-by-file basis. Organizer The Xcode Organizer is available in the Windows menu. This is a convenient place to drop project files, non-project text files, or entire folders of frequently-accessed information for quick reference and navigation. Folders in the Organizer represent the contents of directories in the file system. You can move, rename, and delete files and directories using the Organizer. The Action (gear) button at the bottom of the Organizer window allows you to add new files or directories into the selected directory in the Organizer. When creating a new file or folder, you can optionally choose a template to base the new item on; Xcode will make a copy of the template in the designated place on disk and add it to the Organizer. You can edit documents in the Workspace’s embedded editor or double-click them to open them in a separate window. When a directory is selected in the Organizer, the Edit ▶ Find ▶ Find in Project menu item changes to Find in Folder, and allows you to do deep searches within that folder. The Build, Clean, Run, and Action tools allow you to attach arbitrary shell commands, shell scripts, AppleScript files, or Automator workflows to Organizer folders and invoke them from the toolbar or main menu. Actions attached to a folder are also available to all enclosed folder; with this, you can define one operation on a directory and invoke it on any deeply-nested file in that directory. Build commands are executed in the Build Results window; Run and Debug commands are executed in the graphical Debug or Console windows. If you want to share action tools with others, you can define them in an .xccommands file in your project directory before adding that directory to the Organizer. The scripts attached to an Organizer item can be exported to an .xccommands file with the Export Actions... menu item in the Gear button at the bottom of the Organizer window. Snapshots You can take a “snapshot” of project state at any time (such as after a successful build or before refactoring). If you later decide to discard all changes, you can restore your files to the contents of a snapshot. Edit ▶ Make Snapshot Now makes a full copy of your project; if you later make changes you don't want to keep, you can use Edit ▶ Snapshots... to choose a snapshot, examine how it differs from your current project, and restore your project or individual files from it to the state as of that snapshot. Directories in the Organizer can also be snapshotted. Snapshots are stored in a sparse .dmg file in your user directory; you can protect this with a password if you choose for added security (using DiskUtility). The snapshots are stored in~/Library/Application Support/Apple/Developer Tools/SnapshotRepository.sparseimage and mounted in your /tmp directory. Xcode Source Editor The new source code editor in Xcode 3.0 edits large files up to 5 times faster than Xcode 2.5 and opens very large files almost instantly, instead of in tens of seconds. Syntax-aware indentation now works better than it did in Xcode 2.5 and earlier, handling many cases (such as multiline comments) that were handled poorly before. Syntax Coloring, Code Focus, Code Folding, and Code Sense Completion work with dozens of text file types supported by Xcode: C, C++, Objective-C, Objective-C++, Rez, Property Lists, XML, HTML, Perl, Python, Ruby, Fortran, and others. There are some special considerations for certain languages. For example, the Python languages considers tab characters to be semantically significant, and assumes that a tab character equals eight spaces. For Code Folding and indentation to work correctly for Python, set View ▶ Text ▶ Tab Settings to 8 characters. It may also help to disable the Editor Uses Tabs setting in Xcode Preferences ▶ Indentation. Code Focus Code Focus shows you the block structure of your code on demand. A new Focus Ribbon shows the nesting depth of every line of code; moving the mouse pointer into the ribbon highlights the blocks of your text by nesting depth, without changing your selection. This is great for checking for misbalanced parentheses, unbroken switch statements, etc. The Code Focus feature can also be latched on with the Code Focus menu item in the View menu, or using the Command-Control-Option-F keyboard shortcut. The Focus Ribbon also contains controls for Code Folding. You can collapse brace structures, C-style comments, and other nested structures in C-like languages, XML, and plists. You can also invoke folding and unfolding from the View or contextual menus, or by the shortcut keys listed in those menus. Code Sense Inline Completion Code Sense code completion is now done inline, as in Mail, Terminal, and other applications. You can confirm completions with the Tab key (not F5 any longer) and invoke the traditional completion pop-up menu with the Escape key. CodeSense now completes build setting values in .xcconfig files and file paths and names in #include statements. Syntax Coloring Syntax coloring now supports separate colors for different kinds of symbols: classes, types, constants, functions, and variables, as well as macros and comments. Xcode ▶ Preferences ▶ Fonts and Colors allows you to control the individual colors, and define, load, and save preferred color themes. Both uncolored and syntax-colored text are placed on the Pasteboard for copy and text drag operations. Note: If you created custom color schemes in an early Developer Preview releases of Xcode 3.0, you may need to delete and re-create them in order to get them to work correctly with the final Xcode 3.0.
Message Bubbles Errors, Warnings, and Breakpoints are now shown inline in source text, not just as icons in the gutter. Show them with the View ▶ Message Bubbles menu or the context menu in the text editor. Multiple messages are consolidated into single bubbles; bubbles can be shown or hidden by clicking on the error or warning icon in the gutter, or by using the context menu on the icon in the gutter. Class Navigator The Navigator Bar now contains a Class Navigator next to the Bookmarks popup. This allows you to move quickly in the class hierarchy to the superclass or subclasses of classes defined in the current file. Open Quickly improvements Open Quickly now accepts the same line number format as Go to Line; follow the filename with a colon and a line number or colon-separated range to go directly to a line in a file. You can also navigate directly to the implementation or declaration of a symbol by entering the symbol into the Open Quickly box, or just by selecting the symbol and pressing Command-Shift-D. Command-line tool to open a file in the Editor A command line tool allows you to open existing files, create new untitled or named files, and pipe text from standard input into Xcode's editor. You can use this as your EDITOR shell variable for command-line operations on text. The command is installed at /usr/bin/xed ; the documentation can be found with man xed .
Streamlined Debugging In Xcode 3.0 the distinction between Run and Debug has been blurred. You can opt to launch your application under the debugger (Debug) or not (Run), but you do not need to stop and restart your application. There is no more Standard I/O Log or Run Log, there is only the Console. Stdin to your app is now sent via the Console log while executing and to the debugger when paused. The Console window now has a toolbar like the old Run window formerly did. To make this available in existing projects, remove the <user>.mode*V3 file from the project wrapper. The debugger prompt and text colors set in the Debugger preferences are visual indicators for where the input is going. Datatips are structured, hierarchical tool tips that show the value of variables in scope during debugging, right in your text file. You can even descend into objects or structures and perform actions, such as printing the object to the console. The Xcode debugger now shows you the contents of C, CoreFoundation, and AppKit array types, as well as STL vectors. The first 10 array elements are shown by default, and controls allow you to see the next and last 10. A Mini Debugger allows you to pause and step through your application while it is in front, without activating Xcode. Debugging with Go The Debug menu has been re-organized with new launch options: Run, Debug, and Go. Corresponding changes have been made to the Build menu. Run and Debug launch the executable without and with breakpoints enabled, respectively; Go launches the executable with the breakpoint status unchanged from your last session. If you Run but then Activate Breakpoints to debug a problem, Xcode automatically launches the debugger and attaches it to the running application so you don’t have to restart your session. If you launch using a performance tool like Shark, you can use Go (or Build and Go) to launch with Shark again. For convenience, the command-key equivalents for Go are variants on the Return key. Project Find The Project Find module has been rewritten to search projects and directories considerably faster. For text searches in UTF-8 files, the speed is now comparable to grep . Project Find can now search in cross-project references as well as the current project alone: select a current Find Set (like “Project” or “Project and Frameworks”), click the Options button, and click the “Project and referenced projects” radio button. Project Find now supports “Find in source and headers” with a new checkbox in the Options panel, and a new search style “Symbols” that searches for uses of symbols (call sites), rather than just definitions or plain text. Regular _expression_ searches now find multiple matches on the same line. Classes, connections, and bindings in nib files are now indexed and can be found in the Project Symbols smartgroup, Go to Definition (command-double-click), and Find in Project's Definitions or Symbols search. Xcode's Spotlight importers for source code now index only the identifiers in your source, not the full text, making it easier to find appropriate code files with Spotlight. It also indexes the target, configuration, and product names from project files, so you can find what project builds a specific target or executable using Spotlight. Documentation Viewing The documentation viewer has been completely revamped. It manages Documentation Sets (downloadable and installable separately, with update notifications broadcast via subscriptions and RSS) and does full-text, API, and Document Title searches within a documentation set or across documentation sets. The API search now does “contains” matches rather than “starts with” by default. The Documentation Viewer supports the same Class Navigator popup as in the Source Editor. Research Assistant Choosing Help ▶ Research Assistant opens a new floating window shows the declaration, abstract, and usage notes about system APIs, macros, and build settings. It covers both Apple frameworks and standard Unix C APIs, and has detailed information on API deprecation and 64-bit availability of functions and methods. Open the Research Assistant and as you select terms, the window shows useful information about the selection. SCM Repository Management You can now manage SCM repositories (Perforce, Subversion, and cvs) from within Xcode. The current feature set allows you to configure your repository access, manage repository authentication, browse the repository, check out a revision, and import a new project into the repository.
|