Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341903 - [Perspectives] Code-Bug in CustomizePerspectiveDialog
Summary: [Perspectives] Code-Bug in CustomizePerspectiveDialog
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Prakash Rangaraj CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 09:37 EDT by Conny Kreyssel CLA
Modified: 2011-04-26 10:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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