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.
Summary: | OK button is disabled in "Replace Code Format Editor" dialog | ||
---|---|---|---|
Product: | java | Reporter: | Petr Dvorak <joshis> |
Component: | I18N | Assignee: | Ralph Ruijs <ralphbenjamin> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Dialog re-design |
Description
Petr Dvorak
2008-05-14 17:09:18 UTC
I agree that in case the dialog for formatting is enabled to open then OK button should not be disabled. But anyway In case you haven't selected any bundle and keys in primary dialog, any formatted code couldn't be generated. I hope that better solution is to disable "Format" button in case when no parameters are filled instead of enabling OK button in Format Editor. Well, I don't know if disabling the "Format" button is currently the good way how to deal with the issue, Janie. You don't need to see any generated code after you change the replace string format, you might just want to set the replace string format... I think the way it worked in 6.0.1 was quite fine (not perfect) as the change in the replace string format was persistent after you reopened the dialog. Supose this use case: you are using some solution for the i18n and you want to set the replace string format matching your i18n solution in the beginning of your work (before there is any internationalized string in the project - you just want to "get ready") so that you can just use it later whenever you want to really insert some internationalized string... Anyway - is there any way how to edit the list of replace string formats (can you edit the items in the "Replace Code Format Editor" combobox?) or is user allowed to create/customize a replace string before he/she really wants to do some internationalization in the project? [ I haven't found these features :-( but maybe they are somewhere... ] I think the best would be to do following: 1. Redesign the "Replace Code Format Editor" - change combobox to listbox, add a textfield and new buttons: "Add", "Remove", "Edit", ... See the picture (it is just an illustration, don't take the appearance of the dialog too seriously;))... 2. Allow invoking the "Replace Code Format Editor" from somewhere else then from the "Insert Internationalized String" dialog (and "Internationalize" dialog). Hmm, I do not actually know where it should be placed. It would be possible to create a new sub-menu in the Internationalize menu called Others, or something (Tools > Internationalization > Others > Edit Replace Code Formats)... 3. An OK button in above mentioned dialog would just store the selected listbox item somewhere. The dialog "Insert internationalized string" could just use the currently stored value when "Replace code format editor" dialog is closed... If there is any problem (conceptual, technical or other) with this solution, please comment on it. Created attachment 61449 [details]
Dialog re-design
Hello, this issue seems to a side effect in user experience likely caused by a fix for issue 58477. The OK button was always enabled in all pre-6.1 releases. Starting with 6.1 the OK button is enabled only when the formatting code is properly formatted and can be properly handled w/o exceptions. From my point of view this issue is not DEFECT, but ENHANCEMENT. I do admit that disabling OK button is not the best way of feedback to tell user about improperly formatted replace string, but it was the only way possible in that time for NB 6.1 release. It was the only way w/o UI change, which gives user at least some feedback that something is wrong. If the formating code is correct, the OK button should be enabled and in such a case I would treat this issue a DEFECT. Notes for UI redesign: Please consider also graphical&textual notification area where user can get info about quality of the formatting string, current dialog just disables the OK button. Developer note: Disabling/enabling of the OK button is done by calls of "dd.setValid()" method in http://hg.netbeans.org/main/file/1d277c3e7f2d/i18n/src/org/netbeans/modules/i18n/PropertyPanel.java lines 546-572 Hi Rudo, OK button is always disabled in case when no resource bundle and keys are filled in basic dialog and it doesn't matter if formatted string is correct or not. I agree with joshis that current behavior of this dialog is odd. This case should be handled better. But anyway IMHO 6.5 release is coming soon and this issue is not so serious to be solved immediately in such complicated way. This state doesn't cause any issue to user, he just has to adapt to it. So, I agree with joshis that this is bug not enhancement. On the other hand it's not so serious to fulfill criteria of priority P3 therefore I am lowering it on P4. Finally, I don't think that we have enough time to fix it because there are more critical issues which should be done in 6.5 Yes, I agree, janie. *** Issue 137149 has been marked as a duplicate of this issue. *** This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss |