workflow-cps-plugin searchbox ace-builds

16 views
Skip to first unread message

Michael Nazzareno Trimarchi

unread,
Sep 15, 2025, 2:03:01 AM (5 days ago) Sep 15
to jenkin...@googlegroups.com
Hi all

Working to add to the workflow-editor the ace-build search box. This
should impact all the jelly that uses it. Now let's understand the
reason:

- searchbox allow to find/replace things to edit and change a pipeline
when we are debugging it
- allow to search element anyway that are not visible from the scrollbar
- it's integrated in ace-editor

Now I have tried several things. Let's start with the easy one:

diff --git a/plugin/src/main/js/workflow-editor.js
b/plugin/src/main/js/workflow-editor.js
index 1952cc5e..b28edf13 100644
--- a/plugin/src/main/js/workflow-editor.js
+++ b/plugin/src/main/js/workflow-editor.js
@@ -8,6 +8,7 @@ import ace from "ace-builds/src-noconflict/ace";
import "ace-builds/src-noconflict/ext-language_tools";
import "ace-builds/src-noconflict/mode-groovy";
import "ace-builds/src-noconflict/snippets/javascript";
+import "ace-builds/src-noconflict/ext-searchbox";


Now according to ace this should be enough to have it integrated but
when I search
using CTRL+F

2025-09-14 16:17:41.794+0000 [id=130] WARNING
h.i.i.InstallUncaughtExceptionHandler#handleException: Caught
unhandled exception with ID a70593c9-9edf-4abc-a6e2-f5295f618c19
java.lang.IllegalArgumentException: No such adjunct found:
org/jenkinsci/plugins/workflow/cps/ext-searchbox.js
at org.kohsuke.stapler.framework.adjunct.AdjunctManager.doDynamic(AdjunctManager.java:184)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:484)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:497)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:218)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140)
at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:622)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:800)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:938)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:369)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:800)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:938)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:721)
at org.kohsuke.stapler.Stapler.service(Stapler.java:253)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587)

I have test to install it and add some rule in webpack.common.js

Anyway from dumping of what is included in workflow-editor.js
generated from the webpack.common.js the search function should be
included inside the javascript. The workflow-editor.js that is the
result from the compilation anyway tries to fetch the ext-searchbox.js
from loadModule / loadScript function. Adding the require in the init
does not solve anything and nothing get solved if I add here:

<st:adjunct includes="org.jenkinsci.plugins.workflow.cps.workflow-editor,
org.jenkinsci.plugins.workflow.cps.ext-searchbox"
/>

I'm testing and run using mvn hpi:run -P quick-build

Michael

Tim Jacomb

unread,
Sep 15, 2025, 5:27:16 AM (4 days ago) Sep 15
to jenkin...@googlegroups.com
I tried for a while and wasn't able to get it to work

2 approaches I tried:

2. adding a webpack rule and updating the adjunct includes but the classloader wasn't finding the resource for some reason.

Cheers
Tim

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jenkinsci-dev/CAOf5uw%3DFMddKYqyANtkjkpr-7jRdOVXZ46Y%2B_%3DuffqQiQhwJUw%40mail.gmail.com.

Michael Nazzareno Trimarchi

unread,
Sep 15, 2025, 5:39:13 AM (4 days ago) Sep 15
to jenkin...@googlegroups.com
Hi

On Mon, Sep 15, 2025 at 11:27 AM Tim Jacomb <timja...@gmail.com> wrote:
>
> I tried for a while and wasn't able to get it to work
>
> 2 approaches I tried:
>
> 1. esm-resolver: https://github.com/ajaxorg/ace/issues/4782#issuecomment-1826278360
> 2. adding a webpack rule and updating the adjunct includes but the classloader wasn't finding the resource for some reason.
>

Yes, I have tried them both too. I'm thinking to move to monaca :D

Michael
> To view this discussion visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3Bic8FDOG65z8RRnBJbDPD7jFeZb2YHwgyGLVNWbT%3DS62hg%40mail.gmail.com.



--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
mic...@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
in...@amarulasolutions.com
www.amarulasolutions.com

Michael Nazzareno Trimarchi

unread,
Sep 15, 2025, 5:09:33 PM (4 days ago) Sep 15
to jenkin...@googlegroups.com
Hi Tim

I finally fixed it, now it works. I'm checking to make easy to use
with the sample widget

MIchael

On Mon, Sep 15, 2025 at 11:38 AM Michael Nazzareno Trimarchi

Michael Nazzareno Trimarchi

unread,
Sep 15, 2025, 6:13:12 PM (4 days ago) Sep 15
to jenkin...@googlegroups.com
Hi

This is the pull, https://github.com/jenkinsci/workflow-cps-plugin/pull/1085

Looking for someone help now on javascript and some other fixes to
make nicer appearance and working well with sample pipeline drop down
menu

Michael

On Mon, Sep 15, 2025 at 11:09 PM Michael Nazzareno Trimarchi
Reply all
Reply to author
Forward
0 new messages