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 71858 - I18N: checkbox in Change Visible Columns have invalid mnemonic
Summary: I18N: checkbox in Change Visible Columns have invalid mnemonic
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: API, API_REVIEW_FAST, I18N
Depends on:
Blocks:
 
Reported: 2006-01-25 15:07 UTC by Masaki Katakai
Modified: 2006-10-23 16:39 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snapshot - LocalsView dialog (19.00 KB, image/jpeg)
2006-01-25 15:08 UTC, Masaki Katakai
Details
The API change. (5.35 KB, text/plain)
2006-01-30 17:45 UTC, Martin Entlicher
Details
The test for the new method. (2.84 KB, patch)
2006-01-31 13:10 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2006-01-25 15:07:01 UTC
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.
Comment 1 Masaki Katakai 2006-01-25 15:08:05 UTC
Created attachment 28593 [details]
snapshot - LocalsView dialog
Comment 2 Martin Entlicher 2006-01-25 17:32:04 UTC
Please advice, how can we provide mnemonic info for this (if possible at all).
Comment 3 Ken Frank 2006-01-25 21:05:34 UTC
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
Comment 4 Martin Entlicher 2006-01-25 22:41:24 UTC
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...
Comment 5 Ken Frank 2006-01-25 22:50:02 UTC
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
Comment 6 Stanislav Aubrecht 2006-01-26 11:58:43 UTC
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.
Comment 7 Martin Entlicher 2006-01-26 20:24:00 UTC
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.
Comment 8 Martin Entlicher 2006-01-30 17:45:53 UTC
Created attachment 28659 [details]
The API change.
Comment 9 Martin Entlicher 2006-01-30 17:56:41 UTC
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.
Comment 10 Jaroslav Tulach 2006-01-31 09:21:55 UTC
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. 
  
Comment 11 Martin Entlicher 2006-01-31 13:10:01 UTC
Created attachment 28674 [details]
The test for the new method.
Comment 12 Martin Entlicher 2006-01-31 13:32:02 UTC
O.K., thanks for comments. I'll add the @since 1.11 tag and I've attached the
test also.
Comment 13 Martin Entlicher 2006-02-10 11:24:27 UTC
Thanks for the review, I'm going to commit the change later today...
Comment 14 Martin Entlicher 2006-02-10 14:57:33 UTC
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
Comment 15 Pavel Rehak 2006-08-23 13:34:30 UTC
Verfied.