Unable to open single file resource
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)
-
repo owner -
reporter File that I'm unable to edit is
.resource
that is plain javascript file and it's meta file content type is set toapplication/javascript
. -
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. -
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
-
repo owner Do you mind emailing me your entire
idea.log
, or at least starting at theStaticResourceFileTypeDetector
portion? You can send it to support@illuminatedcloud.com. -
reporter Sure, just sent.
-
reporter - changed status to resolved
Problem occurred because
.resource
file type was registered as archive. Removing this registration entry allowed IntelliJ to properly open file for editing. -
reporter - marked as bug
- changed title to Unable to open single file resource
-
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. - Log in to comment
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?