Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 245789 - [Workbench] "Could not restore workbench layout" - say where eclipse searched for plugins if none found
Summary: [Workbench] "Could not restore workbench layout" - say where eclipse searched...
Status: RESOLVED DUPLICATE of bug 218197
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-31 13:07 EDT by Ralf Hauser CLA
Modified: 2008-09-03 08:15 EDT (History)
1 user (show)

See Also:


Attachments
eclipsePluginProblem.PNG (42.33 KB, image/png)
2008-08-31 13:07 EDT, Ralf Hauser CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser CLA 2008-08-31 13:07:33 EDT
Created attachment 111361 [details]
eclipsePluginProblem.PNG

Build ID: M20060921-0945

Steps To Reproduce:
1. I am trying to create an identical clone of a workspace on a different machine
2. I get the attached message
3. The windows are open as I left them on the original machine, but the plugin's are not available


More information:
eclipse 3.2 on debian stable
Comment 1 Remy Suen CLA 2008-08-31 13:10:39 EDT
If the plug-ins are not installed then Eclipse naturally cannot restore the views that were originally contributed by the plug-in. This is what the error dialog is trying to convey.

I'm not sure I understand what the problem is here.
Comment 2 Ralf Hauser CLA 2008-08-31 13:27:34 EDT
hmm, the plugin is present.

I did "tar -cvzf workspace.tgz ~/workspace" and unpacked it on the new machine again.

The only difference is that the user on the destination machine is not the same.
So, it may look in the work place for some plugins even though I correctly adapted the workspace property 

So, the workspace/.metadata/ with its entire .plugin is present on the new machine as well.

So, if it is looking for some file in a destination that doesn't exist, I'd hope it amends the error with what it is looking for and that it did not find that directory
Comment 3 Remy Suen CLA 2008-08-31 13:42:53 EDT
(In reply to comment #2)
> hmm, the plugin is present.
> 
> So, the workspace/.metadata/ with its entire .plugin is present on the new
> machine as well.

Hint: Plug-ins are not stored in that folder. I guess you technically could (maybe?), but I know of nobody that stores plug-ins there.
Comment 4 Ralf Hauser CLA 2008-08-31 14:48:46 EDT
ok, in the .metadate apparently are only a directory with the plugin's java class-name is present.
 
Now found the *.jar's of the plugins are in the ~/.eclipse directory, but I still get the same error when starting up eclipse

Any hint how to find out where it searches for it short of doing an "strace"
Comment 5 Remy Suen CLA 2008-08-31 14:54:47 EDT
(In reply to comment #4)
> ok, in the .metadate apparently are only a directory with the plugin's java
> class-name is present.

Actually, those aren't Java class names, but anyway...

> Now found the *.jar's of the plugins are in the ~/.eclipse directory, but I
> still get the same error when starting up eclipse
> 
> Any hint how to find out where it searches for it short of doing an "strace"

I'm not sure if strace is going to help here personally. In any case, I noticed you are using Eclipse 3.2 on Debian, did you get Eclipse from the Debian repositories? If yes, I suggest you get Eclipse from eclipse.org. For your information, Eclipse 3.2.0 itself is over two years old and the last maintenance release, 3.2.2, is over one and a half years old.
Comment 6 Ralf Hauser CLA 2008-08-31 15:55:05 EDT
Menu "Help"  - "Software Update" - "Manage Configuration" - "Add Extension Location" and entering ~/.eclipse did help - but why does it forget that and not blame, it doesn't know where to search or rather list the directories it DOES search?

Thx for the hint for taking another eclipse version, just trying to avoid doing too much of config myself
Comment 7 Remy Suen CLA 2008-08-31 16:04:37 EDT
(In reply to comment #6)
> why does it forget that

Hard to say. I'm not even totally sure if you're running two separate Eclipse installations or the same one. Also, did you install Eclipse from Debian's repository? If yes, Debian may have done some plug-in detection thing to get it working with ~/.eclipse/ or something. I can't say more because a) I don't use Debian and b) I use Eclipse builds from eclipse.org directly.

> not blame, it doesn't know where to search or rather list the directories it
> DOES search?

Where are you suggesting this be listed? By default Eclipse 3.2 is just searching in eclipse/plugins/ as far as I know.
Comment 8 Ralf Hauser CLA 2008-09-01 01:12:25 EDT
> Where are you suggesting this be listed? By default Eclipse 3.2 is just
> searching in eclipse/plugins/ as far as I know.
IMHO, this should be listed in the error message "Could not restore workbench layout" as attached. I.e.: 

if the config from the workspace has some views open and the plugins to create them are not found,
I) say that in "~/eclipse/plugins/" or wherever the defalut location is, no corresponding plugin was found
II) say where you found the hint that such a "orphaned view" does exist

   e.g. which xml tag in workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml or alike
Comment 9 Remy Suen CLA 2008-09-01 01:48:07 EDT
(In reply to comment #8)
> IMHO, this should be listed in the error message "Could not restore workbench
> layout" as attached. I.e.: 
> 
> if the config from the workspace has some views open and the plugins to create
> them are not found,

I am not sure if this solution would actually scale since not having the plug-ins is simply one of a variety of reasons why a view couldn't be created. It could just as easy be a typo issue or an issue with the code not being as robust as one would like that causes the view to fail to be created.
Comment 10 Eric Moffatt CLA 2008-09-03 08:15:06 EDT
Ralf, thanks for the info. I'm already slated to take a crack at this in 3.5. As Remy points out there are a number of ways that we can 'fail' to be able to restore a part. Some (like missing plugins) are even 'expected' under certain conditions (like uninstalling a plugin).


*** This bug has been marked as a duplicate of bug 218197 ***