I'm working on a project for which I have one eclipse workspace. However, there are three folders inside this workspace, each of which have similar filenames.
Corresponding to these three folders, I have three eclipse windows open, displaying the files in each.
However, since the filenames are similar and the files are ordered the same way across all windows, I can't immediately tell which folder's window I'm looking at right now. Technically, this can be achieved by looking at the title bar as shown in the following screen shot:
But using that identifier is sub optimal as I have to search for the folder name in the middle of that string.
It would be much more preferable if I could write a dedicated string to the title of the window, which would help me identify the folder, whose files are contained in that window.
I am aware that I can set a custom "workspace" identifying string in the window, but since that's at a workspace level, setting that string affects all three windows and therefore does not function at the window level.
Is setting such a string even possible? How might I accomplish this?
Tech Specs:
I don't think there is anything out of the box for eclipse that can help. Probably going to need an eclipse plugin to customize the workbench window titles in this way. One solution would be to write your own Eclipse plugin that would do exactly what you need which would involve just grabbing the various workbench window shells and based on your own needs setting the Text to whatever title you need.
However writing a new Eclipse plugin maybe to heavyweight for you. One option would be to install a scripting environment into your Eclipse environment. I looked at Eclipsescript but I don't think it is going to give you access to the WorkbenchWindow object you need to get the active shell to change the title. Something more like Eclipse Monkey is what you need. However, Eclipse monkey is discontinued. Perhaps Groovy Monkey. This way you could write a groovy script that you could execute once you have Eclipse running and it could modify the titles for you and much more.
With groovy monkey, the script you would need to execute would be:
window.getShell().setText( 'Custom shell text' )
Update Following up from a comment I looked again and EclipseScript is what you need and it is drop-dead simple as well.
customWindowTitles.eclipse.js
Packages.org.eclipse.ui.PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setText('Foo');
Alt+R
if you are on windows.