Community
Participate
Working Groups
Build Identifier: Eclipse: 20100218-1602, Eclipse webdeveloper 3.1.1 Many files that contain html content don't necessarily end with html or htm. In my case Freemarker (.ftl). There is a standard editor for it, but it's crap and so you revert to the default html editor. Unfortunately, the files are not being color coded when opened with the HTML editor which kinda sucks. I would expect an HTML editor (or any editor for that matter) to color code files openend in it according to its internal color coding rules. Surprised it doesn't and can't seem to be forced to either. Reproducible: Always Steps to Reproduce: 1. Just open any file with HTML content that doesn't end with htm/html 2. 3.
Hi Marc, The HTML (along with other Structured Text Editors) require the file to be associated with a content type by their nature. If you go to Window > Preferneces then General > Content Types, expand the Text node in the Content Types tree and find HTML. Under the File Associations, add the extensions you're working with (*.ftl for example) and click Ok. Now .ftl should be associated with the HTML editor by default. Hope this helps.
Hi and thanks for your reply. I should have mentioned in the bug report that I had already taken this step. The file association for *.ftl is set to HTML Editor and that has no effect. When I go to the file extension for *.htm I see HTML editor (locked by 'HTML' content type). Not sure if that has anything to do with it.
Reopened
Hey Marc, Some of the terminologies do overlap between the two preference pages. It sounds like you are setting the "File association" through Editor > File Associations. My instructions were for setting the content type of *.ftl to be of the HTML content type. Once you associate the correct content type to *.ftl, you shouldn't have a problem. Once your file extension is associated with the HTML content type, you no longer will need the entry for *.ftl in the Editors > File Associations preferences. This is because the HTML editor is associated with the HTML content type. I hope this makes sense.
Hi, didn't seem to work for me. Went into registry editor to add HTML mime to ftl files (isn't there an easier way on xp?). Nothing changed.
Created attachment 167760 [details] content type preferences (In reply to comment #5) > Hi, didn't seem to work for me. Went into registry editor to add HTML mime to > ftl files (isn't there an easier way on xp?). Nothing changed. Hi, You shouldn't need to edit the registry or anything like that. The preference I'm talking about is in the Eclipse preferences accessed by Window > Preferences. Expand General > Content Types. From the Content types tree, expand Text and select HTML. In the File Associations add *.ftl. Please see the attached screenshot for a reference.
Ah, finnally got it. The Windows Preferences threw me off. Feel like a real newbie here suddenly. :-) Thanks for your patience.
(In reply to comment #7) > Ah, finnally got it. The Windows Preferences threw me off. Feel like a real > newbie here suddenly. :-) Thanks for your patience. No problem, I'm glad it's working out. As they say, a picture's worth a 1000 words.