asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
355 stars 145 forks source link

imagesdir is ignored when using the "create missing file" action #496

Closed ggrossetie closed 4 years ago

ggrossetie commented 4 years ago

The imagesdir attribute is ignored when using the "create missing file" action.

In this example, the image Properties.png is missing from the img directory:

create-missing

If I use the "create missing file" action then the file is created at the root and not in the img directory:

wrong

Arguably, this quick action is not really useful when dealing with png or jpeg images. In my opinion, it can make sense if the format is SVG but otherwise...

AsciiDoc Plugin Version:

0.30.74

IDE Name and Version:

IntelliJ IDEA 2019.3.5 (Ultimate Edition)
Build #IU-193.7288.26, built on May 6, 2020
Runtime version: 11.0.6+8-b520.66 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-101-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: 
Non-Bundled Plugins: BashSupport, Batch Scripts Support, CMD Support, CheckStyle-IDEA, FindBugs-IDEA, JFormDesigner, com.dmarcotte.handlebars, com.intellij.ideolog, com.jetbrains.lang.ejs, com.jetbrains.plugins.jade, com.wix.eslint, org.asciidoctor.intellij.asciidoc, org.intellij.scala, org.jetbrains.idea.grammar, org.jetbrains.kotlin, org.jetbrains.plugins.slim, org.jetbrains.plugins.ruby
ahus1 commented 4 years ago

Thanks for raising this issue. As you pointed out, creating a missing image doesn't make sense here. It was added for adding missing includes.

For the next version I'll disable the "create missing file" for images altogether.

ggrossetie commented 4 years ago

For the next version I'll disable the "create missing file" for images altogether.

Yes it's probably the safest option 👍

ahus1 commented 4 years ago

Pre-release 0.30.75 is available fixes this issue.

The new pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.