Several Javascript files marked with X and yellow background

Answered

I have a project and today, I suddenly noticed that two Javascript files are suddenly marked with yellow backgrounds and an X in the top left corner. When refactoring, IntelliJ says those files are not part of the project, and the files have no syntax highlighting. I checked, and the files are definitely in Git, they're not being mistreated in the file types category, and there is no other evident exception I can find. Here's what it looks like:

The affected files are abstractUtxoCoin.js and baseCoin.js. Quite curiously, when marking any other file as plain text, the context menu shows the option to mark it as Javascript afterwards. With these files, however, there is only the option to mark them as plain text, which remains even after clicking it, which I did as part of some experimentation. Additionally, here's the dialog that appears when trying to rename either file:

What's going on, and how do I fix it? Thanks!

8 comments

This icon indicates non-project files - those that are excluded from indexing. Please check Excluded files list in the Project structure - do you have these files listed there? Also, does the issue persist after caches invalidation?

0

The file is definitely not being excluded using the project structure, and the issue does persist after cache invalidation and restart.

0

were these files created by hand, or generated?

0

I created them by hand many commits ago. This change in behavior was sudden.

0

does the issue persist if you copy these files in a new project?

0

can you share a project that can be used to recreate the issue?

0

I'm afraid I cannot. However, I removed ./.idea/workspace.xml, reopened the project, and that appears to have fixed it.

0

Please sign in to leave a comment.