http://imagej.273.s1.nabble.com/Programatic-Plugin-installation-tp3702389p3702390.html
Oh great. Thanks for your help
>
> > How do I install macro tools from another plugin?
> > Currently I am doing:-
> >
> > MacroInstaller installer = new ij.plugin.MacroInstaller();
> >
> > installer.install(ROIBrush_.MACRO_CMD); //MACRO_CMD contains the
> > macro
> > definition as it would appear in a macro.txt file
> > installer.install(LabelBrush_.MACRO_CMD);
> > But only the last called macro tool appears in the toolbar. i.e. in
> > this
> > case the LabelBrush_ tool appears, but if I reversed the calling
> > order then
> > the ROIBrush would be the only one that appeared in the toolbar.
>
> The MacroInstaller installs macro sets and each set you install
> replaces the previous one. You can install both macros using
>
> installer.install(ROIBrush_.MACRO_CMD+LabelBrush_.MACRO_CMD);
>
> but you need to be using ImageJ 1.37d or later if the second macro uses
> global variables. This is because earlier versions of ImageJ required
> that global variables be defined at the beginning of the macro file.
>
> I posted the RoiBrush plugin at
> <
http://rsb.info.nih.gov/ij/plugins/roi-brush.html>. Let me know if
> there are any changes you would like me to make to the Web page.
>
> By the way, I spent the morning figuring out why leaving out the braces
> in
>
> if (flags&alt==0) {
> call('ROI_Brush.label', x,y,z,flags, roiBrushWidth);
> } else {
> call('ROI_Brush.unlabel', x,y,z,flags, roiBrushWidth);
> }
>
> caused a macro error. The fix will be in ImageJ 1.37j, which I plan to
> release in the next day or two.
>
> -wayne
>
>