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 42283

Summary: Context-sensitive project actions must have unit tests
Product: projects Reporter: Jesse Glick <jglick>
Component: Generic InfrastructureAssignee: Petr Hrebejk <phrebejk>
Status: RESOLVED FIXED    
Severity: blocker Keywords: TEST
Priority: P2    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535    

Description Jesse Glick 2004-04-21 16:23:41 UTC
I just encountered some serious bugs in the new
context-sensitive project actions, which of course
I am unable to reproduce after a restart.
Basically, the file which had the focus when the
IDE was started "stuck" as the context for *all*
context-sensitive project actions, making them all
useless. After a restart this does not seem to
happen. But I don't know when the bug will be back.

All of this action infrastructure must be covered
by unit tests:

- each category of action is enabled or disabled
appropriately acc. to its context

- 'enable' property changes are fired immediately
when any applicable underlying condition changes

- the action performer method gets the correct
context (set of projects, set of files, etc.)
Comment 1 Petr Hrebejk 2004-07-15 12:37:56 UTC
Some tests added

RCS file:
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/FileCommandActionTest.java,v
done
Checking in
projectui/test/unit/src/org/netbeans/modules/project/ui/actions/FileCommandActionTest.java;
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/FileCommandActionTest.java,v
 <--  FileCommandActionTest.java
initial revision: 1.1
done
RCS file:
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/LookupSensitiveActionTest.java,vdone
Checking in
projectui/test/unit/src/org/netbeans/modules/project/ui/actions/LookupSensitiveActionTest.java;
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/LookupSensitiveActionTest.java,v
 <--  LookupSensitiveActionTest.java
initial revision: 1.1
done
RCS file:
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/ProjectActionTest.java,v
done
Checking in
projectui/test/unit/src/org/netbeans/modules/project/ui/actions/ProjectActionTest.java;
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/ProjectActionTest.java,v
 <--  ProjectActionTest.java
initial revision: 1.1
done
RCS file:
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/TestSupport.java,v
done
Checking in
projectui/test/unit/src/org/netbeans/modules/project/ui/actions/TestSupport.java;
/cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/TestSupport.java,v
 <--  TestSupport.java
initial revision: 1.1
done