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.
Product Version: NetBeans IDE Dev (Build 200805130003) Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19 System: Linux version 2.6.24-17-generic running on i386; UTF-8; en_US (nb) In "Replace Code Format Editor" dialog, the OK button is enabled only if all parameters are filled in in the "Insert Internationalized String" dialog (the same holds for the "Internationalize" dialog)... This didn't hold in NB6.0.1 - the OK button was enabled, you were allowed to change the format of an i18n replace string with no limitations... I don't know if it is not just an enhancement (imho its not - it worked fine in 6.0.1, now the behavior is really strange, I think there is a little step backwards in NB functionality, but feel free to change it to an enhancement). Steps to reproduce: 1. Create some java application and open some java file 2. Prepare some properties file (we will try to insert internationalized string - we need to have it) 3. Go to "Tools > Internationalization > Insert Internationalized String" -> an "Insert Internationalized String" dialog opens 4. Click the "Format" button -> dialog with a title "Replace Code Format Editor" opens, but you cannot confirm it using OK button, close this dialog by clicking Cancel 5. Fill in bundle name and select a key in the "Insert Internationalized String" dialog 6. Click "Format" button again -> Now, you can click OK button I don't think there is a reason why users shouldn't be allowed to change the format of I18N replace string in the dialog without doing anything else, is there? (in that case this issue would be invalid...)
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