Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341903

Summary: [Perspectives] Code-Bug in CustomizePerspectiveDialog
Product: [Eclipse Project] Platform Reporter: Conny Kreyssel <dev>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: prakash, remy.suen
Version: 3.6.2   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Conny Kreyssel CLA 2011-04-05 09:37:11 EDT
Build Identifier: 20110218-0911

Simple bugfix for plugin "org.eclipse.ui.workbench" class "org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog"

In method okPressed() its access the wrong array-size.

perspective.turnOnActionSets((IActionSetDescriptor[]) toAdd
	.toArray(new IActionSetDescriptor[toAdd.size()]));
perspective.turnOffActionSets((IActionSetDescriptor[]) toRemove
	.toArray(new IActionSetDescriptor[toAdd.size()]));

should be changed to

perspective.turnOnActionSets((IActionSetDescriptor[]) toAdd
	.toArray(new IActionSetDescriptor[toAdd.size()]));
perspective.turnOffActionSets((IActionSetDescriptor[]) toRemove
	.toArray(new IActionSetDescriptor[toRemove.size()]));


http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.ui.workbench/Eclipse%20UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java?revision=1.86&view=markup

line 3207/3208

Reproducible: Always
Comment 1 Remy Suen CLA 2011-04-05 09:46:44 EDT
Thanks for the bug report? Would you be interested in contributing a patch?
http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 2 Prakash Rangaraj CLA 2011-04-15 00:58:16 EDT
Fixed in HEAD
Comment 3 Prakash Rangaraj CLA 2011-04-26 10:11:56 EDT
Verified in I20110425-1800