Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331181 - 'History' view needs to de/activate page sites when showing/hiding pages
Summary: 'History' view needs to de/activate page sites when showing/hiding pages
Status: RESOLVED DUPLICATE of bug 354658
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-26 04:05 EST by Robin Rosenberg CLA
Modified: 2011-12-02 14:49 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Rosenberg CLA 2010-11-26 04:05:03 EST
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.
Comment 1 Remy Suen CLA 2010-11-29 17:53:13 EST
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.
Comment 2 Remy Suen CLA 2010-11-29 17:58:20 EST
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
Comment 3 Remy Suen CLA 2010-11-29 21:14:45 EST
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.
Comment 4 Tomasz Zarna CLA 2010-12-03 05:18:02 EST
I'm not sure if I'm following. For what selection does copying text not work? For a row in revisions tree?
Comment 5 Remy Suen CLA 2010-12-03 05:52:22 EST
(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.
Comment 6 Remy Suen CLA 2010-12-03 05:53:42 EST
(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).
Comment 7 Tomasz Zarna CLA 2011-11-17 12:24:50 EST
Remy, you mentioned on bug 354658 that it fixes this one as well, could you please double check it and update this bug accordingly.
Comment 8 Tomasz Zarna CLA 2011-12-01 05:45:38 EST
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 ***
Comment 9 Remy Suen CLA 2011-12-01 07:50:32 EST
(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.
Comment 10 Tomasz Zarna CLA 2011-12-02 14:49:25 EST
No worries.