Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for groovy views as well as help files in the structure view #150

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

Vlatombe
Copy link
Member

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@duemir duemir self-requested a review April 13, 2023 22:13
@duemir
Copy link
Member

duemir commented Apr 26, 2023

I think it is a good idea to compare the File Type, but I think it'll be better to keep it typesafe and compare it with FileType instances. I'll doodle a bit to figure out the approach.
Maybe I am overthinking it, but I want to add a Groovy plugin as an optional dependency.

@duemir
Copy link
Member

duemir commented Apr 27, 2023

I made it work which made me realise that it'll lead to groovy views showing up only when Groovy plugin is installed. So this should probably be just right. Maybe using file extensions will make it closer to stapler itself 🤔

@duemir
Copy link
Member

duemir commented Apr 27, 2023

Well, this implementation doesn't work if the Groovy plugin is not installed. Without the plugin, there is no "Groovy" file type.

@duemir
Copy link
Member

duemir commented Apr 27, 2023

#153 is my rough idea of how to do it via the Extension Point.

@duemir
Copy link
Member

duemir commented Apr 27, 2023

@timja can you give your two cents?

@timja
Copy link
Member

timja commented Apr 27, 2023

Does this assume all groovy files could be views?


No strong opinions on this, generally I convert groovy views to jelly if I have to do anything nontrivial on them.
We don't really recommend groovy views for new code.

@duemir
Copy link
Member

duemir commented Apr 27, 2023

Does this assume all groovy files could be views?

All groovy files in a package that has the same name as fully qualified name of a class for which structure view is constructed

@timja
Copy link
Member

timja commented Apr 27, 2023

Does this assume all groovy files could be views?

All groovy files in a package that has the same name as fully qualified name of a class for which structure view is constructed

ok so sounds safe enough

@duemir duemir merged commit 3452cb1 into jenkinsci:master Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants