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.

Bug 81468 - User Cannot copy text from Validation Callout
Summary: User Cannot copy text from Validation Callout
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexey Anjeleevich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-31 12:53 UTC by Michael Frisino
Modified: 2006-10-03 12:47 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Mini HTML Viewer (11.95 KB, application/octet-stream)
2006-09-05 12:34 UTC, Alexey Anjeleevich
Details
A screenshot of callout mockup using HTML (18.98 KB, image/png)
2006-09-11 19:43 UTC, Jiri Kopsa
Details
A callout mockup in HTML (4.84 KB, application/x-compressed)
2006-09-11 19:44 UTC, Jiri Kopsa
Details
Callout mockup - when should it look like when it loads properly. (263.09 KB, image/png)
2006-09-11 21:19 UTC, Jiri Kopsa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Frisino 2006-07-31 12:53:57 UTC
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.
Comment 1 Jiri Kopsa 2006-07-31 13:05:10 UTC
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?
Comment 2 Michael Frisino 2006-07-31 13:08:19 UTC
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.
Comment 3 Jiri Kopsa 2006-07-31 13:13:04 UTC
We will need to understand what are the limitations then.
Comment 4 Jiri Kopsa 2006-08-29 17:31:11 UTC
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!
Comment 5 Alexey Anjeleevich 2006-09-01 14:58:08 UTC
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.
Comment 6 Jiri Kopsa 2006-09-01 15:14:22 UTC
What if we still wanted to have selection and Ctrl+C working? What would need to
be changed and what would be the cost?
Comment 7 Alexey Anjeleevich 2006-09-05 12:34:11 UTC
Created attachment 33597 [details]
Mini HTML Viewer
Comment 8 Alexey Anjeleevich 2006-09-05 12:37:27 UTC
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).
Comment 9 Ritesh Adval 2006-09-06 01:28:30 UTC
This is an editor bug for showing validation errors. reassigning to correct 
category.
Comment 10 Alexey Anjeleevich 2006-09-11 11:01:22 UTC
Jirka, please, look at my last comments and attached mini browser.
Let's make final decision about way of fixing of this bug
Comment 11 Jiri Kopsa 2006-09-11 19:43:16 UTC
Created attachment 33784 [details]
A screenshot of callout mockup using HTML
Comment 12 Jiri Kopsa 2006-09-11 19:44:51 UTC
Created attachment 33785 [details]
A callout mockup in HTML
Comment 13 Jiri Kopsa 2006-09-11 19:51:26 UTC
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!
Comment 14 Jiri Kopsa 2006-09-11 19:55:09 UTC
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.
Comment 15 Jiri Kopsa 2006-09-11 21:19:30 UTC
Created attachment 33791 [details]
Callout mockup - when should it look like when it loads properly.
Comment 16 Jiri Kopsa 2006-09-11 21:20:49 UTC
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.
Comment 17 Alexey Anjeleevich 2006-09-12 14:38:18 UTC
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. 
Comment 18 Victoria Zhukovskaya 2006-10-03 12:47:20 UTC
WinXP Coke061001
selection text and Ctrl+A and Ctrl-C work