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

Bug 321949

Summary: Application.requestUserAttention doesn't work with SWT applications
Product: [Eclipse Project] Platform Reporter: Milos Kleint <mkleint>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: normal    
Priority: P3 CC: j.sushanthkumar, pascal, skovatch
Version: 4.0   
Target Milestone: 3.7   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
run this file none

Description Milos Kleint CLA 2010-08-06 03:25:38 EDT
Build Identifier: helios

com.apple.eawt.Application.requestUserAttention(boolean) works fine with swing applications, but fails with SWT application. The failure is silent, no bumping of the icon occurs and only this is printed to the log/console

2010-08-06 09:04:45.113 java[993:903] [Java CocoaComponent compatibility mode]: Enabled
2010-08-06 09:04:45.114 java[993:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000

Expected Results:
I would expect the same icon bump in both cases when the application is not active

Actual Results:
actually works in the swing case and not the swt case.

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)

Reproducible: Always

Steps to Reproduce:
See the attached project. 2 main classes. Main.java contains the swt code the other class contains the swing code

can be run from cmdline by typing
ant run -Dconfig=swt
or
ant run -Dconfig=swing

after running press the button in the UI and switch to other application, wait approx 10 seconds. the swing case bumps the dock icon while the swt case doesn't
Comment 1 Scott Kovatch CLA 2010-08-06 12:37:02 EDT
Yes, this is a known limitation right now. None of the EAWT code works when the SWT is in use. We need some support from Apple, and they have promised us it will show up in the next dev preview of Java on OS X. See bug 307302. I'll leave this bug open as it's a separate test case.
Comment 2 Scott Kovatch CLA 2010-11-03 13:46:34 EDT
Sorry for leaving this alone for so long, but I'm cleaning out my queue this morning.

eAWT should now work in an SWT app as of 3.7m3. Please give it a try with the latest builds.

Also, it looks like you forgot to attach the test case. If it is still broken for you please attach it and I'll have a look before 3.7 ships.
Comment 3 sushanth kumar CLA 2014-06-17 07:57:34 EDT
platform-> 
mac :os x 10.9.02
swt : v 3.102.1
java : 1.6 (default apples version)



this doesn't works for me in the e4 swt application 

how do i make bounce the icon for this type of applications

pfa
Comment 4 sushanth kumar CLA 2014-06-17 07:58:34 EDT
Created attachment 244302 [details]
run this file
Comment 5 sushanth kumar CLA 2014-06-18 07:16:45 EDT
got the solution this works fine now