IDE doesn't associate file with correct type.

i have created a new file with no extension then i changed the file extension to php but the IDE doesn't associate the file type. I have tried to remove manually the extension and then use the file > associate to a file type option on the IDE and it works but when i try to add the extension to the file it removes that association and i see the file as plain text.
Also I have tried to invalidate the cache and restart and doesn't work either. 

It happens only when i try to use that specific name. If a change the name to something else the IDE automatically associates the file type.

1 comment
Comment actions Permalink

Hi there,

1. Settings/Preferences | Editor | File Types

2. Locate Text file entry in the top list

3. Locate and remove unwanted pattern in the bottom list (will be your problematic file name or very similar)


P.S. Pay a bit more attention to what is happening on the screen when typing fast/creating new files: when you creating a new file with no extension, IDE asks you how to treat such file and Text file type is preselected by default, hitting Cancel in that dialog will allow you to go back and fix the file name (add extension) or use more correct New File template (e.g. PHP Class if you are creating .php files etc).


Please sign in to leave a comment.