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

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAOf5uw%3DFMddKYqyANtkjkpr-7jRdOVXZ46Y%2B_%3DuffqQiQhwJUw%40mail.gmail.com.

Reply via email to