
# 搜索与定位代码
CodeArts IDE的智能搜索功能让您能够即时搜索并导航到项目中的任意位置，同时轻松查找和执行任何CodeArts IDE命令。
#### 搜索代码
1. 通过按下 "Shift+Shift" / "Ctrl+Shift+A" 来启动**智能搜索** 窗口。
   
   图1启动智能搜索窗口   
   ![](https://support.huaweicloud.com/usermanual-codeartside/zh-cn_image_0000002368469009.png)
   
   
2. 输入搜索请求。要缩小搜索范围，例如仅搜索类成员或CodeArts IDE命令，可以在**智能搜索** 窗口中通过按下"Tab"/"Shift+Tab"来切换标签页，或者使用[搜索查询语法和运算符](https://support.huaweicloud.com/usermanual-codeartside/codeartside_01_0343.html)。
   
   图2输入搜索请求   
   ![](https://support.huaweicloud.com/usermanual-codeartside/zh-cn_image_0000002394394609.png "点击放大")
   
   
3. 使用光标在条目之间导航，并按下"Enter"键跳转到相应的位置或执行命令。另外，也可以双击所需的条目。要关闭**智能搜索**窗口，请按下"Escape"键。
 
#### 定位任意实体
搜索查询"init"将匹配名称中包含"init"的所有实体。
图3搜索包含"init"的所有实体   
![](https://support.huaweicloud.com/usermanual-codeartside/zh-cn_image_0000002360758478.png "点击放大")
#### 定位类
搜索查询"class:init"将匹配名称中包含"init"的所有类。使用替代语法，此查询也可以写为"type:init"、"init:class" 或"init:c"。
图4搜索包含"init"的所有类   
![](https://support.huaweicloud.com/usermanual-codeartside/zh-cn_image_0000002394395665.png "点击放大")
#### 查询某个类的成员
搜索查询"class:init AND member:test"将匹配类名称包含"init"的类中，类成员名称中包含"test"的所有类成员。
图5搜索包含"test"的所有类成员   
![](https://support.huaweicloud.com/usermanual-codeartside/zh-cn_image_0000002394276517.png "点击放大")
搜索查询"class:init AND (member:test OR member:assert)"将匹配名称包含"init"的类中，类成员名称中包含"test"或"assert"的所有类成员。
图6搜索类成员名称中包含"test"或"assert"的所有类成员   
![](https://support.huaweicloud.com/usermanual-codeartside/zh-cn_image_0000002394277161.png "点击放大")
