-
Notifications
You must be signed in to change notification settings - Fork 32
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
Configure Built-In plantuml to not steal keyboard focus on MacOS X #547
Comments
Thank you for the investigation. public class UMLDoclet extends StandardDoclet {
static {
System.setProperty("java.awt.headless", "true");
}
// ...
public UMLDoclet() {
super();
this.config = new DocletConfig();
System.out.println("Headless? java.awt.headless=" + System.getProperty("java.awt.headless")
+ ", GraphicsEnvironment.isHeadless()=" + java.awt.GraphicsEnvironment.isHeadless());
}
} Results in: Headless? java.awt.headless=true, GraphicsEnvironment.isHeadless()=false The java module system also prevents us from using filthy reflection tools to try manipulate the private static Do you have other suggestions that will autoconfigure the built-in PlantUML behave decently? |
Perhaps the maven javadoc plugin could (/should) set this system property by default? |
Okay, that may have been a bit premature running tests from my IDE 🫣. Commandline maven gives me:
I'll create a version where I set the |
@arthurvl Could you please check whether the problem still exists with version |
Closing this issue to lack of activity. @arthurvl feel free to re-open if you still experience this issue with the latest version. |
Is your feature request related to a problem? Please describe.
Running a JavaDoc with UMLDoclet from maven repeatedly steals keyboard focus on MacOS X. This makes it hard to use the computer while the javadoc generation is running.
Describe the solution you'd like
It would be good to provide a mechanism to set the java.awt.headless=true property for the run context of the built-in plantuml, or do so by default.
Describe alternatives you've considered
Setting java.awt.headless through _JAVA_OPTIONS works but is somewhat clunky. Neither JAVA_OPTS nor MAVEN_OPTS will be picked up. Setting it through additionalJOptions or additionalOptions also does not work. Having to set it at all can now only be documented in a readme or faq, rather than set in e.g. the pom.xml.
The text was updated successfully, but these errors were encountered: