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

Make swingx/MaterialTaskPaneUI optional #199

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

juanmuscaria
Copy link
Contributor

@juanmuscaria juanmuscaria commented Feb 3, 2024

This change will gracefully catch NoClassDefFoundError in case swingx is not present in the classpath, allowing material ui to be used without it.

In the end, I've decided against making swingx compileOnly as it would require more changes than needed, consumers instead can exclude swingx if they desire.
For making MaterialTaskPaneUI optional, I decided to try-catch the class initialization instead of using a plain string with the class name to keep consistency with all other field declarations, but had to move it to a static block to do so.

Fixes #198

This change will gracefully catch NoClassDefFoundError in case swingx is not present in the classpath, allowing material ui to be used without it.
Copy link
Owner

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I left a small comment and I think that swingx is used by @zanderson9 inside JMars, so maybe she need to be ping too

src/main/java/mdlaf/MaterialLookAndFeel.java Show resolved Hide resolved
This will tell people that swingx is optional
and can be excluded using their dependency management tools.
@vincenzopalazzo vincenzopalazzo merged commit ffa02de into vincenzopalazzo:master Feb 5, 2024
2 checks passed
Copy link
Collaborator

@zanderson9 zanderson9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make swingx optional
3 participants