Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328953

Summary: [Cheatsheet] Using e4 SDK Commands launched from cheat sheets not working
Product: [Eclipse Project] Platform Reporter: Chris Goldthorpe <cgold>
Component: User AssistanceAssignee: Chris Goldthorpe <cgold>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pwebster, remy.suen
Version: 4.1   
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 328963    
Bug Blocks:    
Attachments:
Description Flags
CommandRunner patch v1
none
Patch v2 none

Description Chris Goldthorpe CLA 2010-10-28 13:46:38 EDT
e4 SDK I20101025-1602

Switch to the resource perspective
Help/Cheat Sheets/Java Development/Create a Hello World Application
Click to begin to advance past the introduction
At the next step "Open the Java Perspective" press click to perform

Expected result: switches to the Java Perspective
Actual Result: Perspective unchanged

The problem is not specific to this command, it seems that any command launched from Help or a Cheat Sheet is not executing.

I will work on creating a smaller test plug-in which illustrates the problem.
Comment 1 Remy Suen CLA 2010-10-28 14:26:52 EDT
Looks like the same problem as bug 321263.

Thread [main] (Suspended (breakpoint at line 454 in Command))	
	Command.executeWithChecks(ExecutionEvent) line: 454	
	ParameterizedCommand.executeWithChecks(Object, Object) line: 508	
	CommandRunner.executeCommand(CheatSheetCommand, CheatSheetManager) line: 83	
	CheatSheetCommand.execute(CheatSheetManager) line: 44	
	CoreItem.runExecutable(AbstractExecutable, CheatSheetManager) line: 506	
	CoreItem.runExecutable(CheatSheetManager) line: 501	
	CheatSheetViewer.runPerformExecutable(ImageHyperlink) line: 1046	
	CoreItem$1.linkActivated(HyperlinkEvent) line: 89	
	ImageHyperlink(AbstractHyperlink).handleActivate(Event) line: 233	
	ImageHyperlink.handleActivate(Event) line: 199	
	ImageHyperlink(AbstractHyperlink).handleMouseUp(Event) line: 327
Comment 2 Remy Suen CLA 2010-10-28 14:34:34 EDT
Created attachment 181978 [details]
CommandRunner patch v1

This should do it.
Comment 3 Chris Goldthorpe CLA 2010-10-28 14:52:07 EDT
Thanks Remy, that worked! I will apply this patch after 3.6M3 is announced.
Comment 4 Chris Goldthorpe CLA 2010-10-28 14:53:37 EDT
I meant 3.7M3 of course.
Comment 5 Chris Goldthorpe CLA 2010-10-28 19:32:11 EDT
The patch improves the situation but I am still not getting the result of the command passed back correctly. With the patch in place commands execute OK but the result is always null. When running against Eclipse 4.1 with patch three test cases fail in the JUnit test org.eclipse.ua.tests.cheatsheet.execution.TestCommandExecution. When using Eclipse 3.7 all tests pass.
Comment 6 Remy Suen CLA 2010-10-28 19:42:27 EDT
(In reply to comment #5)
> The patch improves the situation but I am still not getting the result of the
> command passed back correctly. With the patch in place commands execute OK but
> the result is always null.

Hi Chris, see bug 328963. I believe that should resolve the problem.
Comment 7 Chris Goldthorpe CLA 2010-11-01 12:45:01 EDT
Created attachment 182155 [details]
Patch v2

The same issue exists for intro and help, I have attached a patch which addresses all of these.
Comment 8 Chris Goldthorpe CLA 2010-11-01 12:49:01 EDT
Patch committed to HEAD. Added dependency to Bug 328963.
Comment 9 Chris Goldthorpe CLA 2010-11-01 18:14:08 EDT
With the fix for Bug 328963 and Patch v2 the cheat sheet JUnit tests now all pass. Fixed
Comment 10 Chris Goldthorpe CLA 2011-01-28 19:24:23 EST
Verified using Eclipse 4.1 build I20110125-2200