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

Bug 311460

Summary: SelectionRequest has not method to check if Command key is pressed on MacOS X
Product: [Tools] GEF Reporter: Bojan Martin <bojan.martin>
Component: GEF-Legacy GEF (MVC)Assignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: 3.7.1 (Indigo) M4   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
the minimal additions that should be made to SelectionRequest none

Description Bojan Martin CLA 2010-05-03 19:28:48 EDT
Build Identifier: M20080911-1700

They interface for org.eclipse.gef.requests.SelectionRequest was not designed with OS X in mind. There is a way to set the statemask (modifiers), but no way to get it. There are getters to check if a variety of keys are pressed, but no getter to check if the Command key is pressed. This is a problem for any client of SelectionRequest that wants to enable proper functionality for the primary modifier key on the MacOS X platform. The only workaround is to use reflection to get the statemask (not really an acceptable workaround).

Reproducible: Always

Steps to Reproduce:
1. Look at the interface for org.eclipse.gef.requests.SelectionRequest.
Comment 1 Bojan Martin CLA 2010-05-03 19:29:47 EDT
Created attachment 166885 [details]
the minimal additions that should be made to SelectionRequest
Comment 2 Alexander Nyßen CLA 2010-12-01 17:26:25 EST
Added method to check if COMMAND key was pressed (isCommandKeyPressed()).
Added method to access modifiers (getModifiers()).

Changes committed to cvs HEAD (3.7).