buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/735401/#msg_735401
I have a few plugins (osgi.bundle) which download a zip file from an url in an ant action, depositing some jars found inside it somewhere in a lib/ folder, each inside their corresponding plugin. This action is called during buckminster.prebind. The problem is that the changes are not seen in the plugins unless I manually do a refresh on each of them. I need to do this every time these jars are updated/changed for eclipse to see the change.

I'd like to refresh the plugin (equivalent to pressing F5 in eclipse on the project) after this action finishes.
I found some eclipse ant tasks:

This code works if the plugin is already in the workspace when the bucknminster.prebind command is run, but fails if the plugin is not in the workspace (like it says in the manual, the buckminster.prebind is set to run before the component is bound to the workspace).

I'd like to know to which action/group/artifacts I could bind this code to so it works in both cases:
- if the plugin is in the workspace and also
- if it's not yet in the workspace (does something like buckminster.postbind exist?).

Thank you.]]>Fabian Baboschi2011-10-11T17:03:54-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/738954/#msg_738954
Anyone? A workaround perhaps?]]>Philip Bedingfield2011-10-17T00:18:36-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/739143/#msg_739143
> I'd like to know the answer to this as well. I want to run some java code after it is bound to the workplace.
>
> Anyone? A workaround perhaps?

One thing that you could try is to use a .cspex to add a prerequisite to the generated 'eclipse.build' action. If I'm
not mistaking, such a prerequisite will execute just prior to the eclipse build which means that it will kick in after
the bind. It's not a one time action (it happens on every perform) but that shouldn't matter if all that it does is a
refresh.

- thomas]]>Thomas Hallgren2011-10-17T06:14:57-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/739880/#msg_739880
So I don't think a prerequisite to eclipse.build is going to help me.
I guess I'm more after a postBuild hook.]]>Philip Bedingfield2011-10-18T00:07:52-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/740545/#msg_740545
> Actually, what I'm after is to run some code after it's built. So I
> don't think a prerequisite to eclipse.build is going to help me. I guess
> I'm more after a postBuild hook.
In that case, you can simply wrap the top level build action in a
specialized action that first calls the original, and then your post action.

- henrik]]>Henrik Lindberg2011-10-18T16:17:28-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/741107/#msg_741107
Thank you for your really fast help.]]>Fabian Baboschi2011-10-19T07:30:04-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/787346/#msg_787346
i would like to implement some kind of post.build functionality. this works with the proprietary my.build action:

but how can i enhance the existing eclipse.build action with my additional stuff.
using alterAction i can only set prerequisites, there's no postrequistes.

thanks for your help
jakob]]>Jakob Braeuchi2012-01-31T13:30:09-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/788018/#msg_788018
Buckminster builds are issued as actions. Either from the Buckminster menu in the IDE or by use of the headless perform
command. What you do with your 'my.build' function is exactly right. It will be called after the eclipse.build action
has executed.

Perhaps you want something to execute during the the Eclipse incremental build phase? You can do that too, but not from
a CSpec. You're then entering the domain of eclipse builders and they are defined in the .project file of the Eclipse
project. The 'eclipse.build' in Buckminster will call the Eclipse builder which in turn uses those definitions. You can
read more about that here:

On 01/31/2012 02:30 PM, Jakob Braeuchi wrote:
> hi,
>
> i would like to implement some kind of post.build functionality. this works with the proprietary my.build action:
>
>
> <public name="my.build" actor="null">
> <prerequisites>
> <attribute name="eclipse.build" />
> <attribute name="datapackage.export" /> <attribute name="datapackage.update" />
> </prerequisites>
> </public>
>
>
> but how can i enhance the existing eclipse.build action with my additional stuff. using alterAction i can only set
> prerequisites, there's no postrequistes.
>
> thanks for your help
> jakob]]>Thomas Hallgren2012-02-01T08:50:39-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/789000/#msg_789000
thank you for your answer. I used eclipse.build only as a sample. Actually i would like to add a postrequisite to an arbitrary action; or if not possible override an action.

Jakob]]>Jakob Braeuchi2012-02-02T13:43:09-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/789111/#msg_789111
as builders. They work in headless as well. Naturally they have to be
present in the environment that is doing the building.

The advantage is that they also work if someone is doing the work manually.

Regards
- henrik

On 2012-02-02 14:43, Jakob Braeuchi wrote:
> Hi Thomas,
>
> thank you for your answer. I used eclipse.build only as a sample.
> Actually i would like to add a postrequisite to an arbitrary action; or
> if not possible override an action.
>
>
> <public name="eclipse.build" actor="null">
> <POSTrequisites>
> <attribute name="datapackage.export" /> <attribute
> name="datapackage.update" />
> </postrequisites>
> </public>
>
> or
>
>
> <public name="eclipse.build" actor="null">
> <prerequisites>
> <attribute name="SUPER.eclipse.build[/b]" />
> <attribute name="datapackage.export" /> <attribute
> name="datapackage.update" />
> </prerequisites>
> </public>
>
>
> Jakob]]>Henrik Lindberg2012-02-02T16:03:27-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/789586/#msg_789586
i'm not looking specifically for a builder. eclipse.build was used as a sample only.
if i would like to add a "postrequisite" ie. to the bundle.jar action; could i use a builder as well ?

jakob]]>Jakob Braeuchi2012-02-03T06:36:51-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/789771/#msg_789771
> hi henrik,
>
> i'm not looking specifically for a builder. eclipse.build was used as a
> sample only.
> if i would like to add a "postrequisite" ie. to the bundle.jar action;
> could i use a builder as well ?

The Eclipse builder framework allows you to run processes (that
typically build something :)), they can do whatever you want. They can
be configured to run after some other builder, be interactive, trigger
rebuilds etc.

If you want additional things to happen before/after/around something
that already exists - like bundle.jar action and you can't modify all
the places where this specific bundle.jar action is used/called then you
can use a cspex to 'inject a wrapper action' called bundle.jar action
after first having renamed the original bundle.jar action. Your injected
'wrapping' action should have the (renamed) original bundle.jar as a
prerequisite. (I think this has been described earlier in this forum,
don't remember if there is an example in BuckyBook, I think I included
one that shows how to perform an Obfuscation action).

However, since "bundle.jar" is invoked after all the builders have
executed the required additional work would already have taken place if
it was implemented using builders.

Hope that helps.
- henri]]>Henrik Lindberg2012-02-03T11:40:57-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/789826/#msg_789826
i'm very interested in injecting a wrapper action ! That sounds exactly like the thing i'm looking for.
can't find a sample in the booky book, could you please provide one ?

where alterXXX is one of the alterGroups, alterArtifacts, etc. available
in the cspex. Unfortunately a description of the rename seems to be
missing in the BuckyBook.

You can then add
<alter ...>
<public name="foo.bar")
...

</alter ...>

Hope that helps.
- henrik]]>Henrik Lindberg2012-02-03T14:33:36-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/791955/#msg_791955
thanks for the links to the samples.
i tried to replace eclipse.build with the wrapper action by renaming eclipse.build to original.eclipse.build:

when i try to execute my eclipse.build action i get the following error (using debug option).
it looks like the actor is missing for the renamed action:

Actions to perform (in order)
ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#original.eclipse.build
ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#datapackage.export
ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#datapackage.update
ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#get.datapackage
ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#eclipse.build
Action ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#original.eclipse.build refers to actor with id null but no such actor has been registered with extension-point org.eclipse.buckminster.core.actors

Jakob]]>Jakob Braeuchi2012-02-06T13:12:09-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/791968/#msg_791968
associated with it), you need to use a group.

The reference to an "attribute" is resolved using name, i.e. it is ok to
change the type from action to group.

btw i do not understand why the renamed eclipse.build action complains about a missing actor; is this a bug ?

thanks
jakob
]]>Jakob Braeuchi2012-02-07T08:44:43-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/792904/#msg_792904
The eclipse.build is an internal action that represents the workspace build. It cannot be replaced with a group. You can
add a new group that uses the eclipse.build as a prerequisite and adds additional things though.

Action ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#original.eclipse.build refers to actor with id null but no such actor has been registered with extension-point org.eclipse.buckminster.core.actors

thanks
jakob]]>Jakob Braeuchi2012-02-07T21:24:31-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/793187/#msg_793187
You cannot replace the eclipse.build action. It's an internal action that acts as a placeholder for the workspace
builder. Think of it as a hook to that builder. You can either call it directly or use it as a prerequisite in other
actions. That's it.

- thomas

On 02/07/2012 10:24 PM, Jakob Braeuchi wrote:
> hi thomas,
>
> my first try was to replace eclipse.build with my own action, but then actor was missing in the renamed action.
> Action ch.rtc.bdv.data:osgi.bundle$1.0.0.qualifier#original.eclipse.build refers to actor with id null but no such actor
> has been registered with extension-point org.eclipse.buckminster.core.actors
>
>
> thanks jakob]]>Thomas Hallgren2012-02-07T21:31:18-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/794360/#msg_794360
thanks for the clear statement.
i'd like to see it in the bucky book in the chapter about replacing actions

jakob]]>Jakob Braeuchi2012-02-09T07:35:12-00:00Re: buckminster.postbind?https://www.eclipse.org/forums/index.php/mv/msg/245518/794779/#msg_794779
> hi thomas,
>
> thanks for the clear statement. i'd like to see it in the bucky book in
> the chapter about replacing actions ;)