On Thu, Dec 16, 2021 at 10:38 AM 'simon' via Jenkins Developers <
[email protected]> wrote:

> how can I access the current request path* from inside a class extending
> `hudson.model.Action`? I would like to extend the sidebar link plugin to
> add a reference to the url.
>

https://github.com/jenkinsci/sidebar-link-plugin/blob/96c70e3a6fc4cb1357838d8609f029aa15874376/src/main/java/hudson/plugins/sidebar_link/ProjectLinks.java#L116
might be a reasonable place to tell the LinkAction about its owner (or at
least the owner's #getUrl).

Otherwise you can always fall back on
https://javadoc.jenkins.io/component/stapler/org/kohsuke/stapler/Stapler.html#getCurrentRequest--

-- 
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 on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAMo7PtJy9XfLQCz4yQDHT3MHoFadJiB_Y99LD2wQVkbRux5OQg%40mail.gmail.com.

Reply via email to