Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321949 - Application.requestUserAttention doesn't work with SWT applications
Summary: Application.requestUserAttention doesn't work with SWT applications
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 03:25 EDT by Milos Kleint CLA
Modified: 2014-06-18 07:16 EDT (History)
3 users (show)

See Also:


Attachments
run this file (9.26 KB, application/zip)
2014-06-17 07:58 EDT, sushanth kumar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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