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 68299

Summary: Slow PropertiesAction.enable()
Product: platform Reporter: _ rkubacki <rkubacki>
Component: ActionsAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker Keywords: API_REVIEW_FAST, PERFORMANCE
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: proposed change

Description _ rkubacki 2005-11-08 17:34:37 UTC
We removed properties window from the default window system configuration in
previous releases and keep properties action available in context menu of most
of objects in the IDE. The action's enable() checks if the size of propertySets
set is bigger than one and thus usualy forces creating of property sets.  That's
something what we should defer and do more effectively to reduce time required
to display context menus in the IDE.
Comment 1 Jiri Rechtacek 2005-11-15 12:35:20 UTC
Created attachment 26960 [details]
proposed change
Comment 2 Jiri Rechtacek 2005-11-15 12:44:44 UTC
I attched a proposed semantic change of PropertiesAction.enable(), this makes
PropertiesAction.enable() return statically true iff given nodes are not null.
The change saves a lot of useless creating property set when create popup menu
of a node. It'll cause a empty Properties sheet when PropertiesAction is invoked
on a node w/o properties.
Comment 3 Jiri Rechtacek 2005-11-21 07:24:01 UTC
I'm going to integrate now.
Comment 4 Jiri Rechtacek 2005-11-21 07:25:48 UTC
Checking in openide/actions/src/org/openide/actions/PropertiesAction.java;
/shared/data/ccvs/repository/openide/actions/src/org/openide/actions/PropertiesAction.java,v
 <--  PropertiesAction.java
new revision: 1.2; previous revision: 1.1
done
RCS file:
/shared/data/ccvs/repository/openide/actions/test/unit/src/org/openide/actions/PropertiesActionTest.java,v
done
Checking in
openide/actions/test/unit/src/org/openide/actions/PropertiesActionTest.java;
/shared/data/ccvs/repository/openide/actions/test/unit/src/org/openide/actions/PropertiesActionTest.java,v
 <--  PropertiesActionTest.java
initial revision: 1.1
done