Bug 90607

Summary: Macro scripts failed
Product: [Eclipse Project] PDE Reporter: Wassim Melhem <wassim.melhem>
Component: UIAssignee: Dejan Glozic <dejan>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: veronika_irvine
Version: 3.0   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix for double-click problem none

Description Wassim Melhem CLA 2005-04-07 09:59:13 EDT
Since the I-20050405 build, the macro scrips for Plugin Junit tests have 
started to fail to execute.

They can't go beyond the first page of the New Plugin Project wizard for 
example.
Comment 1 Dejan Glozic CLA 2005-04-07 15:50:10 EDT
So far I narrowed the problem down to 'double-select' command. Double-click 
stopped executing in scripts for some reason. Investigating why. Since it does 
not work, the wizard does not switch to the next page, and the expected page 
id fails.

In order to make the debugging and error reporting easier, I have improved the 
error message (it now reports the expected and actual page id), and the script 
line number (I got it for free by copying XMLDefaultHandler from PDE - yey!). 
There is nothing sweeter than stealing somebody else's fine work :-).
Comment 2 Dejan Glozic CLA 2005-04-07 16:08:03 EDT
Our dear friend Veronika is on the case. She will try to find out what 
happened between M6 and I20050405 to make the following code fail silently 
i.e. do not produce the desired effect:

	public boolean playback(Display display, Composite parent, 
IProgressMonitor monitor) throws CoreException {
		CommandTarget target = MacroUtil.locateCommandTarget(parent, 
getWidgetId(), getStartLine());
		if (target==null) return false;
		target.setFocus();
		Widget widget = target.getWidget();
		Event e = new Event();
		e.type = SWT.DefaultSelection;
		e.widget = widget;
		e.display = display;
		widget.notifyListeners(SWT.DefaultSelection, e);
		return true;
	}
Comment 3 Dejan Glozic CLA 2005-04-07 20:40:11 EDT
Created attachment 19672 [details]
Fix for double-click problem
Comment 4 Wassim Melhem CLA 2005-04-07 22:46:17 EDT
after applying the patch, the same 20 tests are still failing.
Comment 5 Dejan Glozic CLA 2005-04-08 07:38:25 EDT
That is strange - they pass on my machine.
Comment 6 Dejan Glozic CLA 2005-04-08 08:27:13 EDT
I have regained my commit rights and checked in all the changes. I checked out 
PDE plug-ins from HEAD and rerun the tests on 0405 build - they all pass.

Please check out org.eclipse.pde.ui.tests from HEAD and try again.
Comment 7 Wassim Melhem CLA 2005-04-10 23:38:51 EDT
fixed.