We recently converted a large project from Swing to JavaFX. A conversion program was written to automate some of this process which saved a lot of time, but also left us with some issues. One of which is we have some Alerts that never have showAndWait()
called. I was hoping to put a Regex together to find all instances in our project that meet the following criteria:
Starts with new Alert(
End with ");
And potentially contains 0 or multiple line feeds along with any characters in between the parenthesis.
I was able to come up with this: new Alert\(*.*\R*.*\"\)\;
But it seems to also include results that end with the showAndWait()
call as well.
Examples:
new Alert(AlertType.INFORMATION, "This alert should not be matched").showAndWait();
new Alert(AlertType.INFORMATION, "This alert should be matched");
Thanks