File types will not delete

已回答

I had a problem with ANT in IntelliJ IDEA 2025.1.3 (Community Edition)
Build #IC-251.26927.53, built on June 23, 2025
Source revision: a5abecbe752fe
Runtime version: 21.0.7+9-b895.130 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
 

Initially when I opened an ANT build.xml errors started to appear in the editor, eg <property> not allowed immediately after a <project> which is obviously wrong

I tried to add a new FileType called ANT Build Type with a pattern of *.xml

I solved the first issue by invalidating the cache and restarting.

Now I can not add a build file to the ANT Window.  I just get a message saying ‘Cannot add file’.  I solved this by deleting my new FileType. Once deleted via settings I can add the build file.  However, if I restart IDEA the file type reappears.

I have looked at posts about this and they tell me to edit the filetypes.xml file.  This does not seem to exist.  Being on windows the config data is help in ~/AppData/Local/JetBrains/IdealC2025.1 but there is no filetypes.xml.

Any suggestions
 

0

Thanks for the reply.  I have done that and it still reappears.

0

I got around it by upgrading to 2025.2 and resetting IDEA to its default settings, which obviously means resetting the environment.

0

Mrbray26, thank you for reaching out. Glad upgrading to 2025.2 and resetting settings resolved it.

The issue was likely caused by a conflict from the custom file type (*.xml), which overrode the built-in ANT support. That's why the ANT window couldn't recognize the build file. Deleting the custom type helped temporarily, but the config was likely cached or stored in a user settings file (e.g. filetypes.xml or under options/). Resetting cleared that and restored proper behavior. 

Let us know if it reappears!

0

One other possible reason is I have syncing of my configuration as I occasionally use another computer, it could be reinstating the file type

0

I am also having this issue, where custom file types will keep reappearing on editor restart.
I have settings sync disabled (was never enabled), and this is with a fresh install of CLion 2025.2.4.

Deleting the following paths has no effect:
'~/Library/Application Support/JetBrains/CLion2025.2/options/filetypes.xml'
'~/Library/Application Support/JetBrains/CLion2025.2/filetypes/*.xml'

Only resetting the IDE to default settings works, but is not ideal.

0

Hi Terids , could you please share reproducible steps of the issue “custom file types will keep reappearing on editor restart”, thanks!

0
  • Go to Settings > Editor > File Types.
  • Click the + to add a new file type and fill in the relevant info.
  • Add a file name pattern.
  • Click Apply and OK.
  • Restart the editor.
  • Go to Settings > Editor > File Types.
  • Click the - to remove the file type.
  • Click Apply and OK.
  • Restart the editor.
  • Go to Settings > Editor > File Types.
  • Expected: The custom file type is gone.
    Actual: The custom file type is still there.
0

Hi Terids , I've submitted an issue report, please follow it to check further updates.

https://youtrack.jetbrains.com/issue/IJPL-218040

0

请先登录再写评论。