Bug 515074 - [WorkbenchLauncher] Allow to copy settings from another workspace from launcher
Summary: [WorkbenchLauncher] Allow to copy settings from another workspace from launcher
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: David Weiser CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on: 432006 516049
Blocks:
  Show dependency tree
 
Reported: 2017-04-11 03:18 EDT by Lars Vogel CLA
Modified: 2020-02-19 05:58 EST (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 Lars Vogel CLA 2017-04-11 03:18:17 EDT
+++ This bug was initially created as a clone of Bug #432006 +++

A long desired feature of the Eclipse IDE is that users want to use the same settings across workspaces.

During a ws switch, it is possible to copy certain settings, this is planned to be extended by Bug 432006 for preferences.

I suggest to add the "Copy Settings" drop-down box also to the initial workspace selector. A hyperlink "Select workspace" could be added and if pressed, a directory picker could be presented to the user.
Comment 1 John Moule CLA 2017-04-13 05:25:12 EDT
+1
Sounds like a great feature and one my colleagues and I have wanted.

One thing I really miss when starting a new workspace is my bookmarks. Will this enhancement copy bookmarks over to the new ws?
Comment 2 Lars Vogel CLA 2017-04-13 06:23:34 EDT
(In reply to John Moule from comment #1)
> will this enhancement copy bookmarks over to the new ws?

Don't know how they are stored. You can try with latest I-Build from http://download.eclipse.org/eclipse/downloads/and use switch workspace which allow to copy already and report back if that works or not.
Comment 3 John Moule CLA 2017-05-03 05:21:48 EDT
Bookmarks don't appear to be copied.

To test:
1) launch in a new workspace.
2) create a java project, add a class, add a comment, add a bookmark to the line containing the comment.
3) open bookmarks view and confirm bookmark is there (would be neat if the bookmark view opened automatically when I add a bookmark to it - is there a bug already open for this I wonder?)
4) restart workbench in same workspace, to flush the pref cache.*
5) File > Switch Workspace (Copy Settings > all items checked) and enter a location for the new workspace (eg: workspace1).
6) Observe the bookmarks view:
  Hoped for: bookmarks view contains bookmark from workspace0.
  Actual: bookmarks view empty.

Looking at this a bit more the bookmarks appear linked to the project, which is understandable. So
7) import the java project from workspace0 into workspace1.
  Hoped for: bookmarks view contains bookmark from java project.
  Actual: bookmarks view empty.

BTW, the bookmark is stored in the following file:
  workspace0\.metadata\.plugins\org.eclipse.core.resources\.projects\java\.markers


Side issue:
One thing I did notice with the existing implementation (eclipse-SDK-I20170412-2000-win32) is when switching to another workspace with Copy Settings > Workbench Layout checked the layout of an unsaved workspace is not copied.
Steps to reproduce:
1) launch in a new workspace (eg workspace0).
2) make a change to the layout; eg open the bookmarks view and move it to a different location so its not stacked in the usual place.
3) File > Switch Workspace (Copy Settings > Workbench Layout checked) and enter a location for the new workspace (eg: workspace1)
  Expected: the new workspace is opened with the bookmarks view open in the location it was in step 2).
  Actual: bookmarks view is not open.

*: I'm guessing that the workspace location pref has not been saved before doing the switch so any layout changes I made in the most recent session are not reflected in the new workspace.
If I restart the workbench back into workspace0 and then perform step 3) the layout is respected and the expected result occurs.
Comment 4 Lars Vogel CLA 2017-05-08 04:04:07 EDT
(In reply to John Moule from comment #3)
> Bookmarks don't appear to be copied.

Bookmarks / Tasks are not preferences, hence they are not copied.

> Side issue:
>  is when switching to another workspace
> with Copy Settings > Workbench Layout checked the layout of an unsaved
> workspace is not copied.

Please open a separate bug for that.
Comment 5 John Moule CLA 2017-06-02 07:17:13 EDT
(In reply to Lars Vogel from comment #4)
> (In reply to John Moule from comment #3)
> > Bookmarks don't appear to be copied.
> 
> Bookmarks / Tasks are not preferences, hence they are not copied.


Are Launch Configurations considered to be preferences? If so could they be copied too?


> 
> > Side issue:
> >  is when switching to another workspace
> > with Copy Settings > Workbench Layout checked the layout of an unsaved
> > workspace is not copied.
> 
> Please open a separate bug for that.

Bug 517695 - Provide explicit wizards for exporting and importing Bookmarks and Tasks

Bug 517696 - Allow to copy Bookmarks from another workspace from launcher (Switch Workspace)
Comment 6 Dani Megert CLA 2017-09-13 05:08:05 EDT
Removed target milestone since nothing seems to happen here. Please ssign it back when you plan to work on it.
Comment 7 Dani Megert CLA 2017-09-13 05:08:40 EDT
(In reply to Dani Megert from comment #6)
> ssign

==> assign