I am trying to adjust the width of tabs from Window -> Preferences -> General -> Editors -> Text Editors where there is a field for \"Display Tab Width\". But no matter what
Changing Window -> Preferences -> General -> Editors -> Text Editors tab preference is relevant for text files, not for java files as indicated here. You may create a text file in Eclipse and check that your tab size is really changed.