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.
NetBeans IDE Dev (Build 200705301800) 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87 Mac OS X version 10.4.9 running on i386 en_US (nb); MacRoman I have set the proxy port to ":8080" and pushed OK on the Options dialog. Then the following exception appeared in Exception dialog: java.lang.NumberFormatException: For input string: ":8080"
Created attachment 43018 [details] messages.log attached...
Reassigning back to owner.
Reassigning to new module owner jskrivanek.
Jiri Skrivanek agreed that he would review and integrate a patch for this issue contributed by the NetFIX [1] team. [1] http://wiki.netbeans.org/NetFIX
It looks like to be already fixed. I can't reproduce it anymore for 6.7. Probably should be closed as FIXED.
It's still being thrown in development builds. You can't see the exception in 6.7 FCS because it's only an AssertionError which is hidden in FCS on purpose.
which should be the behaviour when the value is invalid? Just ignore the value or some message should be showed? If yes, when should this message should be shown? Regards
In my opinion if user enters "aaa" or ":8080" as port, IDE should display a modal warning that "Proxy port you specified is invalid. Please use only digits e.g. 8080", value should be cleared and dialog should NOT close. What do others think?
I can reproduce in the following build: Product Version: NetBeans IDE Dev (Build 200908022240) Java: 1.5.0_19; Java HotSpot(TM) Client VM 1.5.0_19-137 System: Mac OS X version 10.5.7 running on i386; MacRoman; en_US (nb) IMHO the port textfield should accept only numbers. If other char than a number is typed then it should be ignored at the textfield.
I checked the Miscelleneous > Issue Tracking panel. The bugzilla panel has implemented number validation for the fields named "Refresh open queries every" and when we type something like "aa" in that field they show a red colored label in the panel saying invalid input and the OK button is greyed/disabled. I found this way of input validation a better way. The isValid() method is supported in the GeneralOptionsController which is delegated to GeneralOptionsPanel in the core.ui project and this method plainly returns true. I can change this implementation to make it like the bugzilla panel. I am attaching the screenshot of the bugzilla panel with error notification after this comment. Please confirm my understanding and comment so I can proceed with the fix. with regards Tushar Joshi, Nagpur NetFIX Team
Created attachment 85944 [details] bugzilla panel with input error shown
Question is where to put red error label. Otherwise it is OK. Also advanced proxy options dialog (click More.. button) should be treated the same way.
Ok, regarding where to put the red label, I will put one label and attach the screen-shot here. As the overall idea is accepted I will work on this locally and will show screen-shots first for the layout, then will attach the patch. Thanks for the input, I am able to proceed with this much input. with regards Tushar Joshi, Nagpur NetFIX Team
IMHO, this kind of message is really better than just don't accept OK button click. AFAIK user should always be notified about the problem even misconfiguration values. I really liked the idea. Regards
Created attachment 86109 [details] Error label position and working in options dialog
Created attachment 86110 [details] Error label on advanced proxy dialog
I have implemented the error label in the mail options dialog and also in the advanced proxy dialog. For general options panel I introduced a new label and manipulated it. For manipulating the OK button I implemented property listeners on GeneralOptionsPanel which was not implemented. For advanced proxy dialog as the dialog was shown with Dialog API DialogDisplayer and DialogDescriptor I used the usual way of NotificationLineSupport to show the error label and also manipulate the OK button. Please check the screenshots of both windows I have attached and comment. If the location of the label in general options dialog is ok I will attach the patch of this implementation. with regards Tushar Joshi, Nagpur NetFIX Team.
I like the proposal.
I really liked the proposal. The only concern is that we need to be consistent, so, IMHO will be important use the same image. Maybe it should be available in a common space where all module should look at about it? The same for colors. Maybe we need an proposal to change options dialog to support some way to show error and warning messages. IMO we just copy the image to this module to make everything consistent but in the future it should be reviewed. What do you think (probably here is not the right place to this discussion :)?
Created attachment 86111 [details] Implementation of the error labels
I have attached the patch for the error label implementations I have done as explained in earlier comment. @Michel I have kept the color of the label same as the NotificationLineSupport type label only the icon is missing. The position of the label is also custom position as there is no standard NotificationLineSupport for the general options dialog yet. Adding an icon may be too much for me at this starting level. If I add that icon how will it be added with the patch? as the file will be an PNG file, hence I have not done the icon part at this stage. with regards Tushar Joshi, Nagpur NetFIX Team.
Jirko, can you please review the patch? If it's okay would you be willing to add the Stop image? Thanks!
The image is included in the patch as binary data. In theory, no extra work at least for cvs and svn. HG I've never exported patches with binary data before. Thanks for your help and congratulations for the patch. Regards
The patch looks promising. To include a new file to a patch (including binary file) use 'hg add' and then 'hg diff'. My comments: JS01: Please, keep NetBeans formatting. Use Alt+Shift+F (Format) for newly added blocks of code. Also move private member methods like AdvancedProxyPanel.setDialogDescriptor behind constructors and public methods. Also add missing @Override annotations. JS02: GeneralOptionsPanel.errorLabel should be aligned to the right, IMO. To get correct color use Color nbErrorForeground = UIManager.getColor("nb.errorForeground"); //NOI18N if (nbErrorForeground == null) { nbErrorForeground = new Color(255, 0, 0); } org.openide.awt.Mnemonics.setLocalizedText(errorLabel... not needed. Then also remove GeneralOptionsPanel.errorLabel.text from Bundle.
Thanks a lot Jirko. Tushar?
Thanks for the review. I will work on the suggested modifications and re-submit the patch. with regards Tushar
Created attachment 86145 [details] Patch with suggested changes + binary error icon
Hi, I have made all the suggested changes. Added the error.png file same as used in the Core.Windows dialogs. Please review with regards Tushar Joshi, Nagpur NetFIX Team
Can this patch be added for next RC of NB6.8?
Great! I have no objection to apply the patch.
Jirko, could you please integrate the patch as soon as possible? Thanks a lot!
Patch applied. Thank you tusharvjoshi. core-main #eab44c9b9204
Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/eab44c9b9204 User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #105236 - Validate port number.
v. 200909210201