Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 207041 - Coding error in class MacroCommandShell
Summary: Coding error in class MacroCommandShell
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: DuWayne Morris CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 133099
Blocks:
  Show dependency tree
 
Reported: 2007-10-22 07:06 EDT by Frank Fröhlich CLA
Modified: 2016-05-05 11:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Fröhlich CLA 2007-10-22 07:06:51 EDT
There is a coding error in method createCommand of class MacroCommandShell (pkg=org.eclipse.tptp.test.auto.gui.internal.commands) which prevents the recorder from insertion of focus commands. The first SWT.MouseUp event leads to setting the flag 'isMousePressed' to true. With a high degree of probalility this flag will never be reset because of the wrongly coded if-statement which follows the switch-statement for event.type:

if (event.type != SWT.KeyUp)
    isKeyPressed = false;
else if (event.type != SWT.MouseUp)
    isMousePressed = false;

Only in case of event.type is a SWT.KeyUp event (!!!), the isMousePressed flag is reset. The worse is that in case of the flag is set to true, SWT.MouseUp events will be ignored (see first if-statement of the method) and the handling for toBeAckEvent does not work (please have a look at case SWT.MouseUp in the switch-statement).

The 'else' need to be removed from the if-statement:

if (event.type != SWT.KeyUp)
    isKeyPressed = false;
if (event.type != SWT.MouseUp)
    isMousePressed = false;
Comment 1 Liz Dancy CLA 2007-10-22 11:31:18 EDT
Re-assigning to current project lead.
Comment 2 Paul Slauenwhite CLA 2007-12-10 12:11:34 EST
In TPTP 4.5, the AGR was moved from a Technology Preview component to an As-Is component. As-Is components are primarily provided for prior users but imply no support (for example, defects, news group, and mailing lists) or commitment to triage or resolve opened defects. For this defect to be considered, please re-open with an attached patch including code to resolve the symptom and test cases to test the fix.
Comment 3 Alexander Nyßen CLA 2008-02-27 18:00:59 EST
The enhancement uploaded to bug #133099 fixes this issue.
Comment 4 Paul Slauenwhite CLA 2009-02-25 11:57:06 EST
Closing by default since not closed by the originator in the 7+ months since
being resolved.  

Please reopen if the issue is still present in the latest TPTP release or the
resolution is not correct.