| Summary: | [Workbench] Add custom workspace name in front of the Workbench window title | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michael Giroux <michael_giroux> | ||||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | Paul Webster <pwebster> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | bokowski, greg, mober.at+eclipse, mschorn.eclipse, remy.suen, starwarsfan, wbprio | ||||||
| Version: | 3.5 | ||||||||
| Target Milestone: | 3.6 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Michael Giroux
This feature is probably only useful when the user has supplied the optional value for -showlocation. ex. -showlocation Trunk The default is to include the location of the workspace which generally would not be completely visible in the icon title either. +1 for exactly this request. This may seem minor and irrelevant at first sight, but when people switch between multiple workspaces / views / branches frequently, having a workspace ID first in the title bar would be extremely helpful and a big usability improvement. Workaround: If there is a major perspective in which you perform most of your work, then in each workspace do a "Save As" of exactly that Perspective under a name that is unique for your workspace. For instance: JDT --> Save as: Yoyodyne-1.0.1 JDT --> Save as: Yoyodyne-1.x This works nicely since by default, the perspective name appears first in the title bar. BTW, in case anybody wants to contribute something.. the default implementation of this is in IDEWorkbenchWindowAdvisor#computeTitle() and it works by hooking several listeners (PageListener, PerspectiveListener, PartListener) to call its private updateTitle() method. It would be really nice if products had an easy way to configure this... even making computeTitle() protected would help for those who dare extending non-API IDEWorkbenchAdvisor. Created attachment 148038 [details]
Patch
Attached patch is my "poor man's" approach making the enhancement...
A user's "-showlocation" setting is always prepended, whereas an absolute file system path (supposedly inherited from -data rather than -showlocation) remains appended.
My patch also contains an only loosely related change in IDEWorkbenchAdvisor which suppressed manual -showlocation string in case there was a dash in it. I really couldn't see why a dash in the user-specified name could be problematic... I think that if user explicitly specifies a name in -showlocation it should be used.
Background of this additional change is that we'd like to use clearcase view tags as workspace name, and these often contain a dash for us.
..actually, comparing against Platform.getLocation().toOSString(); may be wiser than new File().isAbsolute() Hmm, I think the patch does not adress an important use case:
- Use one installation and one way of launching (e.g. one Windwos shortcut)
- Select different workspaces via the eclipse workspace selection dialog.
==> I'd like to see something that identifies the workspace of each running
instance in the task bar.
Ideally I'd have a workspace preference where I can supply a meaningful name for my workspace, which than is prepended to the current title.
(In reply to comment #6) > Ideally I'd have a workspace preference where I can supply a meaningful name > for my workspace, which than is prepended to the current title. +1 for workspace specific text "prepended" to title. Created attachment 157641 [details]
Implements a workspace preference for a workspace name
The attached patch adds a preference to the page 'General - Workspace':
Workspace name (show in the window title): ____________________
The value of this preference, if not empty is prepended to the window title.
The default behavior is unchanged (per default the workspace name is empty)
I'll try and look at this in M6 PW Changing the summary, since the proposed new approach is not related to -showlocation. Previous summary was: [Workbench] Move -showlocation data to beginning of windows title bar Released to HEAD >20100216 Thanx Markus, PW In I20100309-0100 PW *** Bug 131566 has been marked as a duplicate of this bug. *** CQ:WIND00270146 - US1109 While the feature was in Helios already, respective documentation was added in Indigo only: http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.user/reference/ref-9.htm |