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 19520

Summary: [IconEditor] It's impossible change value of property with Property Marking(invalid)
Product: platform Reporter: rost <rost>
Component: Window SystemAssignee: David Strupl <dstrupl>
Status: CLOSED FIXED    
Severity: blocker CC: ttran
Priority: P1    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description rost 2002-01-17 10:39:11 UTC
I have moved the icons directory of my application. If I use the form editor to
change the icon classpath for the relevant gui elements I can see in the
properties tab a big red cross on the right side of the "icon" property and the
old (now invalid) classpath to the icon.

If I open the property editor the "OK" button is disabled, which is ok, as long
as the classpath is invalid.

Now after I chose the new (correct) classpath for the icon the "OK" button is
still disabled, which is a major bug - I can not update the icon classpath and
my application doesn't start!

Greetings

Ronny
Comment 1 Marian Mirilovic 2002-01-17 13:00:32 UTC
Yes, you are right. 

This one is regression of issue 17986,
 and it must be fixed to 3.3.1 !
Comment 2 David Strupl 2002-01-18 09:14:21 UTC
We don't have a fix yet but meanwhile if you want to change the icons
in cases where it is not possible please hit one of the sorting
buttons on the property sheet. The properties are resorted and the
icon can be changed.
Comment 3 David Strupl 2002-01-18 13:07:02 UTC
I have "fixed" it by disabling the invalid icon feature in icon
editor. This solution is not optimal and more permanent solution
should be found (see task #19569).

The first diff makes sure that the PropertyDialogManager listens on
the env before getCustomEditor() is called because the IconEditor in
getCustomEditor calls setState(STATE_NEEDS_VALIDATION). This is change
is very low risk since it is just move of the attachment of the
listener before getCustomEditor call. It should have no impact on
other editors than IconEditor:
http://www.netbeans.org/source/browse/openide/src/org/openide/explorer/propertysheet/PropertyDialogManager.java.diff?r1=1.46&r2=1.47

The second diff disables invalid state in IconEditor. So the editor
will use just STATE_VALID and STATE_NEEDS_VALIDATION. Those two states
do not result in disabling the Ok button which was the main problem.
http://www.netbeans.org/source/browse/openide/src/org/openide/explorer/propertysheet/editors/IconEditor.java.diff?r1=1.37&r2=1.38

The bug was present also in release330 so there was no way to rollback
any changes. It was only discovered this late.
Comment 4 eadams 2002-01-18 13:40:38 UTC
Approved.
Comment 5 iformanek 2002-01-18 13:48:08 UTC
Approved.
Comment 6 Jan Chalupa 2002-01-18 13:59:43 UTC
Approved by QA.
Comment 7 David Strupl 2002-01-18 15:18:54 UTC
Integrated into release33.
Comment 8 Marian Mirilovic 2002-01-21 13:58:22 UTC
verified in [nb3.3.1_rc2](20020121) && [nb_dev](20020121)
Comment 9 Quality Engineering 2003-07-01 16:17:28 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.