Eclipse PDT Differentiating file name tabs for MVC?

北城以北 提交于 2019-12-24 09:57:55

问题


When working with MVC in Eclipse you might often have a model, view, and controller all with the same name open at the same time. When looking at each of the file tabs, you won't always know which is which and have to click through them, which can be quite a hassle sometimes. I've heard of being able to color code files based on the path in some editors. For example, tabs with path model could be set as green, path controller set as yellow, etc. Is this possible in Eclipse, or is there a plugin for something like this? If not, what do you do to more easily differentiate between the tabs? I've heard of people always opening a MVC set in a certain order. So you'll know the leftmost tab is the controller, the right most is the view, etc. However, that must also mean you need to open all 3 files each time. Any better tips or tricks?

Another thing about the file tabs that can be annoying is that when you have more files that can't fit in one line, eclipse pushes off to an arrow which you have to click to see the rest. It seems to be random which tabs get pushed off there, maybe the least used ones, I have no idea... This coupled with the problem above gets kind of annoying. I was trying to find a way to disable this and just show tabs that can't fit in one line to show up on a second line, but surprisingly couldn't find such an option (then again you also can't wordwrap without a plugin).

Hopefully there are some solutions to these two problems. Thanks.


回答1:


Maybe this can be helpful

http://www.dipherence.com/2011/03/20/full-coloured-eclipse-navigator-plug-in/




回答2:


With the latest version of Eclipse (Kepler 4.3.1, build M20130911-1000) when two or more files with the same base name are opened, tab will show also the parent directory name.



来源:https://stackoverflow.com/questions/5409778/eclipse-pdt-differentiating-file-name-tabs-for-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!