TAILIEUCHUNG - Lập trình Wrox Professional Xcode 3 cho Mac OS part 20

Tìm kiếm và thay thế văn bản trong một tập tin tìm kiếm và thay thế văn bản trên nhiều tập tin Sử dụng mẫu tìm kiếm nâng cao Sử dụng lịch sử tìm kiếm để lặp lại kết quả tìm kiếm và xem lại các phím tắt tìm kiếm học và thủ thuật | 8 Searching WHAT S IN THIS CHAPTER Searching and replacing text in a single file Searching and replacing text across multiple files Using advanced search patterns Using search history to repeat searches and revisit results Learning search shortcuts and tricks A lot of development is spent just looking for things finding all occurrences of a particular constant looking for a message in a string finding where a family of symbols is defined and so on. Learning to use Xcode s find and replace features can save you a lot of tedious work. Xcode provides five basic facilities for finding and potentially replacing text and code definitions in your project Single file search Multi-file search Definition search Syntax-aware refactoring Edit All in Scope Taking the last two first the Edit All in Scope feature was described in the Editing Symbol Names section of Chapter 7. Refactoring which can change aka find and replace symbol names intelligently is described in Chapter 10. All of the remaining tools are described in this chapter. Single and multi-file search tools search the text files in your project for text patterns or regular expressions and optionally replace them either individually or en masse. You can also search your project s symbol definitions Code Sense index intelligently to locate the code that defines a symbol. Download at 152 CHAPTER 8 SEARCHING Xcode keeps a history of your searches and their results making it easy to repeat a search or revisit the result of a former one. Finally a lot of shortcuts and tricks exist for performing all kinds of find and replace actions swiftly and effortlessly. SEARCHING AND REPLACING TEXT IN A SINGLE FILE The single file search bar appears at the top of the active editor pane whenever you choose either the Edit Find Find Command F or the Edit Find Find and Replace Control Command F command as shown in Figure 8-1. Find Replace Replace All FIGURE 8-1 The search bar has two modes the find mode appears when you

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.