Community
Participate
Working Groups
Selecting and copying text from the history view does not work. Instead of the selected text, the SHA-1 of the commit goes into the clipboard.
It works if you use Ctrl+X to 'Cut' though. The text itself doesn't actually get cut but the text does get transferred to your clipboard. Ctrl+A to 'Select All' also doesn't work, you end up selecting all the commit entries in the graph viewer.
Cut stack trace: Thread [main] (Suspended (breakpoint at line 474 in Clipboard)) Clipboard.setContents(Object[], Transfer[], int) line: 474 StyledText.setClipboardContent(int, int, int) line: 8480 StyledText.copySelection(int) line: 1808 StyledText.cut() line: 2101 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 WidgetMethodHandler.execute(ExecutionEvent) line: 151 HandlerProxy.execute(ExecutionEvent) line: 293 Command.executeWithChecks(ExecutionEvent) line: 476 ParameterizedCommand.executeWithChecks(Object, Object) line: 508 HandlerService.executeCommand(ParameterizedCommand, Event) line: 169 WorkbenchKeyboard.executeCommand(Binding, Event) line: 468 WorkbenchKeyboard.press(List, Event) line: 786 WorkbenchKeyboard.processKeyEvent(List, Event) line: 885 WorkbenchKeyboard.filterKeySequenceBindings(Event) line: 567 WorkbenchKeyboard.access$3(WorkbenchKeyboard, Event) line: 508 WorkbenchKeyboard$KeyDownFilter.handleEvent(Event) line: 123 EventTable.sendEvent(Event) line: 84 Display.filterEvent(Event) line: 1254 StyledText(Widget).sendEvent(Event) line: 1052 Copy stack trace: Thread [main] (Suspended (breakpoint at line 474 in Clipboard)) Clipboard.setContents(Object[], Transfer[], int) line: 474 CommitGraphTable.doCopy() line: 261 CommitGraphTable.access$4(CommitGraphTable) line: 247 CommitGraphTable$8.run() line: 388 CommitGraphTable$8(Action).runWithEvent(Event) line: 498 ActionHandler.execute(ExecutionEvent) line: 119 Command.executeWithChecks(ExecutionEvent) line: 476 ParameterizedCommand.executeWithChecks(Object, Object) line: 508 HandlerService.executeCommand(ParameterizedCommand, Event) line: 169 WorkbenchKeyboard.executeCommand(Binding, Event) line: 468 WorkbenchKeyboard.press(List, Event) line: 786 WorkbenchKeyboard.processKeyEvent(List, Event) line: 885 WorkbenchKeyboard.filterKeySequenceBindings(Event) line: 567 WorkbenchKeyboard.access$3(WorkbenchKeyboard, Event) line: 508 WorkbenchKeyboard$KeyDownFilter.handleEvent(Event) line: 123 EventTable.sendEvent(Event) line: 84 Display.filterEvent(Event) line: 1254 StyledText(Widget).sendEvent(Event) line: 1052
The problem is that GenericHistoryView's showPageRec(PageContainer) method doesn't de/activate the PageSites when the pages are being shown/hidden. Since the site never becomes active, changes propagated to the handler service through the action bars are never actually considered (because the site is inactive). See org.eclipse.ui.internal.handlers.NestableHandlerService.
I'm not sure if I'm following. For what selection does copying text not work? For a row in revisions tree?
(In reply to comment #4) > I'm not sure if I'm following. For what selection does copying text not work? > For a row in revisions tree? It's in the EGit 'History' view. However, our code is not working because the page sites (of GenericHistoryView) aren't being de/activated (handlers problem, see comment 3). Please compare GenericHistoryView's showPageRec(PageContainer) with PageBookView's showPageRec(PageRec) and you'll see what I mean about service de/activation.
(In reply to comment #4) > I'm not sure if I'm following. For what selection does copying text not work? > For a row in revisions tree? But in case you want to test it out yourself with EGit, it is that Ctrl+C doesn't work when we have focus in our text viewer (bottom left area). It ends up copying the stuff as if the focus (and selection) was from the revisions graph tree (top area).
Remy, you mentioned on bug 354658 that it fixes this one as well, could you please double check it and update this bug accordingly.
This seems to be working fine in Eclipse SDK I20111129-1024 and EGit 1.2.0.201111292013, so I assume it has been fixed in bug 354658 (see bug 354658, comment 22). *** This bug has been marked as a duplicate of bug 354658 ***
(In reply to comment #7) > Remy, you mentioned on bug 354658 that it fixes this one as well, could you > please double check it and update this bug accordingly. This does indeed look fixed with I20111129-2100 on Windows 7. Sorry for not getting back to you earlier, Tomasz.
No worries.