IntelliJ 전체 프로젝트 검색

Category
스터디노트 Spring
Status
Published
Tags
IntelliJ
Description
Published
Slug
VS Code의 Ctrl + Shift + F와 동일한 기능이 IntelliJ에도 있음

방법 1: Find in Path (가장 많이 사용)

단축키

Ctrl + Shift + F

검색 창

Find in Path ┌─────────────────────────────────────────┐ │ Text to find: userService │ ← 검색할 텍스트 │ │ │ File mask: *.java │ ← 파일 확장자 필터 │ │ │ Scope: Project Files ▼ │ ← 검색 범위 │ │ │ ☑️ Match case │ ← 대소문자 구분 │ ☑️ Regex │ ← 정규식 사용 │ ☑️ Words │ ← 단어 단위 검색 │ │ │ [Find All] │ └─────────────────────────────────────────┘

방법 2: Search Everywhere

단축키

Shift + Shift (더블 시프트)

모든 것 검색

Search Everywhere ┌─────────────────────────────────────────┐ │ userService │ ← 검색어 입력 │ │ │ All Classes Files Symbols Actions │ │ │ │ 📁 UserService.java │ ← 파일명 │ 🔧 UserService (class) │ ← 클래스명 │ 📄 "userService" in UserController.java │ ← 텍스트 매칭 │ ⚙️ userService field in... │ ← 필드/변수 └─────────────────────────────────────────┘

방법 3: Find Usages (특정 요소의 사용처)

클래스/메소드 사용처 찾기

public class UserService { // ← 여기서 Alt + F7 public User findById(Long id) { return userRepository.findById(id); } }

단축키

Alt + F7

사용처 결과

Find Usages: UserService ┌─────────────────────────────────────────┐ │ Usage (15 found) │ │ │ │ Declaration │ │ UserService.java:5 class UserService │ │ │ │ Usages in Project Files (14) │ │ UserController.java:12 private UserService│ │ UserController.java:18 @Autowired │ │ UserServiceTest.java:15 @Mock │ │ ApplicationConfig.java:25 @Bean │ └─────────────────────────────────────────┘