How to reset to default filetype mappings?

Lets say, I remap some file type mappings using FileTypeManager API. This updates config/options/filetypes.xml file. How can I reset the remapped filetype mappings to default?

Here is filetypes.xml after mapping js, xml, dtd to 'plain_text'. How do I reset all the file types that got remapped (in this case, xml, js, dtd)?

<?xml version="1.0" encoding="UTF-8"?>
<application>
  <component name="FileTypeManager" version="10">
    <ignoreFiles list="CVS;SCCS;RCS;rcs;.DS_Store;.svn;.pyc;.pyo;*.pyc;*.pyo;.git;*.hprof;_svn;.hg;.sbas;.IJI.*;vssver.scc;vssver2.scc;*.lib;*~;__pycache__;.bundle;" />
    <extensionMap>
      <removed_mapping ext="dtd" type="DTD" />
      <mapping pattern=".js" type="JavaScript" />
      <removed_mapping ext="js" type="JavaScript" />
      <mapping pattern="BUILD" type="PLAIN_TEXT" />
      <mapping pattern="VERSION_MAP" type="PLAIN_TEXT" />
      <mapping ext="xml" type="PLAIN_TEXT" />
      <mapping ext="dtd" type="PLAIN_TEXT" />
      <mapping ext="js" type="PLAIN_TEXT" />
      <mapping ext="pom" type="XML" />
      <mapping ext="rng" type="XML" />
      <mapping ext="gxp" type="XML" />
      <removed_mapping ext="xml" type="XML" />
    </extensionMap>
  </component>
</application>

1 comment
Comment actions Permalink

Hello chandra,

There is no such feature in the API. You need to undo the changes you've
made manually.

Lets say, I remap some file type mappings using FileTypeManager API.
This updates config/options/filetypes.xml file. How can I reset the
remapped filetype mappings to default?

Here is filetypes.xml after mapping js, xml, dtd to 'plain_text'. How
do I reset all the file types that got remapped (in this case, xml,
js, dtd)?

<?xml version="1.0" encoding="UTF-8"?>
<application>
<component name="FileTypeManager" version="10">
<ignoreFiles
list="CVS;SCCS;RCS;rcs;.DS_Store;.svn;.pyc;.pyo;.pyc;.pyo;.git;*.hpr
of;_svn;.hg;.sbas;.IJI.;vssver.scc;vssver2.scc;.lib;*~;__pycache__;.
bundle;" />
<extensionMap>
<removed_mapping ext="dtd" type="DTD" />
<mapping pattern=".js" type="JavaScript" />
<removed_mapping ext="js" type="JavaScript" />
<mapping pattern="BUILD" type="PLAIN_TEXT" />
<mapping pattern="VERSION_MAP" type="PLAIN_TEXT" />
<mapping ext="xml" type="PLAIN_TEXT" />
<mapping ext="dtd" type="PLAIN_TEXT" />
<mapping ext="js" type="PLAIN_TEXT" />
<mapping ext="pom" type="XML" />
<mapping ext="rng" type="XML" />
<mapping ext="gxp" type="XML" />
<removed_mapping ext="xml" type="XML" />
</extensionMap>
</component>
</application>


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.