| Summary: | Eclipse forgets last workspace and does not show workspace prompt | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Quinn Rohlf <qrohlf> | ||||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | gerd, john.arthorne, mikhail.barg, pwebster, remy.suen, spaungam | ||||||
| Version: | 4.2 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
|
Description
Quinn Rohlf
Perhaps you should try the steps a few times without installing CDT and see if CDT is triggering the problem. The described behaviour occurs if you access the ResourcesPlugin to early (probably before the -data parameter has been passed in). The attached example contains a P2 repository with a minimal feature that contains a minimal bundle. After installing the feature and restarting the eclipse IDE, eclipse 'forgets' the last workspace location and opens (or recreates) a workspace in the default location. Uninstalling the feature cures the disease. Created attachment 218071 [details]
zipped P2 repo with a minimal feature that reproduces the behaviour
Created attachment 218074 [details]
examples as plug-in projects
After some further investigations I found the following explanation: In my example the bundle is automatically started with the OSGi frameworks (I added a small p2.inf file in the META-INF folder of my plug-in project to force the P2 repo metadata generator to generate an corresponding entry in the P2 metadata). Within the bundle's activator I (maybe transitively) access ResourcesPlugin.getWorkspace(). At this time the eclipse application (extension point 'org.eclipse.core.runtime.applications' has *not* been started. So the -data parameter has not been set and as the result the call ResourcesPlugin.getWorkspace() creates a (maybe new) default workspace. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |