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 219919 - Annotation for keywords should use NBBundles
Summary: Annotation for keywords should use NBBundles
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-11 13:43 UTC by Milutin Kristofic
Modified: 2012-10-17 08:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milutin Kristofic 2012-10-11 13:43:05 UTC
In Bug #218312 was introduced new annotation. It should only use NbBundle for keywords.

In some Options Panel Controller, there are already keyword bundles. For example FontAndColorsPanelController has #KW_FontsAndColorsOptions. 

This is ok: 
120975:+@OptionsPanelController.Keywords(keywords={"#KW_General_Editor"}, location=OptionsDisplayer.EDITOR, index=0)
121085-+@NbBundle.Messages({"KW_General_Editor=general editor"})
--
7945-  */
17950:+@OptionsPanelController.Keywords(keywords={"#KW_FilesOptions"}, location=OptionsDisplayer.ADVANCED, tabTitle="#AdvancedOption.displayName")
18091- final class FileAssociationsPanel extends javax.swing.JPanel {
--
18894-  */
50221- 
50223:+@OptionsPanelController.Keywords(keywords={"#AdvancedOption_Tooltip", "svg"}, location=OptionsDisplayer.ADVANCED, tabTitle="#AdvancedOption_DisplayName")
50378- final class SvgcorePanel extends javax.swing.JPanel {
--

This is wrong:


1909-  */
1914:+@OptionsPanelController.Keywords(keywords={"issue tracking"}, location=OptionsDisplayer.ADVANCED, tabTitle="#LBL_IssueTracking")
2044- class BugtrackingOptionsPanel extends javax.swing.JPanel {
--
3760-  */
3765:+@OptionsPanelController.Keywords(keywords={"bugzilla", "issue tracking"}, location=OptionsDisplayer.ADVANCED, tabTitle="Issue Tracking")
3903- public class BugzillaOptionsPanel extends javax.swing.JPanel {
--
5967- 
5969:+@OptionsPanelController.Keywords(keywords={"c/c++ debugging"}, location=CndUIConstants.TOOLS_OPTIONS_CND_CATEGORY_ID, index=3)
6097- public class GlobalOptionsPanel extends JPanel {
--
8104-  */
8109:+@OptionsPanelController.Keywords(keywords={"c/c++ project options"}, location=CndUIConstants.TOOLS_OPTIONS_CND_CATEGORY_ID, index=1)
8243- public class ProjectOptionsPanel extends JPanel {
--
10247- 
10249:+@OptionsPanelController.Keywords(keywords={"c/c++ code assistance"}, location=CndUIConstants.TOOLS_OPTIONS_CND_CATEGORY_ID, index=2)
10383- public class ParserSettingsPanel extends JPanel implements ChangeListener, ActionListener, IsChangedListener {
--
11862- /** Display the "Tools Default" panel */
11904:+@OptionsPanelController.Keywords(keywords={"c/c++ build tools"}, location=CndUIConstants.TOOLS_OPTIONS_CND_CATEGORY_ID, index=0)
12034- public final class ToolsPanel extends JPanel implements ActionListener,
--
13859-  */
13864:+@OptionsPanelController.Keywords(keywords={"c/c++ other options"}, location=CndUIConstants.TOOLS_OPTIONS_CND_CATEGORY_ID, index=4)
13996- /*package-local*/ final class CndOtherOptionsPanel extends javax.swing.JPanel implements ActionListener {
--
15968- })
15972:+@OptionsPanelController.Keywords(keywords={"Output Window Font Color"}, location=OptionsDisplayer.ADVANCED, tabTitle="Output")
16100- public final class OutputSettingsPanel extends javax.swing.JPanel {
--
1
18899:+@OptionsPanelController.Keywords(keywords={"advanced proxy"}, location=OptionsDisplayer.GENERAL)
18997- public class AdvancedProxyPanel extends javax.swing.JPanel {
--
19838-  */
19843:+@OptionsPanelController.Keywords(keywords={"#KW_General"}, location=OptionsDisplayer.GENERAL)
19938- public class GeneralOptionsPanel extends JPanel implements ActionListener {
--
20858-  */
20863:+@OptionsPanelController.Keywords(keywords={"web browser"}, location=OptionsDisplayer.GENERAL)
20958- public class WebBrowsersOptionsPanel extends JPanel implements ListSelectionListener {
--
22848- 
22850:+@OptionsPanelController.Keywords(keywords={"#AdvancedOption_DisplayName_WinSys"}, location=OptionsDisplayer.ADVANCED, tabTitle="#AdvancedOption_DisplayName_WinSys")
23016- final class WinSysPanel extends javax.swing.JPanel {
--
25071- 
25073:+@OptionsPanelController.Keywords(keywords={"java debugger"}, location=JavaOptions.JAVA, index=3)
25171- final class JavaDebuggerPanel extends StorablePanel {
--
26942-  */
26947:+@OptionsPanelController.Keywords(keywords={"diff colors"}, location=OptionsDisplayer.FONTSANDCOLORS, index=3)
27058- public class DiffColorsPanel extends javax.swing.JPanel implements ActionListener, FontsColorsController, PropertyChangeListener {
--
27818-  */
27823:+@OptionsPanelController.Keywords(keywords={"diff"}, location=OptionsDisplayer.ADVANCED, tabTitle="Diff")
27929- class DiffOptionsPanel extends javax.swing.JPanel implements ChangeListener, DocumentListener {
--
30022-  */
30027:+@OptionsPanelController.Keywords(keywords = {"code", "templates"}, location = OptionsDisplayer.EDITOR, index = 3)
30142- public class CodeTemplatesPanel extends JPanel implements ActionListener, ListSelectionListener, KeyListener, DocumentListener {
--
32366-  */
32371:+@OptionsPanelController.Keywords(keywords = {"macros"}, location = OptionsDisplayer.EDITOR, index = 6)
32475- public class MacrosPanel extends JPanel {
--
34328-  */
34333:+@OptionsPanelController.Keywords(keywords={"gui builder"}, location="Java", index=1)
34419- public final class FormEditorCustomizer extends JPanel implements  ActionListener, ChangeListener {
--
36635-  */
36640:+@OptionsPanelController.Keywords(keywords={"groovy", "grails"}, location=OptionsDisplayer.ADVANCED, tabTitle="Groovy")
36760- final class SupportPanel extends javax.swing.JPanel {
--
38652-  */
38657:+@OptionsPanelController.Keywords(keywords={"php hudson"}, location=UiUtils.OPTIONS_PATH, index=4)
38756- public class HudsonOptionsPanel extends JPanel {
--
40887- 
40889:+@OptionsPanelController.Keywords(keywords={"java card"}, location=JavaOptions.JAVA, index=2)
40983- final class JavacardOptions extends javax.swing.JPanel implements ValidationUI, DocumentListener {
--
43022- 
43024:+@OptionsPanelController.Keywords(keywords={"javafx"}, location=JavaOptions.JAVA, index=7)
43115- final class SBOptionsPanel extends javax.swing.JPanel {    
--120975:+@OptionsPanelController.Keywords(keywords={"#KW_General_Editor"}, location=OptionsDisplayer.EDITOR, index=0)
121085-+@NbBundle.Messages({"KW_General_Editor=general editor"})
--
45289-  */
45294:+@OptionsPanelController.Keywords(keywords={"javascript"}, location=OptionsDisplayer.ADVANCED, tabTitle="#JsOptions.displayName")
45424- public class BrowserPanel extends JSPreferencesPanel {
--
47088-  */
47093:+@OptionsPanelController.Keywords(keywords={"maven global"}, location=JavaOptions.JAVA, index=5)
47190- public class GlobalOptionsPanel extends javax.swing.JPanel {
--
48017-  */
48022:+@OptionsPanelController.Keywords(keywords={"maven"}, location=JavaOptions.JAVA, index=5)
48112- public class SettingsPanel extends javax.swing.JPanel {
--

52403-  */
52408:+@OptionsPanelController.Keywords(keywords={"ant"}, location=JavaOptions.JAVA, index=0)
52496- public class AntCustomizer extends JPanel implements ActionListener {
--
111432-  */
111437:+@OptionsPanelController.Keywords(keywords = {"annotations"}, location = OptionsDisplayer.FONTSANDCOLORS, index = 2)
111554- public class AnnotationsPanel extends JPanel implements ActionListener, 
--
112412-  */
112417:+@OptionsPanelController.Keywords(keywords = {"Fonts & Colors"}, location = OptionsDisplayer.FONTSANDCOLORS, index = 0)
112537- public class FontAndColorsPanel extends JPanel implements ActionListener {
--
113507-  */
113512:+@OptionsPanelController.Keywords(keywords={"highlighting"}, location=OptionsDisplayer.FONTSANDCOLORS, index=1)
113624- public class HighlightingPanel extends JPanel implements ActionListener, ItemListener, FontsColorsController {
--
114744-  */
114749:+@OptionsPanelController.Keywords(keywords={"syntax coloring"}, location=OptionsDisplayer.FONTSANDCOLORS, index=0)
114864- public class SyntaxColoringPanel extends JPanel implements ActionListener, 
--
115745-  */
115750:+@OptionsPanelController.KeywordsRegistration({
115798:+    @OptionsPanelController.Keywords(keywords = {"hints"}, location = OptionsDisplayer.EDITOR, index = 4),
115906:+    @OptionsPanelController.Keywords(keywords = {"highlighting"}, location = OptionsDisplayer.EDITOR, index = 5)
116020-+})
--
117031-  */
117036:+@OptionsPanelController.Keywords(keywords = {"code completion"}, location = OptionsDisplayer.EDITOR, index = 2)
117149- public class CodeCompletionOptionsPanel extends JPanel implements PropertyChangeListener {
--
118018-  */
118023:+@OptionsPanelController.Keywords(keywords = {"all languages"}, location = OptionsDisplayer.EDITOR, index = 2)
118134- public class GeneralCompletionOptionsPanel extends JPanel {
--
118975-  */
118980:+@OptionsPanelController.Keywords(keywords = {"all languages"}, location = OptionsDisplayer.EDITOR, index = 7)
119091- public class OnSaveCommonPanel extends javax.swing.JPanel {
--
120022-  */
120027:+@OptionsPanelController.Keywords(keywords = {"on save"}, location = OptionsDisplayer.EDITOR, index = 7)
120132- public class OnSaveTabPanel extends JPanel implements PropertyChangeListener {
--
120970-  */

122201-  */
122206:+@OptionsPanelController.Keywords(keywords={"formatting"}, location=OptionsDisplayer.EDITOR, index=1)
122308- public final class FormattingPanel extends JPanel implements PropertyChangeListener {
--
123474-  */
123479:+@OptionsPanelController.Keywords(keywords={"indentation"}, location=OptionsDisplayer.EDITOR, index=1)
123582- public class IndentationPanel extends JPanel implements ChangeListener, ActionListener, PreferenceChangeListener {
--
125680-  */
125685:+@OptionsPanelController.Keywords(keywords={"keymaps"}, location=OptionsDisplayer.KEYMAPS)
125776- public class KeymapPanel extends javax.swing.JPanel implements ActionListener, Popupable {
--
127811- 
127813:+@OptionsPanelController.Keywords(keywords={"php apigen"}, location=UiUtils.OPTIONS_PATH, index=5)
127912- public class ApiGenOptionsPanel extends JPanel {
--
129900- 
129902:+@OptionsPanelController.Keywords(keywords={"php composer"}, location=UiUtils.OPTIONS_PATH, index=7)
130003- public class ComposerOptionsPanel extends JPanel {
--
131996-  */
132001:+@OptionsPanelController.Keywords(keywords={"php doctrine2"}, location=UiUtils.OPTIONS_PATH, index=12)
132104- public class Doctrine2OptionsPanel extends JPanel {
--
134046- 
134048:+@OptionsPanelController.Keywords(keywords={"php doc"}, location=UiUtils.OPTIONS_PATH, index=6)
134144- public final class PhpDocOptionsPanel extends JPanel {
--
136256-  */
136261:+@OptionsPanelController.Keywords(keywords={"php unit testing"}, location=UiUtils.OPTIONS_PATH, index=2)
136366- public class PhpUnitOptionsPanel extends JPanel {
--
137350- 
137352:+@OptionsPanelController.Keywords(keywords={"php anotations"}, location=UiUtils.OPTIONS_PATH, index=3)
137455- public class PhpAnnotationsPanel extends JPanel {
--
138350-  */
138355:+@OptionsPanelController.Keywords(keywords={"php debugger"}, location=UiUtils.OPTIONS_PATH, index=1)
138456- public class PhpDebuggerPanel extends JPanel {
--
139327-  */
139332:+@OptionsPanelController.Keywords(keywords={"php"}, location=UiUtils.OPTIONS_PATH, index=0)
139424- public final  class PhpOptionsPanel extends JPanel {
--
141474-  */
141479:+@OptionsPanelController.Keywords(keywords={"php smarty"}, location=UiUtils.OPTIONS_PATH, index=11)
141579- public class SmartyOptionsPanel extends JPanel {
--
143500-  */
143505:+@OptionsPanelController.Keywords(keywords={"php sympfony"}, location=UiUtils.OPTIONS_PATH, index=9)
143606- public class SymfonyOptionsPanel extends JPanel {
--
153480-  */
153485:+@OptionsPanelController.Keywords(keywords={"php sympfony2"}, location=UiUtils.OPTIONS_PATH, index=8)
153587- @NbBundle.Messages("LBL_ZipFilesFilter=Zip File (*.zip)")
--
155674-  */
155679:+@OptionsPanelController.Keywords(keywords={"php zend"}, location=UiUtils.OPTIONS_PATH, index=10)
155777- public final class ZendOptionsPanel extends JPanel {
--
157904- })
157908:+@OptionsPanelController.Keywords(keywords={"profiler"}, location=JavaOptions.JAVA, index=6)
158001- public final class ProfilerOptionsPanel extends JPanel implements ActionListener {
--
160117-  */
160122:+@OptionsPanelController.Keywords(keywords = {"install", "dictionary"}, location = OptionsDisplayer.EDITOR, index = 8)
160241- public class DictionaryInstallerPanel extends javax.swing.JPanel {
--
161490-  */
161495:+@OptionsPanelController.Keywords(keywords = {"spellchecker"}, location = OptionsDisplayer.EDITOR, index = 8)
161605- public class SpellcheckerOptionsPanel extends javax.swing.JPanel {
--
163494-  */
163499:+@OptionsPanelController.Keywords(keywords={"#KW_ToDo", "action", "items"}, location=OptionsDisplayer.ADVANCED, tabTitle="#LBL_Options")
163636- class ToDoCustomizer extends javax.swing.JPanel {
--
165378- )
165381:+@OptionsPanelController.Keywords(keywords={"terminal"}, location=OptionsDisplayer.ADVANCED, tabTitle="#CTL_Term_options")
165504- public final class TermAdvancedOption extends OptionsPanelController {
--
167698- 
167700:+@OptionsPanelController.Keywords(keywords={"general", "versioning"}, location=OptionsDisplayer.ADVANCED, tabTitle="Versioning")
167829- final class GeneralOptionsPanel extends javax.swing.JPanel implements ActionListener {
--
168579-  */
168584:+@OptionsPanelController.Keywords(keywords={"history", "versioning"}, location=OptionsDisplayer.ADVANCED, tabTitle="Versioning")
168713- public class HistoryOptionsPanel extends javax.swing.JPanel {
--
170478-  */
170483:+@OptionsPanelController.Keywords(keywords={"systems", "versioning"}, location=OptionsDisplayer.ADVANCED, tabTitle="Versioning")
170612- public class VcsAdvancedOptionsPanel extends javax.swing.JPanel {
--
171661-  */
171666:+@OptionsPanelController.Keywords(keywords={"versioning", "colors"}, location=OptionsDisplayer.FONTSANDCOLORS, index=4)
171786- public class AnnotationColorsPanel extends javax.swing.JPanel implements ActionListener, FontsColorsController, PropertyChangeListener {
--
173851-  */
173856:+@OptionsPanelController.Keywords(keywords={"java me"}, location=JavaOptions.JAVA, index=4)
173948- final class ComponentssupportPanel extends javax.swing.JPanel {
Comment 1 Milutin Kristofic 2012-10-11 15:36:19 UTC
http://hg.netbeans.org/jet-main/rev/074e9c1219d9
Comment 2 Theofanis Oikonomou 2012-10-12 10:32:44 UTC
I am not really sure I understand the meaning of your fix. AFAICT you did not eliminate the usage of plain string. You just added a NbBundle based keyword. Why not use the @Messages annotation instead? Also please keep in mind that the actual owners should choose which keywords to use. So, please reconsider reverting your fix and add everyone interested in cc. Thank you
Comment 3 Milutin Kristofic 2012-10-12 11:15:51 UTC
I just improved fix search for other languages by adding nbbundle where it is necessarily. It changed from just english search state to any language search state.

I grep all keyword annotations and I look how other developers managed with it. They made same changes as I did to all modules that wasn't changed by their owners. They left your non-localizated string and add keywords into bundle or @Bundle. I mostly reuse already existing keywords.

Owners can of course change it anytime. You also, with @Bundle if you prefer. But I think I made changes to better.

It's your feature, I wanted to help before there will be bug reports why search is not working in their language.
Comment 4 Quality Engineering 2012-10-13 02:11:44 UTC
Integrated into 'main-golden', will be available in build *201210130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/074e9c1219d9
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #219919 - Annotation for keywords should use NBBundles
Comment 5 Theofanis Oikonomou 2012-10-17 08:03:12 UTC
ok closing then. I will monitor the status of the registered, by the owners, keywords and act accordingly. Thank you.