This is in reference to issue #7387 which is not clearly describing the problem.
To reproduce the problem do the following ..
1. Open ADS and open Query Window, then type "select * from x". You will notice that the editor has focus because cursor is blinking.
2. Then do a File->Options ... then click OK. Ok will call EditorPreferences.setAnnotationBarVisible(mime, b). Once the Option dialog closes you will see that the editor does not have a blinking cursor any more. There is no focus on the frame or editor.
3. If you right mouse click on the editor you will get the popup menu, but there is still no focus ... if you click on a menu action, the action will not be called.
4. Yet, if you left mouse click on the editor to give focus to the editor, then right mouse click to get the popup menu, then select an action, the action is called.
There are two problems :
1. The call to EditorPreferences.setAnnotationBarVisible(mime, b) loses the focus to the editor ( Seems to be Vincaed Editor issue )
2. A click to an action in a popup menu doesn't seem to be triggered if the component doesn't have focus. ( Seems to be a Swing issue )
Things to note :
1. The call to EditorPreferences.setAnnotationBarVisible(mime, b) causes focus loss, but none of the other EditorPreferences.setXXX methods cause focus lose.
2. Adding a requestFocus() call to DatastudioOptions.OptionsDialog2.onOK() at the end doesn't seem to give focus back to editor. ( eg : ((CFrame)getParent()).getPanelView().requestFocus(); )
This is not limited to the SQL editors. You can reproduce this with the HTML editor. You can also reproduce in the DemoApplication by adding to the DemoOptions ...
new OptionDialog2(f, b.getRoot()) {
protected void onOk() {
super.onOk();
EditorPreferences.setAnnotationBarVisible(HtmlKit.HTML_MIME_TYPE, true);
}
}.open();
I can still reproduce the issue with 12.0.0-alpha-55 - look at the attached gif file in issue#7387 which clearly shows how to reproduce
I can still reproduce the issue with 12.0.0-alpha-55 - look at the attached gif file in issue#7387 which clearly shows how to reproduce
It works for me even with the alpha-55 build, under Ubuntu. Do you have issues with it under Windows? I'll test with the Windows build, too.
This issue is about focus loosing , which doesn't occur anymore (on my side) with the latest builds, i.e. if the editor had the focus before opening the Options window, it will gain the focus again after hitting OK on this window. Right-clicking and choosing "Format Script" in this case will show the "Beautify Options" window.
If the editor did not have the keyboard focus before showing the Options dialog, after this window is closed the right-click on the editor won't give focus to it, therefore "Format Script" option won't work, but this is another issue (JIDE focus issue).
It works for me even with the alpha-55 build, under Ubuntu. Do you have issues with it under Windows? I'll test with the Windows build, too.
This issue is about focus loosing , which doesn't occur anymore (on my side) with the latest builds, i.e. if the editor had the focus before opening the Options window, it will gain the focus again after hitting OK on this window. Right-clicking and choosing "Format Script" in this case will show the "Beautify Options" window.
If the editor did not have the keyboard focus before showing the Options dialog, after this window is closed the right-click on the editor won't give focus to it, therefore "Format Script" option won't work, but this is another issue (JIDE focus issue).
It works under Windows, too. I've tested with a MySQL connection, following the steps indicated in the #7387 gif animation. I don't have an Oracle DB here, therefore please test if this issue occurs again only for certain mimetypes (it shouldn't, you don't have to check for every text/sql-* mimetype , just see if it does reproduce on a MySQL connection on your side).
I still suspect that the editor didn't have the keyboard focus before opening the Options window.
It works under Windows, too. I've tested with a MySQL connection, following the steps indicated in the #7387 gif animation. I don't have an Oracle DB here, therefore please test if this issue occurs again only for certain mimetypes (it shouldn't, you don't have to check for every text/sql-* mimetype , just see if it does reproduce on a MySQL connection on your side).
I still suspect that the editor didn't have the keyboard focus before opening the Options window.
I was able to reproduce it a few times in 12.0.0-alpha-56 once I searched in File-->Options for a term in the "Type filter text.." and then reopened File Options a 2nd time. Even though the editor had focus previously, after the Options dialog was opened it lost focus as before.
Will reopen once I get a consistent reproducible behaviour
I was able to reproduce it a few times in 12.0.0-alpha-56 once I searched in File-->Options for a term in the "Type filter text.." and then reopened File Options a 2nd time. Even though the editor had focus previously, after the Options dialog was opened it lost focus as before.
Will reopen once I get a consistent reproducible behaviour
Issue #7452 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build vincaed 3.0.4.0 |
No time estimate |
This is not limited to the SQL editors. You can reproduce this with the HTML editor. You can also reproduce in the DemoApplication by adding to the DemoOptions ...
new OptionDialog2(f, b.getRoot()) {
protected void onOk() {
super.onOk();
EditorPreferences.setAnnotationBarVisible(HtmlKit.HTML_MIME_TYPE, true);
}
}.open();