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.
check boxes on all "Change Visible Columns" dialogs for debugger have invalid mnemonic when messages are localized. The first character always has the underline. See attachment. I can not find mnemonic definitions in resource bundle.
Created attachment 28593 [details] snapshot - LocalsView dialog
Please advice, how can we provide mnemonic info for this (if possible at all).
Martin, are you asking question below to l10n ? Its for base team dev to define/setup mnemonic just like for any other windows. there are 2 ways mne done in nb, using the '&' before the letter of the desired mnemonic as part of the key/value for the label/msg in bundle file (assuming here that these are in bundle files) or having 2 key/values for each in the bundle file the actual mne letter and the label itself. or maybe the assigned letter is hardcoded in the code vs coming from bundle file if not the 2 key/val as above. I suggest some source code analysis to see if any mne are so assigned, even if not related to this particualr issue. I'll point you separately to more discussion of these requirements. ken.frank@sun.com
No, I'm asking the developer of this in openide - saubrecht. Debugger does not own this window, the check boxes are created in openide. And there does not seem to be an API for setting the mnemonics for this. We can try to use '&' approach, if it will not have side-effects for the display of the same string on different places...
sorry for the misunderstanding, Martin. Are there any similar places in debug that might have the same kind of problem -- I could add to this issue or file new as applicable. Stanislav, are there other parts of areas you handle that might have situations where mnemonics not been defined or hardcoded and not from bundle file ? ken.frank@sun.com
there's a property attribute "ColumnMnemonicCharTTV" in the org.openide.explorer.view.NodeTableModel whose value is used to set the mnemonic char (if available). reassigning back to debugger team.
Aha, this was done as a fix of issue #64856. We need an API change in ColumnModel class to be able to define mnemonics from ResourceBundles.
Created attachment 28659 [details] The API change.
Please review the attached API change. No tests written for this - there is no getProperties() method in TreeTableView, so it's not clear to me at all how to verify that the mnemonic was actually set. The functionality will be certainly verified by QE and translators.
The new method is missing @since 1.11 tag in javadoc. Re. tests: You can simply write a unit test for Column class and ensure that if a ColumnModel returning non-null from the getDisplayedMnemonic method is passed to constructor, the Column.getValue("ColumnMnemonicCharTTV") returns the mnemonic. This should be pretty easy to do and clearly verifies the contract. The fact that "ColumnMnemonicCharTTV" is then properly displayed should have been tested in TreeTableView.
Created attachment 28674 [details] The test for the new method.
O.K., thanks for comments. I'll add the @since 1.11 tag and I've attached the test also.
Thanks for the review, I'm going to commit the change later today...
Fixed in trunk: Checking in debuggercore/src/org/netbeans/modules/debugger/ui/models/Bundle.properties; /cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/Bundle.properties,v <-- Bundle.properties new revision: 1.7; previous revision: 1.6 done Checking in debuggercore/src/org/netbeans/modules/debugger/ui/models/ColumnModels.java; /cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/ColumnModels.java,v <-- ColumnModels.java new revision: 1.9; previous revision: 1.8 done Checking in debuggercore/viewmodel/apichanges.xml; /cvs/debuggercore/viewmodel/apichanges.xml,v <-- apichanges.xml new revision: 1.16; previous revision: 1.15 done Checking in debuggercore/viewmodel/manifest.mf; /cvs/debuggercore/viewmodel/manifest.mf,v <-- manifest.mf new revision: 1.17; previous revision: 1.16 done Checking in debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/Column.java; /cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/Column.java,v <-- Column.java new revision: 1.4; previous revision: 1.3 done Checking in debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java; /cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java,v <-- TreeTable.java new revision: 1.24; previous revision: 1.23 done Checking in debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/ColumnModel.java; /cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/ColumnModel.java,v <-- ColumnModel.java new revision: 1.6; previous revision: 1.5 done Removing debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/BasicTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/BasicTest.java,v <-- BasicTest.java new revision: delete; previous revision: 1.10 done Removing debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/ModelEventTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/ModelEventTest.java,v <-- ModelEventTest.java new revision: delete; previous revision: 1.2 done Removing debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/YardaTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/YardaTest.java,v <-- YardaTest.java new revision: delete; previous revision: 1.2 done RCS file: /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/BasicTest.java,v done Checking in debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/BasicTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/BasicTest.java,v <-- BasicTest.java initial revision: 1.1 done RCS file: /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/ModelEventTest.java,v done Checking in debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/ModelEventTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/ModelEventTest.java,v <-- ModelEventTest.java initial revision: 1.1 done RCS file: /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/YardaTest.java,v done Checking in debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/YardaTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/modules/viewmodel/YardaTest.java,v <-- YardaTest.java initial revision: 1.1 done Checking in debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/Bundle.properties; /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/Bundle.properties,v <-- Bundle.properties new revision: 1.29; previous revision: 1.28 done Checking in debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/ClassesNodeModel.java; /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/ClassesNodeModel.java,v <-- ClassesNodeModel.java new revision: 1.6; previous revision: 1.5 done Checking in debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/SourcesModel.java; /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/SourcesModel.java,v <-- SourcesModel.java new revision: 1.16; previous revision: 1.15 done
Verfied.