Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 506797

Summary: Workspace Preferences Do Not Persist on MacOS Sierra
Product: [Eclipse Project] Platform Reporter: Scott Davis <darkpreludesi>
Component: IDEAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: gunnar, mikael.barbero
Version: 4.6   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Scott Davis CLA 2016-10-31 11:30:32 EDT
Hardware: MacBook Pro 15 - 2014
OS: MacOS Sierra 10.12.1
Eclipse: 4.6.1
Install Location: ~/opt

Description:

When launching Eclipse either via finder or via my custom shell script (https://github.com/isaki-x/osx-util; I like this as it allows me to use SSH based git without having to constantly enter my SSH certificate passwords) I am prompted to select my workspace regardless of whether or not I have selected "use this as the default and do not ask again".

Additionally, if I close Eclipse and immediately relaunch it, the preference is respected. However, if Eclipse is closed for awhile (I haven't narrowed down the time frame as of yet) and then restarted, I am prompted irrespective of my workspace prompt preference.

Finally, if I launch Eclipse explicitly (i.e. not using "open" or finder) via ~/opt/eclipse/Eclipse.app/Contents/MacOS/eclipse, the preference is always respected (regardless of time elapsed).

Eclipse Details:

I am running the basic Eclipse for Java developers. The only plugin I have added is the Luna code formatter.
Comment 1 Scott Davis CLA 2016-11-16 11:50:00 EST
Additional information:

When this happens, a new directory is created under ~/.eclipse. I had nuked this directory as part of debugging other issues this morning and when I saw the prompt for workspace show up during an eclipse restart, I noticed that a new directory appeared here.

user@host ~/.eclipse $ ls -ltr
total 0
drwxr-xr-x  3 user  staff  102 Nov 16 11:37 org.eclipse.epp.logging.aeri
drwxr-xr-x  4 user  staff  136 Nov 16 11:37 org.eclipse.oomph.setup
drwxr-xr-x  4 user  staff  136 Nov 16 11:43 org.eclipse.oomph.p2
drwxr-xr-x  8 user  staff  272 Nov 16 11:44 org.eclipse.platform_4.6.1_973666455_macosx_cocoa_x86_64
drwxr-xr-x  5 user  staff  170 Nov 16 11:47 org.eclipse.platform_4.6.1_1650834180_macosx_cocoa_x86_64
user@host ~/.eclipse $
Comment 2 Scott Davis CLA 2016-11-28 08:55:13 EST
After downloading a completely fresh install (I was having issues with updates), the problem seems to be gone.

I now see a more correct directory structure (and the .p2 directory now exists in my home directory, whereas it had not been updated since Mars2 on my previous Neon1 install).

$ find .p2 .eclipse -type d 
.p2
.p2/org.eclipse.equinox.p2.engine
.p2/org.eclipse.equinox.p2.engine/profileRegistry
.eclipse
.eclipse/org.eclipse.epp.logging.aeri
.eclipse/org.eclipse.oomph.p2
.eclipse/org.eclipse.oomph.p2/cache
.eclipse/org.eclipse.oomph.setup
.eclipse/org.eclipse.oomph.setup/cache
.eclipse/org.eclipse.oomph.setup/setups
.eclipse/org.eclipse.recommenders.models.rcp

I am marking this bug as closed since something in the most recent version fixed this.
Comment 3 Scott Davis CLA 2016-11-28 08:57:39 EST
Marking status closed.

Version: Neon.1a Release (4.6.1)
Build id: 20161007-1200

This build seems to have fixed the issue.
Comment 4 Mikaƫl Barbero CLA 2016-11-28 09:04:19 EST
You've probably worked around bug 507328 (as described in bug 507328 comment 4).

*** This bug has been marked as a duplicate of bug 507328 ***
Comment 5 Gunnar Wagenknecht CLA 2016-12-11 18:43:46 EST
Quick update on this one.

I spent some time today to investigate launching Eclipse on macOS with proper hosting of the configuration and p2 data outside of the Eclipse.app bundle. This change places the modifiable data under ~/Library/Application Support/.... (as it should be on macOS anyway).

This is working without any issues for the vanilla Eclipse SDK. I tested a bit and it seems that this would also address the issue reported here, i.e. even though Gatekeeper was given Eclipse.app random paths, my installed plug-ins persisted across reboots/sessions.

There is an issue with the packages. The reason is Oomph not honoring the "-protect base" mode properly and thus, writing into the Eclipse.app bundle, which voids the signature (bug 509043).

I've opened bug 509040 to discuss making this mode a default for the Oxygen packages.