The Project view puts Rename beside Refactor and Delete, with a separate group for Reformat Code and Optimize Imports. Jump to Source follows the clipboard actions; Local History, Git and Reload from Disk share a group, and comparison is separated from directory roles and file colors.
The editor tab context menu puts Close All Tabs beside Close Other Tabs, followed by the more specific close commands. Copy Path/Reference gets its own group above the splits, each split sits beside its split-and-move action, and pinning, opening a new window and configuring tabs share a group.
WebKitGTK pastes the primary selection on a middle-button release into the focused editable, wherever the release lands, so closing a tab with a middle click pasted into the active editor (and a middle click on a tree, tool window or the terminal did the same). Middle-button releases outside editable content now cancel that paste; a middle click in the editor or a text field still pastes.
Fixes#5079
The editor context menu keeps Cut, Copy, Paste and Copy / Paste Special together, with clipboard shortcut labels that follow the host platform. With a selection, Find in Files sits with the other search and navigation actions, and Split Right sits next to Open In, above Local History and Git.
When the global settings.toml is missing, OpenIDEA now saves the OS's preferred UI language (NSLocale on macOS, GetUserPreferredUILanguages on Windows, LC_ALL/LC_MESSAGES/LANG elsewhere) as appearance.locale, mapped to one of the shipped UI languages with English as the fallback, and loads that catalog before the workbench renders. An existing settings file keeps its saved language. The mapping lives in ide-workspace next to the settings store, and a test keeps its locale list in step with the frontend's.
Co-authored-by: laot7490 <70145288+laot7490@users.noreply.github.com>
The Expressions chooser uses one compact column for both the refactoring action and the syntax fallback. Multiline candidates show their first source line followed by an ellipsis, while selecting a row still highlights and uses the full expression; the highlight clears when filtering leaves no active row.
With no desktop session (WSLg, a bare compositor) GTK reports its built-in decoration layout, close only, so the frameless title bar had no way to minimize or maximize the window. The desktop's gtk-decoration-layout is now used only when a desktop session is running (XDG_CURRENT_DESKTOP, XDG_SESSION_DESKTOP or DESKTOP_SESSION); otherwise the title bar shows minimize, maximize and close.
Fixes#4421
The Unwrap/Remove chooser uses a compact list of action names. The selected action previews the kept and removed code in the editor; switching rows leaves the caret and scroll position in place, and Escape dismisses the chooser and clears the preview.
Inline refactoring name suggestions align with the identifier being edited. Rows follow the editor font and zoom, with a separate footer for the shortcut; the list fits inside the editor and scrolls to keep the active suggestion visible.
Generate now uses the compact, caret-anchored action chooser. Constructors, accessors, overrides and tests get distinct icons at the standard action-list size, and the chooser keeps its width while typing to filter.
When the caret reaches a closing delimiter whose opener is above the viewport, the opening line of that scope (with the declaration above a brace on its own line) is shown at the top of the editor after a short pause, in the editor's font, line numbers and colours. Caret and scroll stay put; it follows the brace highlighting setting, closes on Escape, and stays hidden when Sticky Lines already shows the opener.
A scroll range of one pixel or less is WebKit rounding after a resize (a splitter drag leaves scrollHeight 319 over clientHeight 318), not content: the overlay scrollbar and the editor scrollbar thumb no longer show for it.
Inline hints use a size one pixel under the editor font, sit on the text baseline with even padding, and stay a single label when lines wrap, so they no longer shift or split around the source text.
Collapsed unchanged lines in the diff viewer are now a full-width button: a chevron, the line count in UI type and a hatched rule in the separator colour, with hover and focus states. Clicking it or pressing Enter expands the range in both panes and returns focus to the editor.
Redo of Move Statement Up / Down left the caret where the move started: CodeMirror's history maps the selection from before the edit through it unless the command records the selection after. Both the structural and the line-based move now record the caret they set, so Undo / Redo put it back.
Optimize Imports in JavaScript / TypeScript now removes unused imports first: typescript-language-server's organize imports only sorts and merges them, and removing the unused ones is its own source.removeUnusedImports action. Optimize-imports-on-save does the same.
typescript-language-server answers code actions with refactorings only when `only` contains a kind that contains `refactor`; asked for `refactor.extract` it returned nothing, so Introduce Variable and Extract Method refused the selection. JavaScript / TypeScript now ask for `refactor`; the actions are still mapped by their own kind, and other servers keep the narrow kind.
TypeScript Introduce Variable, Extract Constant and Extract Method did nothing with vtsls: its refactoring actions carry resolve data and a follow-up command but no edit, and an action was only resolved when it had no command either. The resolved edit then failed on a create of the edited file marked ignoreIfExists, which the conversion dropped.
- Resolve an action without an edit whenever it carries resolve data (interactive path and lsp_apply_code_action).
- Leave out create / rename operations their ignoreIfExists makes no-ops, and deletes their ignoreIfNotExists does.
Hovering a folded region's placeholder shows the folded lines in a tooltip: highlighted as in the editor, with line numbers when the gutter shows them, up to 80 lines, aligned to the pane edge. It closes on Escape, scroll or a fold change. The sticky-lines renderer shares the line rendering.
Wheel or keyboard zoom now shows the current font size at the bottom of the editor pane that changed, with Reset Font Size and a link to Editor > General. It stays while hovered or focused and dismisses after five seconds; LightEdit gets the same reset.
A task's agent only learned its own directory, so in a workspace with attached projects it missed the other projects and left their part of a change undone.
- Sessions pass the workspace's other roots (the project and the trusted attached projects, minus the task's own directory and project) as ACP additionalDirectories to agents that advertise the capability.
- The Codex shim turns them into runtimeWorkspaceRoots on thread start, resume and fork, so workspace-write covers them and the model is told about them; the Claude Code shim passes each as --add-dir.
- New read-only MCP tool get_workspace_roots lists the roots, and the server instructions point to it for workspace questions and changes that span projects.
Fixes#5058
Insert documentation comment stub filled tags in for PHP only.
- **JavaScript / TypeScript**: `/**` + Enter above a function declaration, method, constructor or arrow function assigned to a `const` now lists `@param name` for each parameter (parameter properties, rest and defaulted parameters included) and `@returns` when a non-void result type is declared. Calls and statements get no tags.
- **Python**: Enter between the quotes of a `"""` (or `'''`) opened on the first line under a `def` expands it into a docstring, as PyCharm does with its default reStructuredText format: the summary line, `:param name:` per parameter (`self` / `cls` skipped, `*args` / `**kw` by name) and `:return:` (not for `__init__` or `-> None`), then the closing quotes.
Both follow the existing Smart Keys › Insert documentation comment stub option.
Complete Current Statement (⌘⇧↵) in TypeScript and Python (both use the text rules in `completeStatementSpec`):
- `const f = (x: number) =>` became `=>;`. An arrow function now gets a block body, followed by the brackets still open and a `;` where the statement needs one: `=> {` / `|` / `};`, `items.map((x) => {` / `|` / `});`.
- `const obj = { name: "Ada"` became `{ name: "Ada";`. Brackets the line opened and left open are now closed before the `;` (`{ name: "Ada" };`, `foo(a, bar(2));`); a line ending in `,` or `{` is left to continue.
- Python `async def …`, `with …`, `except …`, `case …`, `match …`, `async for …` got no `:`. Every compound statement header now gets one; `match = 5` and `case.x` stay statements.
`closeBrackets()` steps over a closer only when it inserted that closer itself during the session. So with `value = (1 + 2|)` in a reopened file (or code pasted / written earlier), typing `)` gave `(1 + 2)|)`; same for `]` and `}`. IDEA types over a closing bracket that already closes a pair.
`skipClosingBracket` (an input handler next to `skipClosingQuote`, under the Insert pair bracket option) steps over the bracket at the caret when the syntax tree matches it to an opener and the line has no more openers than closers of that kind outside strings; otherwise the bracket is inserted (`f(g(x|)` still gets its missing `)`). Multi-line pairs (`foo(` … `)` on a later line) are stepped over too.
Tool window titles and tabs give up width before the header actions, so Options and Hide stay at the right edge of a narrow pane. A shortened title keeps its full text on hover. When the contributed controls need more room, their strip scrolls independently while Options and Hide stay in place.
Two Python indentation gaps against PyCharm:
- Enter after `return 1`, `pass`, `raise …`, `break` or `continue` kept the block's indentation. The dedent rule existed only in `fallbackIndent`, which steps aside when a language mode is loaded (Python has `@codemirror/lang-python`). An indent service for Python now applies it: one level out, unless a bracket is still open (`return foo(`) or text follows the caret.
- Typing a bare `except:` inside a `try` body left it indented: the stock `indentOnInput` pattern and `Body` rule only know `except ` with a space. `except:` now triggers reindentation and aligns with its `try:` (or a previous `except`).
Both are added through `EXTRA_SUPPORT` for the Python mode (`src/editor/core/cm/languages.ts`).
`prefsExtension` gives `closeBrackets()` its own pairing list (to honour the Insert pair bracket / quote options), and that list replaced the language's: only `( [ { ' "`. So:
- TypeScript / JavaScript: typing `\`` left the template literal open;
- Python: `f"`, `r'`, `b"`… left the string open (the language's `stringPrefixes` were dropped), and `"""` did not close.
The list now adds the backtick for JavaScript, TypeScript, Vue, Svelte, Astro and Go, and Python's `'''` / `"""` with its string prefixes; the two options still switch brackets and quotes off.
Editor notification bars group their action links and let the message wrap at the width of the editor pane. Links stay on the same row when there is room and wrap below the message in narrower splits. The banner uses the UI text size and has smaller vertical insets in Compact Mode.
Docker logs reached the webview one IPC message per line; WebView2 delivers each message on its own, so a 1000-line tail took 10-40 s on Windows. ide_docker::logs now collects lines for 30 ms and sends them together from a second thread, so a quiet log still flushes, and docker_logs streams Vec<DockerLogLine>. The log pane (container and plugin service logs) renders ANSI colours instead of stripping them, takes the Console log level colours like the Run console, and has Scroll to End.
Fixes#5049
Delete Line (⌘⌫), Undo, Redo: the line was deleted again, but the caret ended at the end of the line above instead of where the deletion had put it (the next line, same column). CodeMirror's history restores, on Redo, the first selection recorded after the change, and otherwise maps the pre-change caret through it; Delete Line set its caret in the same transaction, so nothing was recorded and the old caret (inside the deleted line) mapped to the previous line end. `deleteLine` now dispatches its resulting selection once more, which the history records as the selection after the edit.
Copy Path/Reference opens at 500 px when space permits. Each row places the action and shortcut before the right-aligned path preview. Long paths keep the filename in view, and dragging the popup edge gives them more room.
Enter inside a Java string (`String t = "hello|world";`) inserted a raw line break into the literal, leaving code that does not compile. A new Enter handler (`enterInStringLiteral`) splits a one-line string literal into two joined with `+`, the second on a continuation-indented line with the caret after its opening quote:
```java
String t = "hello" +
"|world";
```
It applies in Java, C#, Kotlin, Groovy, JavaScript and TypeScript (the literal's own quote in JS/TS), with IDEA's default continuation indent (two levels for the JVM languages and C#, one for JS/TS). Text blocks, template literals, a caret inside an escape (`\\|n`), char literals, multi-line literals and other languages keep the plain newline.
After Introduce Variable (⌥⌘V) and Enter on a suggested name, one Undo only put the server's placeholder name back (`value` → `extracted`); the reformatting and the extraction each needed another Undo. The refactoring is made of several transactions (the server's workspace edit, `reformatGenerated`, the in-place rename) and each was its own history event.
A small history group (`src/editor/lsp/historyGroup.ts`) keeps the transactions in between out of the undo history and, when it closes, records the net change once. `applyIntroduceAction` opens it before applying the server action and closes it when the in-place rename ends (new `onEnd` on the session), or right away if no rename starts. One Undo now restores the original expression, and Redo brings the whole refactoring back.
Escape during the rename keeps the introduced variable with its current name, as the hint says and as IDEA does; that part of the report is not changed.
Closing the focused editor tab with ⌘W (or its close button) showed the next tab, but `document.activeElement` became `<body>`: arrow keys and typing did nothing until the editor was clicked. `closeTab` removed the tab without giving the focus to the editor that took its place. It now does so when the closed editor had the focus (a tab closed while focus is elsewhere leaves focus alone).
Complete Current Statement (⌘⇧↵) in Java added a `;` where a block was meant, because tree-sitter's error recovery reports a missing `;` after an unfinished head and the structural pass inserted it:
- `if (true)` → `if (true);` (the next statement then runs unconditionally)
- `public class App` / `public void run()` → `…;`
- `String m = "hello` → `"hello;` (the `;` inside the open string)
- `for` → `for { }` (the text rules only knew keyword-led heads)
Now a finished block head (balanced brackets, not followed by an Allman `{` line) and an open string skip the parser's `;` and go to the text rules, which:
- recognise type declarations behind modifiers/annotations and Java / C# method and constructor headers (`abstract` / `native` methods keep the `;`; `return` / `throw` / `new` lines and plain calls are statements);
- give a bare `if` / `for` / `while` / `switch` / `catch` its parentheses with the caret inside (`for (|) {` / `}`) in languages with parenthesised conditions;
- close an open string or char literal before the `;` (Rust's `'a` is a lifetime, not a quote).
The status bar uses one 30 px row in the standard density and a 24 px row in Compact Mode. Adjacent widgets use their existing insets for spacing, which gives the editor and its status controls a little more room.
Three CSS rules in the agents feature can never apply, so they only add to the files:
- `ReferenceChip.module.css` `.selected`: no `styles.selected` (or `chipStyles.selected`) anywhere in `src/`.
- `SkillsPage.module.css` `.link` and `.link:hover`: `SkillsPage.tsx` never reads `styles.link`.
- `Session.module.css`: the first `.questionChoices` block (`display`, `flex-direction`, `gap`) is overridden property-for-property by the second `.questionChoices` block later in the file (same selector, same specificity, no media query), so the computed style is unchanged.
22 lines removed, no behaviour change.
Co-authored-by: Mr0Bread <55754540+Mr0Bread@users.noreply.github.com>
Project names now have a line of their own in the title bar project switcher, so a long Git branch can no longer crowd out the name. The path and branch use the smaller metadata type size. Remote projects show their host and folder on separate lines, with keyboard search highlighting each match in its corresponding line.
Complete Current Statement (⌘⇧↵) on `String a = "123"` added the `;` but put the caret on a new line one continuation indent deeper (12 spaces instead of 8). `completeStatementSpec` asked for the new line's indentation before inserting the `;`, when the parser still saw an unfinished statement. The indentation is now computed on the line with the `;` in place.
The test results toolbar groups its filters together and moves Previous and Next Failed Test into More Actions, where the shortcuts are shown next to their labels. Test Runner Options can hide row durations to give long test names more room. The choice is remembered across sessions and the test summary and selected output remain visible.
During Introduce Variable, the name suggestions listed under the new variable reacted only to a single press: a double click put the name in but left the refactoring open, so it looked like double click did nothing. A double click now puts the name in and finishes, as Enter does (a single click still only puts it in). The list and its hint used the hand cursor; they now show the arrow, as other editor popups do.
With the Run notification group set to not show balloons (Settings › Notifications, or Don't Show Again on a Run notification), clicking Profile '…' / Allocations / Live Objects or Run with Coverage looked like it did nothing: the reason the run could not start (async-profiler or the coverage tool is not installed, the configuration is not supported, preparing it failed) went only to the Notifications list. These notifications answer a command the user just ran, so they are now `userInitiated` and always show as a balloon, like a manual update check.
New Project accepted the name of a folder that already exists and has files, and only reported "already exists and is not empty" in the progress view after Create. It now checks as the name or location changes: the name field and its hint turn red and Create is disabled. Until the user types a name, it follows the first free `untitled`, `untitled1`, … in the location.
The location always started at the home folder (unless Default Project Directory was set). It now starts where the last project was created; the Default Project Directory setting still comes first.
The check is the one `scaffold_create` already did, moved into `ide_scaffold::target_taken` and exposed with `free_name` as `scaffold_target_taken` / `scaffold_free_name`.
Markdown can display the editor above its live preview so both use the full width of a narrow editor group. Choose Side by side or Stacked under Preview layout in Markdown settings. Each layout remembers its own divider position, and existing side-by-side sizes are restored when switching back.
Remote Development was hidden in the welcome page's More Actions menu, with the same folder icon as Open; New File used the same plus as New Project. Remote Development is now a header button next to Clone Repository with a new server icon, and New File has a new page-with-plus icon (both icons apply wherever these actions appear). Header buttons no longer cap their width, which cut "Remote Development" to "Remote Develo…"; they collapse to icons below 740px.
The Remote Development dialog's rows ended at different edges because Configure… is wider than Browse. The form is now a two-column grid: fields share the first column and side buttons the second, and its horizontal padding matches the dialog footer, so fields, side buttons and Cancel / Open line up.
A long file name in a single-row editor split could push the selected tab's close button outside the visible strip. Single-row tabs now constrain the label to the available width and keep the close button beside the shortened name. The hidden tabs picker still opens tabs outside the visible strip.
Right-clicking the annotation gutter showed Show Commit in Git Log first and Close Annotations last, below Options. The menu now starts with Close Annotations, then Show Diff and Copy Revision Number; after a separator come the revision actions (Annotate at Revision…, Annotate Previous Revision, Show Commit in Git Log, Ignore This Commit), and Options is last. On an uncommitted line the menu is Close Annotations, Options.