Unable to open single file resource

Issue #658 resolved
Jacek Nakonieczny created an issue

Having support for zip bundles is great.However there are cases when static resource is just a simple file (.js or .css) and editing it directly in IC is impossible.

Comments (9)

  1. Scott Wells repo owner

    Jacek, IC has featured support for single file static resources since the first release. It uses the content type from the companion meta.xml file to decide which of IntelliJ IDEA's editors to use. What types of files are you trying to edit and what content type are you setting in the meta.xml file that's not allowing it to work?

  2. Jacek Nakonieczny reporter

    File that I'm unable to edit is .resource that is plain javascript file and it's meta file content type is set to application/javascript.

  3. Scott Wells repo owner

    Jacek, will you do File>Invalidate Caches / Restart to force it to reassociate the file type and see if that helps? Before doing that, please add the following under Help>Debug Log Settings so we can see how it's associating it:

    #com.illuminatedcloud.intellij.filetype.StaticResourceFileTypeDetector
    

    If it doesn't work, please send me your idea.log so I can see what's going on.

  4. Jacek Nakonieczny reporter

    File is associated as JavaScript which is correct but double-clicking on it does nothing.

    2017-07-19 15:19:05,189 [ 130425] DEBUG - StaticResourceFileTypeDetector - The file type for C:/Users/nakoniej/workspace/hco-git/src/staticresources/HCO_JSON.resource is JavaScript

    Some stray info log appeared, might be connected

    2017-07-19 15:23:04,022 [ 369258] INFO - #com.intellij.AbstractBundle - Cannot load resource bundle from *.properties file, falling back to slow class loading: messages.PropertiesBundle

  5. Scott Wells repo owner

    Do you mind emailing me your entire idea.log, or at least starting at the StaticResourceFileTypeDetector portion? You can send it to support@illuminatedcloud.com.

  6. Jacek Nakonieczny reporter

    Problem occurred because .resource file type was registered as archive. Removing this registration entry allowed IntelliJ to properly open file for editing.

    2017-07-21_09-24-23.png

  7. Jacek Nakonieczny reporter

    One note tho. When .resource file is of unknown type, as it was Archive before, git version control plugin doesn't know how to handle it for diff operation.

  8. Log in to comment