Problem importing a project with Preferences [message #323017] |
Wed, 05 December 2007 02:57  |
Eclipse User |
|
|
|
Originally posted by: nadeem.aboobaker.bea.com
Hi All,
I have code that creates a project with various facets, natures, and
preferences stored in the .settings folder using ProjectScope. Everything
works great when the projects are created from scratch using the wizard I
coded. However, a problem arises when a user imports one of these project
and I attempt to read the facets and preferences from this imported project.
I have a resource change listener that detects when a project is added to
the Workspace. When I get the call back for this event, I do some checking
to see if this an imported project. After I determine it's an imported
project, I attempt to get the facets and the Preferences from this imported
project. The problem is when I get the resource change event, the project
does not seem to have facets or preferences loaded and I can't get the
associated information. If I close the Workspace and re-open it, then I am
able to get the facets and preferences.
I did some searches on the Eclipse bug database, and did find a bug that
says the preferences are loaded after the project OPEN event, so I'm
thinking this is a similar issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=139911
So, my question: Is there a way for me to figure out when the project has
been fully loaded, i.e. facets and preference information is loaded and
ready to use?
BTW, this is the use case I am seeing this behavior:
- Create a new project with the project's wizard
- Delete the project, but do not delete the contents
- Import the deleted project from disk
Thanks!
Nadeem
|
|
|
Event when project import has been completed? [message #323089 is a reply to message #323017] |
Fri, 07 December 2007 16:21  |
Eclipse User |
|
|
|
Originally posted by: nadeem.aboobaker.bea.com
Hi All,
I have code that creates a project with various facets, natures, and
preferences stored in the .settings folder using ProjectScope. Everything
works great when the projects are created from scratch using the wizard I
coded. However, a problem arises when a user imports one of these project
and I attempt to read the facets and preferences from this imported project.
I have a resource change listener that detects when a project is added to
the Workspace. When I get the call back for this event, I do some checking
to see if this an imported project. After I determine it's an imported
project, I attempt to get the facets and the Preferences from this imported
project. The problem is when I get the resource change event, the project
does not seem to have facets or preferences loaded and I can't get the
associated information. If I close the Workspace and re-open it, then I am
able to get the facets and preferences.
I did some searches on the Eclipse bug database, and did find a bug that
says the preferences are loaded after the project OPEN event, so I'm
thinking this is a similar issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=139911
So, my question: Is there a way for me to figure out when the project has
been fully loaded, i.e. facets and preference information is loaded and
ready to use?
BTW, this is the use case I am seeing this behavior:
- Create a new project with the project's wizard
- Delete the project, but do not delete the contents
- Import the deleted project from disk
Thanks!
Nadeem
|
|
|
Powered by
FUDForum. Page generated in 0.02936 seconds