Community
Participate
Working Groups
java.lang.IllegalArgumentException: Argument cannot be null at org.eclipse.swt.SWT.error(SWT.java:4064) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.widgets.Widget.error(Widget.java:468) at org.eclipse.swt.widgets.Label.setText(Label.java:388) at org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog$NameAndDescriptionToolTip.createEntry(CustomizePerspectiveDialog.java:754) at org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog$NameAndDescriptionToolTip.createToolTipContentArea(CustomizePerspectiveDialog.java:704) at org.eclipse.jface.window.ToolTip.toolTipShow(ToolTip.java:359) at org.eclipse.jface.window.ToolTip.toolTipOpen(ToolTip.java:483) at org.eclipse.jface.window.ToolTip.toolTipCreate(ToolTip.java:348) at org.eclipse.jface.window.ToolTip.access$2(ToolTip.java:342) at org.eclipse.jface.window.ToolTip$ToolTipOwnerControlListener.handleEvent(ToolTip.java:631) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.WorkbenchPage.editActionSets(WorkbenchPage.java:1881) at org.eclipse.ui.internal.handlers.EditActionSetsHandler.execute(EditActionSetsHandler.java:41) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
Problem is that CustomizePerspectiveDialog could not handle items which tooltip=null. But tooltip could be set to null in ActionContributionItem (line 807-813). // if the text is showing, then only set the tooltip if // different if (!showText || toolTip != null && !toolTip.equals(text)) { ti.setToolTipText(toolTip); } else { ti.setToolTipText(null); }
Scenarios to reproduce: a) 1)Add item with icon 2)Set mode to "FORCE_TEXT" 3)Empty tooltip, or tooltip==label open Window->Customize Perspective.. and then hover mouse under above action item. b) Just add item without icon and without mode "FORCE_TEXT", but with tooltip==label open Window->Customize Perspective.. and then hover mouse under above action item.
workaround is to have tooltip different from label. But CustomizePerspectiveDialog shows tooltip text as label.
Fix: https://git.eclipse.org/r/41385
New Gerrit change created: https://git.eclipse.org/r/41385
Gerrit change https://git.eclipse.org/r/41385 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=320ca4a5621e7f43e1687c3d5be33e4c1106281e
.
New Gerrit change created: https://git.eclipse.org/r/45858
Gerrit change https://git.eclipse.org/r/45858 was merged to [R4_4_maintenance]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8916639c1ee72656689304d704ec77ce854b3f4b