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 36959 - Too many exceptions when editor settings is initialized
Summary: Too many exceptions when editor settings is initialized
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-10-31 16:56 UTC by _ rkubacki
Modified: 2007-11-05 13:44 UTC (History)
0 users

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 _ rkubacki 2003-10-31 16:56:37 UTC
I tried to count number of
java.util.MissingResourceException that are caught
in NbLocalizer and ignored. 853 missing resources
during warmup related to base and Java editor
settings. The number raises to 1720 if any XML
document is opened.

They are ignored - does it mean it is OK or is it
a bug?

Why these resources are loaded? At least you can
do it lazily.
Comment 1 Martin Roskanin 2003-11-14 14:12:01 UTC
It is OK.

It is happening during the creating of editor actions and putting
additional properties to action like Action.SHORT_DESCRIPTION or
BaseAction.POPUP_MENU_TEXT
See constructor BaseAction(String name, int updateMask)

"short description" and "popup menu text" are retrieving from locales.
If there is no localized text for them, null is set.
Comment 2 _ rkubacki 2003-11-14 14:45:46 UTC
Maybe that you really want to find popup menu text so that it is
possible to create popup menu quickly. Why you need short description? 

Anyway the way how it is searched is bad. The cost of exception
creating is much higher than for any oher object. The code produces
many of them and forces processing of many bundles. It means that the
whole operation is too expensive.
Comment 3 Martin Roskanin 2003-11-14 15:44:03 UTC
Yes, Radim. You are right.
We would like to get rid of NbLocalizer later. As a short term
solution of this issue we will load the resources lazily.
And as for short description, it is needed i.e. in keybindings
property editor.
Comment 4 Martin Roskanin 2003-11-18 09:08:33 UTC
fixed in [maintrunk]

/cvs/editor/libsrc/org/netbeans/editor/BaseAction.java,v  <-- 
BaseAction.java
new revision: 1.31; previous revision: 1.30
Comment 5 Martin Roskanin 2003-11-18 12:26:23 UTC
additional minor fix

Get the short description name (instead of action name) for popup
items if there is no specific localized text for them

/cvs/editor/libsrc/org/netbeans/editor/BaseAction.java,v  <-- 
BaseAction.java
new revision: 1.32; previous revision: 1.31
Comment 6 Max Sauer 2005-07-14 08:21:01 UTC
Radime, could you please verify this issue? Thanks
Comment 7 Jiri Prox 2006-04-07 09:08:04 UTC
Verified