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 . 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?
Sorry for the late reply. My question targets the question which classes
will be instantiated first in an RCP app and which methods will be
invoked first. With logging I investigated that a specific plugin for my
rcp app will be initialized before the class which implements
IApplication will be initialized. Furthermore the activator class of the
plugin where the application class is specified will be invoked earlier
too. And I don't know why :(