IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
- IDE 메뉴에 새 동작 추가
- 동작 등록이나 아이콘 변경
- 동작 이름과 설명 정리
IntelliJ Symbol API로 언어, 프레임워크, 데이터베이스의 의미 요소와 선언 및 참조를 모델링하고 탐색, 사용 위치 검색, 이름 변경, 문서 표시를 연결하는 방법을 안내합니다. PolySymbols를 먼저 고려할 상황도 설명합니다.
Use IntelliJ Symbol API for declarations, references, and rename.
실행 점수 미검증
설치 방법 보기이 스킬은 IntelliJ Symbol API를 사용해 언어, 프레임워크, 데이터베이스의 의미 요소를 Symbol로 표현하는 방법을 안내합니다. 선언을 제공하고 참조를 해석하며, 심볼을 탐색, 사용 위치 검색, 이름 변경, 문서 표시와 연결하는 내용을 다룹니다. 참조는 언어 자체에 속하는 참조, 다른 플러그인이 제공하는 외부 참조, 대상 쪽에서의 탐색만 지원하는 암시적 참조로 나누어 설명합니다. 의미상 동일성을 유지하는 동등성 구현과 심볼이 읽기 작업 사이를 이동할 때 포인터를 사용하는 방법도 다룹니다.
IntelliJ 플러그인에서 언어나 프레임워크의 선언과 참조를 구현할 때 유용합니다. PSI 요소에 직접 연결되지 않는 심볼도 다루며, 문자열 안의 자리표시자를 호출 인자로 해석하는 예가 포함됩니다. 일반적인 언어나 프레임워크 지원에는 구현 작업의 상당 부분을 처리하는 PolySymbols를 먼저 검토하도록 안내합니다. 하나의 독립적인 해석처럼 해당 모델에 맞지 않는 경우에는 원시 Symbol API를 고려합니다.
IntelliJ 플랫폼 Symbol API와 플러그인 개발을 전제로 합니다. 일반적인 언어나 프레임워크 지원을 구현할 때는 관련 poly-symbols 스킬을 먼저 살펴보도록 권장합니다.
이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.
AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.
점수에는 넣지 않았습니다. 2026년 10월 28일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
com.intellij.model.Symbol (community/platform/core-api/src/com/intellij/model/Symbol.java) is
the platform's generic replacement for "resolve a PsiReference to a PsiElement". A Symbol
represents a semantic element in some model — a language, a framework, a database schema — and
decouples navigation/find-usages/rename/documentation from PSI. A Symbol is not required to be
backed by a PsiElement, and it is incorrect to try to obtain one from a Symbol.
Canonical examples from the docs: a Java local variable (backed by PsiVariable), a compiled class
from JDK stubs (not tied to any project), a Spring bean (created dynamically by framework support,
project-bound but not PSI-backed), a database column (defined by a data source, not PSI-backed and
not project-bound).
Before hand-wiring any of the mechanisms on this page, look at
poly-symbols first. PolySymbol : Symbol, and the PolySymbols
framework exists specifically to save you from writing this boilerplate by hand — its query
executor, completion-provider base class, and default searchTarget/renameTarget/
getDocumentationTarget/getNavigationTargets implementations give you declarations, references,
completion, search, rename, and navigation with a fraction of the code this page documents.
Treat PolySymbols as the default, go-to way to implement a new language or framework's symbol
support — it is not limited to cross-language microsyntax sharing, that's simply the feature that
falls out for free once the query/pattern machinery exists. Reach for the raw Symbol/
PsiSymbolReference API on this page directly only when a symbol genuinely doesn't fit PolySymbols'
model: a single, self-contained resolve with no query/completion surface of its own (a
format-string placeholder resolved from one call expression, a markdown link label), or something
not project-bound / not PSI-backed at all (a compiled-class symbol from JDK stubs, a database
column) where the extra query/scope layer would add nothing.
public interface Symbol {
@NotNull Pointer<? extends Symbol> createPointer();
@Override boolean equals(Object obj);
@Override int hashCode();
}
equals/hashCode must reflect semantic identity, not object identity — the platform uses
Symbol as a cache key and de-duplicates concurrently-computed instances that are equal.Symbol is safe to pass between APIs within one read
action, but must not be referenced across read actions. Call createPointer() while still valid,
store the Pointer, and call Pointer.dereference() in the next read action to get a fresh (or
the same, if still valid) instance.PolySymbol, which extends Symbol.Model where a symbol is declared in a PSI tree via PsiSymbolDeclaration
(community/platform/core-api/src/com/intellij/model/psi/PsiSymbolDeclaration.java):
getDeclaringElement(), getRangeInDeclaringElement(), getSymbol(). A symbol can have zero
declarations (files — "only references"), one (a Java local variable), or several (a C# partial
class, a property key declared in multiple files).
Two ways to supply declarations:
PsiSymbolDeclarationProvider (getDeclarations(element, offsetInElement)) at EP
com.intellij.psi.declarationProvider. The platform calls it for each PsiElement from the leaf
at the caret up to the containing file, with offsetInElement as a hint (-1 means "all
declarations").PsiSymbolDeclaration directly on the PsiElement.References are modeled by PsiSymbolReference
(community/platform/core-api/src/com/intellij/model/psi/PsiSymbolReference.java):
getElement(), getRangeInElement(), resolveReference(): Collection<? extends Symbol> (empty
collection = unresolved), and resolvesTo(target) (override to short-circuit before a full
resolve, e.g. by comparing text first). For the common single-target case, extend
SingleTargetReference.
| Kind | When | Mechanism |
|---|---|---|
| Own | Reference is intrinsic to the language itself (e.g. x in x * 2 referencing var x = 42) | PsiElement.getOwnReferences() |
| External | Reference is not recognized by the host language, contributed by another plugin (e.g. a filename string in new File("users.txt")) | Host implements PsiExternalReferenceHost; other plugins register a PsiSymbolReferenceProvider |
| Implicit | Reference only supports resolving to a target (navigation, hover doc) — not find-usages/rename starting from the target (e.g. var in var x = new Person()) | ImplicitReferenceProvider |
Language support should not assume external references are absent — they may be contributed by any
plugin. Own vs. external is a modeling choice about who "owns" the reference semantics, not a
technical distinction in PsiSymbolReference itself.
PsiSymbolReferenceProviderInterface (community/platform/core-api/src/com/intellij/model/psi/PsiSymbolReferenceProvider.java):
public interface PsiSymbolReferenceProvider {
Collection<? extends PsiSymbolReference> getReferences(PsiExternalReferenceHost element, PsiSymbolReferenceHints hints);
Collection<? extends SearchRequest> getSearchRequests(Project project, Symbol target);
}
Register via PsiSymbolReferenceProviderBean at EP com.intellij.psi.symbolReferenceProvider,
declaring hostLanguage, hostElementClass, targetClass (common supertype of resolved symbols),
referenceClass (defaults to PsiSymbolReference; narrow it so the platform can skip providers
that can't possibly answer a query for a more specific reference type), and implementationClass.
Worked examples in this repo:
community/java/java-impl/src/com/siyeh/ig/format/StringFormatSymbolReferenceProvider.java —
resolves %s/{0}-style placeholders inside String.format/printf/MessageFormat call
arguments back to the corresponding call argument, complete with its own Symbol
(FormatArgumentSymbol-style), NavigatableSymbol, and a SearchTarget/rename-capable design —
read this file end to end as the reference implementation for "symbol lives inside a string
literal, references live inside sibling call arguments."community/jvm/jvm-analysis-impl/src/com/intellij/analysis/logging/resolve/LoggingArgumentSymbolReferenceProvider.kt —
the same idea for JVM logging framework {}/{0} placeholders across Java/Kotlin.[text][label] resolves to the [label]: url definition.ImplicitReferenceProvider(community/platform/core-api/src/com/intellij/model/psi/ImplicitReferenceProvider.java, EP
com.intellij.psi.implicitReferenceProvider):
public interface ImplicitReferenceProvider {
default PsiSymbolReference getImplicitReference(PsiElement element, int offsetInElement) { ... }
default Collection<? extends Symbol> resolveAsReference(PsiElement element) { return emptyList(); }
}
Usually you only override resolveAsReference — the default getImplicitReference wraps a
non-empty result in an ImmediatePsiSymbolReference. This enables navigation and hover-link
highlighting on the target Symbol, but the platform will never find this "reference" via
find-usages or rename-from-target, because it was never indexed as a searchable reference. Called
for every element from the caret leaf up to the file — keep it cheap.
PolySymbols' PsiPolySymbolReferenceProvider is built on top of exactly this external-reference
mechanism, but replaces the manual getReferences/getSearchRequests plumbing with a single
getReferencedSymbol(element): PolySymbol? you implement once — resolution, search, and rename all
follow from the returned symbol. Prefer it over hand-writing PsiSymbolReferenceProvider unless you
have a concrete reason not to — see the "References" section of
poly-symbols/references/query-model.md.
A bare Symbol only gives you resolve. To light up the rest of the IDE, implement (or delegate to)
these on your Symbol/PolySymbol:
| Feature | Interface | Notes |
|---|---|---|
| Navigation | NavigatableSymbol (community/platform/core-api/src/com/intellij/navigation/NavigatableSymbol.java) | getNavigationTargets(project); SymbolNavigationService helps build NavigationTargets |
| Find usages | SearchTarget/SearchTargetSymbol (community/platform/lang-impl/src/com/intellij/find/usages/api/SearchTarget.kt) | presentation(), usageHandler, maximalSearchScope, textSearchRequests; register a factory at com.intellij.lang.symbolSearchTarget if you don't want the Symbol itself to implement it |
| Rename | RenameableSymbol/RenameTarget (community/platform/lang-impl/src/com/intellij/refactoring/rename/symbol/RenameableSymbol.kt) | or register a SymbolRenameTargetFactory at com.intellij.rename.symbolRenameTargetFactory |
| Documentation | DocumentationTarget | via PsiSymbolReferenceService/language-specific hookup |
PolySymbol (see poly-symbols) already wires all four of these through
searchTarget/renameTarget/getDocumentationTarget/getNavigationTargets properties with
sensible defaults. This is the general pattern across this whole page: almost everything above is
what PolySymbol implements for you. Implement PolySymbol and get all four; implementing raw
Symbol means writing every row of the table above by hand for every symbol kind you add.
Symbol and is the intended default implementation path, not a
specialized add-on — reach for the mechanisms on this page directly only when a symbol falls
outside its model (see the decision note above).아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.
IntelliJ JPS 테스트 모듈을 Bazel로 옮기고 Bazel에서만 발생하는 실패를 조사하는 안내서입니다. 의존성, 플러그인, 테스트 데이터와 runfiles 문제를 확인하고 생성된 대상과 이전된 테스트를 검증합니다.
IntelliJ 프로젝트 규칙에 맞춰 Kotlin과 Java 코드를 작성하거나 검토합니다. 언어 선택, 서식, 봉인 타입, 스레드 주석, 제어 흐름 예외 처리를 확인합니다.
이 가이드는 IntelliJ 프로젝트의 변경 사항을 목적별로 나누고 프로젝트 형식에 맞는 커밋 메시지를 작성하도록 돕습니다. 티켓이 있으면 번호와 변경 설명을, 없으면 레이블과 하위 시스템명을 사용하며 필요에 따라 이유와 판단을 본문에 담습니다.
여러 Python 타입 검사기로 코드 조각이나 파일의 타입 추론과 오류 판정을 비교합니다. 도구별 결과, 실행 시간, 진단 내용을 Markdown 보고서로 모아 저장할 수 있습니다.
Compose Desktop 화면을 구성할 때 컴포저블은 렌더링을 맡고 프레젠터나 코디네이터는 앱 결정을 맡도록 구조를 정리합니다. 상태 소유권, Effect, 재사용 컴포넌트 API, 지연 목록 키, 애니메이션과 성능을 개별 UI 변경에 맞춰 살펴봅니다.