Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » life cycle of RCP app?
life cycle of RCP app? [message #485758] Mon, 14 September 2009 20:48 Go to next message
Eclipse UserFriend
Originally posted by:

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

[1] ml
Re: life cycle of RCP app? [message #486107 is a reply to message #485758] Wed, 16 September 2009 11:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

What can I do?
Re: life cycle of RCP app? [message #486185 is a reply to message #486107] Wed, 16 September 2009 16:23 Go to previous messageGo to next message
Laurent Marchal is currently offline Laurent MarchalFriend
Messages: 91
Registered: July 2009

I did not catch all your explanations and what you are trying to do. For
my RCP application I use a parameter saved in the .ini file that set
where all the preferences will be stored.

osgi.instance.area=@user.home/.yourRCPApp c.isv/reference/misc/runtime-options.html

When you run/debug your app within eclipse, this parameter is controlled
from run/debug configuration dialog where you can specify where the
workspace data is stored in

Run Configuration->Main->Workspace Data->Location

I prefer to set the instance area by a configuration file, instead of
initWorkspace() this avoid hard setting in code.

Hope this helps.

Laurent Marchal.

Gilbert Mirenque a écrit :
> What can I do?
Re: life cycle of RCP app? [message #487754 is a reply to message #486185] Thu, 24 September 2009 10:43 Go to previous message
Eclipse UserFriend
Originally posted by:

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 :(
Previous Topic:private Xulrunner is not detected
Next Topic:Dynamic extension of Perspective from other Bundles
Goto Forum:

Current Time: Mon May 28 05:09:33 GMT 2018

Powered by FUDForum. Page generated in 0.02432 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top