Bug 491721 - Workspace name shown in window title should default to the name of workspace directory
Summary: Workspace name shown in window title should default to the name of workspace ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.6 M7   Edit
Assignee: Sergey Prigogin CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 491850
  Show dependency tree
 
Reported: 2016-04-14 13:30 EDT by Sergey Prigogin CLA
Modified: 2016-04-25 19:07 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2016-04-14 13:30:28 EDT
It would be very convenient if, when creating a new workspace, the Preferences -> General -> Workspace -> Workspace Name preference was automatically set to match the name of the workspace directory.
Comment 1 Lars Vogel CLA 2016-04-14 13:47:50 EDT
+1
Comment 2 Jonah Graham CLA 2016-04-14 13:58:16 EDT
+1 -- it will be very useful for runtime workspaces / junit workspaces having the proposed default (also +1 for pointing out that feature, I didn't know it existed)
Comment 3 Stefan Xenos CLA 2016-04-14 14:10:43 EDT
+1

That's a great idea. I wonder what the best way to implement it is? We could:

1. Detect first launch and set the preference.
2. Or support variable expansions within the title field and make the default value something like ${workspace_name}.
Comment 4 Lars Vogel CLA 2016-04-14 14:33:53 EDT
(In reply to Stefan Xenos from comment #3)
> +1
> 
> That's a great idea. I wonder what the best way to implement it is? We could:
> 
> 1. Detect first launch and set the preference.
> 2. Or support variable expansions within the title field and make the
> default value something like ${workspace_name}.

I would propose to keep is simple and change the default value
Comment 5 Eclipse Genie CLA 2016-04-14 15:08:24 EDT
New Gerrit change created: https://git.eclipse.org/r/70697
Comment 6 Dani Megert CLA 2016-04-15 04:16:28 EDT
NOTE: There is a command line option to do this: -showlocation

If you set the name to be the location you must ensure that it won't appear duplicated.

Same applies when the user goes to General > Workspace and enables 'Show workspace path in window title'.
Comment 7 Sergey Prigogin CLA 2016-04-15 11:47:52 EDT
(In reply to Dani Megert from comment #6)

Showing workspace name and showing workspace location are two independent options and the proposed change doesn't change this situation. The workspace name is displayed as before, the only thing that changes is the default value of the preference.
Comment 9 Eclipse Genie CLA 2016-04-15 15:53:21 EDT
New Gerrit change created: https://git.eclipse.org/r/70789
Comment 10 Eclipse Genie CLA 2016-04-16 07:10:17 EDT
New Gerrit change created: https://git.eclipse.org/r/70805
Comment 11 Andrey Loskutov CLA 2016-04-16 07:11:01 EDT
Caused bug 491850, which is a blocker IMHO.
Comment 13 Dani Megert CLA 2016-04-18 09:35:26 EDT
(In reply to Andrey Loskutov from comment #11)
> Caused bug 491850, which is a blocker IMHO.

Same on Windows. Looks like the change was never tested!
Comment 14 Sergey Prigogin CLA 2016-04-18 10:16:20 EDT
(In reply to Dani Megert from comment #13)
> Same on Windows. Looks like the change was never tested!

The change was tested by running a hosted instance of Eclipse, but this was equivalent to using -data flag :-(.
Comment 15 Eclipse Genie CLA 2016-04-18 18:45:30 EDT
New Gerrit change created: https://git.eclipse.org/r/70917
Comment 16 Dani Megert CLA 2016-04-19 04:19:05 EDT
(In reply to Sergey Prigogin from comment #7)
> (In reply to Dani Megert from comment #6)
> 
> Showing workspace name and showing workspace location are two independent
> options and the proposed change doesn't change this situation. The workspace
> name is displayed as before, the only thing that changes is the default
> value of the preference.

For those who use -showlocation this change duplicates the name in the window title (once as name and once as last segment of the path). But I can live with that.
Comment 17 Eclipse Genie CLA 2016-04-19 17:02:42 EDT
New Gerrit change created: https://git.eclipse.org/r/71007
Comment 18 Sergey Prigogin CLA 2016-04-19 17:05:16 EDT
https://git.eclipse.org/r/71007 puts the preference initialization in IDEWorkbenchAdvisor instead of IDEApplication. Please let me know which of the two locations you prefer.
Comment 19 Dani Megert CLA 2016-04-21 09:24:25 EDT
(In reply to Sergey Prigogin from comment #18)
> https://git.eclipse.org/r/71007 puts the preference initialization in
> IDEWorkbenchAdvisor instead of IDEApplication. Please let me know which of
> the two locations you prefer.

I don't like either solution so close to feature freeze. More tests will be needed e.g. for products that set the preference in their custom ini files. I suggest to move this to 4.7.
Comment 20 Sergey Prigogin CLA 2016-04-21 21:40:10 EDT
(In reply to Dani Megert from comment #19)
> I don't like either solution so close to feature freeze. More tests will be
> needed e.g. for products that set the preference in their custom ini files.
> I suggest to move this to 4.7.

Thank you, Dani, for bringing up the plugin customization use case. Testing of this use case has uncovered a bug that been fixed in the latest version of the patch.

I do not think this pretty useful feature needs to wait another year. The month of May gives plenty of time for additional testing and fixing of bugs should they be uncovered.
Comment 21 Lars Vogel CLA 2016-04-22 02:10:21 EDT
(In reply to Sergey Prigogin from comment #20)
> (In reply to Dani Megert from comment #19
> I do not think this pretty useful feature needs to wait another year. The
> month of May gives plenty of time for additional testing and fixing of bugs
> should they be uncovered.

+1, I also would like to see that in Neon, a very nice user facing enhancement
Comment 24 Sergey Prigogin CLA 2016-04-25 19:07:44 EDT
Verified in I20160425-1300.