본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

kotlin-ui-dsl

Kotlin UI DSL v2로 IntelliJ 대화상자, 설정 페이지, 도구 창 양식 화면을 만드는 안내서입니다. 구성 요소 배치와 속성 바인딩, 입력 검증, 조건에 따른 표시와 활성화를 다룹니다.

원문원문 설명 보기

Write IntelliJ dialogs and settings with Kotlin UI DSL v2 panels.

JetBrains/intellij-community스타 20,685(GitHub 20,685 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • IntelliJ 설정 페이지를 만들 때
  • 대화상자 입력을 모델에 연결할 때
  • 검증이나 조건부 UI를 추가할 때

한국어 소개

할 수 있는 일

이 안내서는 Kotlin UI DSL v2로 IntelliJ 대화상자, 설정 페이지, 양식 형태의 도구 창 콘텐츠를 만드는 방법을 설명합니다. panel { }을 중심으로 행과 셀 배치, 그룹 구성, 여러 열 만들기, 너비와 간격 조절을 다룹니다. 텍스트 필드, 체크박스, 선택 목록 같은 구성 요소 팩토리를 사용하고 속성에 연결하여 적용, 초기화, 변경 여부를 처리하는 방법도 안내합니다. 입력 중 또는 적용 시 검증하고, 조건에 따라 구성 요소를 표시하거나 활성화하는 방법도 포함합니다. 예시를 볼 수 있는 UI DSL Showcase와 UI Sandbox를 소개하며, 화면 문구를 메시지 번들에서 가져오는 방법도 설명합니다.

이럴 때 유용합니다

IntelliJ 플러그인에 설정 페이지나 입력 대화상자를 새로 만들 때 활용할 수 있습니다. 구성 요소를 정돈하고, 속성에 연결하며, 입력 오류를 표시하거나 조건에 따라 화면을 제어해야 할 때 유용합니다.

사용 예시

  • “Kotlin UI DSL v2로 이 옵션들의 설정 페이지를 만들어 주세요.”
  • “대화상자 입력을 이 모델에 연결하고 검증을 추가해 주세요.”
  • “선택한 옵션에 따라 필드를 표시하거나 활성화해 주세요.”

주의 사항

이 안내서는 Kotlin UI DSL v2를 대상으로 하며 v1은 제거되었습니다. EDT에서 UI DSL을 구성하고 panel { } 안에서는 서비스 호출이나 I/O를 하지 않도록 안내합니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

문서 점검

AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.

안전성전송·삭제·명령 실행 등을 명시하고 있는가
A양호EDT에서 구성하고 `panel { }` 안의 I/O와 서비스 호출을 피하라고 합니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
A양호Kotlin UI DSL v2를 대상으로 하며 추가 API 키나 서비스는 제시하지 않습니다.

점수에는 넣지 않았습니다. 2026년 10월 28일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

포함된 파일(1)

  • SKILL.md14.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/kotlin-ui-dsl/SKILL.md -->

Kotlin UI DSL

Use Kotlin UI DSL (com.intellij.ui.dsl.builder, "version 2") for new IntelliJ forms: dialogs, settings pages, and form-like tool-window content. panel { } returns a DialogPanel with layout, data binding, and validation wired together.

Version 1 (the com.intellij.ui.layout builder: LayoutBuilder, CellBuilder, PropertyBinding, noteRow, titledRow, ...) was removed in July 2026 — never write against it and do not copy old snippets that import it. ComponentPredicate and ValidationInfoBuilder still live in the com.intellij.ui.layout package, but they are current v2 support code, not leftovers.

For component architecture (state flow, EDT, lifecycle) apply the Swing component architecture skill; for accessibility review apply the UI accessibility skill.

Sources and live examples

  • API: community/platform/platform-api/src/com/intellij/ui/dsl/builder/ — Panel.kt, Row.kt, Cell.kt, plus per-component extensions (textField.kt, button.kt, comboBox.kt, spinner.kt, ...). Implementations: community/platform/platform-impl/src/com/intellij/ui/dsl/builder/impl/.
  • UI DSL Showcase — documentation-grade demos: community/plugins/devkit/intellij.devkit.uiDsl/src/showcase/Demo*.kt (Basics, RowLayout, ComponentLabels, Comments, Components, Gaps, Groups, Availability, Validation, Binding, Examples). Run via Tools | Internal Actions | UI | Kotlin UI DSL | UI DSL Showcase.
  • UI Sandbox — ~80 stress-test panels including edge cases: community/plugins/devkit/intellij.devkit.uiDsl/src/sandbox/. Run via Tools | Internal Actions | UI | UI Sandbox.
  • Online reference: https://plugins.jetbrains.com/docs/intellij/kotlin-ui-dsl-version-2.html

Before inventing a pattern, check whether a Demo*.kt or sandbox panel already demonstrates it.

Core model

A panel is a grid built row by row:

  • Rows go top to bottom; cells in a row go left to right, one per factory call.
  • The last cell of a row occupies the remaining width; trailing empty cells merge into it.
  • A cell holds one component or a sub-panel with its own grid.
val panel: DialogPanel = panel {
  row(MyBundle.message("label.host")) {          // "Host:" — sets labelFor + mnemonics + accessible context
    textField()
      .align(AlignX.FILL)
      .bindText(model::host)
  }
  row(MyBundle.message("label.port")) {
    intTextField(range = 0..65535)
      .bindIntText(model::port)
  }
  row {
    checkBox(MyBundle.message("checkbox.use.auth"))
      .bindSelected(model::useAuth)
  }
}

Rows, labels, and row layout

  • row("Label:") { ... } — labeled row. Always attach labels of modifiable components via row(label) or Cell.label(...), never a bare label(...) cell next to them: these two methods set correct spacing, mnemonics, labelFor, and accessible context. Label text ends with a colon; use row("") for a row that must align with labeled siblings.
  • Cell.label(text, LabelPosition.TOP) puts the label above the component.
  • Row.layout(RowLayout) controls grid participation:
    • INDEPENDENT — row has its own grid (default for rows without a label).
    • LABEL_ALIGNED — label sits in the parent grid, the rest is independent (default for row("Label:")). Note: without a label the first cell (often a checkbox) is treated as the label.
    • PARENT_GRID — every cell participates in the parent grid (use for column-aligned forms).
    • One long label stretching all others? Give that row .layout(RowLayout.INDEPENDENT).
  • Row.resizableRow() — the row takes the free vertical space (several resizable rows share it). Combine with align(Align.FILL) on the cell (text areas, trees, tables).
  • Row.rowComment("...") — gray comment under the whole row; follows the row's visible/enabled state.
  • Row.topGap(TopGap.SMALL|MEDIUM) / bottomGap(...) — vertical gaps; attach them to the related row so hiding it doesn't leave a stray gap. Default vertical gap is none; group adds its own.

Components (Row factories)

Always prefer a factory over cell(JBTextField()) — factories apply platform defaults (widths, gaps, group membership):

  • Toggles: checkBox(text), threeStateCheckBox(text), radioButton(text, value = null)
  • Buttons: button(text) { }, button(text, anAction), actionButton(anAction) / actionsButton(...) (extensions from platform-impl extensions.kt), segmentedButton(items) { text = ... }
  • Text input: textField(), passwordField(), expandableTextField(), extendableTextField(), intTextField(range = null, keyboardStep = null), textArea(), textFieldWithBrowseButton(fileChooserDescriptor, project)
  • Choice: comboBox(items or model, renderer = null), spinner(IntRange, step), spinner(ClosedRange<Double>, step), slider(min, max, minorTick, majorTick)
  • Static: label(text), text(text) (wrapping HTML text, supports links), comment(text), icon(icon), contextHelp(description, title = null) (the (?) icon), link(text) { }, browserLink(text, url), dropDownLink(item, items)
  • Raw cells: cell(component) (custom component), scrollCell(component) (wraps in JBScrollPane), cell() (reserve an empty grid cell), placeholder() (content assigned later), panel { } (sub-panel cell)

Tune components via .applyToComponent { ... }. Text-field width: .columns(COLUMNS_TINY|COLUMNS_SHORT|COLUMNS_MEDIUM|COLUMNS_LARGE) (6/18/25/36).

Structure: groups and multi-column

panel {
  group(MyBundle.message("group.server")) { ... }          // titled block, own grid, vertical gaps around
  groupRowsRange(title) { ... }                            // titled block sharing the parent grid
  collapsibleGroup(title) { ... }                          // collapsible; title is focusable, supports mnemonics
  rowsRange { ... }                                        // invisible range for batch visibleIf/enabledIf, parent grid
  indent { ... }                                           // standard left indent
  separator()                                              // plain line; for a titled line use group/groupRowsRange
  panel { ... }                                            // sub-panel: full width, own grid
  twoColumnsRow({ checkBox(...) }, { checkBox(...) })      // and threeColumnsRow(...)
}
  • buttonsGroup(title = null) { ... } is required around radioButtons (never use raw javax.swing.ButtonGroup) and around checkboxes grouped under a title. Bind a value per radio button:

    buttonsGroup(MyBundle.message("group.color")) {
      for (value in Color.entries) {
        row { radioButton(value.displayName, value) }
      }
    }.bind(model::color)   // radioButton value arguments must match the property type
    
  • Multi-column blocks: put several panel { } cells in one row, aligning each with .align(AlignY.TOP); Row.panel { } builds the nested grid inline.

Sizing, alignment, gaps

  • Cell.align(AlignX.LEFT|CENTER|RIGHT|FILL), AlignY.TOP|CENTER|BOTTOM|FILL, combined: align(AlignX.RIGHT + AlignY.TOP), Align.FILL, Align.CENTER. Default is AlignX.LEFT + AlignY.CENTER.
  • Cell.resizableColumn() — this column takes the extra horizontal space; several share it. Setting it once per column is enough (other rows inherit). AlignX.FILL stretches the component inside the column; resizableColumn() grows the column itself — full-width fields usually need both.
  • Cell.widthGroup("name") — equal widths within the group (e.g. buttons); do not combine with AlignX.FILL.
  • Horizontal gaps: default gap between cells needs no code. .gap(RightGap.SMALL) binds tightly related neighbors: checkbox-as-label before a field, field before its unit label (textField().gap(RightGap.SMALL); label("pixels")). RightGap.COLUMNS separates independent columns.
  • Never wrap DSL content in hand-made JPanels or Borders to fix spacing. Use Cell.customize(UnscaledGaps(...)) / Row.customize(UnscaledGapsY(...)) for exceptional cases, and customizeSpacingConfiguration(...) to change spacing wholesale.

Data binding

Bindings connect a component to a property; the property is written only on DialogPanel.apply(), while reset() and isModified() come for free:

ComponentBinding
checkBox, any AbstractButtonbindSelected(model::flag)
textField & other text componentsbindText(model::text) / bindText(getter, setter)
intTextFieldbindIntText(model::count)
comboBoxbindItem(model::item.toNullableProperty())
spinnerbindIntValue(model::value) / bindValue(model::double)
sliderbindValue(model::value)
textFieldWithBrowseButtonbindText(model::path)
buttonsGroup.bind(model::choice) — radio buttons carry values
segmentedButton.bind(property)
custom cell(c).bind(componentGet, componentSet, prop)
  • Property forms: KMutableProperty0 (model::field), getter/setter lambdas, MutableProperty(getter, setter); converters toMutableProperty(), toNullableProperty(), toNonNullableProperty(default). Binding an ObservableMutableProperty additionally updates immediately and auto-registers a validation requestor.
  • There is no bindItems: pass combo items at construction (comboBox(items, renderer)).
  • Extra apply/reset/modified logic: Panel.onApply/onReset/onIsModified { } and Cell.onApply/onReset/onIsModified { }.
  • Hosts call the lifecycle for you: DialogWrapper applies the panel on OK; BoundConfigurable delegates apply/reset/isModified. Call panel.apply()/reset()/isModified() manually only in custom hosts.

Validation

Two rule styles on Cell:

// Stable API: ValidationInfoBuilder receiver — error(...) / warning(...)
textField()
  .validationOnInput { if (it.text.toIntOrNull() == null) error(MyBundle.message("error.not.a.number")) else null }
  .validationOnApply { if (it.text.isBlank()) error(MyBundle.message("error.specify.value")) else null }

// Newer API (experimental, used across the platform; will eventually be renamed `validation`)
textField().cellValidation {
  addInputRule(MyBundle.message("error.contains.digits"), level = Level.WARNING) { it.text.any(Char::isDigit) }
  addApplyRule(MyBundle.message("error.must.not.be.empty")) { it.text.isNullOrEmpty() }   // condition true = problem
  enabledIf(someCheckBox.selected)
}
  • validationOnInput runs on every change — keep it lightweight and only reject impossible input (bad characters, out-of-range). validationOnApply (and addApplyRule) runs on OK — put emptiness and expensive checks there. Never flag empty required fields on input or focus loss.
  • warning(...) / Level.WARNING doesn't block OK; error(...) disables OK by default (.withOKEnabled() to keep it enabled in complex forms).
  • Wiring:
    • DialogWrapper: return the DialogPanel from createCenterPanel() — validators register automatically on the dialog's disposable, doValidateAll() includes panel.validateAll(), OK applies the panel.
    • BoundConfigurable / DslConfigurableBase: automatic as well.
    • Standalone hosts: call panel.registerValidators(parentDisposable) yourself; run panel.validateAll() before applying.
  • Custom components validate too: cell(custom).validationRequestor { ... } (or the prebuilt WHEN_TEXT_CHANGED etc. from com.intellij.openapi.ui.validation) tells the panel when to re-validate.
  • Cross-field validation has no dedicated DSL API: install ComponentValidator(disposable).withValidator { ... }.installOn(field) per field and revalidate() all of them from each field's onChanged (see sandbox/dsl/validation/CrossValidationPanel.kt).

Dynamic UI

  • visibleIf(predicate) / enabledIf(predicate) exist on Cell, Row, Panel, RowsRange and accept a ComponentPredicate or ObservableProperty<Boolean>. Built-ins: cellOrButton.selected, comboBox.selectedValueIs(v) / selectedValueMatches { }, textComponent.enteredTextSatisfies { }; combine with and / or / not.

    lateinit var enableAll: Cell<JBCheckBox>
    row { enableAll = checkBox(MyBundle.message("checkbox.enable")) }
    indent {
      row { checkBox(MyBundle.message("checkbox.option1")) }
    }.enabledIf(enableAll.selected)
    
  • placeholder() reserves a cell whose component you assign or clear later; a nested panel { } put there keeps its own bindings and validation.

  • Change listeners: Cell.onChanged { component -> } / onChangedContext { component, context -> } (supported for buttons, text components, combo boxes, sliders; JSpinner is not supported and throws UiDslException). Experimental typed helpers take a disposable: whenTextChangedFromUi, whenStateChangedFromUi, whenItemSelectedFromUi.

List and combo renderers

Never hand-write ListCellRenderers for combo boxes and JBList — use the DSL from com.intellij.ui.dsl.listCellRenderer, which handles selection shapes (old/new UI), disabled colors, scaling, accessibility, and speed search:

comboBox(items, textListCellRenderer { it?.displayName })          // simple text

comboBox(items, listCellRenderer {                                  // rich rows
  icon(value.icon)
  text(value.name)
  text(value.detail) { foreground = greyForeground }
  separator { text = "Group" }                                      // section separator
})

Settings pages

  • Extend BoundConfigurable(displayName) or BoundSearchableConfigurable(displayName, helpTopic) and build the UI in createPanel(): DialogPanel; use the inherited disposable for UI that needs one. Apply/reset/isModified/validation are handled by the base class.
  • For a fragment embedded in a composite configurable, implement UiDslUnnamedConfigurable.Simple and override Panel.createContent(); root your content in group { } or panel { } so it doesn't interfere with the parent grid.

Hard rules

  • Every user-visible string comes from a message bundle (MyBundle.message("key")); @NlsContexts annotations on the factory parameters enforce this. Sentence capitalization, no ending period on checkbox/radio labels, labels end with :.
  • No javax.swing.ButtonGroup; use buttonsGroup { }.
  • No manual JPanel/GridBagLayout wrappers inside DSL forms; nest panel { } / use rowsRange / customize(UnscaledGaps) instead.
  • Custom components with their own borders confuse layout — set putClientProperty(DslComponentProperty.VISUAL_PADDINGS, UnscaledGaps.EMPTY) (see also DslComponentProperty.INTERACTIVE_COMPONENT for composite components so labelFor, validation, and onChanged target the right child).
  • DialogPanel construction is EDT work like any Swing; do not run services or I/O inside the panel { } block.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

actions

무료요약 있음

IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.

  • IDE 메뉴에 새 동작 추가
  • 동작 등록이나 아이콘 변경
  • 동작 이름과 설명 정리
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

bazel-test-migration

무료요약 있음

IntelliJ JPS 테스트 모듈을 Bazel로 옮기고 Bazel에서만 발생하는 실패를 조사하는 안내서입니다. 의존성, 플러그인, 테스트 데이터와 runfiles 문제를 확인하고 생성된 대상과 이전된 테스트를 검증합니다.

  • 기존 JPS 테스트 모듈을 Bazel로 이전할 때
  • Bazel에서만 실패하는 테스트를 조사할 때
  • 테스트 의존성과 데이터 설정을 확인할 때
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

code-style

무료요약 있음

IntelliJ 프로젝트 규칙에 맞춰 Kotlin과 Java 코드를 작성하거나 검토합니다. 언어 선택, 서식, 봉인 타입, 스레드 주석, 제어 흐름 예외 처리를 확인합니다.

  • IntelliJ 규칙에 맞는 Kotlin 작성
  • Java 코드 검토
  • 예외 처리와 봉인 타입 분기 확인
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

commits

무료요약 있음

이 가이드는 IntelliJ 프로젝트의 변경 사항을 목적별로 나누고 프로젝트 형식에 맞는 커밋 메시지를 작성하도록 돕습니다. 티켓이 있으면 번호와 변경 설명을, 없으면 레이블과 하위 시스템명을 사용하며 필요에 따라 이유와 판단을 본문에 담습니다.

  • 티켓이 있는 변경의 프로젝트 형식 메시지 작성
  • 테스트나 문서 커밋에 적절한 레이블 적용
  • 기존 커밋 메시지를 규칙에 맞게 수정
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

compare-python-typecheckers

무료요약 있음

여러 Python 타입 검사기로 코드 조각이나 파일의 타입 추론과 오류 판정을 비교합니다. 도구별 결과, 실행 시간, 진단 내용을 Markdown 보고서로 모아 저장할 수 있습니다.

  • 검사기별 타입 추론 비교
  • 코드가 타입 오류로 판정되는지 확인
  • 여러 도구의 진단 결과 비교
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

compose-ui-architecture

무료요약 있음

Compose Desktop 화면을 구성할 때 컴포저블은 렌더링을 맡고 프레젠터나 코디네이터는 앱 결정을 맡도록 구조를 정리합니다. 상태 소유권, Effect, 재사용 컴포넌트 API, 지연 목록 키, 애니메이션과 성능을 개별 UI 변경에 맞춰 살펴봅니다.

  • 화면 렌더링과 프레젠터 판단 분리
  • UI 상태를 둘 위치 정리
  • Effect 키와 코루틴 사용 검토
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

JetBrains의 스킬 모두 보기

이 스킬의 문제 신고