Currently, in my Xtext project, I have an INI file in my xtext.ui plugin. My editor extension looks like this:
<extension point="org.eclipse.ui.editors">
<editor
class="com.*INIExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
filenames="XYZ.ini"
id="com.abc"
name="INI Editor">
</editor>
The Xtext INI highlighter works for XYZ.ini, but in real scenarios, my INI file can have any name, like abc.ini. For abc.ini, the highlighter and other Xtext features do not work. I want to add dynamic file names to achieve this.
Description: I'm working on an Xtext project where the INI file's name can vary. The current setup specifies a static file name (XYZ.ini) in the editor extension point, which causes issues when the file name is dynamic (e.g., abc.ini). I need to make the editor extension dynamic to support any INI file name, ensuring that the Xtext features work correctly for all INI files within my project. What changes do I need to make to achieve this dynamic file name handling in the editor extension point?
Thanks @greg
I have added the extension "org.eclipse.core.contenttype.contentTypes" and my issue got resolved