Skip to content

Moving files from pages to partials doesn't update include paths #1765

Open
@Nadreck

Description

@Nadreck

Observed vs. expected behavior

We're using Antora, and have some orphan pages that really should have been partials (they're not linked to, just included in other pages). Using Refactor -> Move File..., moving a page to a pages folder in another module or component works and will update any include:: macros appropriately, but it doesn't update if the file is moved from pages to partials. We've double-checked that we have "Search for references" checked in the move dialog.

My expectation would be that the include coordinates would update to reflect the move. I feel like this was working before, but I may be misremembering, and after recently updating IntelliJ and the Asciidoc plugin, it's definitely not working now.

Scenarios I've tried:

  • Moving from <module-a>/pages/ to <module-b>/pages/
  • Moving from <module-b>/pages/ back to <module-a>/pages/
  • Moving from <module-a>/pages/ to <module-a>/partials/
  • Moving from <module-a>/partials/ to <module-b>/partials/

Steps to reproduce

  1. Using an Antora project, create an asciidoc file called move-me.adoc in modules/ROOT/pages/
  2. Using include::, add this file to another file (such as adding include::move-me.adoc[] to module/ROOT/pages/index.adoc
  3. Using IntelliJ, move move-me.adoc to modules/ROOT/partials/

Environment

Plugin Version: 0.43.6

IntelliJ Details: IntelliJ IDEA 2024.3.1.1 (Community Edition)
Build #IC-243.22562.218, built on December 18, 2024
Runtime version: 21.0.5+8-b631.28 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.2
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 10
Metal Rendering is ON
Registry:
ide.experimental.ui=true
i18n.locale=
llm.show.ai.promotion.window.on.start=false
Non-Bundled Plugins:
com.jetbrains.space (243.21565.122)
Docker (243.22562.236)
com.intellij.grazie.pro (0.3.354)
org.asciidoctor.intellij.asciidoc (0.43.6)
com.github.copilot (1.5.30-242)
com.dmarcotte.handlebars (243.21565.122)
Kotlin: 243.22562.218-IJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions