|
Re: ValidTriggers of a Task [message #1708515 is a reply to message #1708504] |
Thu, 17 September 2015 09:19 |
Ed Merks Messages: 33258 Registered: July 2009 |
Senior Member |
|
|
Maksim,
The possible values are from the enum org.eclipse.oomph.setup.Trigger.
You might exclude startup trigger, but then the task would not run
automatically at all when the IDE is launched for the first time. Best
you come up with a good implementation of isNeeded.
On 17/09/2015 10:28 AM, Maksim Melnik wrote:
> This Thread is a follow from:
> https://www.eclipse.org/forums/index.php/t/1069773/
>
> I decided to create a new thread because my questions have nothing to
> do with old topic name anymore. Thus , I think it will be more usefull
> for other users if i create a new topic.
>
> So, my problem is that my task is automatically included into startup
> task, so it is executed each time when i start my eclipse , instead of
> just once , after the installation. The answer from Eike was to either
> use ValidTriggers or :
> 1) Remember a flag somwhere under .metadata to remember the fact that
> a one-time task has successfully executed. See
> ProjectSetImportTaskImpl.Helper.isNeeded() for an example with more
> fine-grained state that is remembered.
>
> 2) Leave more expensive computation to the MANUAL trigger and skip the
> STARTUP trigger completely. See
> P2TaskImpl.isNeeded() for an example of a task that's only needed at
> startup if from the explicit top-level requirements
> it's obvious that software is missing (i.e., it omits expensive remote
> queries for update searches).
>
> 3) Combinations of the two approaches 1 and 2.
>
>
> Is it possible to controll the startup execution of the task with
> ValidTriggers ?
> What are the possible values of the ValidTriggers ?
>
>
> So far i only have one annotation: "triggers -> STARTUP MANUAL"
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03405 seconds