This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
We originally have requirement that user should be able to copy text from the Validation callout. The use case is that user wishes to save off validation messages to some text. Maybe for bug report, maybe for email, whatever. It is common use case. The prior version of callout based on HTML renderer allowed for copy CTRL-C, CTRL-A actions. But the latest version based on HIE style guidelines was implemented as a JLabel instead of HTML renderer. So now we have lost the Copy capability. Workaround is that the user can still copy same messages from the output window. So this is not super critical bug. Fix is debatable. HIE and engineering need to work out solution. If we go back to prior HTML renderer implementation, there is concern that it introduces other useabiity issues, like the fact that the callout would then capture ALL keystrokes while it has focus, including CTRL-Z. Not sure if that is reason to avoid HTML renderer. We need to discuss post beta.
Copy & Paste functionality is peceived as essential and we should implement it. Could CTRL-Z be passed from the callout to the diagram so it works as expected?
Maybe, but either way it will require some iteration on callout L&F. Alexey had to use JLabel today because he could not acheive your recommendation for L&F with HTML renderer. So we need to find compromise L&F style that can be implemented with solution that will allow us to to implement Ctrl-A, Ctrl-C etc.
We will need to understand what are the limitations then.
Alexey, what are the limitations from the implementation perspective? Would we have one JLabel per validation message or would you put all the stuff into one JLabel? Would the separators and icons be included in the JLabel (and is it capable of that via HTML inlining?) or would the icons be rendered separately? Please help me to understand where we need to shift the L&F of the callout to be able to implement it with Clipboard Copy easily. Thanks!
HTML renderer implemented in JEditorPane (which we used before) is very simple and has a lot of resrtrictions: it does not support CSS. This means that it is impossible to set font like in IDE, impossible to set font size witch we want, impossible to use asymmetric insets, and impossible to correctly align icons. My suggestion is to add popup(context) menu for error message with "Copy to clipboard" item.
What if we still wanted to have selection and Ctrl+C working? What would need to be changed and what would be the cost?
Created attachment 33597 [details] Mini HTML Viewer
Jirka, we need to rollback to java html renderer, the cost of this rollback is time and design. To better understand problems with java html renderer, We've implemented mini html browser in java. You can use this app to evaluate all limitations of HTML render we are about to use in Validation call-out panels. So, you can try to create HTML markup by yourself, and if you get the result you will be saticfied with, just send it to us in HTML code, so we will use it for call-out panel. How to use: 1) Download Mini HTML Viewer attachment from previous comment 2) To run: java -jar HTMLViewer4Jirka.jar 3) Create html page with validation results in any editor, then open it in HTMLViewer4Jirka ("Open" button on toolbar) 4) Use "Reload" button to reload changed html 5) Don't forget to check your design for different screen DPI, and system font size (HTMLViewer4Jirka should be restarted).
This is an editor bug for showing validation errors. reassigning to correct category.
Jirka, please, look at my last comments and attached mini browser. Let's make final decision about way of fixing of this bug
Created attachment 33784 [details] A screenshot of callout mockup using HTML
Created attachment 33785 [details] A callout mockup in HTML
I've attached a mockup in HTML - see the attached screenshot and zip file. As the Java SE does not support border-bottom-width and other important CSS style attributes, the bottom line was workarounded with an image file (1pix9b9b9b.png). http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/html/CSS.html Assigning to Alexey... thanks buddy for the tool, it helped a lot!
Pleaes note that I used fixed font size of 9 px, which equals to the default setting on Windows XP. The font size needs to be set appropriately according to the current platform setting.
Created attachment 33791 [details] Callout mockup - when should it look like when it loads properly.
There is an issue with the rendering - I've attached the mockup how should it look like. Unfortunately the HTML renderer is unstable and sometimes renders incorrectly.
Fixed. Now we again use java html rendering. User cas select text and use Ctrl-C to copy. A litle modified markup used. More stable rendering is achived by specifing of width and height of images in html code.
WinXP Coke061001 selection text and Ctrl+A and Ctrl-C work