Community
Participate
Working Groups
EGit 0.12.1 1. Window > Open Perspective > Other... > Git Repository Exploring. 2. Activate the 'Git Repositories' view. 3. Ctrl+F10 > Link with Selection 4. Check your logs, you will have a CCE. java.lang.ClassCastException: org.eclipse.swt.widgets.MenuItem at org.eclipse.egit.ui.internal.repository.tree.command.LinkWithSelectionCommand.execute(LinkWithSelectionCommand.java:27) 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.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829) at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815) at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
There's a blind cast to an SWT ToolItem, but that can be a MenuItem (in this case) or even a random Control (in the keybinding case). But I think this command wants to be a toggle command. See org.eclipse.example.commands.monitorCount as an example of a toggle command that saves its state between runs. https://github.com/paulweb515/commandsEclipseCon2011/blob/master/org.eclipse.example.commands/plugin.xml and https://github.com/paulweb515/commandsEclipseCon2011/blob/master/org.eclipse.example.commands/src/org/eclipse/example/commands/MonitorCountHandler.java PW
Pushed patch for review http://egit.eclipse.org/r/#change,3798
merged as 4b93402ae3ad3de7116a83b6cf08c6db23bed631