Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » settings for correct highlighting of my makefile
settings for correct highlighting of my makefile [message #1820675] Sat, 25 January 2020 16:55 Go to next message
Eclipse UserFriend
Hello,

I have a number of makefiles in my project, so none of them are named "Makefile". I use the .mak extension for my makefiles, since that is what one of my other editors recognizes. I have tried to configure Eclipse to show the correct highlighting but it is not working.

This is what I have done,
Menu > Preferences > General > Editors > File_Associations
- added .mak with Makefile Editor as the associated editor

Menu > Preferences > General > Content Types 
in the "content types:" window
 - expand >Text
 - select Makefile
 in the "file associations:" windos
  - click "Add"
  - add .mak

click "Apply and Close"

I have restarted Eclipse but my makefile still does not have any highlighting. Did I miss something?

LMHmedchem

[Updated on: Sat, 25 January 2020 16:57] by Moderator

Re: settings for correct highlighting of my makefile [message #1820779 is a reply to message #1820675] Tue, 28 January 2020 12:18 Go to previous messageGo to next message
Eclipse UserFriend
After some thousands of views and no suggestions I looked at the list of file associations and changed the file extension of my makefiles to .mk. These all now display correctly in the editor. I guess that is easier than playing about in the settings.

It seems very odd to me that is is not easy to set up a file association. Every code editor I have ever used had a simple interface to associate a file extension with a specific flavor of code markup. I find it hard to believe that Eclipse lacks such a functionality.

If anyone can let me know the proper instructions, I would appreciate that.

LMHmedchem
Re: settings for correct highlighting of my makefile [message #1820782 is a reply to message #1820779] Tue, 28 January 2020 12:57 Go to previous message
Eclipse UserFriend
.mk is already associate with the Makefile Editor.
What you did for .mak was correct.
It worked for me although Eclipse took its time getting around to it.
Sometimes you need to close a file then reopen it using the context menu "Open with"
Previous Topic:include from not current project
Next Topic:increase the text size for items in the package explorer
Goto Forum:
  


Current Time: Mon Jun 23 15:35:41 EDT 2025

Powered by FUDForum. Page generated in 0.03341 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top