- daniel sti
- 10/07/11
Hi,
can anyone provide me with a hint how i can get an Error Message Box in a refactoring.
I have to display some text while in the
refactor(refactoringContext) -> void {
??? MessagBox.showError("error text here"); ???
}
function ....
Best,
Dan
can anyone provide me with a hint how i can get an Error Message Box in a refactoring.
I have to display some text while in the
refactor(refactoringContext) -> void {
??? MessagBox.showError("error text here"); ???
}
function ....
Best,
Dan
- Alexey Pomelov
- 10/07/11
Hi, Dan
I really don't know if my solution is the best, but you can add the java_stub import for javax.swing to your refactorings model and use the JOptionPane class (it has several static methods for displaying message boxes).
Alexey
I really don't know if my solution is the best, but you can add the java_stub import for javax.swing to your refactorings model and use the JOptionPane class (it has several static methods for displaying message boxes).
Alexey
- daniel sti
- 10/07/11
Hi Alexey,
but don“t i need a parent component or something like that? I do not have any reference to the ui thread ....
Dan
but don“t i need a parent component or something like that? I do not have any reference to the ui thread ....
Dan
- Alexey Pomelov
- 10/07/11
You can provide null as the parent component
- Alexey Pomelov
- 10/07/11
Just tried:
result in correct modal message box.
JOptionPane.showMessageDialog(null,
"Message", "Caption" JOptionPane.ERROR_MESSAGE);
result in correct modal message box.
- daniel sti
- 10/07/11