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 13509 - Changes of String value from ResourceBundle to String editor needed explicit change Property Editor
Summary: Changes of String value from ResourceBundle to String editor needed explicit ...
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-07-11 10:57 UTC by Marian Mirilovic
Modified: 2003-06-30 18:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IllegalArgumentException (4.61 KB, text/plain)
2001-07-11 10:58 UTC, Marian Mirilovic
Details
ClassCastException (5.67 KB, text/plain)
2001-07-11 10:58 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2001-07-11 10:57:25 UTC
[nb_dev](20010711), [jdk1.3.1](rc1)  -J-Dnetbeans.debug.exceptions=true

Steps to reproduce:
- open frame, add JLabel, try to change property text
- invoke Property Editor by "...", change editor to Resource Bundle, create new
"xxx", add key "my_key" and value "My value"
	-> property text has value "[KEY:my_key, RB:xxx]" it's right
- try to change text property to value (not from bundle), type "my text"
	-> exception only to log (IllegalArgumentException), and value isn't changed
- invoke Property Editor by "...", change editor to String Editor and type text
"My value"
	-> exception only to log (ClassCastException)

In my opinion will be nice, if user can change value of String property
(ResourceBundle -> String) without needed change type of property editor.
Comment 1 Marian Mirilovic 2001-07-11 10:58:00 UTC
Created attachment 1852 [details]
IllegalArgumentException
Comment 2 Marian Mirilovic 2001-07-11 10:58:40 UTC
Created attachment 1853 [details]
ClassCastException
Comment 3 Tomas Pavek 2001-07-11 12:09:53 UTC
The ClassCastException should not occur - I'll fix it.

The IllegalArgumentException is problem of FormI18nStringEditor from 
i18n module (missing setAsText(...) method).

Automatic change ResourceBundle -> String without changing the editor 
explicitly is not possible.
Comment 4 Tomas Pavek 2001-07-11 12:16:00 UTC
Working on it.
Comment 5 Tomas Pavek 2001-07-11 13:56:34 UTC
ClassCastException fixed.
Comment 6 Tomas Pavek 2001-07-11 15:00:22 UTC
FormI18nStringEditor should implement setAsText(String) if it 
implements getAsText().
Comment 7 Tomas Pavek 2001-07-11 15:01:03 UTC
Þ
Comment 8 Peter Zavadsky 2001-07-11 16:32:33 UTC
Fixed in [main-trunk]. Next build available.

Now setAsText method does nothing.
Comment 9 Marian Mirilovic 2001-07-12 09:20:19 UTC
verified in [nb_dev](20010712)
Comment 10 Quality Engineering 2003-06-30 18:27:49 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.