> I'd like to watch the startup of an product.
> Is there any way to really watch the product starting up?
>
> The "Watcher" shall be installed in BundleActivator start() method..
There isn't at present -- the model is created and loaded in the product's
application's start(), and so happens before most other code is loaded.
I'd like to declare the app model in Application.e4xmi in "application plug-in".
Another plug-in may contribute Parts to a Perspective via extension point org.eclipse.e4.workbench.model using compontent descriptors.
When the workbench is initialized an "ready to run" I'd like to show that declared part of contributing plug-in depending on run-time decisions, because the app plug-in doesn't know about the contribution.
Currently, it seems, that this is not possible, since I haven't found a way about getting informed about the workbench and model having been initialized.
Even giving it a try via IStartup doesn't work out (is org.eclipse.ui.startup broken?)
It talks about programmatic contribution (not 100% what you are
describing) but could be used to.
Another thing that has been added to the latest model is
Application#addons which allows you to contribute classes which are
going to instanatiated after the model is loaded (the exact details are
not worked out yet) - e.g. the Perspective-Swichter will be implemented
like this.
Tom
Am 19.04.10 18:27, schrieb Sebastian:
> Hi Brian,
>
> sorry for answering that late.
>
> I'd like to declare the app model in Application.e4xmi in "application
> plug-in".
>
> Another plug-in may contribute Parts to a Perspective via extension
> point org.eclipse.e4.workbench.model using compontent descriptors.
>
> When the workbench is initialized an "ready to run" I'd like to show
> that declared part of contributing plug-in depending on run-time
> decisions, because the app plug-in doesn't know about the contribution.
>
> Currently, it seems, that this is not possible, since I haven't found a
> way about getting informed about the workbench and model having been
> initialized.
> Even giving it a try via IStartup doesn't work out (is
> org.eclipse.ui.startup broken?)
>
> Sebastian
awesome! This could help for especially for synchronous use.
Another case could be an async way accessing the workbench model - currently have no example on my mind.
Would it be useful, to send an event after E4Workbench has been created?
Yes - there's a proposal for sending an event to the e4-eventbus but I
don't know the bug OTOH.
Tom
Am 19.04.10 22:53, schrieb Sebastian:
> Hi Tom,
>
> awesome! This could help for especially for synchronous use.
>
> Another case could be an async way accessing the workbench model -
> currently have no example on my mind.
> Would it be useful, to send an event after E4Workbench has been created?
>
> Sebastian
>
currently I'm working around the whole thing
using an addon to install a non-headless event subscriber for topic "*"
which will perform the modifications on the model once and only on the first event.
Found out, that you could use the LifeCycleManager (property lifeCycleURI in extension org.eclipse.core.runtime.products) for modifications.
The class should have the methods
public void postContextCreate(IEclipseContext ctx);
public void processAdditions(IEclipseContext ctx);
public void processRemovals(IEclipseContext ctx);
Won't help in my case, but could be a good starting point for your programmatic contributions (if i got you right)
Well for the programmatic contribution I think a modififcation of the
contribution extension point is the best.
The reason is that the contribution should be merged into the model
BEFORE the ModelReconciler is consulted and the change management is
collecting delas.
Tom
Am 24.04.10 01:31, schrieb Sebastian:
> Hi Tom again :)
>
> Found out, that you could use the LifeCycleManager (property
> lifeCycleURI in extension org.eclipse.core.runtime.products) for
> modifications.
> The class should have the methods
>
> public void postContextCreate(IEclipseContext ctx);
> public void processAdditions(IEclipseContext ctx);
> public void processRemovals(IEclipseContext ctx);
>
> Won't help in my case, but could be a good starting point for your
> programmatic contributions (if i got you right)
>
> Sebastian
I'd like to declare the app model in Application.e4xmi in "application plug-in".
Another plug-in may contribute Parts to a Perspective via extension point org.eclipse.e4.workbench.model using compontent descriptors.
When the workbench is initialized an "ready to run" I'd like to show that declared part of contributing plug-in depending on run-time decisions, because the app plug-in doesn't know about the contribution.
Currently, it seems, that this is not possible, since I haven't found a way about getting informed about the workbench and model having been initialized.
Even giving it a try via IStartup doesn't work out (is org.eclipse.ui.startup broken?)
It talks about programmatic contribution (not 100% what you are
describing) but could be used to.
Another thing that has been added to the latest model is
Application#addons which allows you to contribute classes which are
going to instanatiated after the model is loaded (the exact details are
not worked out yet) - e.g. the Perspective-Swichter will be implemented
like this.
Tom
Am 19.04.10 18:27, schrieb Sebastian:
> Hi Brian,
>
> sorry for answering that late.
>
> I'd like to declare the app model in Application.e4xmi in "application
> plug-in".
>
> Another plug-in may contribute Parts to a Perspective via extension
> point org.eclipse.e4.workbench.model using compontent descriptors.
>
> When the workbench is initialized an "ready to run" I'd like to show
> that declared part of contributing plug-in depending on run-time
> decisions, because the app plug-in doesn't know about the contribution.
>
> Currently, it seems, that this is not possible, since I haven't found a
> way about getting informed about the workbench and model having been
> initialized.
> Even giving it a try via IStartup doesn't work out (is
> org.eclipse.ui.startup broken?)
>
> Sebastian
awesome! This could help for especially for synchronous use.
Another case could be an async way accessing the workbench model - currently have no example on my mind.
Would it be useful, to send an event after E4Workbench has been created?
Yes - there's a proposal for sending an event to the e4-eventbus but I
don't know the bug OTOH.
Tom
Am 19.04.10 22:53, schrieb Sebastian:
> Hi Tom,
>
> awesome! This could help for especially for synchronous use.
>
> Another case could be an async way accessing the workbench model -
> currently have no example on my mind.
> Would it be useful, to send an event after E4Workbench has been created?
>
> Sebastian
>
currently I'm working around the whole thing
using an addon to install a non-headless event subscriber for topic "*"
which will perform the modifications on the model once and only on the first event.
Found out, that you could use the LifeCycleManager (property lifeCycleURI in extension org.eclipse.core.runtime.products) for modifications.
The class should have the methods
public void postContextCreate(IEclipseContext ctx);
public void processAdditions(IEclipseContext ctx);
public void processRemovals(IEclipseContext ctx);
Won't help in my case, but could be a good starting point for your programmatic contributions (if i got you right)
Well for the programmatic contribution I think a modififcation of the
contribution extension point is the best.
The reason is that the contribution should be merged into the model
BEFORE the ModelReconciler is consulted and the change management is
collecting delas.
Tom
Am 24.04.10 01:31, schrieb Sebastian:
> Hi Tom again :)
>
> Found out, that you could use the LifeCycleManager (property
> lifeCycleURI in extension org.eclipse.core.runtime.products) for
> modifications.
> The class should have the methods
>
> public void postContextCreate(IEclipseContext ctx);
> public void processAdditions(IEclipseContext ctx);
> public void processRemovals(IEclipseContext ctx);
>
> Won't help in my case, but could be a good starting point for your
> programmatic contributions (if i got you right)
>
> Sebastian