0

In Eclipse we have the option Window->Preferences->Editors->Text Editors->Insert spaces for tabs to convert tab into spaces, but this is not applicable for makefiles.

To implement this for makefiles I am also trying to use InstanceScope.INSTANCE.getNode(). Is this the correct way? If yes, what should I pass as argument for getnode()? If no, please guide with correct way.

Angelo van der Sijpt
  • 3,611
  • 18
  • 24
  • What do you mean by 'implement this for makefile'? Are you writing a new text editor? Please explain in much more detail what you are trying to write. – greg-449 Jun 23 '16 at 14:03
  • Window->Preferences->Editors->Text Editors->Insert spaces for tabs ,after setting this option true,if i press any .txt file ,instead of tab i will get spaces according to the tab spaces we gave.but in makefile ,if i press tab it works like tab only.i want ,if i press tab in makefile ,i have to get spaces instead of tab. – Renganathan Selvaraju Jun 24 '16 at 02:11
  • Yes I understand that, but what has `InstanceScope.INSTANCE.getNode()` got to do with this? What are you trying to do to fix this? – greg-449 Jun 24 '16 at 06:12
  • i thought,By passing makefile editor's plugin id as an argument to getNode() we can set the preference.I am not sure about this.Please correct me ,if i am wrong. – Renganathan Selvaraju Jun 24 '16 at 06:39
  • Only if the editor is written to look for that preference. – greg-449 Jun 24 '16 at 06:43
  • In any case in makefiles tabs are required - see http://stackoverflow.com/q/2131213/2670892 – greg-449 Jun 24 '16 at 06:45
  • yes.InstanceScope.INSTANCE.getNode(EditorsUI.PLUGIN_ID).putBoolean().i have passed MakeUIPlugin.getPluginId() to getNode and preference value to putBoolean .but it is not working. makefile means a file with .mak extension . – Renganathan Selvaraju Jun 24 '16 at 06:48
  • That doesn't do anything that the Preferences setting isn't already doing. As I said tabs are **required** in makefiles so to the editor is probably deliberately not using this setting. – greg-449 Jun 24 '16 at 06:52
  • so ,are you telling it is not possible to do this for .mak file? – Renganathan Selvaraju Jun 24 '16 at 06:54

0 Answers0