[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] life cycle of RCP app?

I have big problems whith teh lifecycle of my RCP app. I set the path to
the workspace on my own. Therefor an dialog opens if no path is set yet.
Then it will be stored in the preferences like described here [1]. I had
the problem that I got errors like "The instance data location has not
been specified yet." I thought that the location will be set to late.
Until now it will be invoked in the constructor of my plugin activation
class. So I invoked the initWorkspace method, which sets the location,
by my IApplication class as well and, for restoring the open editors of
the workspace, in the openWindows method of the WorkbenchAdvisor class.
Therefor I added a flag to my plugin activation class for checking if
the initWorkspace method already has been invoked. I want to make sure
that the method only will be called once. Now it happens that I don't
get the exceptions while debugging but only while running the RCP app in
normal mode. So I'm asking myself what is the life cycle of an RCP app.
Why does it behave different while debugging and running? Where to
invoke initWorkspace to ensure that it will be called before any
interaction with the workspace will be started? Do you have any suggestions?

best regards
Gilbert




[1] http://www.vogella.de/articles/EclipsePreferences/article.html