Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Plugin vs. Application startup sequence
Plugin vs. Application startup sequence [message #39854] Tue, 06 April 2004 18:37 Go to next message
Stephen Goldbaum is currently offline Stephen GoldbaumFriend
Messages: 75
Registered: July 2009
Member
I have a plugin the that implements the
org.eclipse.core.runtime.applications extension and also provides a
startup class. This is to allow the plugin to either host its own RCP or
run within another RCP (I assume this is acceptable). When running in
another RCP, the Workbench is created before the plugin is started.
However, when running in its own RCP, the startup sequence is:

* Create Plugin startup class instance.
* Call the start(BundleContext) method on that startup instance.
* Create and run the IPlatformRunnable instance.

In such a case, the Workbench is not created until after the plugin is
started. Unfortunately, the plugin assumes that the Workbench has already
been created before it is started (a natural assumption, I think.) While
I could trigger some type of secondary startup upon Workbench creation,
this seems unnatural. It also requires separate implementations for self
hosted RCP vs. inclusion in another RCP. So, my questions are:

* Is this startup sequence correct?
* Is the a better way of accomplishing what I'm trying to do?

Thanks,
Stephen
Re: Plugin vs. Application startup sequence [message #40762 is a reply to message #39854] Mon, 26 April 2004 19:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

Not sure I fully follow what you are doing but will take a stab. The
application is the thing that "eclipse" runs in its main thread after it has
finished initializing the framework/runtime. In any given install, there
are many applications (10-15 in base Eclipse I think) but only one of them
is chosen for any given run. When that application finishes, Eclipse exits.
Typcially you are running some app which draws the UI and then reads and
dispatches UI events to drive the UI.

The calls to start() are done either when a class is loaded from a plugin
for the first time or explicitly either by user control (e.g., on typing
start N on the console) or by the framework if the bundle is listed on the
osgi.bundles list.

Jeff

"Stephen Goldbaum" <stephen.goldbaum@lehman.com> wrote in message
news:c4utd8$ltp$1@eclipse.org...
> I have a plugin the that implements the
> org.eclipse.core.runtime.applications extension and also provides a
> startup class. This is to allow the plugin to either host its own RCP or
> run within another RCP (I assume this is acceptable). When running in
> another RCP, the Workbench is created before the plugin is started.
> However, when running in its own RCP, the startup sequence is:
>
> * Create Plugin startup class instance.
> * Call the start(BundleContext) method on that startup instance.
> * Create and run the IPlatformRunnable instance.
>
> In such a case, the Workbench is not created until after the plugin is
> started. Unfortunately, the plugin assumes that the Workbench has already
> been created before it is started (a natural assumption, I think.) While
> I could trigger some type of secondary startup upon Workbench creation,
> this seems unnatural. It also requires separate implementations for self
> hosted RCP vs. inclusion in another RCP. So, my questions are:
>
> * Is this startup sequence correct?
> * Is the a better way of accomplishing what I'm trying to do?
>
> Thanks,
> Stephen
>
Re: Plugin vs. Application startup sequence [message #40885 is a reply to message #40762] Wed, 28 April 2004 11:14 Go to previous message
Sten Ernerot is currently offline Sten ErnerotFriend
Messages: 26
Registered: July 2009
Junior Member
> The calls to start() are done either when a class is loaded from a plugin
> for the first time

For this to happen you need to specify "Eclipse-AutoStart: True" in the
bundle manifest

Regards
Sten


"Jeff McAffer" <jeff_mcaffer@REMOVE.ca.ibm.com> wrote in message
news:c6jmog$uvc$1@eclipse.org...
> Not sure I fully follow what you are doing but will take a stab. The
> application is the thing that "eclipse" runs in its main thread after it
has
> finished initializing the framework/runtime. In any given install, there
> are many applications (10-15 in base Eclipse I think) but only one of them
> is chosen for any given run. When that application finishes, Eclipse
exits.
> Typcially you are running some app which draws the UI and then reads and
> dispatches UI events to drive the UI.
>
> The calls to start() are done either when a class is loaded from a plugin
> for the first time or explicitly either by user control (e.g., on typing
> start N on the console) or by the framework if the bundle is listed on the
> osgi.bundles list.
>
> Jeff
>
> "Stephen Goldbaum" <stephen.goldbaum@lehman.com> wrote in message
> news:c4utd8$ltp$1@eclipse.org...
> > I have a plugin the that implements the
> > org.eclipse.core.runtime.applications extension and also provides a
> > startup class. This is to allow the plugin to either host its own RCP
or
> > run within another RCP (I assume this is acceptable). When running in
> > another RCP, the Workbench is created before the plugin is started.
> > However, when running in its own RCP, the startup sequence is:
> >
> > * Create Plugin startup class instance.
> > * Call the start(BundleContext) method on that startup instance.
> > * Create and run the IPlatformRunnable instance.
> >
> > In such a case, the Workbench is not created until after the plugin is
> > started. Unfortunately, the plugin assumes that the Workbench has
already
> > been created before it is started (a natural assumption, I think.)
While
> > I could trigger some type of secondary startup upon Workbench creation,
> > this seems unnatural. It also requires separate implementations for
self
> > hosted RCP vs. inclusion in another RCP. So, my questions are:
> >
> > * Is this startup sequence correct?
> > * Is the a better way of accomplishing what I'm trying to do?
> >
> > Thanks,
> > Stephen
> >
>
>
Previous Topic:specialized adaptor deployment problem
Next Topic:[FAQ] How to get an URL for the news message
Goto Forum:
  


Current Time: Sat Apr 20 04:38:17 GMT 2024

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

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

Back to the top