Compare commits

..

387 Commits

Author SHA1 Message Date
Alexey Ushakov
032c4b1852 [JDK 11] Font Rendering on MacOS
Fixed regression caused by JBR-1076 by limiting fallback painting
only to undecorated non-opaque frames and dialogs

(cherry picked from commit 013d3dfcf2)
2019-04-12 14:50:51 +03:00
Anton Tarasov
532f0a3f91 [followup] JBR-1365 force IDE-managed HiDPI on Linux for fractional scales
(cherry picked from commit 84286e9c67)
2019-04-10 19:51:36 +03:00
Anton Tarasov
6093049cf7 JBR-1365 force IDE-managed HiDPI on Linux for fractional scales
(cherry picked from commit f092ff3962)
2019-04-10 19:51:11 +03:00
Egor Ushakov
fa2a7c1eba JBR-1354 com/sun/tools/attach/PermissionTest.java: access denied ("java.util.PropertyPermission" "sun.tools.attach.tmp.only" "read")
(cherry picked from commit 3a09f6c1db)
2019-04-10 19:32:43 +03:00
Vitaly Provodin
c6b433b268 updated JTreg exclude list
(cherry picked from commit bceea77552)
2019-04-10 16:32:27 +07:00
Denis Fokin
b48ad24881 JBR-1362 Multiple child windows opened and closed in sequence result in a focus loss 2019-04-09 17:01:05 +03:00
Anton Tarasov
61e8702439 JBR-1351 Borderless UI: Bold frame around IDEA window appears on non-HiDPI display
(cherry picked from commit 06d35de069)
2019-04-09 12:21:39 +03:00
Egor Ushakov
106ef27433 JBR-1061 .attach_pid files in the working dir - flag to put .attach file in tmp dir only
(cherry picked from commit 4bd3f7835e)
2019-04-05 12:00:57 +03:00
Vitaly Provodin
ae45c3387c updated JTreg exclude list 2019-04-03 14:44:02 +03:00
Alexey Ushakov
ee05f360c5 JBR-1324 [fwp to JBR11] JBR-1174 Font Difference on macOS
Enable LCD shader by "Use font smoothing when available" setting
2019-03-29 20:15:11 +03:00
Egor Ushakov
2db9a870e7 8146986: JDI: Signature lookups for unprepared classes can take a long time - fixed tests 2019-03-29 13:20:38 +03:00
Vitaly Provodin
260319ec74 updated JTreg exclude list 2019-03-29 10:58:38 +07:00
Anton Tarasov
9179718cb6 JBR-1313 wrong insets for non-resizable custom-decorated frame 2019-03-28 19:17:17 +03:00
Vitaly Provodin
90276e6c00 updated JTreg exclude list 2019-03-28 14:34:03 +07:00
Anton Tarasov
cb188edaab JBR-1293 do not modify client bounds when custom-decorated frame is set undecorated 2019-03-26 10:20:35 +03:00
Vitaly Provodin
589b93be04 updated JTreg exclude list 2019-03-26 10:54:49 +07:00
Egor Ushakov
63572dcc76 8146986: JDI: Signature lookups for unprepared classes can take a long time - pt.2 2019-03-25 12:37:50 +03:00
Vitaly Provodin
480a2f5a34 updated JTreg exclude list 2019-03-25 15:42:35 +07:00
pbansal
763414f5f0 8218469: JSlider display issue with slider for GTKLookAndFeel
8218470: JScrollBar display issue with GTKLookAndFeel
8218472: JProgressBar display issue with GTKLookAndFeel
8203627: Swing applications with JRadioButton and JCheckbox fail to render correctly when using GTK3 and the GTK L&F
Reviewed-by: serb, prr
2019-03-22 22:29:38 +03:00
Alexey Ushakov
e3ba0bd651 JBR-1144 [JDK11] [macos] Held down key is not deleted when press backspace after accent menu popup (Mojave)
Handled both Delete and ForwardDelete keys
2019-03-22 14:40:05 +03:00
Egor Ushakov
7db46ce2b2 8146986: JDI: Signature lookups for unprepared classes can take a long time 2019-03-22 12:38:29 +03:00
Alexey Ushakov
81916a92af JBR-1144 [JDK11] [macos] Held down key is not deleted when press backspace after accent menu popup (Mojave)
Handled backspace separately
2019-03-21 23:10:40 +03:00
Vitaly Provodin
b85a2171c3 updated JTreg exclude list 2019-03-20 15:48:54 +07:00
Mikhail Filippov
05dc889841 Adopt fix to match patch submitted into Oracle 2019-03-19 10:31:45 +03:00
Vitaly Provodin
4a754a0fa2 JBR-1286: jdk.compiler was added into JBR 2019-03-19 11:18:23 +07:00
pbansal
be9b80a30a 8215364: JavaFX crashes on Ubuntu 18.04 with Wayland while using Swing-FX interop
Reviewed-by: prr, kcr
2019-03-18 23:02:00 +03:00
Vitaly Provodin
f691fe2f03 updated JTreg exclude list 2019-03-18 16:51:16 +07:00
Anton Tarasov
a879ad5739 JBR-1278 allow native border and shadow for custom decoration mode 2019-03-18 11:48:56 +03:00
Vyacheslav Moklev
94c75b0537 JBR-1274 Common Item Dialog sometimes crash the process
Prevent from freeing memory with CoTaskMemFree twice
2019-03-18 11:12:54 +03:00
Vyacheslav Moklev
bff7dfddfb JBR-1273 Common Item Dialog does not open when wrong path to directory is passed
Handle set directory / set file properly
2019-03-18 11:12:41 +03:00
Vyacheslav Moklev
6ecbc2736b JBR-1271 Wrong parent of native windows dialogs
Set a proper parent to a dialog window
2019-03-18 11:12:26 +03:00
Vyacheslav Moklev
8cde9502f1 JBR-1269 Common Item Dialog does not appear on Alt+Tab or click in windows toolbar
JBR-1270 Common Item Dialog does not have an icon

Select a proper window handle
2019-03-18 11:12:11 +03:00
Sergey Malenkov
af0360f3ea Merge remote-tracking branch 'origin/master' 2019-03-14 13:50:23 +03:00
Sergey Malenkov
02e0f6f078 do not replace the right Alt key with AltGr on Mac by default 2019-03-14 13:50:09 +03:00
Vitaly Provodin
094f03f5b3 updated JTreg exclude list 2019-03-13 11:35:07 +07:00
Vitaly Provodin
71ee90cd7b updated JTreg exclude list 2019-03-13 11:16:30 +07:00
Vitaly Provodin
426055c320 updated JTreg exclude list 2019-03-12 11:37:06 +07:00
Vitaly Provodin
30ce36030d updated JTreg exclude list 2019-03-11 10:06:30 +07:00
Vitaly Provodin
6012cd1180 updated JTreg exclude list 2019-03-10 09:39:32 +07:00
Elena Sayapina
1d31d1f8ff JBR-1260: Wrong calling convention for EnableNonClientDpiScaling in windows/native/sun/windows/awt.h 2019-03-07 13:27:10 +03:00
Vyacheslav Moklev
04112e6f90 JBR-1258 CommonItemDialog ignores directory to open
Fix parsing of directory path / file path
2019-03-06 12:01:25 +03:00
Vyacheslav Moklev
e0c79eb54f JBR-1257 CommonItemDialog modal window has no owner
Fix modality for Common Item Dialog
2019-03-06 12:00:56 +03:00
Vitaly Provodin
6ad54fb1ea JBR-1199: added JBR modules list for jlink 2019-03-06 09:37:47 +07:00
Elena Sayapina
dc7abebe17 JBR-1102: [JDK11] java/awt/Paint/ComponentIsNotDrawnAfterRemoveAddTest/ComponentIsNotDrawnAfterRemoveAddTest.java: 'paint' method of 60 components was not called 2019-03-05 08:36:37 +03:00
Vitaly Provodin
6d35b8fe59 updated JTreg exclude list 2019-03-03 08:20:13 +07:00
Vitaly Provodin
9552363525 updated JTreg exclude list 2019-03-03 07:45:56 +07:00
Vitaly Provodin
6a9a917161 Merge remote-tracking branch 'origin/master' 2019-03-03 07:44:33 +07:00
Sergey Malenkov
916fec8145 Fix key modifiers processing including AltGr 2019-03-02 17:38:24 +03:00
Alexey Ushakov
a53989e85a Added cmake projects for hotspot and jdk 2019-02-28 18:13:20 +03:00
Dmitry Batrak
4efa7eab3e JBR-1248 Exception caused by broken font 2019-02-28 15:49:24 +03:00
Elena Sayapina
07bf36928d updated JTreg exclude list 2019-02-28 11:26:48 +03:00
Dmitry Batrak
c2e756ec4f apply (partial) fix for JBR-363 from OpenJDK 12 (JDK-8139178) 2019-02-28 10:09:41 +03:00
Dmitry Batrak
3d7ac30072 partially rollback JBR-363 fix, to apply corresponding change from OpenJDK 12 2019-02-28 10:09:41 +03:00
Dmitry Batrak
3d0ec88046 apply part of JBR-363 fix missed in backporting from JBRE 8 2019-02-28 10:09:40 +03:00
Vitaly Provodin
2b8f6f70a0 updated JTreg exclude list 2019-02-28 11:55:42 +07:00
Elena Sayapina
c8d631a142 JBR-1102: [JDK11] java/awt/Paint/ComponentIsNotDrawnAfterRemoveAddTest/ComponentIsNotDrawnAfterRemoveAddTest.java: 'paint' method of 60 components was not called 2019-02-28 07:50:43 +03:00
Alexey Ushakov
37739127c3 JBR-1113 java/awt/FontClass/GlyphRotationTest.java: java.lang.RuntimeException: cnt 1 = 13 cnt 2 = 13
Resolved merge issue (IDEA-57233)
2019-02-27 14:13:12 +03:00
Dmitry Batrak
a26b70568a JBR-1245 [JDK 11] There are different letter spacings in some controls 2019-02-27 12:06:42 +03:00
Dmitry Batrak
1e6f37320b add 'build' folder to .gitignore 2019-02-27 12:05:14 +03:00
Elena Sayapina
f368f0f101 JBR-1148: jb/sun/awt/macos/KeyPressAndHoldTest.java intermittently fails by timeout, added max time to wait, reverted ApplePressAndHoldEnabled check 2019-02-27 10:15:29 +03:00
Elena Sayapina
48b7dd874f JBR-1146: Test jb/javax/swing/JDialog/JDialog1054.java intermittently fails by timeout 2019-02-26 14:27:16 +03:00
Elena Sayapina
5bb4c2a1d6 JRE-318: Minor regression test update, corrected comments 2019-02-26 12:51:47 +03:00
Vitaly Provodin
094306dc24 updated JTreg exclude list 2019-02-25 11:43:51 +07:00
Vitaly Provodin
9b1114df30 updated JTreg exclude list 2019-02-25 10:09:03 +07:00
Vitaly Provodin
366ceeb857 JRE-1238: NoClassDefFoundError: Could not initialize class sun.tools.attach.VirtualMachineImpl 2019-02-22 16:55:59 +03:00
Denis Fokin
315b0ed151 JRE-1220 Allow to process and veto keyevents after AWT typeahead and before Swing actions processing 2019-02-22 16:30:36 +03:00
Denis Fokin
2a68808b1d Indentation 2019-02-22 13:07:31 +03:00
Vitaly Provodin
8bc90e970e updated JTreg exclude list 2019-02-22 12:34:57 +03:00
Anton Tarasov
d2820524a1 JRE-1232 forwardport: JRE-1228support custom frame decoration 2019-02-21 20:04:00 +03:00
Denis Fokin
d68dcbfa37 Indentation 2019-02-21 19:53:06 +03:00
Denis Fokin
34fa047463 IDEA-205322 Dark window header not worked on macOS. 2019-02-21 17:21:42 +03:00
Vitaly Provodin
a4e7fdb61c JRE-1199: added the list of files required for stripped JBR bundle (follow up) 2019-02-21 09:41:50 +03:00
Vitaly Provodin
ec0d6d6b14 JRE-1199: added JFX files 2019-02-20 20:13:19 +03:00
Vitaly Provodin
903775e751 updated JTreg exclude list 2019-02-18 05:58:41 +03:00
Vitaly Provodin
13fbc2beca JRE-1199: added the list of files required for stripped JBR bundle - removed leading ./ 2019-02-17 08:50:27 +07:00
Vitaly Provodin
6f4be20e39 JRE-1199: corrected the list of files required for stripped JBR bundle on Windows 2019-02-15 18:32:26 +07:00
Vitaly Provodin
e5dd1ec919 JRE-1199: added the list of files required for stripped JBR bundle (follow up) 2019-02-15 15:36:25 +07:00
Vitaly Provodin
ad87675353 updated JTreg exclude list 2019-02-15 14:41:32 +07:00
Vyacheslav Moklev
764909ce2a JRE-1216 Implement Windows native file dialogs with the new Common Item Dialog API
Add implementation of file dialogs with the new Common Items Dialog API
2019-02-14 11:21:59 +03:00
Vitaly Provodin
74f6d29013 updated JTreg exclude list 2019-02-14 11:57:59 +07:00
Vitaly Provodin
9820ecb77c JRE-1199: added the list of files required for stripped JBR bundle (follow up) 2019-02-14 10:57:19 +07:00
Vitaly Provodin
a1fcf9fcbc JRE-1199: added the list of files required for stripped JBR bundle 2019-02-14 10:55:08 +07:00
Elena Sayapina
8637715ecc JRE-1092 Compilation with VS2017 is broken by JRE-431 fix on JBRE11 2019-02-13 16:32:41 +07:00
Vitaly Provodin
52ee651a09 removed 2019-02-13 16:25:37 +07:00
Vitaly Provodin
a47c5fadca updated JTreg exclude list 2019-02-13 11:23:44 +07:00
Vitaly Provodin
33b68747b2 updated JTreg exclude list 2019-02-13 10:45:01 +07:00
Dmitry Batrak
d53601a541 Merge pull request #2 from mfilippov/mf-users-font-issue
JRE-1166 Handle the case when fonts are installed into user's home folder
2019-02-12 13:26:00 +03:00
Mikhail Filippov
a03103bbe6 JRE-1166 [jdk11] Handle the case when fonts are installed into user registry key. This is the default behaviour since Windows 10 1809. 2019-02-12 13:20:45 +03:00
Alexey Ushakov
8fb03809dc Merge remote-tracking branch 'origin/openjdk11' 2019-02-08 01:24:47 +03:00
Vitaly Provodin
3d988754d4 Revert "JRE-1139 RubyMine with 11 JDK throws exception on the start"
This reverts commit 96da48c5
2019-02-07 17:45:54 +07:00
Vitaly Provodin
53c4bf9f26 updated JTreg exclude list 2019-02-05 16:49:24 +07:00
Vitaly Provodin
140750c24d updated JTreg exclude list 2019-02-03 11:55:37 +07:00
Vitaly Provodin
7c60ba27c5 updated JTreg exclude list 2019-02-03 10:39:44 +07:00
Vitaly Provodin
5bd82eb264 updated JTreg exclude list 2019-02-03 07:04:05 +07:00
Vitaly Provodin
ba6e4eb906 updated JTreg exclude list 2019-02-01 14:00:56 +07:00
Anton Tarasov
46fc019eeb JRE-1172 [cleanup] 2019-01-31 17:41:44 +03:00
Anton Tarasov
04eebb8c56 Merge remote-tracking branch 'origin/master' 2019-01-31 15:17:23 +03:00
Anton Tarasov
c7257c1dae JRE-1172 forwardport: JRE-1163[IDEA-187439] Modal dialogs (e.g commit dialog or diff from it) are sometimes invisible 2019-01-31 15:00:29 +03:00
Anton Tarasov
c06c4c69d3 JRE-1162 [jdk11] support on-the-fly DPI change on linux 2019-01-28 18:45:26 +03:00
Anton Tarasov
d45e86456a Merge remote-tracking branch 'origin/master' 2019-01-25 13:36:08 +03:00
Anton Tarasov
924d33c6d1 Add unix classes to the gradle project 2019-01-25 13:34:45 +03:00
Alexey Ushakov
63b1f82e1c JRE-911 [JDK11]jb/sun/lwawt/macosx/CThreading/IsAppKit.java: Compilation failed
Allowed access to sun.lwawt.macosx
2019-01-23 13:28:41 +03:00
Vitaly Provodin
39501a3d4a updated JTreg exclude list 2019-01-23 11:53:15 +07:00
Vitaly Provodin
6003593f78 updated JTreg exclude list 2019-01-20 08:50:51 +07:00
Alexey Ushakov
9e06cc8f01 JRE-1114 [JDK11] IDEA hangs on adding new SDK on macOS
Ported workaround for JRE-199 from JBRE8
(ce389c1012efa8d4caf6ee118720145bb51eddba)
2019-01-18 20:41:29 +03:00
Anton Tarasov
be4f8c0d9d JRE-1142 [jdk11] hidpi is not detected since Ubuntu 18.04 2019-01-18 18:36:52 +03:00
Anton Tarasov
b89e6aed0b JRE-1111 [JDK11] java/beans/Beans/TypoInBeanDescription.java crashes at libawt_xawt.so+0x4a30d 2019-01-18 17:44:50 +03:00
Elena Sayapina
3d898a8024 JRE-998: Added new regression test (Input freezes after MacOS key-selector on Mojave) 2019-01-18 19:23:26 +07:00
Alexey Ushakov
96da48c589 JRE-1139 RubyMine with 11 JDK throws exception on the start
Restored javax.activation module
2019-01-17 21:28:48 +03:00
Vitaly Provodin
241af853ea updated JTreg exclude list 2019-01-17 15:34:52 +07:00
Elena Sayapina
b808be6a6a JRE-1054: Added new regression test (Weird non-modal dialog above modal dialog behaviour) 2019-01-17 13:00:07 +07:00
Elena Sayapina
0be0a018b5 JRE-318: Added new regression test (Cmd+` doesn't work after update to JDK 152_*) 2019-01-17 12:59:33 +07:00
Alexey Ushakov
48e7b547ae JRE-1083 [JDK11] Test com/sun/java/accessibility/util/8051626/Bug8051626.java fails on macOS on JB JDK11b
Wrapped SelectorPerformer invocation into privileged action
2019-01-16 16:52:26 +03:00
Alexey Ushakov
d4b529ad49 JRE-1112 javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java: Background is not translucent (java.awt.Color[r=255,g=255,b=255])
Moved check to resolve rendering problems in components
2019-01-15 15:48:34 +03:00
Vitaly Provodin
f779f6248c updated JTreg exclude list 2019-01-15 15:30:10 +07:00
Vitaly Provodin
c0c871c5f9 updated JTreg exclude list 2019-01-15 15:22:02 +07:00
Vitaly Provodin
53b86e4272 updated JTreg exclude list 2019-01-14 16:58:00 +07:00
Vitaly Provodin
483af71639 updated JTreg exclude list 2019-01-11 16:33:17 +07:00
Vitaly Provodin
5a9b273098 updated JTreg exclude list 2019-01-11 10:43:00 +07:00
Denis Fokin
212888416b Fallback mode, compatible with OpenJDK key event processing
(cherry picked from commit 33704a6)
2019-01-10 22:58:52 +03:00
Denis Fokin
14e2b7a4ad Mac OS X private keyboard layout switch API
(cherry picked from commit f6532954e9b0fd1600848fcc7f9f367058599e89)
2019-01-10 22:51:27 +03:00
Vitaly Provodin
bbdbe17e2a JRE-1117 J2DBench: introduced result reader for TC's charts (follow up)
separated printing values fo TC charts and values for comparisons
2019-01-07 06:47:33 +07:00
Vitaly Provodin
422fa59643 JRE-1117 J2DBench: introduced result reader for TC's charts 2019-01-05 08:22:51 +07:00
Vitaly Provodin
0b5119ca89 enabling dtrace-tests: added dtrace keyword 2018-12-28 11:18:23 +07:00
Alexey Ushakov
dfaa777ff5 JRE-1112 javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java: Background is not translucent (java.awt.Color[r=255,g=255,b=255])
Fixed regression on linux caused by fix of JRE-1076
2018-12-27 20:16:12 +03:00
Vitaly Provodin
d45e80b422 updated JTreg exclude list 2018-12-27 15:41:44 +07:00
Alexey Ushakov
a29f19e6a2 JRE-1109 [JDK11] java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java: JNI string operation received a non-string
Corrected check for the allocated string
2018-12-26 15:59:57 +03:00
Vitaly Provodin
c2eee9426f updated JTreg exclude list 2018-12-26 10:27:37 +07:00
Alexey Ushakov
0e1d23c807 JRE-60 Editor font is distorted on Kubuntu Linux 16.04 with HiDPI
Override FC_HINT_SLIGHT only for small font sizes
2018-12-25 13:00:19 +03:00
Alexey Ushakov
2847be73c6 JRE-366 Add support for Awesome WM
Added detection of Awesome WM and handled similar to Sawfish WM

(cherry picked from commit 6742077ed198975949af567e8ef543f853397351)
2018-12-25 13:00:17 +03:00
Alexey Ushakov
6851dc3441 JRE-353 Fedora 25 + XMonad rendering issues
Added support for Xmonad WM

(cherry picked from commit c690c3c7fdf1390e6b1a8d388ff752a09391ae3c)
2018-12-25 13:00:15 +03:00
Dmitry Batrak
61dc0ea151 force Unix line endings on new files in project
as core.autocrlf=false is recommended on Windows, Git won't convert line endings on commit
2018-12-25 12:03:50 +03:00
Vitaly Provodin
d295bb0bbd moving diff-image file into the scratch directory 2018-12-25 15:32:33 +07:00
Vitaly Provodin
703cdf6b6a updated JTreg exclude list 2018-12-25 15:02:06 +07:00
Dmitry Batrak
c606d1f8c6 JRE-571 Print to PDF not working when no printers installed on macOS
port of JDK-8211055, JDK-8212040 from OpenJDK 12
2018-12-25 09:03:49 +03:00
Dmitry Batrak
65a5e450d5 JRE-927 Unexpected wrapping of bidirectional text in JEditorPane on HiDPI screens
port commit 11a5a4a2 from JBR 9
2018-12-25 09:03:26 +03:00
Dmitry Batrak
c6fed2cf58 JRE-774 Don't paste BOM from clipboard on Mac
port commit ea9b75b3 from JBR 9
2018-12-25 09:03:10 +03:00
Dmitry Batrak
9caaac4a5a JRE-847 Box drawing characters have different widths with Monospaced font on Windows
port commit 778cef18 from JBR 9
2018-12-25 09:02:44 +03:00
Dmitry Batrak
5d704a963b IDEA-152816, IDEA-152454 fix text rendering issues (text cutoff and incorrect rendering in editor fragment components)
FcMatchFont-type pattern substitutions shouldn't be invoked before specific font is selected - it can apply unrelated rules

port commit e21cd635 from JBR 9
2018-12-25 09:02:27 +03:00
Dmitry Batrak
e9bd5f5dad JRE-748 Strange dots with fractional metrics turned on
port commit 82e7c82d from JBR 9
2018-12-25 09:02:08 +03:00
Dmitry Batrak
32ce109355 JRE-593 Wrong italic font rendering for Source Code Pro
port commit 1f6bd200 from JBR 9
2018-12-25 09:01:54 +03:00
Dmitry Batrak
2b03305a5f JRE-588 Images in JavaDoc not scaled proportionally when only <img> width specified
port JDK-8208638 from OpenJDK 12
2018-12-25 09:01:34 +03:00
Dmitry Batrak
89c99c1999 JRE-586 Incorrect rendering of Myanmar combining marks
port commit 5c513399 from JBR 9
2018-12-25 09:01:18 +03:00
Dmitry Batrak
8da6cec22a JRE-472 Impossible to enter zero width non-joiner character on Windows 10
backport JDK-8187364 from OpenJDK 12
2018-12-25 09:01:04 +03:00
Dmitry Batrak
394e055ae6 JRE-469 Console with emoji output becomes slow
The fix consists of two parts:
* Making CCharToGlyphMapper remember that a particular character
  cannot be displayed (isn't mapped to glyph with given font). Checking
  this repeatedly in native code is very slow.
* Make CCompositeGlyphMapper remember the results of char-to-glyph
  mapping, this was missing in previous implementation. This reuses
  caching code in CompositeGlyphMapper, extending the range of
  characters for which the results are cached to include Supplementary
  Multilingual Plane (most emoji characters belong to it).

port commit 4e0ccde2 from JBR 9
2018-12-25 09:00:49 +03:00
Dmitry Batrak
5b814d6b34 JRE-430 Font fallback sometimes doesn't work in Swing text components
port commit fc8003ad from JBR 9
2018-12-25 09:00:27 +03:00
Dmitry Batrak
67b1e552d8 JRE-372 IntelliJ editors silently precompose diacritics
port commit f7facf1b from JBR 9
2018-12-25 09:00:11 +03:00
Dmitry Batrak
fc2b95ea8e avoid changing characters' advances when special character is added to the line or ligatures are enabled
problem report - https://youtrack.jetbrains.com/issue/JRE-118#comment=27-1816577

port commit 32288ee6 from JBR 9
2018-12-25 08:59:52 +03:00
Dmitry Batrak
690696bb52 JRE-118 Emoji support
port commits 5dcafa4d, 70e14949 from JBR 9
2018-12-25 08:59:37 +03:00
Dmitry Batrak
cbf4d301ee fix direction of vertical glyph offsets (regression introduced by backporting JDK 9 changes for JRE-33)
port commit 9b98eaf0 from JBR 9
2018-12-25 08:59:03 +03:00
Dmitry Batrak
72fb9ff7c4 an option to disable native rendering for rotated text (following JRE-19)
port commit ccc1ded6 from JBR 9
2018-12-25 08:58:41 +03:00
Dmitry Batrak
030f15834c JRE-11 Support text rendering via DirectWrite API on Windows
port commits 7b180f8d, cccbcab4 from JBR 9
2018-12-25 08:58:25 +03:00
Dmitry Batrak
c30407cb87 JRE-10 Ligatures are not working sometimes when characters from multiple scripts are present
ports commit 18b3f575 from JBR 9
2018-12-25 08:58:07 +03:00
Dmitry Batrak
dbc15fb84e don't apply FreeType-returned glyph advance for glyphs rendered by GDI
This seems to produce a better looking text (more evenly spaced). Fractional metrics won't be respected by this code, but we can address this later if needed.

ports commit 7bd6c17c from JBR 9
2018-12-25 08:57:45 +03:00
Dmitry Batrak
d6b588bdab IDEA-150876 OpenJDK fonts for toolwindow names look worse than Oracles's
port commits c9debd5e, ed78cd00, 4c7e1619, 7aa0429c from JBR 9
2018-12-25 08:57:27 +03:00
Dmitry Batrak
a949f9d220 reimplement JDK-7162125 to fix JDK-8147002
port commit ba38e5c4 from JBR 9
2018-12-25 08:57:12 +03:00
Dmitry Batrak
c3c85ad548 optimize usage of Harfbuzz - create hb_face_t instance only once for each Font2D instance
port commit de367178 from JBR 9
2018-12-25 08:56:46 +03:00
Dmitry Batrak
f3ca8c7869 revert all my previously merged changes 2018-12-25 08:47:04 +03:00
Alexey Ushakov
ff04fd9429 Revert "JRE-578 OGLRenderQueue.flushNow() executes too many times"
This reverts commit acc636fa
2018-12-24 21:53:51 +03:00
Alexey Ushakov
339d11fa0d JRE-1076 setBackground​(Color bgColor) does not have any effect on Window in 11 Runtime
Use PaintManager.paint() for non-opaque windows
2018-12-21 22:36:21 +03:00
Dmitry Batrak
24dfabe6c3 JRE-593 Wrong italic font rendering for Source Code Pro
port commits 4ae0566, 30f998a from master
2018-12-19 17:13:33 +07:00
Dmitry Batrak
8e6fc9365c fix compilation warning (causing build failure) 2018-12-19 16:58:21 +07:00
Dmitry Batrak
adacc3a6f6 an option to disable native rendering for rotated text (following JRE-19)
port commit bb1be19 from master
2018-12-19 16:51:51 +07:00
Dmitry Batrak
6aee6ac680 JRE-11 Support text rendering via DirectWrite API on Windows
port commits 14b183c, 6305747, 9afd0eb, 004f97e, 3ea365b, edf6ef0, a16b2a6 from master
2018-12-19 16:45:37 +07:00
Dmitry Batrak
6b52af6446 don't apply FreeType-returned glyph advance for glyphs rendered by GDI
This seems to produce a better looking text (more evenly spaced). Fractional metrics won't be respected by this code, but we can address this later if needed.

ports commit 0d385c6 from master
2018-12-19 16:39:21 +07:00
Dmitry Batrak
86ca0039c0 IDEA-150876 OpenJDK fonts for toolwindow names look worse than Oracles's
port commits d170a25, d97f0b8 from master
2018-12-19 16:33:16 +07:00
Vitaly Provodin
fcdbfc43af Revert "JRE-11 Support text rendering via DirectWrite API on Windows"
This reverts commit 8e7d110d
2018-12-19 16:21:41 +07:00
Vitaly Provodin
09b06c2254 Revert "JRE-593 Wrong italic font rendering for Source Code Pro"
This reverts commit 1440ca58
2018-12-19 15:40:10 +07:00
Vitaly Provodin
7919c20137 Revert "JRE-593 Wrong italic font rendering for Source Code Pro"
This reverts commit d08b441e
2018-12-19 15:37:47 +07:00
Dmitry Batrak
25777c7a28 reimplement JDK-7162125 to fix JDK-8147002
port commits e3db506, 373b766, 733ec1f, 01abac6, 6048ac6, 42e6d3c, d1e42da, c9a3a18, 49d2809 from master
2018-12-19 15:01:25 +07:00
Vitaly Provodin
d08b441e3c JRE-593 Wrong italic font rendering for Source Code Pro
fixed compilation errors - removed rotation
2018-12-19 14:50:38 +07:00
Vitaly Provodin
97ab23c7d5 JRE-624 CThreading isAppKit() fails to detect main app thread if it was renamed
moved from jdk/test to test/jdk
2018-12-19 11:22:09 +07:00
Dmitry Batrak
1440ca5841 JRE-593 Wrong italic font rendering for Source Code Pro
port commits 4ae0566, 30f998a from master
2018-12-19 11:15:56 +07:00
Dmitry Batrak
8e7d110d73 JRE-11 Support text rendering via DirectWrite API on Windows
port commits 14b183c, 6305747, 9afd0eb, 004f97e, 3ea365b, edf6ef0, a16b2a6 from master
2018-12-19 11:07:34 +07:00
Dmitry Batrak
968c24866d JRE-588 Images in JavaDoc not scaled proportionally when only <img> width specified
port JDK-8195095, JDK-8206238, JDK-8208638 from OpenJDK 12

port commits 8f5a6e9a, 07461ea4 from jbre8u
2018-12-19 10:23:45 +07:00
Dmitry Batrak
e722edf104 JRE-588 Images in JavaDoc not scaled proportionally when only <img> width specified
port commit 1423c10 from master
2018-12-19 10:15:20 +07:00
Dmitry Batrak
fc8100802a JRE-571 Print to PDF not working when no printers installed on macOS
port of JDK-8212040 from OpenJDK 12

port commits 8b5b0de9, ad455515 from jbre8u
2018-12-18 18:21:02 +07:00
Dmitry Batrak
d31903acce JRE-571 Print to PDF not working when no printers installed on macOS
port of JDK-8211055 from OpenJDK 12

port commits d2fa84e9, 109165b7 from jbre8u
2018-12-18 18:15:03 +07:00
Alexey Ushakov
55e86e53bc JRE-43 Font.getFamily() does not work in headless mode
Resolved merge issues
2018-12-18 13:05:52 +03:00
Vitaly Provodin
a2dd06ca62 updated JTreg exclude list 2018-12-18 16:00:41 +07:00
Dmitry Batrak
785032941d JRE-970 [macos] Problem with input of yen symbol
port of commit fbb07014 from JBRE8u
2018-12-18 15:53:14 +07:00
Dmitry Batrak
3ce2665aae JRE-774 Don't paste BOM from clipboard on Mac
port commit 48b03b9c from master
2018-12-18 15:36:52 +07:00
Dmitry Batrak
3524ee07e7 JRE-847 Box drawing characters have different widths with Monospaced font on Windows
port commit c1ccf91 from master
2018-12-18 15:28:29 +07:00
Dmitry Batrak
32cbdd4cef JRE-748 Strange dots with fractional metrics turned on
port commit e0f56b5 from master
2018-12-18 15:17:29 +07:00
Dmitry Batrak
b5bf240fd8 JRE-586 Incorrect rendering of Myanmar combining marks
port commit d6bdad1 from master
2018-12-18 11:36:41 +07:00
Dmitry Batrak
c3b4add398 JRE-472 Impossible to enter zero width non-joiner character on Win10
port commit dc238fe from master
2018-12-18 11:24:10 +07:00
Dmitry Batrak
bc7cd26d17 JRE-430 Font fallback sometimes doesn't work in Swing text components
port commit 2c79ff3 from master
2018-12-18 10:46:04 +07:00
Dmitry Batrak
5f5b589458 JRE-372 IntelliJ editors silently precompose diacritics
port commit b83ffcf from master
2018-12-18 10:36:02 +07:00
Dmitry Batrak
a9bc2e51f4 fix direction of vertical glyph offsets (regression introduced by backporting JDK 9 changes for JRE-33)
port commit 29e7806 from master
2018-12-17 18:30:02 +07:00
Dmitry Batrak
a6c21c912e JRE-10 Ligatures are not working sometimes when characters from multiple scripts are present
ports commit 165b288 from master
2018-12-17 18:21:25 +07:00
Vitaly Provodin
d3731df79d jbu tests: added golden files for Windows
(cherry picked from commit ff10483)
2018-12-14 16:40:18 +07:00
Vitaly Provodin
00a29ad129 JRE-9: added regression test
(cherry picked from commit 4ffb665)
2018-12-14 16:14:24 +07:00
Vitaly Provodin
7fc924f065 not for upstream: added disposing frames in order to provide the test with the chance on the second run
(cherry picked from commit 8170635)
2018-12-14 16:07:42 +07:00
Vitaly Provodin
63130fd461 Regression test on https://bugs.openjdk.java.net/browse/JDK-8139176
(cherry picked from commit 6f1c0a6)
2018-12-14 15:39:17 +07:00
Alexey Ushakov
f925b24d5e Resolved windows compile issues 2018-12-14 10:46:22 +03:00
Vitaly Provodin
9e6301fd03 Revert "Create README.MD"
This reverts commit 4c588271
2018-12-14 11:28:29 +07:00
Konstantin Bulenkov
4c588271e2 Create README.MD
(cherry picked from commit 66baa265d993540d11ecde5b11c88028e2687270)
2018-12-14 10:35:00 +07:00
Konstantin Bulenkov
9699d0763a add vcs.xml
(cherry picked from commit 1cf13ee9654999c1e07756fe5367c89ef5cf17ec)
2018-12-14 10:29:00 +07:00
Konstantin Bulenkov
786cee5d97 add JetBrains copyright
(cherry picked from commit 260b5e1571c6944a69f96cc702fc9e88f45a6e4e)
2018-12-14 10:21:13 +07:00
Konstantin Bulenkov
37e7661f85 add workspace.xml to gitignore
(cherry picked from commit bd5b9403fdca779ecc76f0b3af2918fe772f7ed1)
2018-12-14 10:14:56 +07:00
Konstantin Bulenkov
de1e4a9d71 update icons
(cherry picked from commit dfe387ff5037deda29d8d522cba6cc5370796ff4)
2018-12-14 10:07:40 +07:00
Alexey Ushakov
9662d45e36 JRE-921 IDEA crash on JDK9
Open and Save Panels should be retained when using without ARC

https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/UsingtheOpenandSavePanels/UsingtheOpenandSavePanels.html
2018-12-14 00:23:51 +03:00
Alexey Ushakov
dffea9d701 JRE-1028 fwport(9): JRE-1008 Do not use LCD shader on macOS 10.14+ in font rendering
Disable LCD text shader on macOS 10.14+ if LCD rendering is not explicitly specified
2018-12-14 00:23:50 +03:00
Alexey Ushakov
c358cff18b JRE-1027 forwardport(9): JRE-998 Input freezes after MacOS key-selector on Mojave
Added workaround to reset IM after entering accented symbols
2018-12-14 00:23:49 +03:00
Alexey Ushakov
2c1ee18b78 JRE-965 Debug build compile failure
Fixed compile failure
2018-12-14 00:23:48 +03:00
Alexey Ushakov
eaed1780be JRE-945 Compiler warnings in graphics trace code
Added casts to pointers
2018-12-14 00:23:47 +03:00
Alexey Ushakov
666e2ed685 JRE-690 Recent bundled JDK VCS Log UI slowdowns
Replaced OLG blit sync with threshold by the sync without threshold
Refactoring. NO_SYNC mode is not used, so removing QueueSyncType

(cherry picked from commit 45cbdc74e15f6bbc48f37b93d3edf5436de255fa)
(cherry picked from commit 8aa2d043fb9f9058fb578396caccd11703c421be)
2018-12-14 00:23:47 +03:00
Alexey Ushakov
fe339f5eab JRE-690 Recent bundled JDK VCS Log UI slowdowns
Optimized nativeGetCursorPosition to avoid creating temporary Point2D object

(cherry picked from commit 2861386c34127be16e4ab0d0b3e6e826e4707cc7)
2018-12-14 00:23:46 +03:00
Alexey Ushakov
5904c3ce30 JRE-686 OGL Glyph cache is too small for IDEA editor
Increased glyph cache size. Added logging to track caching process

(cherry picked from commit f02739d32d7c0bc7b7aae8c85536e16f51bb8543)
(cherry picked from commit 9cc1ce5d2f25892e8ccd9c22a0252e21e8fd2f02)
(cherry picked from commit cb76ebdd51f7ee3cc6133e199bb7e479d863c08b)
(cherry picked from commit 3f94620cf4c5b529cc786706695c4562fbc75ab2)
2018-12-14 00:23:45 +03:00
Alexey Ushakov
7cd1d0bc10 JRE-646 Provide performance logging of graphics primitives
Enhanced logging (example: -Dsun.java2d.trace=log,ptime,td=3000000,verbose)
Filter primitives by name and detect LCD/Grayscale text rendering (JRE-679)
Example: -Dsun.java2d.trace=log,ptime,name:OGLDrawGlyphsGray,verbose

(cherry picked from commit d38e16b0ae64866c91700ed312311419ab749269)
(cherry picked from commit 61a0ac6af921093a20324a88d6ed5e45c9d8ed7d)
(cherry picked from commit 9318aa0a17e50a92accb996f284b4ab5f6d9eaa5)
2018-12-14 00:23:45 +03:00
Alexey Ushakov
0a36774a6e JRE-625 Unstable UI menu rendering
Removed lazy flushing in flushOnscreenGraphics

(cherry picked from commit abf35dcf1304c737fc07783202377fee3c40c58a)
2018-12-14 00:23:44 +03:00
Alexey Ushakov
54bd0ddc20 JRE-624 CThreading.isAppKit() fails to detect main app thread if it was renamed
Added app main thread fix

(cherry picked from commit 5dfb30ae68b2c54d58c98a9195709c031f823581)
(cherry picked from commit 94163bd69f64616836523e81567aa1141480d841)
2018-12-14 00:23:43 +03:00
Alexey Ushakov
2fe5289178 JRE-608 J2DBench metrics: up to 20x degradation
Increased rendering queue buffer up to 6.4 MB

(cherry picked from commit 9ef00f00a7fb6e14835393f8d3944157c6800727)
(cherry picked from commit 2a61e9e997a880a60c5acb361849205170501b91)
(cherry picked from commit 68ca9f00ded004c970b94bd047a04b9f09237047)
2018-12-14 00:23:43 +03:00
Alexey Ushakov
cf7e3f86f5 JRE-584 Retaining objects in HashMap causes some performance drop
Replaced HashMap with ArrayList

(cherry picked from commit 79ea17c76eb44b60d88bd4630ce66c6794f2f881)
(cherry picked from commit 243a2c8833b82c7fef09f1f519d081b4464865c1)
2018-12-14 00:23:42 +03:00
Alexey Ushakov
acc636fa2d JRE-578 OGLRenderQueue.flushNow() executes too many times
Aligned flushNow to predefined time threshold in order to decrease frequency of the operation

(cherry picked from commit 5762188776dc3d425e3fe0ada1015bfdfcade154)
(cherry picked from commit 38e122f6f9a2f85aba1eeb0e9bff277b1f2a471e)
2018-12-14 00:23:41 +03:00
Alexey Ushakov
833d9f85a8 JRE-501 Live resize is jerky for heavy java applications on Mac
Skip too frequent flushBuffer actions

(cherry picked from commit c1abdf240b37065f60678479d662b0966664e7fa)
2018-12-14 00:23:40 +03:00
Alexey Ushakov
cef970e1ba JRE-471 Crash on macOS Sierra after Sleep
Replaced [NSScreen screens] 'objectAtIndex' with 'firstObject' to get nil instead of NSRangeException. Added nil checks

(cherry picked from commit d6b98511262055c01522d9ec8024253af7e91564)
2018-12-14 00:23:33 +03:00
Denis Fokin
3f02c651e5 IDEA-140054 A lot of NSEvents
8042752: [macosx] NSEvent instances leak throw JNI local references
Reviewed-by: serb, azvegint

(cherry picked from commit 511d7c8ae09a74b15f28b0d7030cdcc05c9aac3b)
2018-12-13 20:10:54 +03:00
Denis Fokin
f9902f7611 JRE-318 Cmd+` doesn't work after update to JDK 152_*
Partial revert: 8169589: [macosx] Activating a JDialog puts to back another dialog

(cherry picked from commit 413a18a770dd299e6e47a0f3d4be9f6767ec491f)
2018-12-13 20:10:52 +03:00
Denis Fokin
a8ec2d4116 JRE-190 Cannot type opening square bracket or brace with a Spanish keyboard in the last Rubymine EAP
(cherry picked from commit fe170431d51dd92d28d601c9cc35f06c9f78cddf)
2018-12-13 20:10:51 +03:00
Denis Fokin
9a20d85614 IDEA-166921 Shift not handled correctly in keymap
(cherry picked from commit 9328c07d5545e74d37ad1bf2016b6a433281d28e)
2018-12-13 20:10:50 +03:00
Denis Fokin
98041ba69a IDEA-166443 Mac OS: Delete action deletes twice if Edit menu has be opened before
(cherry picked from commit 9f29d899c9c12ad5c8c19e2d49cff54ad0e93b85)
2018-12-13 20:10:48 +03:00
Denis Fokin
068ee17dc4 IDEA-166435 Mac OS: IDEA quits on pressing any key with Korean, Chinese and Japanese keyboard layouts
(cherry picked from commit 0fb0fee02afb895d5b99514d6049e3d308bd8262)
2018-12-13 20:10:47 +03:00
Denis Fokin
4b53b59313 Broken space is fixed
(cherry picked from commit 5b52e0988a9fe864fe482c10fa6ecbab3da7cd34)
2018-12-13 20:10:46 +03:00
Denis Fokin
95a43caeba IDEA-166086 IDEA crashes on pressing a dead key
IDEA-166368 Terminal, Mac OS: Delete key inserts a symbol
IDEA-160245 Keymap: if non-QWERTY layout support is enabled, shortcuts with Numpad Plus are not recognized

(cherry picked from commit 601502cb5a3e391ca61fb3b041c507a675c7f008)
2018-12-13 20:10:45 +03:00
Denis Fokin
34f70fb425 ^M and other ISO controls are fixed
(cherry picked from commit b107409ba7e980839e34971413249a30df8858e7)
2018-12-13 20:10:43 +03:00
Denis Fokin
86316d0205 JRE-149 java/awt/event/KeyEvent/DeadKey/DeadKeyMacOSXInputText.java: Pressed char is not dead acute
(cherry picked from commit 7f4b9869f8e3e846aedc938c2a9eb644175bd9aa)
2018-12-13 20:10:42 +03:00
Denis Fokin
b1941dcb80 Broken backspace in quick search
IDEA-166086 IDEA crashes on pressing a dead key

(cherry picked from commit c1eeff0b523da3744ee888f10397552665b0276a)
2018-12-13 20:10:39 +03:00
Denis Fokin
a56cb06c61 IDEA-166050 Terminal, Mac OS: can't enter uppercase symbols – Shift key is ignored
(cherry picked from commit 660e54886b9de2d9491bdc30c2755deadb7a4576)
2018-12-13 20:10:37 +03:00
Denis Fokin
3d687d001b IDEA-166040 jediterm-pty expects getting control command unicode chars in KeyEvent (typ0)
(cherry picked from commit edb73f66480355e9c919246d5f5ebf69ca1ac9ab)
2018-12-13 20:10:35 +03:00
Denis Fokin
6e44f31b7d IDEA-166040 jediterm-pty expects getting control command unicode chars in KeyEvent
(cherry picked from commit 7edd54b0a343c582336cf63b6419a98a2fde320b)
2018-12-13 20:10:34 +03:00
Denis Fokin
d68f22fe9a IDEA-165993 French (azerty) keyboard layout: Cmd+Shift+; is recognized as A
(cherry picked from commit 8196fcd73920b6aff122df94e20cab94f4483276)
2018-12-13 20:10:33 +03:00
Denis Fokin
5f4ecfc278 IDEA-165993 French (azerty) keyboard layout: Cmd+Shift+; is recognized as A
(cherry picked from commit 682276fb5a3189cb3a6459dc829e54e0bcc14b60)
2018-12-13 20:10:32 +03:00
Denis Fokin
7282448b4d IDEA-165943 Keymap: for non-QWERTY keyboard layouts Shift+... shortcuts are inconsistently interpreted
(cherry picked from commit 5b7f4b73a3a22d7a336dc6811328176285b5ee05)
2018-12-13 20:10:30 +03:00
Denis Fokin
65c02bb7e6 Fix for java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java
(cherry picked from commit 935f3a13f7b220ec2d11d7b44cb18abc3dcba37c)
2018-12-13 20:10:29 +03:00
Denis Fokin
293c224f35 IDEA-63779 Keymap shows characters for keys only for english keyboard layout correctly
(cherry picked from commit bd745c470d809412259df868fade2d159dfe9e7b)
2018-12-13 20:10:28 +03:00
Denis Fokin
e8af601d73 IDEA-63779 Keymap shows characters for keys only for english keyboard layout correctly
IDEA-27262 Wrong keys are picked up on dvorak layout in Mac OSX 10.6.2

(cherry picked from commit 07780916770f9214a40068addd32579c10a27a72)
2018-12-13 20:10:24 +03:00
Denis Fokin
df5bcf148a Suppress "uncommented constants" warning 2018-12-13 19:53:01 +03:00
Denis Fokin
8453ad0462 IDEA-63779 Keymap shows characters for keys only for english keyboard layout correctly
IDEA-27262 Wrong keys are picked up on dvorak layout in Mac OSX 10.6.2

(cherry picked from commit 07780916770f9214a40068addd32579c10a27a72)
2018-12-13 19:53:01 +03:00
Denis Fokin
3c09162059 IDEA-160416 Cannot type the dollar sign on my Mac (regression)
(cherry picked from commit 2e7d270b931d0dcf07b603df0f6901f7875fbd0b)
2018-12-13 19:53:01 +03:00
Denis Fokin
916ccc45f1 IDEA-157001 Keymap: for non-QWERTY keyboard layouts Ctrl mofifiers change key processing to QWERTY-like
(cherry picked from commit 5cbee365fa41f40d17fa63a02a92ed1289354bc5)
2018-12-13 19:53:01 +03:00
Denis Fokin
4bcecb07e5 Revert: IDEA-157001 Keymap: for non-QWERTY keyboard layouts Alt and Ctrl mofifiers change key processing to QWERTY-like
(cherry picked from commit 4698945b23236e6b82f7a7dc963684d10721ac0f)
2018-12-13 19:53:00 +03:00
Denis Fokin
2fdb898177 IDEA-157001 Keymap: for non-QWERTY keyboard layouts Alt and Ctrl mofifiers change key processing to QWERTY-like
(cherry picked from commit 7927c5cb93ba8461137218d71f8ad25730b8b828)
2018-12-13 19:53:00 +03:00
Alexey Ushakov
bcb5ba34ac Revert "8148187: Remove OS X-specific com.apple.concurrent package"
Move the dispatcher native code to libosx folder
2018-12-13 16:01:49 +03:00
Alexey Ushakov
0f7c26186a JRE-482 Java_sun_font_CStrike_getNativeGlyphOutline takes too much time in scrolling
Replaced glyph outlines with bounding boxes for glyph boundaries calculation for most common usages. Also, skipped unnecessary OGL flushes in OGL rendering queue

(cherry picked from commit c58dc052af48887338a38beb0c721eddca3af481)
(cherry picked from commit 7f6be7cfb907bbf1c3572b911df5690fa3039fde)
(cherry picked from commit c68913d82c0ba4b4c509179123f0a4bf7971f857)
(cherry picked from commit 9cfa04c93ad416a8177d9e7ca410850bd3ff880f)
(cherry picked from commit 0e930841704e4e98ecc0c888b144245e74218799)
(cherry picked from commit 8ffc190fbdb059d5a24842115c0bc3ade8b351b9)
2018-12-13 16:01:49 +03:00
Alexey Ushakov
6fc369e8bf JRE-444 CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse is slow
Replaced number of CGWindowListCopyWindowInfo for each window layer with [NSWindow windowNumberAtPoint: belowWindowWithWindowNumber:]

(cherry picked from commit 2a143af4d62340acdfd9c94d876f684385febbc8)
2018-12-13 16:01:48 +03:00
Alexey Ushakov
6d73b25130 JRE-359 CGraphicsEnvironment.getDefaultScreenDevice() returns null
Moved CG api calls to AppKit thread

(cherry picked from commit fd0210f035199e8612097a2c1d42b90cfd2111f8)
(cherry picked from commit 5e99e376d9dfe477401121878704630c3c13f9f7)
2018-12-13 16:01:48 +03:00
Alexey Ushakov
5d98c94ee9 JRE-238 [736] java.awt.AWTError: access denied ("java.lang.RuntimePermission" "canInvokeInSystemThreadGroup")
Moved task execution on AppKit to the privileged block. Minor refactoring

(cherry picked from commit 5dbb88471115c9e4a536ae37d0e6794de9e5ac9c)
2018-12-13 16:01:48 +03:00
Alexey Ushakov
28774d6878 JRE-193 UI freeze and 12/second thread dumps
Moved CStrikeDisposer dispose code to AppKit
2018-12-13 16:01:48 +03:00
Alexey Ushakov
a68dea068c JRE-202 Deadlock in CGLGraphicsConfig.getCGLConfigInfo
Added processing system events while waiting for OGLRenderQueue.lock
Moved getCGLConfigInfo logic execution to AppKit thread so, awt lock is
 taken on one thread

(cherry picked from commit d1c8bf03e1bd41cb075aa73cc39558103af7fe1a)
(cherry picked from commit 6bf9f31986be64acf3755b34568802f9960a66ec)
(cherry picked from commit 4e21d67e0369bffac45662c63699b39946218a7a)
2018-12-13 16:01:48 +03:00
Alexey Ushakov
45f1ff7490 JRE-193 UI freeze and 12/second thread dumps
Moved CStrikeDisposer dispose code to AppKit

(cherry picked from commit 51a8c0bee88a78e1c14f537345ce161bc44d1030)
2018-12-13 16:01:48 +03:00
Alexey Ushakov
be707de431 JRE-161 CCE in OGLTextRenderer.validateContext
Throw InvalidPipeException instead of CCE

(cherry picked from commit eafe84a8519b42dea5518cc91a27652befd91473)
2018-12-13 16:01:47 +03:00
Alexey Ushakov
3db09e43d8 JRE-140 AWT hangs on component creation because of 2D activity on AppKit thread
Used AtomicBoolean instead of volatile for double

(cherry picked from commit 17ac3b61ac8d2133e49cdcc20935e6ce38212f07)
2018-12-13 16:01:47 +03:00
Stanislav Dombrovsky
9f079c66e9 Fix rendering of HTML list dots + better vertical align for them.
(cherry picked from commit fa4a404533ba1ef638fe523adc74391aee8a3ebf)
2018-12-13 16:56:19 +07:00
Stanislav Dombrovsky
1a1fa31545 IDEA-146218 Add ability to use SF system fonts on OSX 10.11 and greater. The workaround implemented in this fix allows loading OSX system fonts on OSX >= 10.11 in the list of installed fonts which makes possible to use them in the UI.
(cherry picked from commit 401b217)
(cherry picked from commit fda747e)
(cherry picked from commit f2e3f56)
2018-12-13 16:55:59 +07:00
Sergey Malenkov
e79502c708 JRE-100 Scroll with inertia (Mac os) should only work in the initial component 2018-12-13 16:43:33 +07:00
Sergey Malenkov
ef490fa465 IDEA-161965 ignore dragged event that does not change mouse location Sierra is more sensit 2018-12-13 16:43:06 +07:00
Denis S. Fokin
5c13d63217 Fix version and company name
(cherry picked from commit 0ccc1917f2744ffabb4796a4224f5b105a083266)
2018-12-12 11:58:07 +03:00
Vitaly Provodin
614396d63f updated JTreg exclude list 2018-12-12 10:37:26 +07:00
Alexey Ushakov
b6bdd04e41 JRE-303 2017.1.1 update breaks linux fonts
Corrected rendering hints for Non-AA text rendering

(cherry picked from commit b923aa7a0729a10ea47d3438622d659fbead44c9)
2018-12-11 18:43:53 +03:00
Alexey Ushakov
c75c1ef8b2 JRE-205 Font is wrong and without anti aliasing in 2017.1 EAP
Added property to disable bundled font config:
  java2d.font.loadFontConf=false
Do not load custom font.conf by default

Moved hints adjusting logic from code to bundled font.conf file
Applied correction only for regular fonts with platform sizes less than 12
Some fonts are not corrected at all: Consolas, Noto Sans Mono
Used family name instead of physical one in requests to Fontconfig
Removed redundant call to FcConfigBuildFonts
Added privileged access to the properties (JRE-235,JRE-235)

(cherry picked from commit 4d4c915047077ebd966b0e3be056566d56ba11a4)
(cherry picked from commit 9d6f325f72482405264852f3ee2636f5fedaeaf0)
(cherry picked from commit e7e3372bf8db539c0f6bc85db9f1093f8fa4c380)
(cherry picked from commit 3e724caed2f199be50d25d1ecb20b7819c86be2e)
(cherry picked from commit d372b35963c096a32331b05b257e26841ace5d94)
(cherry picked from commit 18a5f5de03eb107f89dca138a44b9aab2151235c)
(cherry picked from commit 9ba320efef0539f75aa93fd1b5dd80266c954d0a)
(cherry picked from commit b8c38f419972af61291953f7f452c1698f7a1624)
(cherry picked from commit debba0128e200be60adc9a339d5985590ef4e230)
(cherry picked from commit 2fa17b1bd7d6524e4b5fa4d0b3ce2bf02a8fcc78)
(cherry picked from commit 09b4f61db0d4f5beea0e16ce9136c99e2185c10b)
(cherry picked from commit 3b6782dd742f9c74a9535145db2f9f7ffaccf7c8)
(cherry picked from commit f1b68149528c13a22fa64468c130b1405bf3d081)
(cherry picked from commit db5cf5a2b9cb454630fb86783c2d58cd5446cba6)
(cherry picked from commit 32140948578bc3c2a0c5f8adb537660421efe5e7)
(cherry picked from commit b978e3d0b131ed642774c5a14a649e13f764c20b)
2018-12-11 17:36:55 +03:00
Alexey Ushakov
cc0faf953f JRE-13 java.awt.TextLayout does not handle correctly the bolded logical fonts (Serif)
Backported fix of JDK-8139176 (test updated)

(cherry picked from commit ba66b203fc4fe59ccf0d1d70d3e09cb17810ca00)
2018-12-11 17:34:59 +03:00
Alexey Ushakov
0a4fdad0f2 JRE-18 CCE in XRMaskFill.MaskFill
Throwing InvalidPipeException for incompatible surfaces

(cherry picked from commit 55dab103c24bf86cf025b9ce02b67e72508d41ba)
2018-12-11 17:34:59 +03:00
Alexey Ushakov
1fd4615c04 JRE-457 OGLTR_DisableGlyphModeState is slow
Skipped number of OGLTR_DisableGlyphModeState calls in sequence of draw text operations
Added screen rendering tests for 3 rendering modes: NonAA, AA, LCD
Added support for OSX low res modes in the rendering test. Minor refactoring
Improved fix by skipping NOOP operation. Added one more test on glyph mode state changing.
Removed unnecessary flag

(cherry picked from commit d52fc846435796381bb0db8dbf4be28cb8fc9ced)
(cherry picked from commit f2727866edc925668d02ef625b9c966e3e5323a4)
(cherry picked from commit e26b5f42c674bc0b8d59207a04a1dc69dc7ffceb)
(cherry picked from commit e5eb91c86a009b97614d610f47e991414ce94afa)
(cherry picked from commit 24569f975a2da1facdc0ee20cf298f0263333a5a)
2018-12-11 13:58:54 +03:00
Alexey Ushakov
66e5c5bc22 JRE-114 JDK for Mac OS: visual artifacts at overlapping letters with subpixel antialiasing enabled
Flushed GPU buffers before rendering overlapping glyphs
Corrected initial value for right boundary of previous glyph

(cherry picked from commit 3c24cd75416e9b899e4b972f2c5b27c13f1827a4)
(cherry picked from commit 43ddbbea395d25064713e49be907f3a1d7b12b57)
(cherry picked from commit c21c0fb4b6395c868709a016969527168cce4a8b)
2018-12-11 13:58:54 +03:00
Alexey Ushakov
4f70a712e0 JRE-526 IDE is unusably slow when using a 4K display on OS X
Performed glTextureBarrierNV() call to separate read/write  from/to the same texture per glyph list not per every single glyph
Moved flush code before LCD glyph rendering
Removed unnecessary condition
Improved scrolling performance for about 30% on Intel graphics hardware
Grouped GL quads for rendering lcd glyphs into one glBegin/glEnd block
instead of multiple ones
Updated performance tests to check text with huge font size
Huge LCD font rendering on OSX
Replaced rendering multiple quads with only one

(cherry picked from commit 0de2f01b0de2f4b98e78137785f6ce9305e04b9d)
(cherry picked from commit 1ce9d484330181e8573096aab99ef7f12390fdf3)
(cherry picked from commit 50e20afba5e085881bec1125d318dc78dee45978)
(cherry picked from commit d61d9e84bfc4bd27028903b3dcb6fcbd11f33d58)
(cherry picked from commit 8c8f3a60ad3551bd36427b6817cae9f5776ebd26)
(cherry picked from commit 15df5e5b55105effea9f60ec3ce93c7babd06b28)
(cherry picked from commit 2ab6b0976821b79db78f9257d7034f2760beac19)
(cherry picked from commit 3642cf72df3d0d037fdf163082c7bc0fea423bd7)
(cherry picked from commit 887683b927821fac574dab79f3e0420c9959c086)
(cherry picked from commit 94ef3cd5b0fd819b3eb139482294e598120dc4dc)
(cherry picked from commit ec004829692f1da3ea8f81258abde1824dde21f0)
2018-12-11 13:58:53 +03:00
Alexey Ushakov
ee05ba1b33 IDEA-144261 IDE is unusably slow when using a 4K display on OS X
2x increase  size of cached glyphs

(cherry picked from commit 52da5f8934ccc482a58606309e44de51521ed9e2)
2018-12-11 13:58:53 +03:00
Alexey Ushakov
6b30858be0 JRE-202 Deadlock in CGLGraphicsConfig.getCGLConfigInfo
Added processing system events while waiting for OGLRenderQueue.lock

(cherry picked from commits
d29c858c8cfd4c74d381fe45fee48e3c1029053b,
6f8619b561e06784471ecd95839c65a8391749b9)
2018-12-11 13:58:53 +03:00
Alexey Ushakov
ab613b0f7e Revert "8148187: Remove OS X-specific com.apple.concurrent package"
This reverts commit 5c74a8df6855efd94fe4eb07b6c643ca6374b4eb.
Disable warnings as errors
2018-12-11 13:58:53 +03:00
Alexey Ushakov
99fe494c59 JRE-140 AWT hangs on component creation because of 2D activity on AppKit thread
Moved FontStrike disposal code to AppKit thread`

(cherry picked from commit 31710bf)
2018-12-11 13:58:53 +03:00
Vitaly Provodin
1ac5433cb8 updated JTreg exclude list 2018-12-11 06:45:38 +07:00
Vitaly Provodin
7326b13db1 updated JTreg exclude list 2018-12-10 15:24:53 +07:00
Alexey Ushakov
7262736e7e IDEA-148133 [IU-143.382] [MacOS] IDEA crashes regularly
Fixed native resource disposal problem by using ref counting

(cherry picked from commit 863b8e7)
(cherry picked from commit 69e76eb)
2018-12-07 19:12:44 +03:00
Vitaly Provodin
8669d9d28b JRE-467 added new regression test (Wrong rendering of variation sequences) follow up 2018-12-07 16:15:21 +07:00
Vitaly Provodin
c8f248a936 JRE-624 CThreading isAppKit() fails to detect main app thread if it was renamed 2018-12-07 16:13:09 +07:00
Vitaly Provodin
9ea664c299 JRE-741 added new regression test (Modal dialog stays above other process windows) 2018-12-07 16:10:37 +07:00
Vitaly Provodin
82cd480619 JRE-705 added new regression test (Z-order of child windows is broken on Mac OS) 2018-12-07 16:09:05 +07:00
Vitaly Provodin
4a14c6f15a JRE-638 added new regression test (enable unlimited cryptographic policy by default) 2018-12-07 16:08:14 +07:00
Vitaly Provodin
c4a1277c1b JRE-501 added new regression test (Live resize is jerky for heavy java applications on Mac) 2018-12-07 16:06:52 +07:00
Vitaly Provodin
1ce8c3ce82 JRE-468 added new regression test (Idea freezes on project loading) 2018-12-07 16:04:07 +07:00
Vitaly Provodin
0026095202 JRE-467 added new regression test (Wrong rendering of variation sequences) 2018-12-07 16:03:04 +07:00
Vitaly Provodin
82adbe9c25 JRE-458 added new regression test (Insufficient and inconsistent permissions on some files in Linux build) 2018-12-07 16:01:57 +07:00
Vitaly Provodin
3a43f4557f JRE-457 added new regression test (OGLTR_DisableGlyphModeState is slow) 2018-12-07 16:00:37 +07:00
Vitaly Provodin
d04debc847 JRE-430 added new regression test (Font fallback sometimes doesn't work in Swing text components) 2018-12-07 15:59:12 +07:00
Vitaly Provodin
37dc13c603 JRE-422 added new regression test (AWTView deliverJavaMouseEvent leaks jEvent) 2018-12-07 15:57:38 +07:00
Vitaly Provodin
cb4453b1d1 JRE-401 added regression test (AppCode freezes during autocomplete and other operations) 2018-12-07 15:55:58 +07:00
Alexey Ushakov
9d0157c362 JRE-394 backport JDK-8173654 Regression since 8u60 System getenv doesn't return env var 2018-12-07 15:51:15 +07:00
Vitaly Provodin
3a7b3c67b0 JRE-394 added regression test (System getenv doesn't return env var set in JNI code) 2018-12-07 15:47:01 +07:00
Vitaly Provodin
c7b0ac686f JRE-392 added regression (Tip of the day is not hidden while another modal window is shown) 2018-12-07 15:44:04 +07:00
Alexey Ushakov
15693661cc JRE-307 Wrong dpi reported on Wayland 2018-12-07 15:42:24 +07:00
Vitaly Provodin
1f4ad38d23 JRE-269 added regression (JLabel doesn't scale <code>text</code> HTML fragments.) 2018-12-07 15:35:27 +07:00
Vitaly Provodin
236bd38d1b JRE-186 added regression test (Modal dialogs (Messages) shouldn't popup IDEA when another application is active) 2018-12-07 15:30:18 +07:00
Vitaly Provodin
65e9ec3602 updated JTreg exclude list 2018-12-07 15:02:02 +07:00
Alexey Ushakov
5b523f049e JRE-43 Font.getFamily() does not work in headless mode
Bundled Droid fonts to fallback in headless mode
Added golden image tests for bundled fonts

Migrate ant based junit tests to gradle (JRE-462)
Migrate quality and performance tests
Corrected legacy xml file
Added cross platform test_jvm path into legacy xml file
Removed old jdk idea project

(cherry picked from commit 18f52ca)
(cherry picked from commit 6cd467b)
(cherry picked from commit b270e85)
(cherry picked from commit 0772bec)
(cherry picked from commit 7d00180)
(cherry picked from commit cce21af)
(cherry picked from commit 664b541)
(cherry picked from commit 9456e85)
(cherry picked from commit 239f521)
(cherry picked from commit c465ca9)
(cherry picked from commit 04caf3f)
(cherry picked from commit faddcec)
(cherry picked from commit ff37799)
(cherry picked from commit 4a10dd8)
2018-12-06 23:10:52 +03:00
Alexey Ushakov
0e0b0d13f9 JRE-769 Update jdk9 gradle project with new source layout in master9
Upgrade gradle wrapper and paths
2018-12-06 22:56:22 +03:00
Alexey Ushakov
fb2bbc47fe JRE-12 CCE: XRTextRenderer.drawGlyphList (sun.java2d.NullSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData)
Throwing InvalidPipeException for incompatible surfaces

(cherry picked from commit f98f34c)
2018-12-06 00:21:42 +03:00
Alexey Ushakov
2ac273a456 Added missing fontconfig defines 2018-12-06 00:21:40 +03:00
Alexey Ushakov
cec93cf1fd IDEA-166173 IntelliJ freezes when returning from sleep
Fixed deadlock by removing unnecessary getScreenResolution call
2018-12-06 00:21:38 +03:00
Alexey Ushakov
f3f2667a4c JRE-48 built-in jre renders fonts abnormally heavier (normal text looks bold) than the oracle jre
Disable FT_LOAD_TARGET_LIGHT for fonts with FC_AUTOHINT=false (this target implicitly enables  FC_AUTOHINT)
Reused setupLoadRenderFlags for all rendering cases
2018-12-05 17:20:09 +03:00
Alexey Ushakov
091d74a791 Added logging for freetypeScaler via env variable OPENJDK_LOG_FFS=yes
and for screen resolution in freetypeScaler
2018-12-05 17:20:09 +03:00
Alexey Ushakov
b1c49c3b27 JRE-34 IDE Crashes During Startup
Added validation of dpi settings coming from xserver
2018-12-05 17:20:09 +03:00
Alexey Ushakov
431e14429c JRE-29 fontconfig lib crashes CLion on OSX
Disabled fontconfig usage on OSX
2018-12-05 16:51:55 +03:00
Alexey Ushakov
f80497c4f0 JRE-15 Greyscale text is too dark comparing with subpixel AA
Adjusted default value for greyscale text rendering in freetype
2018-12-05 15:50:35 +03:00
Alexey Ushakov
44fcbdabf8 IDEA-155347 On Ubuntu with High DPI tooltip font is too thick when the tooltip is fading in and out
Handled missing FC_RGBA_NONE value
2018-12-05 15:50:35 +03:00
Alexey Ushakov
e6f0055704 IDEA-151619 CLion EAP fails to start with missing symbol: FT_Library_setLcdFilter
Skip FT_Library_setLcdFilter call if the symbol is not there
Cache negative FT_Library_setLcdFilter symbol lookup result
Used RTLD_DEFAULT handler for process symbols lookup
2018-12-05 15:50:35 +03:00
Alexey Ushakov
ad92fe9071 IDEA-151425 LCD text is incorrectly rendered when hinting is enabled
Override lcd loading flags with hinting ones
2018-12-05 15:50:35 +03:00
Alexey Ushakov
d93a5f1598 IDEA-149882 Issue with fonts in Ubuntu 12.04
Provided fallback to default font rendering settings if libfontconfig unable to
match font pattern
2018-12-05 15:50:35 +03:00
Denis Fokin
a3c220da70 pointer-sign warning is fixed 2018-12-05 13:20:38 +03:00
Alexey Ushakov
a62d8b2387 Added linux desktop build instructions 2018-12-04 23:08:23 +03:00
Alexey Ushakov
d1ed8ab118 Resolve merge compile problems on mac 2018-12-04 22:21:05 +03:00
Denis Fokin
cdea1cb75d The next warning broke the build
warning: [rawtypes] found raw type: FutureTask
2018-12-04 20:33:54 +03:00
Anton Tarasov
1019d8f0f2 fix JNI_OnUnload definition
(cherry picked from the commit  3571e39071)
2018-12-04 18:10:14 +03:00
Anton Tarasov
f3ccc53e02 JRE-981 IM workaround does not work anymore
forward port of 2d7c29b in JetBrains/jdk8u_jdk
2018-12-04 18:03:31 +03:00
Anton Tarasov
8d532d3f81 JRE-961 Windows size and position are not preserved on jdk 9 2018-12-04 18:03:09 +03:00
Anton Tarasov
6df193a2af JRE-956 Toolkit.getScreenInsets is not hidpi-aware 2018-12-04 18:02:47 +03:00
Anton Tarasov
ccfe65be7f JRE-938 [windows] Frame.setMaximizedBounds not hidpi-aware
(cherry picked from commit cc97899923320e1fa17f5e44975c4a0f0ba51014)
2018-12-04 18:02:26 +03:00
Anton Tarasov
e496262aa1 JRE-907 macOS: add ability to check for scaled display mode
(cherry picked from commit d38092bafd3d4150a7e372a43f5492b8a970f2f6)
2018-12-04 18:02:06 +03:00
Anton Tarasov
641a09dd52 JRE-934 Diff viewer errors are not visible on HiDPI Linux 2018-12-04 18:01:45 +03:00
Anton Tarasov
9279d80110 [jdk9] HiDPI scale is not detected on some linux desktops 2018-12-04 18:01:24 +03:00
Anton Tarasov
da3a816e50 JRE-580 [windows] low-res app icon on HiDPI displays
cherry-picked from b446cd4b by Anton Tarasov on 11/16/2017 at 4:16 PM
2018-12-04 18:01:03 +03:00
Anton Tarasov
277357ae73 Read org.gnome.desktop.interface/scaling-factor 2018-12-04 18:00:41 +03:00
Anton Tarasov
6fb2c36529 Do not scale base font in HiDPI mode on Linux 2018-12-04 18:00:20 +03:00
Anton Tarasov
34234263fb Allow HiDPI mode on Linux 2018-12-04 18:00:00 +03:00
Anton Tarasov
6dc45410b0 JRE-876 add mouse listeners to WWindowPeer.preprocessPostEvent
(cherry picked from commit 8d6043409736a10a62e3967f4a25f379c9a36f58)
2018-12-04 17:59:38 +03:00
Anton Tarasov
2bf5a7ca5c JRE-772 swing returns incorrect FRC when AA is off
(cherry picked from commit a161897d908aa10da6306c06452c5d6317fed2f0)
2018-12-04 17:59:15 +03:00
Anton Tarasov
35571ba1ad JRE-765 [win] window dragged to another display is not resized
(cherry picked from commit 07b27f77225fa52318ec9b2ae4819e30ef4c7c4f)
2018-12-04 17:58:53 +03:00
Anton Tarasov
cdd3529046 JRE-742 [windows] IME candidate window position is wrong on HiDPI displa
(cherry picked from commit 01e7954dec63386bcfadd49e1ffbf1523ca5870b)
2018-12-04 17:58:32 +03:00
Anton Tarasov
ba22b31a49 JRE-729 [windows] unreasonable IME activity consumes CPU
(cherry picked from commit c3040dd1fe1bf6c03c746c76f685629fd0a8e670)
2018-12-04 17:58:11 +03:00
Anton Tarasov
e2d1655703 JRE-711 Horizontal grey lines appear in every window in IntelliJ Idea
(cherry picked from commit 62000130d86e5831d81cfb24659386c6930f84cf)
2018-12-04 17:57:49 +03:00
Anton Tarasov
6ea1d45fd1 JRE-681 [windows] direct drawing into frame graphics may have wrong translate
(cherry picked from commit ab6dee4c1fc453ad3cb5adb69fc243e550d184ae)
2018-12-04 17:57:28 +03:00
Anton Tarasov
6ce31e0a32 JRE-665 Navigate Class/File/Symbol, Find in Path popup windows don't pick characters from input method
(cherry picked from commit 676f305b2b3b278e305bd4d9bde4269f27b3d676)
2018-12-04 17:57:07 +03:00
Anton Tarasov
864999209d JRE-660 [windows] display DPI change damages UI
(cherry picked from commit 71b8b564798087a821fd4b3bd13bca4d0ccd5644)
2018-12-04 17:56:46 +03:00
Anton Tarasov
8c56d9389a Disable: 8175293: Window size is not updated after setting location to display with different DPI
Replaced with JRE-119
2018-12-04 17:56:24 +03:00
Anton Tarasov
0b2bdf3c49 Disable: 8147440: HiDPI (Windows) Swing components have incorrect sizes after changing display resolution
Replaced with JRE-660
2018-12-04 17:56:02 +03:00
Anton Tarasov
48c9ea3f09 JRE-590 Can't run 32 bit version on Windows
Check against Windows x86 as well.

(cherry picked from commit d176d90259163d0e0211e839af1634cb6f2cf436)
2018-12-04 17:55:39 +03:00
Anton Tarasov
6246abc72f JRE-616 [linux] notify when dpi correction factor is applied to fonts
(cherry picked from commit f57d41f3118bfd773c99ce32d58cfae16931be6a)
2018-12-04 17:55:16 +03:00
Anton Tarasov
38466cbab0 JRE-612 [windows] icon in frame title is not dpi-aware
(cherry picked from commit dec04385177a2abb677add909d3b94f94c62a14e)
2018-12-04 17:54:54 +03:00
Anton Tarasov
ef2870ee38 JRE-604 [fps] frame's client area is one pixel beneath frame's borders
(cherry picked from commit 511e237eacaaf2fa03336807269463438a9394ee)
2018-12-04 17:54:31 +03:00
Anton Tarasov
c5cc28d85d JRE-596 [windows] popup positioning is broken with JRE-573
(cherry picked from commit 79154b119a9bc6933281f3d203ddef67139b5ed0)
2018-12-04 17:54:10 +03:00
Anton Tarasov
9ea2011948 JRE-577 Goland 18 displays out of memory
(cherry picked from commit 2daaf21e420d4af15d3b1bfeb3f896074bea1e61)
2018-12-04 17:53:47 +03:00
Anton Tarasov
0651b45e13 JRE-573 [windows] window client area bounds mismatch
(cherry picked from commit afa68f7ad6440303c6417be3f675b1c4644b6014)
2018-12-04 17:53:25 +03:00
Anton Tarasov
5e183c397b JRE-489 -Dswing.bufferPerWindow is fractional scale unfriendly 2018-12-04 17:53:04 +03:00
Anton Tarasov
deeda6fada JRE-310 check for Windows8.1 when enabling ui scale
Was "don't fallback on fractional scale" in JBSDK9.

(cherry picked from commit 263d8641974d263075c93f11c4db6208754d7325)
2018-12-04 17:52:42 +03:00
Anton Tarasov
4f46d6ba2c JRE-431 [windows] Scale the title of toplevel in per-monitor-dpi mode
(cherry picked from commit 63dce3011fb85bc3922cf655e59e49c3f559cf6a)
2018-12-04 17:52:21 +03:00
Anton Tarasov
b965f85c1b JRE-382 Three AWT-tests become hanging starting since master-875
(cherry picked from commit 7d492101db8fcbb3d285fd8e9669f74b0e0fce8f)
2018-12-04 17:51:59 +03:00
Anton Tarasov
aa09fa2c85 JRE-373 [macos] nativeCreateNSWindow deadlocks with a11y
(cherry picked from commit 72c77a992bbf1b95b82ffc08cb2f4f3bc36b3657)
2018-12-04 17:51:38 +03:00
Anton Tarasov
11a0911d65 IDEA-172422 Popup at the wrong place on the second monitor (new hidpi)
(cherry picked from commit 58ee72943d54d119ca4319f5fdc60e8f4945ad19)
2018-12-04 17:51:16 +03:00
Anton Tarasov
985908cf10 JRE-309 [windows] on-screen position of a component is not pixel-perfect in user space in JRE-HiDPI mode
(cherry picked from commit 6084872b6c59aea4c8e5adc0962ddbf3ff00f6bc)
2018-12-04 17:50:54 +03:00
Anton Tarasov
c17bc728ee JRE-269 JLabel doesn't scale <code>text</code> HTML fragments.
(cherry picked from commit 9ef72b6c3a477e4225f9b98e30fa9190613520e4)
2018-12-04 17:50:30 +03:00
Anton Tarasov
4851fdea0a JRE-249 Icons in Messages are huge on Retina
(cherry picked from commit 4d3fa914ee71c13d9c94788bca2c877d1e2ce2c6)
2018-12-04 17:50:08 +03:00
Anton Tarasov
aeea6c1ca3 JRE-225 [macos] IDEA hangs on attempt to call getDefaultScreenDevice() from EDT
(cherry picked from commit 76aba25)

(cherry picked from commit df11dcc97bb5556ac5d0299b773a512b4f0bb5bb)
2018-12-04 17:49:46 +03:00
Anton Tarasov
adb3a4be16 JRE-210 JEditorPane may return wrong preferred size as it moves b/w monitors of different scale
(cherry picked from commit 6c3087e6bda32ae9b095e069d8bea614502f5c03)
2018-12-04 17:49:22 +03:00
Anton Tarasov
b95ae60bc0 IDEA-166659 Settings: Intentions are empty and NullPointerException appears
(cherry picked from commit c77ac9e5f1299e821f242ae1832531ccda1141f8)
2018-12-04 17:48:56 +03:00
Anton Tarasov
cba1501d3e IDEA-162187 [macOS] app icon is low-res after a badge is drawn on it
(cherry picked from commit c7fe3985b9410652b8fa55dbda3bbc193b2b690c)
2018-12-04 17:48:33 +03:00
Anton Tarasov
7e250841df JRE-153 [hidpi] monitors bounds can overlap in multi-dpi env
(cherry picked from commit 5d3f454b4209d4b8271020c92a13daca2012e6f4)
2018-12-04 17:48:10 +03:00
Anton Tarasov
cec49aaa38 JRE-119 [suppress updateGC() for WFileDialogPeer/WPrintDialogPeer]
updateGC() is called from WWindowPeer.<init> though it's not applicable to the named dialogs
as they don't have native AwtWindow peer required for the method.

(cherry picked from commit 72ed9f653177e273b811cfe70c2dba102a8636e4)
2018-12-04 17:47:47 +03:00
Anton Tarasov
7d1d43bfa1 JRE-119 [use default "sun.java2d.dpiaware=true" to be dpi-aware on Window 7]
This lets awt_Win32GraphicsEnv.cpp SetProcessDPIAwareProperty() call Win7 specific ::SetProcessDPIAware() API func.

(cherry picked from commit 5e7a766090810d839f4352d06fc2812499d766f8)
2018-12-04 17:47:24 +03:00
Anton Tarasov
60be76b725 JRE-119 [Dynamically set DPI-awareness level to enable backward compatible HiDPI behavior]
(cherry picked from commit d00cfa4dc62a14a4cf89df9d4c4899970c9fc9e8)

Adopted
2018-12-04 17:47:01 +03:00
Anton Tarasov
c044245410 JRE-119 [Mind device scale when changing window native bounds]
- New location should be scaled according to the device containing the location, not current.
- Size should be reset once the window is repositioned, based on the device it probably moved to.
- Rollback previous related changes in Popup/Window.

(cherry picked from commit 6002330050b048ff240ad3400a86812634217ca6)
2018-12-04 17:46:38 +03:00
Anton Tarasov
20edebdefa JRE-119 [ask if ui scale is enabled natively]
(cherry picked from commit 801f45875fd8699edcbda5896210cec191062261)
2018-12-04 17:46:17 +03:00
Anton Tarasov
ca32a66f85 JRE-119 [Fix getCursorPos() to work in env with scale]
(cherry picked from commit cbcfb72202125cd9bab5d25e4f06b5ba3f684482)
2018-12-04 17:45:56 +03:00
Anton Tarasov
dbc9f3cf91 JRE-119 [Add SwingUtilities2.scalePoint method to translate b/w different scales]
The method is used for popup window location settings.

(cherry picked from commit a7f295f8bc8aaa5bee4bedf1369aefd19152fcf5)
2018-12-04 17:45:36 +03:00
Anton Tarasov
aef17f16be JRE-119 [Handle WM_DPICHANGED with appropriate re-size]
Following MSDN on the subj.

(cherry picked from commit a6b847a1ba9b8512507d8c600778fc5cd709ea04)
2018-12-04 17:45:16 +03:00
Anton Tarasov
fd615a5b45 IDEA-153474 let JDK detect Xft.dpi value on non-GTK Linux DEs
Use the GTK method:

https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-get

to retrieve "gtk-xft-dpi" integer property of the X settings.

Add the property to JDK's GtkEngine & gtk2-interface.
Then read the property via GtkEngine from GTK LaF when "gnome.Xft/dpi" is undefined. It's assumed GTK LaF is forcedly installed.

(cherry picked from commit e05fc391ae0a3cc389e836441f882c0cf6ab3b99)
2018-12-04 17:44:56 +03:00
Anton Tarasov
b8f4b4a9ed IDEA-148854: AppCode crashes randomly every 15 mins or so
(cherry picked from commit 02f9a5fbb4924ff67c8a04c15e490acfcc750003)
2018-12-04 17:44:36 +03:00
Anton Tarasov
8a44e1bb37 JRE-166 [macOS] deadlock with JFXPanel
(cherry picked from commit a9dbb6990fac0c659297487a261ba9170e5fb3ad)
2018-12-04 17:44:16 +03:00
Anton Tarasov
5faebc73d5 IDEA-152524 can't compile fontconfig changes on Windows
(cherry picked from commit 4c8351fecf)
2018-12-04 17:43:56 +03:00
Alexey Ushakov
771ddf16ad Fixed src paths in gradle project 2018-12-03 14:24:54 +03:00
Alexey Ushakov
0456745afb IDEA-57233 Editor font antialising/appearance problems on Linux
Used desktop DPI instead of hard-coded 72
Compensated increased glyph bitmap size by adjusting font size
Added LCD filter for sub-pixel rendering
Use fontconfig library to provide right rendering options for fonts
Corrected sizes passed to fontconfig library and hinting disabling policy
Added logging and versioned fontconfig lib loading
Resolved font rendering problem in lenses
2018-12-03 14:24:54 +03:00
Egor Ushakov
9b4b3fb698 JRE-1061 .attach_pid files in the working dir 2018-11-30 18:49:31 +03:00
Egor Ushakov
1d32ff4742 JRE-1007 Read exception details in jdwp error packets 2018-11-30 18:44:21 +03:00
Alexey Ushakov
a75dc73f88 Added docker build and instructions 2018-11-30 13:41:43 +03:00
Alexey Ushakov
6f825670bb Added gradle project 2018-11-30 12:44:59 +03:00
Denis Fokin
2a92eec59d Revert: 8158325: [macosx] Memory leak in com.apple.laf.ScreenMenu
Reviewed-by: azvegint, alexsch
Contributed-by: Robin Stevens <robin.stevens@scz.be> (8d565d7b)
2018-11-29 12:18:15 +03:00
Denis Fokin
34d91c979d IDEA-166443 Mac OS: Delete action deletes twice if Edit menu has be opened before
(cherry picked from commit dd1fdebfd5)
2018-11-28 17:12:35 +03:00
Denis Fokin
ccf0176c32 Always open folders and files with NSOpenPanel 2018-11-27 19:58:33 +03:00
Denis Fokin
8fd21b3746 New (CFRetainedResource) memory management approach to access window ptr. 2018-11-27 19:58:32 +03:00
Denis Fokin
b71d92478d JRE-199 WebStorm hangs on open macOS file chooser
(cherry picked from commit f7dabd722464b1ec4c4df2e296ded622873c08e9)
2018-11-27 19:58:30 +03:00
Denis Fokin
f1bb150edb IDEA-165501 macOS native file chooser: VCS -> Apply Patch — All files are disabled
(cherry picked from commit eb86901216db840ac83bc137a11a4af2a2ea0019)
2018-11-27 19:58:29 +03:00
Denis Fokin
1d7ed0ff75 JRE-131 Native dialog hang
(cherry picked from commit 11d96947bfa13799481fb90dc87b4bd0ab1b2006)
2018-11-27 19:58:27 +03:00
Denis Fokin
0a92b01c17 JRE-129 IDE hangs on trying to change path in Run/Debug configuration which became invalid (changed in file system)
(cherry picked from commit 9e221546a75f028217ba5bcbbc0e2a8bcbee39f9)
2018-11-27 19:58:26 +03:00
Denis Fokin
3e4fa31780 IDEA-159507 Mac native dialogs: multiple open dialogs are possible
(cherry picked from commit 5a7d29940957a8acbaac5dbb651e6d1d970b7a05)
2018-11-27 19:58:24 +03:00
Alexey Ushakov
ef104967bf IDEA-157086 Change JVM vendor string to mention Jetbrains instead of Oracle
Replaced Oracle vendor string

(cherry picked from commit 86e0a8276306945a1ed6aee23076c1734483f6d6)
2018-11-27 19:29:08 +03:00
Denis Fokin
70e7eb9b95 IDEA-146669 Enable Mac native file dialogs
(cherry picked from commit 2843de1556c161521d9663344290e8cc71e7d70b)
2018-11-27 19:22:08 +03:00
Denis Fokin
0226ce81da Better backward compatible com.apple.eawt library 2018-11-27 17:46:45 +03:00
Denis Fokin
689f55d8c9 Better backward compatible com.apple.eawt library 2018-11-26 20:52:07 +03:00
Denis Fokin
362b676929 com.apple.eawt has been renamed since the latest Java 9 builds
The implementation is in the Desktop class now
See http://openjdk.java.net/jeps/272

To avoid Idea workarounds I am bringing back the classes.

This change must be removed as soon as we migrate to the Desktop API
2018-11-22 21:02:20 +03:00
469 changed files with 32175 additions and 2035 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
JTwork
JTreport
*.class
.idea/workspace.xml
build/

5
.idea/codeStyles/Project.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="LINE_SEPARATOR" value="&#10;" />
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

9
.idea/copyright/JetBrains.xml generated Normal file
View File

@@ -0,0 +1,9 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright 2000-&amp;#36;today.year JetBrains s.r.o.&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10;http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="JetBrains" />
<option name="myName" value="JetBrains" />
<option name="myLocal" value="true" />
</copyright>
</component>

3
.idea/copyright/profiles_settings.xml generated Normal file
View File

@@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="JetBrains" />
</component>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

60
README.md Normal file
View File

@@ -0,0 +1,60 @@
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
# Downloads
|Windows-x64 |macOS |Linux-x64 |
|-------------|-------------|-------------|
|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-windows-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-windows-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-osx-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-osx-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-linux-x64/_latestVersion"><img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-linux-x64/images/download.svg"/></a>|
# How JetBrains Runtime is organised
## Workspaces
[github.com/JetBrains/JetBrainsRuntime](https://github.com/JetBrains/JetBrainsRuntime)
## Getting sources
__OSX, Linux:__
```
git config --global core.autocrlf input
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
__Windows:__
```
git config --global core.autocrlf false
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
# Configure Local Build Environment
## Linux (docker)
```
$ cd jb/project/docker
$ docker build .
...
Successfully built 942ea9900054
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
# cd /JetBrainsRuntime
# sh ./configure
# make images CONF=linux-x86_64-normal-server-release
```
## Linux (Ubuntu 18.10 desktop)
```
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev install libcups2-dev libfontconfig1-dev libasound2-dev
$ cd JetBrainsRuntime
$ sh ./configure --disable-warnings-as-errors
$ make images
```
## Windows
#### TBD
## OSX
#### TBD
## Contribution
We will be happy to receive your pull requests. Before you submit one, please sign our Contributor License Agreement (CLA) https://www.jetbrains.com/agreements/cla/

View File

@@ -0,0 +1,9 @@
FROM centos:7
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool gcc gcc-c++ libstdc++-devel alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel
# Install Java 11
RUN wget --no-check-certificate -q --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/11.0.1+13/90cf5d8f270a4347a95050320eef3fb7/jdk-11.0.1_linux-x64_bin.tar.gz" \
-O - | tar xz -C /
ENV JAVA_HOME /jdk-11.0.1
ENV PATH $JAVA_HOME/bin:$PATH

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
# common for all OS
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_REENTRANT -DVM_LITTLE_ENDIAN -D_LP64 -DTARGET_ARCH_x86 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINCLUDE_SUFFIX_CPU=_x86 -DAMD64 -DHOTSPOT_LIB_ARCH='amd64' -DCOMPILER1 -DCOMPILER2")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_gcc")
endif ()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX -DTARGET_OS_FAMILY_linux -DTARGET_COMPILER_gcc -D_GNU_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLINUX -DTARGET_OS_FAMILY_linux -DTARGET_COMPILER_gcc -D_GNU_SOURCE")
endif ()
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ALLBSD_SOURCE -DTARGET_OS_FAMILY_bsd")
endif ()
if ("${CMAKE_SYSTEM_NAME}" MATCHES "CYGWIN") #not shure about TARGET_COMPILER
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_visCPP -DWIN64 -D_WINDOWS -DTARGET_OS_FAMILY_windows")
endif ()
add_custom_target(configure
COMMAND bash configure
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../)
add_custom_target(build_images
COMMAND make COMPILER_WARNINGS_FATAL=false images
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
DEPENDS ${SOURCE_FILES})

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="java-gradle.main" target="11" />
<module name="java-gradle.test" target="11" />
</bytecodeTargetLevel>
</component>
</project>

20
jb/project/java-gradle/.idea/gradle.xml generated Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="/usr/share/gradle" />
<option name="gradleJvm" value="11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
<option name="useAutoImport" value="true" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.twelvemonkeys.common:common-image:3.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-image/3.3.2/9c975152864050c6dbb7226ca1100694f0aa099d/common-image-3.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-image/3.3.2/e6fb35a9825421ec5a634af328e22546992d536d/common-image-3.3.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.twelvemonkeys.common:common-io:3.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-io/3.3.2/e00b1c744993864d3c8dc698ba7d356122019398/common-io-3.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-io/3.3.2/dbb242585fdfd353dc4c2c0e8b3d8b0383dffbb2/common-io-3.3.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.twelvemonkeys.common:common-lang:3.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-lang/3.3.2/ffbc5e05208c5c9cb43052438294c3ec5546aecf/common-lang-3.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-lang/3.3.2/b695db345614a2b9344fd43a44d9ce722df4b39/common-lang-3.3.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.twelvemonkeys.imageio:imageio-core:3.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-core/3.3.2/8def41c756831dde3c23f2d525e5667cfbfa1847/imageio-core-3.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-core/3.3.2/abcb2beaf21364467afe0e33824dce5730bef0c3/imageio-core-3.3.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.twelvemonkeys.imageio:imageio-metadata:3.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-metadata/3.3.2/b8a31725bde0dc6f4e6b01711784f5ca0a2275f3/imageio-metadata-3.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-metadata/3.3.2/6fc3b223c81afbd4b829e2c924c096aab3ed0e9e/imageio-metadata-3.3.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: com.twelvemonkeys.imageio:imageio-tiff:3.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-tiff/3.3.2/9bea1214eae7d287dc0c685fb6be75102318d080/imageio-tiff-3.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-tiff/3.3.2/cae5b3540dc01889dc9560db86f5f61bdc253107/imageio-tiff-3.3.2-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: junit:junit:4.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: net.java.dev.jna:jna:4.4.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.4.0/cb208278274bf12ebdb56c61bd7407e6f774d65a/jna-4.4.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.4.0/9d45d3dc35711eef7267d8b4fc2c0dc482ef9fd2/jna-4.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.apache.commons:commons-lang3:3.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.0/8873bd0bb5cb9ee37f1b04578eb7e26fcdd44cb0/commons-lang3-3.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.0/d48f964b56a931ec2712ce5d411a40d114a69753/commons-lang3-3.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.hamcrest:hamcrest-core:1.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="Gradle: org.hamcrest:hamcrest-library:1.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/47a7ee46628ab7133129cd7cef1e92657bc275e/hamcrest-library-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>

6
jb/project/java-gradle/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>

11
jb/project/java-gradle/.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/java-gradle.iml" filepath="$PROJECT_DIR$/.idea/modules/java-gradle.iml" />
<module fileurl="file://$PROJECT_DIR$/java-gradle.iml" filepath="$PROJECT_DIR$/java-gradle.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/java-gradle.main.iml" filepath="$PROJECT_DIR$/.idea/modules/java-gradle.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/java-gradle.test.iml" filepath="$PROJECT_DIR$/.idea/modules/java-gradle.test.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="java-gradle:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/../../out/production/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/main" />
<content url="file://$MODULE_DIR$/../../../../../src">
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.base/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.datatransfer/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.desktop/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.instrument/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.logging/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.management.rmi/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.management/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.naming/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.prefs/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.rmi/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.scripting/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.se/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.security.jgss/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.security.sasl/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.smartcardio/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.sql.rowset/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.sql/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.xml.crypto/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.base/macosx/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.datatransfer/macosx/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.desktop/macosx/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.prefs/macosx/classes" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="java-gradle:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output-test url="file://$MODULE_DIR$/../../out/test/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/test" />
<content url="file://$MODULE_DIR$/../../../../../test">
<sourceFolder url="file://$MODULE_DIR$/../../../../../test/jdk/jbu" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="java-gradle.main" />
<orderEntry type="library" name="Gradle: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.4.0" level="project" />
<orderEntry type="library" name="Gradle: com.twelvemonkeys.imageio:imageio-tiff:3.3.2" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.0" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Gradle: com.twelvemonkeys.imageio:imageio-metadata:3.3.2" level="project" />
<orderEntry type="library" name="Gradle: com.twelvemonkeys.imageio:imageio-core:3.3.2" level="project" />
<orderEntry type="library" name="Gradle: com.twelvemonkeys.common:common-image:3.3.2" level="project" />
<orderEntry type="library" name="Gradle: com.twelvemonkeys.common:common-io:3.3.2" level="project" />
<orderEntry type="library" name="Gradle: com.twelvemonkeys.common:common-lang:3.3.2" level="project" />
</component>
<component name="TestModuleProperties" production-module="java-gradle.main" />
</module>

6
jb/project/java-gradle/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,119 @@
apply plugin: 'java'
import org.gradle.internal.os.OperatingSystem
repositories {
mavenCentral()
}
def test_jvm = {
if (project.hasProperty('jbsdkhome')) {
file(jbsdkhome + (OperatingSystem.current().isWindows()?"/bin/java.exe" : "/bin/java")).absolutePath
} else {
if (OperatingSystem.current().isMacOsX()) {
file('../../../build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-11.jdk/Contents/Home/bin/java').absolutePath
} else if (OperatingSystem.current().isLinux()) {
file('../../../build/linux-x86_64-normal-server-release/images/jdk/bin/java').absolutePath
} else {
file('../../../build/windows-x86_64-normal-server-release/images/j2sdk-image/bin/java.exe').absolutePath
}
}
}
dependencies {
testCompile('junit:junit:4.12'){
exclude group: 'org.hamcrest'
}
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'net.java.dev.jna:jna:4.4.0'
testCompile 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2'
testCompile 'org.apache.commons:commons-lang3:3.0'
}
def jdk_modules = ["java.base", "java.logging", "java.prefs",
"java.se.ee", "java.sql", "java.datatransfer",
"java.management", "java.rmi", "java.security.jgss",
"java.sql.rowset", "java.desktop", "java.management.rmi",
"java.scripting", "java.security.sasl", "java.transaction",
"java.instrument", "java.naming", "java.se",
"java.smartcardio", "java.xml.crypto"]
def jdk_class_dirs = []
jdk_modules.collect(jdk_class_dirs) {
new File("../../../src/" + it + "/share/classes")
}
if (OperatingSystem.current().isMacOsX())
jdk_modules.collect(jdk_class_dirs) {
"../../../src/" + it + "/macosx/classes"
}
else if (OperatingSystem.current().isLinux()) {
jdk_modules.collect(jdk_class_dirs) {
"../../../src/" + it + "/solaris/classes"
}
jdk_modules.collect(jdk_class_dirs) {
"../../../src/" + it + "/unix/classes"
}
} else
jdk_modules.collect(jdk_class_dirs) {
"../../../src/" + it + "/windows/classes"
}
sourceSets.main.java.srcDirs = jdk_class_dirs
sourceSets {
test {
java {
srcDir "../../../test/jdk/jbu"
}
}
}
test.dependsOn.clear()
test.dependsOn tasks.compileTestJava
test {
systemProperty "jb.java2d.metal", "true"
systemProperty "testdata", file('../../../jb/tests/testdata').absolutePath
// Generate golden images for DroidFontTest and MixedTextTest
// systemProperty "gentestdata", ""
outputs.upToDateWhen { false }
executable = test_jvm()
// Enable J2D logging (only in debug build)
// Can be turned on for J2D by adding "#define DEBUG 1" into jdk/src/share/native/sun/java2d/Trace.h
// environment 'J2D_TRACE_LEVEL', '4'
}
def buildDir = project.buildscript.sourceFile.parentFile.parentFile.parentFile.parentFile
def make_cmd = "make"
if (OperatingSystem.current().isWindows()) {
def cyg_make_cmd = new File("c:/cygwin64/bin/make.exe")
if (cyg_make_cmd.exists()) make_cmd = cyg_make_cmd.absolutePath
}
task make_images << {
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "images")
def proc = pb.redirectErrorStream(true).start()
proc.inputStream.eachLine {println it}
assert proc.waitFor() == 0
}
task make_clean << {
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "clean")
def proc = pb.redirectErrorStream(true).start()
proc.inputStream.eachLine {println it}
assert proc.waitFor() == 0
}
tasks.compileJava.enabled = false
tasks.compileTestJava.dependsOn.clear()
classes.dependsOn.clear()
classes.dependsOn tasks.make_images
tasks.cleanClasses.dependsOn tasks.make_clean

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Thu Dec 06 20:31:44 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

172
jb/project/java-gradle/gradlew vendored Executable file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

47
jb/tests/tests.iml Normal file
View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<content url="file://$MODULE_DIR$/../../../test/java/awt/Graphics2D">
<sourceFolder url="file://$MODULE_DIR$/../../../test/java/awt/Graphics2D" isTestSource="false" />
</content>
<content url="file://$MODULE_DIR$/../../../test/sun/java2d">
<sourceFolder url="file://$MODULE_DIR$/../../../test/sun/java2d" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar" recursive="false" />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://$APPLICATION_HOME_DIR$/lib/junit.jar" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$APPLICATION_HOME_DIR$/lib/junit.jar" recursive="false" />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="JUnit4">
<CLASSES>
<root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
<root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

168
jbr_file_list_linux.txt Normal file
View File

@@ -0,0 +1,168 @@
bin/jaotc
bin/java
bin/jjs
bin/jrunscript
bin/keytool
bin/pack200
bin/rmid
bin/rmiregistry
bin/unpack200
conf/logging.properties
conf/management/jmxremote.access
conf/management/jmxremote.password.template
conf/management/management.properties
conf/net.properties
conf/security/java.policy
conf/security/java.security
conf/security/policy/limited/default_local.policy
conf/security/policy/limited/default_US_export.policy
conf/security/policy/limited/exempt_local.policy
conf/security/policy/README.txt
conf/security/policy/unlimited/default_local.policy
conf/security/policy/unlimited/default_US_export.policy
conf/sound.properties
legal/java.base/ADDITIONAL_LICENSE_INFO
legal/java.base/aes.md
legal/java.base/asm.md
legal/java.base/ASSEMBLY_EXCEPTION
legal/java.base/c-libutl.md
legal/java.base/cldr.md
legal/java.base/icu.md
legal/java.base/LICENSE
legal/java.base/public_suffix.md
legal/java.base/unicode.md
legal/java.desktop/colorimaging.md
legal/java.desktop/giflib.md
legal/java.desktop/harfbuzz.md
legal/java.desktop/jpeg.md
legal/java.desktop/lcms.md
legal/java.desktop/libpng.md
legal/java.desktop/mesa3d.md
legal/java.desktop/opengl.md
legal/java.desktop/xwindows.md
legal/java.smartcardio/pcsclite.md
legal/java.xml/bcel.md
legal/java.xml/dom.md
legal/java.xml/jcup.md
legal/java.xml/xalan.md
legal/java.xml/xerces.md
legal/java.xml.crypto/santuario.md
legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md
legal/jdk.crypto.cryptoki/pkcs11wrapper.md
legal/jdk.crypto.ec/ecc.md
legal/jdk.dynalink/dynalink.md
legal/jdk.internal.le/jline.md
legal/jdk.localedata/thaidict.md
legal/jdk.scripting.nashorn/double-conversion.md
legal/jdk.scripting.nashorn/joni.md
lib/classlist
lib/jexec
lib/jfr/default.jfc
lib/jfr/profile.jfc
lib/jli/libjli.so
lib/jrt-fs.jar
lib/jvm.cfg
lib/libattach.so
lib/libawt.so
lib/libawt_headless.so
lib/libawt_xawt.so
lib/libdt_socket.so
lib/libextnet.so
lib/libfontmanager.so
lib/libinstrument.so
lib/libj2gss.so
lib/libj2pcsc.so
lib/libj2pkcs11.so
lib/libjaas.so
lib/libjava.so
lib/libjavajpeg.so
lib/libjawt.so
lib/libjdwp.so
lib/libjimage.so
lib/libjsig.so
lib/libjsound.so
lib/liblcms.so
lib/libmanagement.so
lib/libmanagement_agent.so
lib/libmanagement_ext.so
lib/libmlib_image.so
lib/libnet.so
lib/libnio.so
lib/libprefs.so
lib/librmi.so
lib/libsctp.so
lib/libsplashscreen.so
lib/libsunec.so
lib/libunpack.so
lib/libverify.so
lib/libzip.so
lib/modules
lib/psfont.properties.ja
lib/psfontj2d.properties
lib/security/blacklisted.certs
lib/security/cacerts
lib/security/default.policy
lib/security/public_suffix_list.dat
lib/server/libjsig.so
lib/server/libjvm.so
lib/server/Xusage.txt
lib/tzdb.dat
man/ja_JP.UTF-8/man1/java.1
man/ja_JP.UTF-8/man1/jjs.1
man/ja_JP.UTF-8/man1/keytool.1
man/ja_JP.UTF-8/man1/pack200.1
man/ja_JP.UTF-8/man1/rmid.1
man/ja_JP.UTF-8/man1/rmiregistry.1
man/ja_JP.UTF-8/man1/unpack200.1
man/man1/java.1
man/man1/jjs.1
man/man1/keytool.1
man/man1/pack200.1
man/man1/rmid.1
man/man1/rmiregistry.1
man/man1/unpack200.1
release
bin/javapackager
lib/libjavafx_font_pango.so
lib/libavplugin-ffmpeg-56.so
lib/libavplugin-56.so
lib/libglass.so
lib/libavplugin-57.so
lib/libavplugin-ffmpeg-57.so
lib/libprism_sw.so
lib/libavplugin-53.so
lib/libjfxmedia.so
lib/javafx.properties
lib/libfxplugins.so
lib/javafx-swt.jar
lib/ant-javafx.jar
lib/libglassgtk3.so
lib/libjavafx_iio.so
lib/libgstreamer-lite.so
lib/libprism_common.so
lib/libjavafx_font_freetype.so
lib/libglassgtk2.so
lib/libavplugin-54.so
lib/libprism_es2.so
lib/libjfxwebkit.so
lib/libdecora_sse.so
lib/libjavafx_font.so
lib/libavplugin-55.so
legal/javafx.media/glib.md
legal/javafx.media/gstreamer.md
legal/javafx.media/libffi.md
legal/javafx.media/applecoreaudio.md
legal/javafx.web/icu_v51.md
legal/javafx.web/webkit.md
legal/javafx.web/libxslt.md
legal/javafx.web/libxml2.md
legal/javafx.graphics/jpeg_v7.md
jmods/javafx.base.jmod
jmods/javafx.media.jmod
jmods/javafx.swing.jmod
jmods/javafx.controls.jmod
jmods/jdk.packager.services.jmod
jmods/jdk.packager.jmod
jmods/javafx.web.jmod
jmods/javafx.fxml.jmod
jmods/javafx.graphics.jmod

168
jbr_file_list_osx.txt Normal file
View File

@@ -0,0 +1,168 @@
jdk/Contents/Home/bin/jaotc
jdk/Contents/Home/bin/java
jdk/Contents/Home/bin/jjs
jdk/Contents/Home/bin/jrunscript
jdk/Contents/Home/bin/keytool
jdk/Contents/Home/bin/pack200
jdk/Contents/Home/bin/rmid
jdk/Contents/Home/bin/rmiregistry
jdk/Contents/Home/bin/unpack200
jdk/Contents/Home/conf/logging.properties
jdk/Contents/Home/conf/management/jmxremote.access
jdk/Contents/Home/conf/management/jmxremote.password.template
jdk/Contents/Home/conf/management/management.properties
jdk/Contents/Home/conf/net.properties
jdk/Contents/Home/conf/security/java.policy
jdk/Contents/Home/conf/security/java.security
jdk/Contents/Home/conf/security/policy/limited/default_local.policy
jdk/Contents/Home/conf/security/policy/limited/default_US_export.policy
jdk/Contents/Home/conf/security/policy/limited/exempt_local.policy
jdk/Contents/Home/conf/security/policy/README.txt
jdk/Contents/Home/conf/security/policy/unlimited/default_local.policy
jdk/Contents/Home/conf/security/policy/unlimited/default_US_export.policy
jdk/Contents/Home/conf/sound.properties
jdk/Contents/Home/legal/java.base/ADDITIONAL_LICENSE_INFO
jdk/Contents/Home/legal/java.base/aes.md
jdk/Contents/Home/legal/java.base/asm.md
jdk/Contents/Home/legal/java.base/ASSEMBLY_EXCEPTION
jdk/Contents/Home/legal/java.base/c-libutl.md
jdk/Contents/Home/legal/java.base/cldr.md
jdk/Contents/Home/legal/java.base/icu.md
jdk/Contents/Home/legal/java.base/LICENSE
jdk/Contents/Home/legal/java.base/public_suffix.md
jdk/Contents/Home/legal/java.base/unicode.md
jdk/Contents/Home/legal/java.desktop/colorimaging.md
jdk/Contents/Home/legal/java.desktop/freetype.md
jdk/Contents/Home/legal/java.desktop/giflib.md
jdk/Contents/Home/legal/java.desktop/harfbuzz.md
jdk/Contents/Home/legal/java.desktop/jpeg.md
jdk/Contents/Home/legal/java.desktop/lcms.md
jdk/Contents/Home/legal/java.desktop/libpng.md
jdk/Contents/Home/legal/java.desktop/mesa3d.md
jdk/Contents/Home/legal/java.desktop/opengl.md
jdk/Contents/Home/legal/java.desktop/xwindows.md
jdk/Contents/Home/legal/java.smartcardio/pcsclite.md
jdk/Contents/Home/legal/java.xml/bcel.md
jdk/Contents/Home/legal/java.xml/dom.md
jdk/Contents/Home/legal/java.xml/jcup.md
jdk/Contents/Home/legal/java.xml/xalan.md
jdk/Contents/Home/legal/java.xml/xerces.md
jdk/Contents/Home/legal/java.xml.crypto/santuario.md
jdk/Contents/Home/legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md
jdk/Contents/Home/legal/jdk.crypto.cryptoki/pkcs11wrapper.md
jdk/Contents/Home/legal/jdk.crypto.ec/ecc.md
jdk/Contents/Home/legal/jdk.dynalink/dynalink.md
jdk/Contents/Home/legal/jdk.internal.le/jline.md
jdk/Contents/Home/legal/jdk.localedata/thaidict.md
jdk/Contents/Home/legal/jdk.scripting.nashorn/double-conversion.md
jdk/Contents/Home/legal/jdk.scripting.nashorn/joni.md
jdk/Contents/Home/lib/classlist
jdk/Contents/Home/lib/fontconfig.bfc
jdk/Contents/Home/lib/fontconfig.properties.src
jdk/Contents/Home/lib/jfr/default.jfc
jdk/Contents/Home/lib/jfr/profile.jfc
jdk/Contents/Home/lib/jli/libjli.dylib
jdk/Contents/Home/lib/jrt-fs.jar
jdk/Contents/Home/lib/jspawnhelper
jdk/Contents/Home/lib/jvm.cfg
jdk/Contents/Home/lib/libattach.dylib
jdk/Contents/Home/lib/libawt.dylib
jdk/Contents/Home/lib/libawt_lwawt.dylib
jdk/Contents/Home/lib/libdt_socket.dylib
jdk/Contents/Home/lib/libextnet.dylib
jdk/Contents/Home/lib/libfontmanager.dylib
jdk/Contents/Home/lib/libfreetype.dylib
jdk/Contents/Home/lib/libinstrument.dylib
jdk/Contents/Home/lib/libj2gss.dylib
jdk/Contents/Home/lib/libj2pcsc.dylib
jdk/Contents/Home/lib/libj2pkcs11.dylib
jdk/Contents/Home/lib/libjaas.dylib
jdk/Contents/Home/lib/libjava.dylib
jdk/Contents/Home/lib/libjavajpeg.dylib
jdk/Contents/Home/lib/libjawt.dylib
jdk/Contents/Home/lib/libjdwp.dylib
jdk/Contents/Home/lib/libjimage.dylib
jdk/Contents/Home/lib/libjsig.dylib
jdk/Contents/Home/lib/libjsound.dylib
jdk/Contents/Home/lib/liblcms.dylib
jdk/Contents/Home/lib/libmanagement.dylib
jdk/Contents/Home/lib/libmanagement_agent.dylib
jdk/Contents/Home/lib/libmanagement_ext.dylib
jdk/Contents/Home/lib/libmlib_image.dylib
jdk/Contents/Home/lib/libnet.dylib
jdk/Contents/Home/lib/libnio.dylib
jdk/Contents/Home/lib/libosx.dylib
jdk/Contents/Home/lib/libosxapp.dylib
jdk/Contents/Home/lib/libosxkrb5.dylib
jdk/Contents/Home/lib/libosxsecurity.dylib
jdk/Contents/Home/lib/libosxui.dylib
jdk/Contents/Home/lib/libprefs.dylib
jdk/Contents/Home/lib/librmi.dylib
jdk/Contents/Home/lib/libsplashscreen.dylib
jdk/Contents/Home/lib/libsunec.dylib
jdk/Contents/Home/lib/libunpack.dylib
jdk/Contents/Home/lib/libverify.dylib
jdk/Contents/Home/lib/libzip.dylib
jdk/Contents/Home/lib/modules
jdk/Contents/Home/lib/psfont.properties.ja
jdk/Contents/Home/lib/psfontj2d.properties
jdk/Contents/Home/lib/security/blacklisted.certs
jdk/Contents/Home/lib/security/cacerts
jdk/Contents/Home/lib/security/default.policy
jdk/Contents/Home/lib/security/public_suffix_list.dat
jdk/Contents/Home/lib/server/libjsig.dylib
jdk/Contents/Home/lib/server/libjvm.dylib
jdk/Contents/Home/lib/server/Xusage.txt
jdk/Contents/Home/lib/tzdb.dat
jdk/Contents/Home/man/ja_JP.UTF-8/man1/java.1
jdk/Contents/Home/man/ja_JP.UTF-8/man1/jjs.1
jdk/Contents/Home/man/ja_JP.UTF-8/man1/keytool.1
jdk/Contents/Home/man/ja_JP.UTF-8/man1/pack200.1
jdk/Contents/Home/man/ja_JP.UTF-8/man1/rmid.1
jdk/Contents/Home/man/ja_JP.UTF-8/man1/rmiregistry.1
jdk/Contents/Home/man/ja_JP.UTF-8/man1/unpack200.1
jdk/Contents/Home/man/man1/java.1
jdk/Contents/Home/man/man1/jjs.1
jdk/Contents/Home/man/man1/keytool.1
jdk/Contents/Home/man/man1/pack200.1
jdk/Contents/Home/man/man1/rmid.1
jdk/Contents/Home/man/man1/rmiregistry.1
jdk/Contents/Home/man/man1/unpack200.1
jdk/Contents/Home/release
jdk/Contents/Info.plist
jdk/Contents/Home/bin/javapackager
jdk/Contents/Home/lib/libjavafx_iio.dylib
jdk/Contents/Home/lib/libjfxmedia_avf.dylib
jdk/Contents/Home/lib/javafx.properties
jdk/Contents/Home/lib/libglib-lite.dylib
jdk/Contents/Home/lib/javafx-swt.jar
jdk/Contents/Home/lib/libfxplugins.dylib
jdk/Contents/Home/lib/ant-javafx.jar
jdk/Contents/Home/lib/libglass.dylib
jdk/Contents/Home/lib/libjavafx_font.dylib
jdk/Contents/Home/lib/libgstreamer-lite.dylib
jdk/Contents/Home/lib/libjfxwebkit.dylib
jdk/Contents/Home/lib/libprism_common.dylib
jdk/Contents/Home/lib/libprism_es2.dylib
jdk/Contents/Home/lib/libdecora_sse.dylib
jdk/Contents/Home/lib/libjfxmedia.dylib
jdk/Contents/Home/lib/libprism_sw.dylib
jdk/Contents/Home/legal/javafx.media/glib.md
jdk/Contents/Home/legal/javafx.media/gstreamer.md
jdk/Contents/Home/legal/javafx.media/libffi.md
jdk/Contents/Home/legal/javafx.media/applecoreaudio.md
jdk/Contents/Home/legal/javafx.web/icu_v51.md
jdk/Contents/Home/legal/javafx.web/webkit.md
jdk/Contents/Home/legal/javafx.web/libxslt.md
jdk/Contents/Home/legal/javafx.web/libxml2.md
jdk/Contents/Home/legal/javafx.graphics/jpeg_v7.md
jdk/Contents/Home/jmods/javafx.base.jmod
jdk/Contents/Home/jmods/javafx.media.jmod
jdk/Contents/Home/jmods/javafx.swing.jmod
jdk/Contents/Home/jmods/javafx.controls.jmod
jdk/Contents/Home/jmods/jdk.packager.services.jmod
jdk/Contents/Home/jmods/jdk.packager.jmod
jdk/Contents/Home/jmods/javafx.web.jmod
jdk/Contents/Home/jmods/javafx.fxml.jmod
jdk/Contents/Home/jmods/javafx.graphics.jmod
jdk/Contents/MacOS/libjli.dylib

384
jbr_file_list_windows.txt Normal file
View File

@@ -0,0 +1,384 @@
bin/attach.dll
bin/awt.dll
bin/dt_socket.dll
bin/fontmanager.dll
bin/freetype.dll
bin/instrument.dll
bin/j2gss.dll
bin/j2pcsc.dll
bin/j2pkcs11.dll
bin/jaas.dll
bin/jabswitch.exe
bin/jaccessinspector.exe
bin/jaccesswalker.exe
bin/jaotc.exe
bin/java.dll
bin/java.exe
bin/javaaccessbridge.dll
bin/javajpeg.dll
bin/javaw.exe
bin/jawt.dll
bin/jdwp.dll
bin/jimage.dll
bin/jjs.exe
bin/jli.dll
bin/jrunscript.exe
bin/jsound.dll
bin/keytool.exe
bin/kinit.exe
bin/klist.exe
bin/ktab.exe
bin/lcms.dll
bin/le.dll
bin/management.dll
bin/management_agent.dll
bin/management_ext.dll
bin/mlib_image.dll
bin/msvcp140.dll
bin/net.dll
bin/nio.dll
bin/pack200.exe
bin/prefs.dll
bin/rmi.dll
bin/rmid.exe
bin/rmiregistry.exe
bin/server/jvm.dll
bin/splashscreen.dll
bin/sunec.dll
bin/sunmscapi.dll
bin/unpack.dll
bin/unpack200.exe
bin/verify.dll
bin/w2k_lsa_auth.dll
bin/windowsaccessbridge-64.dll
bin/zip.dll
conf/logging.properties
conf/management/jmxremote.access
conf/management/jmxremote.password.template
conf/management/management.properties
conf/net.properties
conf/security/java.policy
conf/security/java.security
conf/security/policy/limited/default_local.policy
conf/security/policy/limited/default_US_export.policy
conf/security/policy/limited/exempt_local.policy
conf/security/policy/README.txt
conf/security/policy/unlimited/default_local.policy
conf/security/policy/unlimited/default_US_export.policy
conf/sound.properties
legal/java.base/ADDITIONAL_LICENSE_INFO
legal/java.base/aes.md
legal/java.base/asm.md
legal/java.base/ASSEMBLY_EXCEPTION
legal/java.base/c-libutl.md
legal/java.base/cldr.md
legal/java.base/icu.md
legal/java.base/LICENSE
legal/java.base/public_suffix.md
legal/java.base/unicode.md
legal/java.base/zlib.md
legal/java.compiler/ADDITIONAL_LICENSE_INFO
legal/java.compiler/ASSEMBLY_EXCEPTION
legal/java.compiler/LICENSE
legal/java.datatransfer/ADDITIONAL_LICENSE_INFO
legal/java.datatransfer/ASSEMBLY_EXCEPTION
legal/java.datatransfer/LICENSE
legal/java.desktop/ADDITIONAL_LICENSE_INFO
legal/java.desktop/ASSEMBLY_EXCEPTION
legal/java.desktop/colorimaging.md
legal/java.desktop/freetype.md
legal/java.desktop/giflib.md
legal/java.desktop/harfbuzz.md
legal/java.desktop/jpeg.md
legal/java.desktop/lcms.md
legal/java.desktop/libpng.md
legal/java.desktop/LICENSE
legal/java.desktop/mesa3d.md
legal/java.desktop/opengl.md
legal/java.instrument/ADDITIONAL_LICENSE_INFO
legal/java.instrument/ASSEMBLY_EXCEPTION
legal/java.instrument/LICENSE
legal/java.logging/ADDITIONAL_LICENSE_INFO
legal/java.logging/ASSEMBLY_EXCEPTION
legal/java.logging/LICENSE
legal/java.management/ADDITIONAL_LICENSE_INFO
legal/java.management/ASSEMBLY_EXCEPTION
legal/java.management/LICENSE
legal/java.management.rmi/ADDITIONAL_LICENSE_INFO
legal/java.management.rmi/ASSEMBLY_EXCEPTION
legal/java.management.rmi/LICENSE
legal/java.naming/ADDITIONAL_LICENSE_INFO
legal/java.naming/ASSEMBLY_EXCEPTION
legal/java.naming/LICENSE
legal/java.net.http/ADDITIONAL_LICENSE_INFO
legal/java.net.http/ASSEMBLY_EXCEPTION
legal/java.net.http/LICENSE
legal/java.prefs/ADDITIONAL_LICENSE_INFO
legal/java.prefs/ASSEMBLY_EXCEPTION
legal/java.prefs/LICENSE
legal/java.rmi/ADDITIONAL_LICENSE_INFO
legal/java.rmi/ASSEMBLY_EXCEPTION
legal/java.rmi/LICENSE
legal/java.scripting/ADDITIONAL_LICENSE_INFO
legal/java.scripting/ASSEMBLY_EXCEPTION
legal/java.scripting/LICENSE
legal/java.se/ADDITIONAL_LICENSE_INFO
legal/java.se/ASSEMBLY_EXCEPTION
legal/java.se/LICENSE
legal/java.security.jgss/ADDITIONAL_LICENSE_INFO
legal/java.security.jgss/ASSEMBLY_EXCEPTION
legal/java.security.jgss/LICENSE
legal/java.security.sasl/ADDITIONAL_LICENSE_INFO
legal/java.security.sasl/ASSEMBLY_EXCEPTION
legal/java.security.sasl/LICENSE
legal/java.smartcardio/ADDITIONAL_LICENSE_INFO
legal/java.smartcardio/ASSEMBLY_EXCEPTION
legal/java.smartcardio/LICENSE
legal/java.sql/ADDITIONAL_LICENSE_INFO
legal/java.sql/ASSEMBLY_EXCEPTION
legal/java.sql/LICENSE
legal/java.sql.rowset/ADDITIONAL_LICENSE_INFO
legal/java.sql.rowset/ASSEMBLY_EXCEPTION
legal/java.sql.rowset/LICENSE
legal/java.transaction.xa/ADDITIONAL_LICENSE_INFO
legal/java.transaction.xa/ASSEMBLY_EXCEPTION
legal/java.transaction.xa/LICENSE
legal/java.xml/ADDITIONAL_LICENSE_INFO
legal/java.xml/ASSEMBLY_EXCEPTION
legal/java.xml/bcel.md
legal/java.xml/dom.md
legal/java.xml/jcup.md
legal/java.xml/LICENSE
legal/java.xml/xalan.md
legal/java.xml/xerces.md
legal/java.xml.crypto/ADDITIONAL_LICENSE_INFO
legal/java.xml.crypto/ASSEMBLY_EXCEPTION
legal/java.xml.crypto/LICENSE
legal/java.xml.crypto/santuario.md
legal/jdk.accessibility/ADDITIONAL_LICENSE_INFO
legal/jdk.accessibility/ASSEMBLY_EXCEPTION
legal/jdk.accessibility/LICENSE
legal/jdk.aot/ADDITIONAL_LICENSE_INFO
legal/jdk.aot/ASSEMBLY_EXCEPTION
legal/jdk.aot/LICENSE
legal/jdk.charsets/ADDITIONAL_LICENSE_INFO
legal/jdk.charsets/ASSEMBLY_EXCEPTION
legal/jdk.charsets/LICENSE
legal/jdk.crypto.cryptoki/ADDITIONAL_LICENSE_INFO
legal/jdk.crypto.cryptoki/ASSEMBLY_EXCEPTION
legal/jdk.crypto.cryptoki/LICENSE
legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md
legal/jdk.crypto.cryptoki/pkcs11wrapper.md
legal/jdk.crypto.ec/ADDITIONAL_LICENSE_INFO
legal/jdk.crypto.ec/ASSEMBLY_EXCEPTION
legal/jdk.crypto.ec/ecc.md
legal/jdk.crypto.ec/LICENSE
legal/jdk.crypto.mscapi/ADDITIONAL_LICENSE_INFO
legal/jdk.crypto.mscapi/ASSEMBLY_EXCEPTION
legal/jdk.crypto.mscapi/LICENSE
legal/jdk.dynalink/ADDITIONAL_LICENSE_INFO
legal/jdk.dynalink/ASSEMBLY_EXCEPTION
legal/jdk.dynalink/dynalink.md
legal/jdk.dynalink/LICENSE
legal/jdk.httpserver/ADDITIONAL_LICENSE_INFO
legal/jdk.httpserver/ASSEMBLY_EXCEPTION
legal/jdk.httpserver/LICENSE
legal/jdk.internal.ed/ADDITIONAL_LICENSE_INFO
legal/jdk.internal.ed/ASSEMBLY_EXCEPTION
legal/jdk.internal.ed/LICENSE
legal/jdk.internal.le/ADDITIONAL_LICENSE_INFO
legal/jdk.internal.le/ASSEMBLY_EXCEPTION
legal/jdk.internal.le/jline.md
legal/jdk.internal.le/LICENSE
legal/jdk.internal.vm.ci/ADDITIONAL_LICENSE_INFO
legal/jdk.internal.vm.ci/ASSEMBLY_EXCEPTION
legal/jdk.internal.vm.ci/LICENSE
legal/jdk.internal.vm.compiler/ADDITIONAL_LICENSE_INFO
legal/jdk.internal.vm.compiler/ASSEMBLY_EXCEPTION
legal/jdk.internal.vm.compiler/LICENSE
legal/jdk.internal.vm.compiler.management/ADDITIONAL_LICENSE_INFO
legal/jdk.internal.vm.compiler.management/ASSEMBLY_EXCEPTION
legal/jdk.internal.vm.compiler.management/LICENSE
legal/jdk.jdwp.agent/ADDITIONAL_LICENSE_INFO
legal/jdk.jdwp.agent/ASSEMBLY_EXCEPTION
legal/jdk.jdwp.agent/LICENSE
legal/jdk.jfr/ADDITIONAL_LICENSE_INFO
legal/jdk.jfr/ASSEMBLY_EXCEPTION
legal/jdk.jfr/LICENSE
legal/jdk.jsobject/ADDITIONAL_LICENSE_INFO
legal/jdk.jsobject/ASSEMBLY_EXCEPTION
legal/jdk.jsobject/LICENSE
legal/jdk.localedata/ADDITIONAL_LICENSE_INFO
legal/jdk.localedata/ASSEMBLY_EXCEPTION
legal/jdk.localedata/cldr.md
legal/jdk.localedata/LICENSE
legal/jdk.localedata/thaidict.md
legal/jdk.management/ADDITIONAL_LICENSE_INFO
legal/jdk.management/ASSEMBLY_EXCEPTION
legal/jdk.management/LICENSE
legal/jdk.management.agent/ADDITIONAL_LICENSE_INFO
legal/jdk.management.agent/ASSEMBLY_EXCEPTION
legal/jdk.management.agent/LICENSE
legal/jdk.management.jfr/ADDITIONAL_LICENSE_INFO
legal/jdk.management.jfr/ASSEMBLY_EXCEPTION
legal/jdk.management.jfr/LICENSE
legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO
legal/jdk.naming.dns/ASSEMBLY_EXCEPTION
legal/jdk.naming.dns/LICENSE
legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO
legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION
legal/jdk.naming.rmi/LICENSE
legal/jdk.net/ADDITIONAL_LICENSE_INFO
legal/jdk.net/ASSEMBLY_EXCEPTION
legal/jdk.net/LICENSE
legal/jdk.pack/ADDITIONAL_LICENSE_INFO
legal/jdk.pack/ASSEMBLY_EXCEPTION
legal/jdk.pack/LICENSE
legal/jdk.scripting.nashorn/ADDITIONAL_LICENSE_INFO
legal/jdk.scripting.nashorn/ASSEMBLY_EXCEPTION
legal/jdk.scripting.nashorn/double-conversion.md
legal/jdk.scripting.nashorn/joni.md
legal/jdk.scripting.nashorn/LICENSE
legal/jdk.scripting.nashorn.shell/ADDITIONAL_LICENSE_INFO
legal/jdk.scripting.nashorn.shell/ASSEMBLY_EXCEPTION
legal/jdk.scripting.nashorn.shell/LICENSE
legal/jdk.sctp/ADDITIONAL_LICENSE_INFO
legal/jdk.sctp/ASSEMBLY_EXCEPTION
legal/jdk.sctp/LICENSE
legal/jdk.security.auth/ADDITIONAL_LICENSE_INFO
legal/jdk.security.auth/ASSEMBLY_EXCEPTION
legal/jdk.security.auth/LICENSE
legal/jdk.security.jgss/ADDITIONAL_LICENSE_INFO
legal/jdk.security.jgss/ASSEMBLY_EXCEPTION
legal/jdk.security.jgss/LICENSE
legal/jdk.unsupported/ADDITIONAL_LICENSE_INFO
legal/jdk.unsupported/ASSEMBLY_EXCEPTION
legal/jdk.unsupported/LICENSE
legal/jdk.xml.dom/ADDITIONAL_LICENSE_INFO
legal/jdk.xml.dom/ASSEMBLY_EXCEPTION
legal/jdk.xml.dom/LICENSE
legal/jdk.zipfs/ADDITIONAL_LICENSE_INFO
legal/jdk.zipfs/ASSEMBLY_EXCEPTION
legal/jdk.zipfs/LICENSE
lib/classlist
lib/fontconfig.bfc
lib/fontconfig.properties.src
lib/jawt.lib
lib/jfr/default.jfc
lib/jfr/profile.jfc
lib/jrt-fs.jar
lib/jvm.cfg
lib/jvm.lib
lib/modules
lib/psfont.properties.ja
lib/psfontj2d.properties
lib/security/blacklisted.certs
lib/security/cacerts
lib/security/default.policy
lib/security/public_suffix_list.dat
lib/server/Xusage.txt
lib/tzdb.dat
lib/tzmappings
release
bin/fxplugins.dll
bin/api-ms-win-crt-time-l1-1-0.dll
bin/api-ms-win-crt-filesystem-l1-1-0.dll
bin/javafx_iio.dll
bin/gstreamer-lite.dll
bin/api-ms-win-crt-utility-l1-1-0.dll
bin/api-ms-win-core-console-l1-1-0.dll
bin/glass.dll
bin/api-ms-win-core-processenvironment-l1-1-0.dll
bin/prism_common.dll
bin/ucrtbase.dll
bin/prism_sw.dll
bin/api-ms-win-core-file-l1-1-0.dll
bin/api-ms-win-core-errorhandling-l1-1-0.dll
bin/api-ms-win-crt-process-l1-1-0.dll
bin/prism_d3d.dll
bin/api-ms-win-core-heap-l1-1-0.dll
bin/glib-lite.dll
bin/api-ms-win-core-processthreads-l1-1-1.dll
bin/api-ms-win-core-processthreads-l1-1-0.dll
bin/javapackager.exe
bin/api-ms-win-crt-convert-l1-1-0.dll
bin/api-ms-win-crt-private-l1-1-0.dll
bin/api-ms-win-core-file-l2-1-0.dll
bin/jfxwebkit.dll
bin/api-ms-win-core-debug-l1-1-0.dll
bin/api-ms-win-crt-stdio-l1-1-0.dll
bin/api-ms-win-core-localization-l1-2-0.dll
bin/api-ms-win-core-datetime-l1-1-0.dll
bin/api-ms-win-crt-math-l1-1-0.dll
bin/api-ms-win-core-file-l1-2-0.dll
bin/api-ms-win-core-timezone-l1-1-0.dll
bin/api-ms-win-core-rtlsupport-l1-1-0.dll
bin/api-ms-win-core-handle-l1-1-0.dll
bin/decora_sse.dll
bin/api-ms-win-core-synch-l1-1-0.dll
bin/api-ms-win-core-string-l1-1-0.dll
bin/api-ms-win-core-interlocked-l1-1-0.dll
bin/api-ms-win-core-memory-l1-1-0.dll
bin/api-ms-win-core-util-l1-1-0.dll
bin/api-ms-win-core-namedpipe-l1-1-0.dll
bin/api-ms-win-crt-conio-l1-1-0.dll
bin/api-ms-win-crt-runtime-l1-1-0.dll
bin/api-ms-win-crt-string-l1-1-0.dll
bin/api-ms-win-crt-multibyte-l1-1-0.dll
bin/api-ms-win-core-synch-l1-2-0.dll
bin/api-ms-win-core-profile-l1-1-0.dll
bin/api-ms-win-crt-locale-l1-1-0.dll
bin/api-ms-win-crt-heap-l1-1-0.dll
bin/api-ms-win-core-sysinfo-l1-1-0.dll
bin/javafx_font.dll
bin/api-ms-win-core-libraryloader-l1-1-0.dll
bin/api-ms-win-crt-environment-l1-1-0.dll
bin/jfxmedia.dll
lib/javafx.properties
lib/javafx-swt.jar
lib/ant-javafx.jar
legal/jdk.packager.services/LICENSE
legal/jdk.packager.services/ADDITIONAL_LICENSE_INFO
legal/jdk.packager.services/ASSEMBLY_EXCEPTION
legal/jdk.packager/LICENSE
legal/jdk.packager/ADDITIONAL_LICENSE_INFO
legal/jdk.packager/ASSEMBLY_EXCEPTION
legal/javafx.media/glib.md
legal/javafx.media/gstreamer.md
legal/javafx.media/libffi.md
legal/javafx.media/LICENSE
legal/javafx.media/applecoreaudio.md
legal/javafx.media/ADDITIONAL_LICENSE_INFO
legal/javafx.media/ASSEMBLY_EXCEPTION
legal/javafx.web/icu_v51.md
legal/javafx.web/LICENSE
legal/javafx.web/webkit.md
legal/javafx.web/libxslt.md
legal/javafx.web/ADDITIONAL_LICENSE_INFO
legal/javafx.web/ASSEMBLY_EXCEPTION
legal/javafx.web/libxml2.md
legal/javafx.swing/LICENSE
legal/javafx.swing/ADDITIONAL_LICENSE_INFO
legal/javafx.swing/ASSEMBLY_EXCEPTION
legal/javafx.graphics/LICENSE
legal/javafx.graphics/ADDITIONAL_LICENSE_INFO
legal/javafx.graphics/ASSEMBLY_EXCEPTION
legal/javafx.graphics/jpeg_v7.md
legal/javafx.base/LICENSE
legal/javafx.base/ADDITIONAL_LICENSE_INFO
legal/javafx.base/ASSEMBLY_EXCEPTION
legal/javafx.controls/LICENSE
legal/javafx.controls/ADDITIONAL_LICENSE_INFO
legal/javafx.controls/ASSEMBLY_EXCEPTION
legal/javafx.fxml/LICENSE
legal/javafx.fxml/ADDITIONAL_LICENSE_INFO
legal/javafx.fxml/ASSEMBLY_EXCEPTION
jmods/javafx.base.jmod
jmods/javafx.media.jmod
jmods/javafx.swing.jmod
jmods/javafx.controls.jmod
jmods/jdk.packager.services.jmod
jmods/jdk.packager.jmod
jmods/javafx.web.jmod
jmods/javafx.fxml.jmod
jmods/javafx.graphics.jmod

View File

@@ -83,7 +83,7 @@ java.datatransfer_COPY += flavormap.properties
################################################################################
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
'-Xdoclint/package:java.*,javax.*' -Xlint:exports \
'-Xdoclint/package:java.*,javax.*' -Xlint:exports -Xlint:-serial \
--doclint-format html4
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
java.desktop_CLEAN += iio-plugin.properties cursors.properties

0
make/CopyFiles.gmk Normal file
View File

View File

@@ -35,7 +35,8 @@ DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,
# If warnings needs to be non-fatal for testing purposes use a command like:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
JAVAC_WARNINGS ?= -Xlint:all -Werror
#JAVAC_WARNINGS := -Xlint:all -Werror
JAVAC_WARNINGS := -Xlint:all -Xmaxwarns 10000
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
# and the interim javac, to be run by the boot jdk.

View File

@@ -80,3 +80,13 @@ $(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
TARGETS += $(COPY_LEGAL)
################################################################################
FONTFILE_SRC_DIR := $(TOPDIR)/src/java.desktop/share
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
FONTFILE_TARGET_FILES := $(subst $(FONTFILE_SRC_DIR),$(LIB_DST_DIR),$(FONTFILE_SRCS))
$(LIB_DST_DIR)/fonts/%: $(FONTFILE_SRC_DIR)/fonts/%
$(call install-file)
TARGETS += $(FONTFILE_TARGET_FILES)

View File

@@ -243,7 +243,7 @@ sequence.fallback=symbols,\
# Exclusion Ranges
exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-20b8,20bb-20bc,20be-f8ff
exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-20b8,20bb-20bc,20be-24ff,2501-2501,2503-250b,250d-250f,2511-2513,2515-2517,2519-251b,251d-2523,2525-252b,252d-2533,2535-253b,253d-254f,256d-f8ff
exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be
exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac

View File

@@ -136,6 +136,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d/opengl \
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/launcher \
#
endif
@@ -251,7 +252,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
imm32.lib ole32.lib uuid.lib shell32.lib \
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib dwmapi.lib, \
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-D "JDK_FNAME=awt.dll" \
@@ -577,10 +578,12 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c \
fontpath.c \
lcdglyph.c
lcdglyph.c \
lcdglyphDW.cpp
else
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
lcdglyph.c
lcdglyph.c \
lcdglyphDW.cpp
endif
LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS

62
modules.list Normal file
View File

@@ -0,0 +1,62 @@
java.base,
java.compiler,
java.datatransfer,
java.desktop,
java.instrument,
java.logging,
java.management,
java.management.rmi,
java.naming,
java.net.http,
java.prefs,
java.rmi,
java.scripting,
java.se,
java.security.jgss,
java.security.sasl,
java.smartcardio,
java.sql,
java.sql.rowset,
java.transaction.xa,
java.xml,
java.xml.crypto,
javafx.base,
javafx.controls,
javafx.fxml,
javafx.graphics,
javafx.media,
javafx.swing,
javafx.web,
jdk.accessibility,
jdk.aot,
jdk.charsets,
jdk.compiler,
jdk.crypto.cryptoki,
jdk.crypto.ec,
jdk.dynalink,
jdk.httpserver,
jdk.internal.ed,
jdk.internal.le,
jdk.internal.vm.ci,
jdk.internal.vm.compiler,
jdk.internal.vm.compiler.management,
jdk.jdi,
jdk.jdwp.agent,
jdk.jfr,
jdk.jsobject,
jdk.localedata,
jdk.management,
jdk.management.agent,
jdk.management.jfr,
jdk.naming.dns,
jdk.naming.rmi,
jdk.net,
jdk.pack,
jdk.scripting.nashorn,
jdk.scripting.nashorn.shell,
jdk.sctp,
jdk.security.auth,
jdk.security.jgss,
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs

View File

@@ -49,7 +49,7 @@
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac debug="off" source="1.6" target="1.6" srcdir="${src}" destdir="${build}"/>
<javac debug="on" source="8" target="8" srcdir="${src}" destdir="${build}"/>
</target>
<target name="run" depends="dist"

View File

@@ -0,0 +1,320 @@
package j2dbench.report;
import java.io.IOException;
import java.nio.file.DirectoryIteratorException;
import java.nio.file.DirectoryStream;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;
/**
* The class reads J2DBench scores and reports them into output stream in format applicable for TeamCity charts.
* The directory, where J2DBench result files placed, is specified via command line parameter like follows:
* <p>
* <code>-basexml | -b <xml file path></code>
* </p>
* This directory must contain one file with pattern <code>*{openjdk}*.{res}</code> which is considered as a container
* of reference scores and several <code>*{jbsdk}*.{res}</code>.
* <p>
* <p> Names of these files have several mandatory fields separated by <code>"_"</code> and look like
* <code>osName_jdkName_renderName_*.res</code>
* </p>
* <p>
* If any of score is less than corresponding reference value by 5% then exit code <code>1</code> is returned otherwise
* exit code <code>0</code> is returned.
* <p>
* Standard output will contain scores in format required for TeamCity charts.
* <p>
* Created by vprovodin on 13/02/2017.
*/
public class TCChartReporter {
private static boolean printTCValues = false;
private static boolean printValues = false;
private static final DecimalFormat decimalFormat =
new DecimalFormat("0.00");
private static FileSystem defaultFileSystem = FileSystems.getDefault();
private static double getMeasurementError(String testCaseName, String osName) {
if (testCaseName.contains("text.Rendering.tests.drawString") && osName.toLowerCase().contains("lin") )
return 0.18;
return 0.1;
}
/**
* Level at which tests are grouped to be displayed in summary
*/
private static final int LEVEL = 2;
/**
* Holds the groups and corresponding group-display-names
*/
private static List<String> groups = new ArrayList<>();
private static Map<String, Double> referenceValues = new HashMap<>();
private static boolean testFailed = false;
private static void printUsage() {
String usage =
"\njava TCChartReporter [options] " +
" \n\n" +
"where options include: " +
" \n" +
" -basexml | -b <xml file path> " +
"path to base-build result";
System.out.println(usage);
System.exit(0);
}
/**
* String = getTestResultsTableForSummary()
*/
private static double generateTestCaseReport(
Object key,
Map<String, J2DAnalyzer.ResultHolder> testCaseResult,
Map<String, Integer> testCaseResultCount) {
Integer curTestCountObj = testCaseResultCount.get(key.toString());
int curTestCount = 0;
if (curTestCountObj != null) {
curTestCount = curTestCountObj;
}
double totalScore = 0;
for (int i = 0; i < curTestCount; i++) {
J2DAnalyzer.ResultHolder resultTCR = testCaseResult.get(key.toString() + "_" + i);
totalScore = totalScore + resultTCR.getScore();
}
return totalScore;
}
/**
* Generate Testcase Summary Report for TC - *.out
*/
private static void generateTestCaseSummaryReport(
String OJRname,
Map<String, Double> consoleResult,
Map<String, J2DAnalyzer.ResultHolder> testCaseResult,
Map<String, Integer> testCaseResultCount,
boolean rememberReference) {
String curGroupName, curTestName;
Object[] groupNameArray = groups.toArray();
Object[] testCaseList = consoleResult.keySet().toArray();
Arrays.sort(testCaseList);
for (Object aGroupNameArray : groupNameArray) {
double value;
curGroupName = aGroupNameArray.toString();
for (Object aTestCaseList : testCaseList) {
curTestName = aTestCaseList.toString();
if (curTestName.contains(curGroupName)) {
value = generateTestCaseReport(curTestName, testCaseResult, testCaseResultCount);
if (printTCValues)
System.out.println("##teamcity[buildStatisticValue key='" + (OJRname.isEmpty() ? "" : OJRname + ".") + curTestName
+ "' value='" + decimalFormat.format(value) + "']");
if (printValues)
System.out.println((OJRname.isEmpty() ? "" : OJRname + ".") + curTestName + "," + decimalFormat.format(value));
if (rememberReference) {
referenceValues.put(curTestName, value);
} else {
double refValue = referenceValues.getOrDefault(curTestName, 0.);
if (Math.abs(value/refValue - 1) >= getMeasurementError(curTestName, OJRname)) {
System.err.println(OJRname);
System.err.println(curTestName);
System.err.println("\treferenceValue=" + refValue);
System.err.println("\t actualValue=" + value);
System.err.println("\t diff:" + ((value / refValue - 1) * 100));
testFailed = (value < refValue);
}
}
}
}
}
}
/**
* main
*/
public static void main(String args[]) {
String baseXML = null;
int group = 2;
/* ---- Analysis Mode ----
BEST = 1;
WORST = 2;
AVERAGE = 3;
MIDAVG = 4;
------------------------ */
int analyzerMode = 4;
try {
for (int i = 0; i < args.length; i++) {
if (args[i].startsWith("-basexml") ||
args[i].startsWith("-b")) {
i++;
baseXML = args[i];
} else if (args[i].startsWith("-tc")) {
printTCValues = true;
} else if (args[i].startsWith("-v"))
printValues = true;
}
} catch (Exception e) {
printUsage();
}
XMLHTMLReporter.setGroupLevel(group);
J2DAnalyzer.setMode(analyzerMode);
if (baseXML != null) {
generateComparisonReport(defaultFileSystem.getPath(baseXML));
} else {
printUsage();
}
if (testFailed)
System.exit(1);
}
/**
* Add Test Group to the list
*/
private static void addGroup(String testName) {
String testNameSplit[] = testName.replace('.', '_').split("_");
StringBuilder group = new StringBuilder(testNameSplit[0]);
for (int i = 1; i < LEVEL; i++) {
group.append(".").append(testNameSplit[i]);
}
if (!groups.contains(group.toString()))
groups.add(group.toString());
}
private static List<Path> listResFiles(Path dir, String pattern) throws IOException {
List<Path> result = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, pattern)) {
for (Path entry : stream) {
result.add(entry);
}
} catch (DirectoryIteratorException ex) {
throw ex.getCause();
}
return result;
}
/**
* Generate the reports from the base & target result XML
*/
private static void generateComparisonReport(Path directoryToResFiles) {
if (directoryToResFiles.toFile().isDirectory()) {
List<Path> jbsdkFiles, openjdkFiles;
try {
jbsdkFiles = listResFiles(directoryToResFiles, "*{jbsdk,jbre}*.{res}");
openjdkFiles = listResFiles(directoryToResFiles, "*{openjdk}*.{res}");
} catch (IOException e) {
e.printStackTrace();
return;
}
readScores(openjdkFiles.get(0), true);
for (Path file : jbsdkFiles) {
readScores(file, false);
}
} else {
readScores(directoryToResFiles, true);
}
}
private static void readScores(Path file, boolean rememberReference) {
String fileName = file.getName(file.getNameCount() - 1).toString();
String osName="", jdkName="", renderName="";
if (fileName.contains("win") || fileName.contains("linux") || fileName.contains("osx")) {
String[] fileNameComponents = fileName.split("_");
if (fileNameComponents.length > 0)
osName = fileNameComponents[0];
if (fileNameComponents.length > 1)
jdkName = fileNameComponents[1];
if (fileNameComponents.length > 2)
renderName = fileNameComponents[2];
}
String resultXMLFileName = file.toString();
J2DAnalyzer.results = new Vector();
J2DAnalyzer.readResults(resultXMLFileName);
J2DAnalyzer.SingleResultSetHolder baseSRSH =
(J2DAnalyzer.SingleResultSetHolder) J2DAnalyzer.results.elementAt(0);
Enumeration baseEnum_ = baseSRSH.getKeyEnumeration();
Vector<String> baseKeyvector = new Vector<>();
while (baseEnum_.hasMoreElements()) {
baseKeyvector.add((String) baseEnum_.nextElement());
}
String baseKeys[] = new String[baseKeyvector.size()];
baseKeyvector.copyInto(baseKeys);
J2DAnalyzer.sort(baseKeys);
Map<String, Double> consoleBaseRes = new HashMap<>();
Map<String, J2DAnalyzer.ResultHolder> testCaseBaseResult = new HashMap<>();
Map<String, Integer> testCaseResultCount = new HashMap<>();
for (String baseKey : baseKeys) {
J2DAnalyzer.ResultHolder baseTCR =
baseSRSH.getResultByKey(baseKey);
Integer curTestCountObj = testCaseResultCount.get(baseTCR.getName());
int curTestCount = 0;
if (curTestCountObj != null) {
curTestCount = curTestCountObj;
}
curTestCount++;
testCaseBaseResult.put(baseTCR.getName() + "_" + (curTestCount - 1), baseTCR);
testCaseResultCount.put(baseTCR.getName(), curTestCount);
addGroup(baseTCR.getName());
Double curTotalScoreObj = consoleBaseRes.get(baseTCR.getName());
double curTotalScore = 0;
if (curTotalScoreObj != null) {
curTotalScore = curTotalScoreObj;
}
curTotalScore = curTotalScore + baseTCR.getScore();
consoleBaseRes.put(baseTCR.getName(), curTotalScore);
}
String OJRname = osName + "." + jdkName + "." + renderName;
generateTestCaseSummaryReport((OJRname.length() == 2? "": OJRname),
consoleBaseRes,
testCaseBaseResult,
testCaseResultCount,
rememberReference);
}
}

View File

@@ -1123,7 +1123,7 @@ bool PhaseIdealLoop::loop_predication_impl_helper(IdealLoopTree *loop, ProjNode*
Node* idx = cmp->in(1);
assert(!invar.is_invariant(idx), "index is variant");
Node* rng = cmp->in(2);
assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo >= 0, "must be");
assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo != 0, "must be");
assert(invar.is_invariant(rng), "range must be invariant");
int scale = 1;
Node* offset = zero;

View File

@@ -117,7 +117,7 @@ const char* Abstract_VM_Version::vm_vendor() {
#ifdef VENDOR
return VENDOR;
#else
return "Oracle Corporation";
return "JetBrains s.r.o";
#endif
}

View File

@@ -110,13 +110,13 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x)
/* Third party may overwrite these values. */
#ifndef VENDOR
#define VENDOR "Oracle Corporation"
#define VENDOR "JetBrains s.r.o"
#endif
#ifndef VENDOR_URL
#define VENDOR_URL "http://java.oracle.com/"
#define VENDOR_URL "https://www.jetbrains.com/"
#endif
#ifndef VENDOR_URL_BUG
#define VENDOR_URL_BUG "http://bugreport.java.com/bugreport/"
#define VENDOR_URL_BUG "https://youtrack.jetbrains.com"
#endif
#ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@@ -1,6 +1,5 @@
#include "version.rc"
#define IDI_ICON 2000
#include "java_rc.h"
/////////////////////////////////////////////////////////////////////////////
//

View File

@@ -0,0 +1,6 @@
#ifndef _JAVA_RC_H_
#define _JAVA_RC_H_
#define IDI_ICON 2000
#endif // _JAVA_RC_H_

View File

@@ -0,0 +1,141 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
import java.util.concurrent.*;
/**
* Factory for {@link Executor}s and {@link ExecutorService}s backed by
* libdispatch.
*
* Access is controlled through the Dispatch.getInstance() method, because
* performed tasks occur on threads owned by libdispatch. These threads are
* not owned by any particular AppContext or have any specific context
* classloader installed.
*
* @since Java for Mac OS X 10.6 Update 2
*/
public final class Dispatch {
/**
* The priorities of the three default asynchronous queues.
*/
public enum Priority {
LOW(-2), NORMAL(0), HIGH(2); // values from <dispatch/queue.h>
final int nativePriority;
Priority(final int nativePriority) { this.nativePriority = nativePriority; }
};
final static Dispatch instance = new Dispatch();
/**
* Factory method returns an instnace of Dispatch if supported by the
* underlying operating system, and if the caller's security manager
* permits "canInvokeInSystemThreadGroup".
*
* @return a factory instance of Dispatch, or null if not available
*/
public static Dispatch getInstance() {
checkSecurity();
if (!LibDispatchNative.nativeIsDispatchSupported()) return null;
return instance;
}
private static void checkSecurity() {
final SecurityManager security = System.getSecurityManager();
if (security != null) security.checkPermission(new RuntimePermission("canInvokeInSystemThreadGroup"));
}
private Dispatch() { }
/**
* Creates an {@link Executor} that performs tasks asynchronously. The {@link Executor}
* cannot be shutdown, and enqueued {@link Runnable}s cannot be canceled. Passing null
* returns the {@link Priority.NORMAL} {@link Executor}.
*
* @param priority - the priority of the returned {@link Executor}
* @return an asynchronous {@link Executor}
*/
public Executor getAsyncExecutor(Priority priority) {
if (priority == null) priority = Priority.NORMAL;
final long nativeQueue = LibDispatchNative.nativeCreateConcurrentQueue(priority.nativePriority);
if (nativeQueue == 0L) return null;
return new LibDispatchConcurrentQueue(nativeQueue);
}
int queueIndex = 0;
/**
* Creates an {@link ExecutorService} that performs tasks synchronously in FIFO order.
* Useful to protect a resource against concurrent modification, in lieu of a lock.
* Passing null returns an {@link ExecutorService} with a uniquely labeled queue.
*
* @param label - a label to name the queue, shown in several debugging tools
* @return a synchronous {@link ExecutorService}
*/
public ExecutorService createSerialExecutor(String label) {
if (label == null) label = "";
if (label.length() > 256) label = label.substring(0, 256);
String queueName = "com.apple.java.concurrent.";
if ("".equals(label)) {
synchronized (this) {
queueName += queueIndex++;
}
} else {
queueName += label;
}
final long nativeQueue = LibDispatchNative.nativeCreateSerialQueue(queueName);
if (nativeQueue == 0) return null;
return new LibDispatchSerialQueue(nativeQueue);
}
Executor nonBlockingMainQueue = null;
/**
* Returns an {@link Executor} that performs the provided Runnables on the main queue of the process.
* Runnables submitted to this {@link Executor} will not run until the AWT is started or another native toolkit is running a CFRunLoop or NSRunLoop on the main thread.
*
* Submitting a Runnable to this {@link Executor} does not wait for the Runnable to complete.
* @return an asynchronous {@link Executor} that is backed by the main queue
*/
public synchronized Executor getNonBlockingMainQueueExecutor() {
if (nonBlockingMainQueue != null) return nonBlockingMainQueue;
return nonBlockingMainQueue = new LibDispatchMainQueue.ASync();
}
Executor blockingMainQueue = null;
/**
* Returns an {@link Executor} that performs the provided Runnables on the main queue of the process.
* Runnables submitted to this {@link Executor} will not run until the AWT is started or another native toolkit is running a CFRunLoop or NSRunLoop on the main thread.
*
* Submitting a Runnable to this {@link Executor} will block until the Runnable has completed.
* @return an {@link Executor} that is backed by the main queue
*/
public synchronized Executor getBlockingMainQueueExecutor() {
if (blockingMainQueue != null) return blockingMainQueue;
return blockingMainQueue = new LibDispatchMainQueue.Sync();
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
import java.util.concurrent.Executor;
class LibDispatchConcurrentQueue extends LibDispatchQueue implements Executor {
LibDispatchConcurrentQueue(final long queuePtr) {
super(queuePtr);
}
@Override
public void execute(final Runnable task) {
LibDispatchNative.nativeExecuteAsync(ptr, task);
}
@Override
protected synchronized void dispose() {
// should not dispose the default concurrent queues
}
}

View File

@@ -0,0 +1,53 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
import java.util.concurrent.Executor;
abstract class LibDispatchMainQueue extends LibDispatchQueue implements Executor {
public LibDispatchMainQueue() {
super(LibDispatchNative.nativeGetMainQueue());
}
@Override
protected synchronized void dispose() {
// should not dispose the main queue
}
static class Sync extends LibDispatchMainQueue {
@Override
public void execute(final Runnable task) {
LibDispatchNative.nativeExecuteSync(ptr, task);
}
}
static class ASync extends LibDispatchMainQueue {
@Override
public void execute(final Runnable task) {
LibDispatchNative.nativeExecuteAsync(ptr, task);
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
final class LibDispatchNative {
static {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
System.loadLibrary("osx");
return null;
}
});
}
static native boolean nativeIsDispatchSupported();
static native long nativeGetMainQueue();
static native long nativeCreateConcurrentQueue(int priority);
static native long nativeCreateSerialQueue(String name);
static native void nativeReleaseQueue(long nativeQueue);
static native void nativeExecuteAsync(long nativeQueue, Runnable task);
static native void nativeExecuteSync(long nativeQueue, Runnable task);
private LibDispatchNative() { }
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
class LibDispatchQueue extends LibDispatchRetainedResource {
LibDispatchQueue(final long queuePtr) {
super(queuePtr);
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
class LibDispatchRetainedResource {
protected long ptr;
protected LibDispatchRetainedResource(final long ptr) {
this.ptr = ptr;
}
protected synchronized void dispose() {
if (ptr != 0) LibDispatchNative.nativeReleaseQueue(ptr);
ptr = 0;
}
protected void finalize() throws Throwable {
dispose();
}
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.concurrent;
import java.util.List;
import java.util.concurrent.*;
class LibDispatchSerialQueue extends AbstractExecutorService {
static final int RUNNING = 0;
static final int SHUTDOWN = 1;
// static final int STOP = 2; // not supported by GCD
static final int TERMINATED = 3;
final Object lock = new Object();
LibDispatchQueue nativeQueueWrapper;
volatile int runState;
LibDispatchSerialQueue(final long queuePtr) {
nativeQueueWrapper = new LibDispatchQueue(queuePtr);
}
@Override
public void execute(final Runnable task) {
if (nativeQueueWrapper == null) return;
LibDispatchNative.nativeExecuteAsync(nativeQueueWrapper.ptr, task);
}
@Override
public boolean isShutdown() {
return runState != RUNNING;
}
@Override
public boolean isTerminated() {
return runState == TERMINATED;
}
@Override
public void shutdown() {
synchronized (lock) {
if (runState != RUNNING) return;
runState = SHUTDOWN;
execute(new Runnable() {
public void run() {
synchronized (lock) {
runState = TERMINATED;
lock.notifyAll(); // for the benefit of awaitTermination()
}
}
});
nativeQueueWrapper = null;
}
}
@Override
public List<Runnable> shutdownNow() {
shutdown();
return null;
}
@Override
public boolean awaitTermination(final long timeout, final TimeUnit unit) throws InterruptedException {
if (runState == TERMINATED) return true;
final long millis = unit.toMillis(timeout);
if (millis <= 0) return false;
synchronized (lock) {
if (runState == TERMINATED) return true;
lock.wait(timeout);
if (runState == TERMINATED) return true;
}
return false;
}
}

View File

@@ -0,0 +1,7 @@
<html>
<head>
</head>
<body bgcolor="white">
Apple-specific implementations of the java.util.concurrent.* API based on libdispatch.
</body>
</html>

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.AboutEvent;
/**
* An implementor receives notification when the app is asked to show it's about dialog.
*
* @see Application#setAboutHandler(AboutHandler)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface AboutHandler {
/**
* Called when the application is asked to show it's about dialog.
* @param e the request to show the about dialog.
*/
public void handleAbout(final AboutEvent e);
}

View File

@@ -0,0 +1,205 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import java.io.File;
import java.net.URI;
import java.util.*;
import java.awt.Window;
/**
* AppEvents are sent to listeners and handlers installed on the {@link Application}.
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public abstract class AppEvent extends EventObject {
AppEvent() {
super(Application.getApplication());
}
/**
* Contains a list of files.
*/
public abstract static class FilesEvent extends AppEvent {
final List<File> files;
FilesEvent(final List<File> files) {
this.files = files;
}
/**
* @return the list of files
*/
public List<File> getFiles() {
return files;
}
}
/**
* Event sent when the app is asked to open a list of files.
*
* @see OpenFilesHandler#openFiles(OpenFilesEvent)
*/
public static class OpenFilesEvent extends FilesEvent {
final String searchTerm;
OpenFilesEvent(final List<File> files, final String searchTerm) {
super(files);
this.searchTerm = searchTerm;
}
/**
* If the files were opened using the Spotlight search menu or a Finder search window, this method obtains the search term used to find the files.
* This is useful for highlighting the search term in the documents when they are opened.
* @return the search term used to find the files
*/
public String getSearchTerm() {
return searchTerm;
}
}
/**
* Event sent when the app is asked to print a list of files.
*
* @see PrintFilesHandler#printFiles(PrintFilesEvent)
*/
public static class PrintFilesEvent extends FilesEvent {
PrintFilesEvent(final List<File> files) {
super(files);
}
}
/**
* Event sent when the app is asked to open a URI.
*
* @see OpenURIHandler#openURI(OpenURIEvent)
*/
public static class OpenURIEvent extends AppEvent {
final URI uri;
OpenURIEvent(final URI uri) {
this.uri = uri;
}
/**
* @return the URI the app was asked to open
*/
public URI getURI() {
return uri;
}
}
/**
* Event sent when the application is asked to open it's about window.
*
* @see AboutHandler#handleAbout()
*/
public static class AboutEvent extends AppEvent { AboutEvent() { } }
/**
* Event sent when the application is asked to open it's preferences window.
*
* @see PreferencesHandler#handlePreferences()
*/
public static class PreferencesEvent extends AppEvent { PreferencesEvent() { } }
/**
* Event sent when the application is asked to quit.
*
* @see QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse)
*/
public static class QuitEvent extends AppEvent { QuitEvent() { } }
/**
* Event sent when the application is asked to re-open itself.
*
* @see AppReOpenedListener#appReOpened(AppReOpenedEvent)
*/
public static class AppReOpenedEvent extends AppEvent { AppReOpenedEvent() { } }
/**
* Event sent when the application has become the foreground app, and when it has resigned being the foreground app.
*
* @see AppForegroundListener#appRaisedToForeground(AppForegroundEvent)
* @see AppForegroundListener#appMovedToBackground(AppForegroundEvent)
*/
public static class AppForegroundEvent extends AppEvent { AppForegroundEvent() { } }
/**
* Event sent when the application has been hidden or shown.
*
* @see AppHiddenListener#appHidden(AppHiddenEvent)
* @see AppHiddenListener#appUnhidden(AppHiddenEvent)
*/
public static class AppHiddenEvent extends AppEvent { AppHiddenEvent() { } }
/**
* Event sent when the user session has been changed via Fast User Switching.
*
* @see UserSessionListener#userSessionActivated(UserSessionEvent)
* @see UserSessionListener#userSessionDeactivated(UserSessionEvent)
*/
public static class UserSessionEvent extends AppEvent { UserSessionEvent() { } }
/**
* Event sent when the displays attached to the system enter and exit power save sleep.
*
* @see ScreenSleepListener#screenAboutToSleep(ScreenSleepEvent)
* @see ScreenSleepListener#screenAwoke(ScreenSleepEvent)
*/
public static class ScreenSleepEvent extends AppEvent { ScreenSleepEvent() { } }
/**
* Event sent when the system enters and exits power save sleep.
*
* @see SystemSleepListener#systemAboutToSleep(SystemSleepEvent)
* @see SystemSleepListener#systemAwoke(SystemSleepEvent)
*/
public static class SystemSleepEvent extends AppEvent { SystemSleepEvent() { } }
/**
* Event sent when a window is entering/exiting or has entered/exited full screen state.
*
* @see FullScreenUtilities
*
* @since Java for Mac OS X 10.7 Update 1
*/
public static class FullScreenEvent extends AppEvent {
final Window window;
FullScreenEvent(final Window window) {
this.window = window;
}
/**
* @return window transitioning between full screen states
*/
public Window getWindow() {
return window;
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
/**
* Common interface for all event listener sub-types.
* Implementors may implement multiple sub-types, but only need to call {@link Application#addAppEventListener(AppEventListener)} once to receive all notifications.
*
* @see AppReOpenedListener
* @see AppForegroundListener
* @see AppHiddenListener
* @see ScreenSleepListener
* @see SystemSleepListener
* @see UserSessionListener
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface AppEventListener { }

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.AppForegroundEvent;
/**
* Implementors are notified when the app becomes the foreground app and when it resigns being the foreground app.
* This notification is useful for hiding and showing transient UI like palette windows which should be hidden when the app is in the background.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface AppForegroundListener extends AppEventListener {
/**
* Called when the app becomes the foreground app.
* @param e the app became foreground notification.
*/
public void appRaisedToForeground(final AppForegroundEvent e);
/**
* Called when the app resigns to the background and another app becomes the foreground app.
* @param e the app resigned foreground notification.
*/
public void appMovedToBackground(final AppForegroundEvent e);
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.AppHiddenEvent;
/**
* Implementors are notified when the app is hidden or shown by the user.
* This notification is helpful for discontinuing a costly animation if it's not visible to the user.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface AppHiddenListener extends AppEventListener {
/**
* Called the app is hidden.
* @param e
*/
public void appHidden(final AppHiddenEvent e);
/**
* Called when the hidden app is shown again (but not necessarily brought to the foreground).
* @param e
*/
public void appUnhidden(final AppHiddenEvent e);
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.AppReOpenedEvent;
/**
* Implementors receive notification when the app has been asked to open again.
* Re-open events occur when the user clicks on the running app's Dock icon.
* Re-open events also occur when the app is double-clicked in the Finder and the app is already running.
*
* This notification is useful for showing a new document when your app has no open windows.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface AppReOpenedListener extends AppEventListener {
/**
* Called when the app has been re-opened (it's Dock icon was clicked on, or was double-clicked in the Finder)
* @param e the request to re-open the app
*/
public void appReOpened(final AppReOpenedEvent e);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,38 +25,18 @@
package com.apple.eawt;
import java.awt.Image;
import java.awt.PopupMenu;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.AppForegroundListener;
import java.awt.desktop.AppHiddenListener;
import java.awt.desktop.AppReopenedListener;
import java.awt.desktop.OpenFilesEvent;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.OpenURIEvent;
import java.awt.desktop.OpenURIHandler;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesEvent;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.QuitResponse;
import java.awt.desktop.QuitStrategy;
import java.awt.desktop.ScreenSleepListener;
import java.awt.desktop.SystemEventListener;
import java.awt.desktop.SystemSleepListener;
import java.awt.desktop.UserSessionListener;
import java.awt.*;
import java.awt.peer.*;
import java.beans.Beans;
import javax.swing.JMenuBar;
import sun.lwawt.*;
import sun.lwawt.macosx.*;
import sun.awt.AWTAccessor;
import sun.lwawt.LWWindowPeer;
import sun.lwawt.macosx.CPlatformWindow;
/**
* The {@code Application} class allows you to integrate your Java application with the native Mac OS X environment.
* The <code>Application</code> class allows you to integrate your Java application with the native Mac OS X environment.
* You can provide your Mac OS X users a greatly enhanced experience by implementing a few basic handlers for standard system events.
*
* For example:
@@ -79,8 +59,15 @@ public class Application {
static Application sApplication = null;
static {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Void>() {
public Void run() {
System.loadLibrary("awt");
return null;
}
});
checkSecurity();
Toolkit.getDefaultToolkit(); // Start AppKit
if (!Beans.isDesignTime()) {
nativeInitializeApplicationDelegate();
}
@@ -121,11 +108,11 @@ public class Application {
}
/**
* Adds sub-types of {@link SystemEventListener} to listen for notifications from the native Mac OS X system.
* Adds sub-types of {@link AppEventListener} to listen for notifications from the native Mac OS X system.
*
* @see AppForegroundListener
* @see AppHiddenListener
* @see AppReopenedListener
* @see AppReOpenedListener
* @see ScreenSleepListener
* @see SystemSleepListener
* @see UserSessionListener
@@ -134,16 +121,16 @@ public class Application {
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public void addAppEventListener(final SystemEventListener listener) {
public void addAppEventListener(final AppEventListener listener) {
eventHandler.addListener(listener);
}
/**
* Removes sub-types of {@link SystemEventListener} from listening for notifications from the native Mac OS X system.
* Removes sub-types of {@link AppEventListener} from listening for notifications from the native Mac OS X system.
*
* @see AppForegroundListener
* @see AppHiddenListener
* @see AppReopenedListener
* @see AppReOpenedListener
* @see ScreenSleepListener
* @see SystemSleepListener
* @see UserSessionListener
@@ -152,16 +139,16 @@ public class Application {
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public void removeAppEventListener(final SystemEventListener listener) {
public void removeAppEventListener(final AppEventListener listener) {
eventHandler.removeListener(listener);
}
/**
* Installs a handler to show a custom About window for your application.
*
* Setting the {@link AboutHandler} to {@code null} reverts it to the default Cocoa About window.
* Setting the {@link AboutHandler} to <code>null</code> reverts it to the default Cocoa About window.
*
* @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout} message
* @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout()} message
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
@@ -172,7 +159,7 @@ public class Application {
/**
* Installs a handler to create the Preferences menu item in your application's app menu.
*
* Setting the {@link PreferencesHandler} to {@code null} will remove the Preferences item from the app menu.
* Setting the {@link PreferencesHandler} to <code>null</code> will remove the Preferences item from the app menu.
*
* @param preferencesHandler
* @since Java for Mac OS X 10.6 Update 3
@@ -184,8 +171,8 @@ public class Application {
/**
* Installs the handler which is notified when the application is asked to open a list of files.
* The {@link OpenFilesHandler#openFiles(OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
* The {@link OpenFilesHandler#openFiles(AppEvent.OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a <code>CFBundleDocumentTypes</code> array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleDocumentTypes</code> key to your app's Info.plist.
*
* @param openFileHandler
* @since Java for Mac OS X 10.6 Update 3
@@ -197,8 +184,8 @@ public class Application {
/**
* Installs the handler which is notified when the application is asked to print a list of files.
* The {@link PrintFilesHandler#printFiles(PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
* The {@link PrintFilesHandler#printFiles(AppEvent.PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a <code>CFBundleDocumentTypes</code> array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleDocumentTypes</code> key to your app's Info.plist.
*
* @param printFileHandler
* @since Java for Mac OS X 10.6 Update 3
@@ -210,10 +197,10 @@ public class Application {
/**
* Installs the handler which is notified when the application is asked to open a URL.
* The {@link OpenURIHandler#openURI(OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleURLTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleURLTypes} key to your app's Info.plist.
* The {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a <code>CFBundleURLTypes</code> array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleURLTypes</code> key to your app's Info.plist.
*
* Setting the handler to {@code null} causes all {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be enqueued until another handler is set.
* Setting the handler to <code>null</code> causes all {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be enqueued until another handler is set.
*
* @param openURIHandler
* @since Java for Mac OS X 10.6 Update 3
@@ -226,7 +213,7 @@ public class Application {
/**
* Installs the handler which determines if the application should quit.
* The handler is passed a one-shot {@link QuitResponse} which can cancel or proceed with the quit.
* Setting the handler to {@code null} causes all quit requests to directly perform the default {@link QuitStrategy}.
* Setting the handler to <code>null</code> causes all quit requests to directly perform the default {@link QuitStrategy}.
*
* @param quitHandler the handler that is called when the application is asked to quit
* @since Java for Mac OS X 10.6 Update 3
@@ -384,16 +371,6 @@ public class Application {
iconHandler.setDockIconBadge(badge);
}
/**
* Displays a progress bar to this application's Dock icon.
* Acceptable values are from 0 to 100, any other disables progress indication.
*
* @param value progress value
*/
public void setDockIconProgress(final int value) {
iconHandler.setDockIconProgress(value);
}
/**
* Sets the default menu bar to use when there are no active frames.
* Only used when the system property "apple.laf.useScreenMenuBar" is "true", and
@@ -416,6 +393,7 @@ public class Application {
*
* @since Java for Mac OS X 10.7 Update 1
*/
@SuppressWarnings("deprecation")
public void requestToggleFullScreen(final Window window) {
final Object peer = AWTAccessor.getComponentAccessor().getPeer(window);
if (!(peer instanceof LWWindowPeer)) return;
@@ -424,4 +402,168 @@ public class Application {
((CPlatformWindow)platformWindow).toggleFullScreen();
}
// -- DEPRECATED API --
/**
* Adds the specified ApplicationListener as a receiver of callbacks from this class.
* This method throws a RuntimeException if the newer About, Preferences, Quit, etc handlers are installed.
*
* @param listener an implementation of ApplicationListener that handles ApplicationEvents
*
* @deprecated register individual handlers for each task (About, Preferences, Open, Print, Quit, etc)
* @since 1.4
*/
@SuppressWarnings("deprecation")
@Deprecated
public void addApplicationListener(final ApplicationListener listener) {
eventHandler.legacyHandler.addLegacyAppListener(listener);
}
/**
* Removes the specified ApplicationListener from being a receiver of callbacks from this class.
* This method throws a RuntimeException if the newer About, Preferences, Quit, etc handlers are installed.
*
* @param listener an implementation of ApplicationListener that had previously been registered to handle ApplicationEvents
*
* @deprecated unregister individual handlers for each task (About, Preferences, Open, Print, Quit, etc)
* @since 1.4
*/
@SuppressWarnings("deprecation")
@Deprecated
public void removeApplicationListener(final ApplicationListener listener) {
eventHandler.legacyHandler.removeLegacyAppListener(listener);
}
/**
* Enables the Preferences item in the application menu. The ApplicationListener receives a callback for
* selection of the Preferences item in the application menu only if this is set to <code>true</code>.
*
* If a Preferences item isn't present, this method adds and enables it.
*
* @param enable specifies whether the Preferences item in the application menu should be enabled (<code>true</code>) or not (<code>false</code>)
*
* @deprecated no replacement
* @since 1.4
*/
@Deprecated
public void setEnabledPreferencesMenu(final boolean enable) {
menuBarHandler.setPreferencesMenuItemVisible(true);
menuBarHandler.setPreferencesMenuItemEnabled(enable);
}
/**
* Enables the About item in the application menu. The ApplicationListener receives a callback for
* selection of the About item in the application menu only if this is set to <code>true</code>. Because AWT supplies
* a standard About window when an application may not, by default this is set to <code>true</code>.
*
* If the About item isn't present, this method adds and enables it.
*
* @param enable specifies whether the About item in the application menu should be enabled (<code>true</code>) or not (<code>false</code>)
*
* @deprecated no replacement
* @since 1.4
*/
@Deprecated
public void setEnabledAboutMenu(final boolean enable) {
menuBarHandler.setAboutMenuItemEnabled(enable);
}
/**
* Determines if the Preferences item of the application menu is enabled.
*
* @deprecated no replacement
* @since 1.4
*/
@Deprecated
public boolean getEnabledPreferencesMenu() {
return menuBarHandler.isPreferencesMenuItemEnabled();
}
/**
* Determines if the About item of the application menu is enabled.
*
* @deprecated no replacement
* @since 1.4
*/
@Deprecated
public boolean getEnabledAboutMenu() {
return menuBarHandler.isAboutMenuItemEnabled();
}
/**
* Determines if the About item of the application menu is present.
*
* @deprecated no replacement
* @since 1.4
*/
@Deprecated
public boolean isAboutMenuItemPresent() {
return menuBarHandler.isAboutMenuItemVisible();
}
/**
* Adds the About item to the application menu if the item is not already present.
*
* @deprecated use {@link #setAboutHandler(AboutHandler)} with a non-null {@link AboutHandler} parameter
* @since 1.4
*/
@Deprecated
public void addAboutMenuItem() {
menuBarHandler.setAboutMenuItemVisible(true);
}
/**
* Removes the About item from the application menu if the item is present.
*
* @deprecated use {@link #setAboutHandler(AboutHandler)} with a null parameter
* @since 1.4
*/
@Deprecated
public void removeAboutMenuItem() {
menuBarHandler.setAboutMenuItemVisible(false);
}
/**
* Determines if the About Preferences of the application menu is present. By default there is no Preferences menu item.
*
* @deprecated no replacement
* @since 1.4
*/
@Deprecated
public boolean isPreferencesMenuItemPresent() {
return menuBarHandler.isPreferencesMenuItemVisible();
}
/**
* Adds the Preferences item to the application menu if the item is not already present.
*
* @deprecated use {@link #setPreferencesHandler(PreferencesHandler)} with a non-null {@link PreferencesHandler} parameter
* @since 1.4
*/
@Deprecated
public void addPreferencesMenuItem() {
menuBarHandler.setPreferencesMenuItemVisible(true);
}
/**
* Removes the Preferences item from the application menu if that item is present.
*
* @deprecated use {@link #setPreferencesHandler(PreferencesHandler)} with a null parameter
* @since 1.4
*/
@Deprecated
public void removePreferencesMenuItem() {
menuBarHandler.setPreferencesMenuItemVisible(false);
}
/**
* @deprecated Use <code>java.awt.MouseInfo.getPointerInfo().getLocation()</code>.
*
* @since 1.4
*/
@Deprecated
public static Point getMouseLocationOnScreen() {
return java.awt.MouseInfo.getPointerInfo().getLocation();
}
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
/**
* An abstract adapter class for receiving <code>ApplicationEvents</code>.
*
* ApplicationEvents are deprecated. Use individual app event listeners or handlers instead.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @see AboutHandler
* @see PreferencesHandler
* @see OpenURIHandler
* @see OpenFilesHandler
* @see PrintFilesHandler
* @see QuitHandler
*
* @see AppReOpenedListener
* @see AppForegroundListener
* @see AppHiddenListener
* @see UserSessionListener
* @see ScreenSleepListener
* @see SystemSleepListener
*
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}.
* @since 1.4
*/
@SuppressWarnings("deprecation")
@Deprecated
public class ApplicationAdapter implements ApplicationListener {
@Deprecated
public void handleAbout(final ApplicationEvent event) { }
@Deprecated
public void handleOpenApplication(final ApplicationEvent event) { }
@Deprecated
public void handleOpenFile(final ApplicationEvent event) { }
@Deprecated
public void handlePreferences(final ApplicationEvent event) { }
@Deprecated
public void handlePrintFile(final ApplicationEvent event) { }
@Deprecated
public void handleQuit(final ApplicationEvent event) { }
@Deprecated
public void handleReOpenApplication(final ApplicationEvent event) { }
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import java.util.EventObject;
/**
* The class of events sent to the deprecated ApplicationListener callbacks.
*
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}
* @since 1.4
*/
@Deprecated
public class ApplicationEvent extends EventObject {
private String fFilename = null;
private boolean fHandled = false;
ApplicationEvent(final Object source) {
super(source);
}
ApplicationEvent(final Object source, final String filename) {
super(source);
fFilename = filename;
}
/**
* Determines whether an ApplicationListener has acted on a particular event.
* An event is marked as having been handled with <code>setHandled(true)</code>.
*
* @return <code>true</code> if the event has been handled, otherwise <code>false</code>
*
* @since 1.4
* @deprecated
*/
@Deprecated
public boolean isHandled() {
return fHandled;
}
/**
* Marks the event as handled.
* After this method handles an ApplicationEvent, it may be useful to specify that it has been handled.
* This is usually used in conjunction with <code>getHandled()</code>.
* Set to <code>true</code> to designate that this event has been handled. By default it is <code>false</code>.
*
* @param state <code>true</code> if the event has been handled, otherwise <code>false</code>.
*
* @since 1.4
* @deprecated
*/
@Deprecated
public void setHandled(final boolean state) {
fHandled = state;
}
/**
* Provides the filename associated with a particular AppleEvent.
* When the ApplicationEvent corresponds to an AppleEvent that needs to act on a particular file, the ApplicationEvent carries the name of the specific file with it.
* For example, the Print and Open events refer to specific files.
* For these cases, this returns the appropriate file name.
*
* @return the full path to the file associated with the event, if applicable, otherwise <code>null</code>
*
* @since 1.4
* @deprecated use {@link OpenFilesHandler} or {@link PrintFilesHandler} instead
*/
@Deprecated
public String getFilename() {
return fFilename;
}
}

View File

@@ -0,0 +1,153 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import java.util.EventListener;
/**
* ApplicationEvents are deprecated. Use individual AppEvent listeners or handlers instead.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @see AboutHandler
* @see PreferencesHandler
* @see OpenURIHandler
* @see OpenFilesHandler
* @see PrintFilesHandler
* @see QuitHandler
*
* @see AppReOpenedListener
* @see AppForegroundListener
* @see AppHiddenListener
* @see UserSessionListener
* @see ScreenSleepListener
* @see SystemSleepListener
*
* @since 1.4
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}
*/
@SuppressWarnings("deprecation")
@Deprecated
public interface ApplicationListener extends EventListener {
/**
* Called when the user selects the About item in the application menu. If <code>event</code> is not handled by
* setting <code>isHandled(true)</code>, a default About window consisting of the application's name and icon is
* displayed. To display a custom About window, designate the <code>event</code> as being handled and display the
* appropriate About window.
*
* @param event an ApplicationEvent initiated by the user choosing About in the application menu
* @deprecated use {@link AboutHandler}
*/
@Deprecated
public void handleAbout(ApplicationEvent event);
/**
* Called when the application receives an Open Application event from the Finder or another application. Usually
* this will come from the Finder when a user double-clicks your application icon. If there is any special code
* that you want to run when you user launches your application from the Finder or by sending an Open Application
* event from another application, include that code as part of this handler. The Open Application event is sent
* after AWT has been loaded.
*
* @param event the Open Application event
* @deprecated no replacement
*/
@Deprecated
public void handleOpenApplication(ApplicationEvent event);
/**
* Called when the application receives an Open Document event from the Finder or another application. This event
* is generated when a user double-clicks a document in the Finder. If the document is registered as belonging
* to your application, this event is sent to your application. Documents are bound to a particular application based
* primarily on their suffix. In the Finder, a user selects a document and then from the File Menu chooses Get Info.
* The Info window allows users to bind a document to a particular application.
*
* These events are sent only if the bound application has file types listed in the Info.plist entries Document Types
* or CFBundleDocumentTypes.
*
* The ApplicationEvent sent to this handler holds a reference to the file being opened.
*
* @param event an Open Document event with reference to the file to be opened
* @deprecated use {@link OpenFilesHandler}
*/
@Deprecated
public void handleOpenFile(ApplicationEvent event);
/**
* Called when the Preference item in the application menu is selected. Native Mac OS X applications make their
* Preferences window available through the application menu. Java applications are automatically given an application
* menu in Mac OS X. By default, the Preferences item is disabled in that menu. If you are deploying an application
* on Mac OS X, you should enable the preferences item with <code>setEnabledPreferencesMenu(true)</code> in the
* Application object and then display your Preferences window in this handler.
*
* @param event triggered when the user selects Preferences from the application menu
* @deprecated use {@link PreferencesHandler}
*/
@Deprecated
public void handlePreferences(ApplicationEvent event);
/**
* Called when the application is sent a request to print a particular file or files. You can allow other applications to
* print files with your application by implementing this handler. If another application sends a Print Event along
* with the name of a file that your application knows how to process, you can use this handler to determine what to
* do with that request. You might open your entire application, or just invoke your printing classes.
*
* These events are sent only if the bound application has file types listed in the Info.plist entries Document Types
* or CFBundleDocumentTypes.
*
* The ApplicationEvent sent to this handler holds a reference to the file being opened.
*
* @param event a Print Document event with a reference to the file(s) to be printed
* @deprecated use {@link PrintFilesHandler}
*/
@Deprecated
public void handlePrintFile(ApplicationEvent event);
/**
* Called when the application is sent the Quit event. This event is generated when the user selects Quit from the
* application menu, when the user types Command-Q, or when the user control clicks on your application icon in the
* Dock and chooses Quit. You can either accept or reject the request to quit. You might want to reject the request
* to quit if the user has unsaved work. Reject the request, move into your code to save changes, then quit your
* application. To accept the request to quit, and terminate the application, set <code>isHandled(true)</code> for the
* <code>event</code>. To reject the quit, set <code>isHandled(false)</code>.
*
* @param event a Quit Application event
* @deprecated use {@link QuitHandler} and {@link QuitResponse}
*/
@Deprecated
public void handleQuit(ApplicationEvent event);
/**
* Called when the application receives a Reopen Application event from the Finder or another application. Usually
* this will come when a user clicks on your application icon in the Dock. If there is any special code
* that needs to run when your user clicks on your application icon in the Dock or when a Reopen Application
* event is sent from another application, include that code as part of this handler.
*
* @param event the Reopen Application event
* @deprecated use {@link AppReOpenedListener}
*/
@Deprecated
public void handleReOpenApplication(ApplicationEvent event);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,13 @@
package com.apple.eawt;
import java.awt.Window;
import com.apple.eawt.event.FullScreenEvent;
import com.apple.eawt.AppEvent.FullScreenEvent;
/**
* Abstract adapter class for receiving fullscreen events. This class is provided
* as a convenience for creating listeners.
*
* Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(Window, FullScreenListener)}
* Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(javax.swing.RootPaneContainer, FullScreenListener)}
* will receive all entering/entered/exiting/exited full screen events.
*
* @see FullScreenUtilities

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,13 @@
package com.apple.eawt;
import com.apple.eawt.event.FullScreenEvent;
import java.awt.*;
import java.util.*;
import java.util.List;
import javax.swing.RootPaneContainer;
import com.apple.eawt.AppEvent.FullScreenEvent;
import sun.awt.SunToolkit;
import java.lang.annotation.Native;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
package com.apple.eawt;
import com.apple.eawt.event.FullScreenEvent;
import java.util.EventListener;
import com.apple.eawt.AppEvent.FullScreenEvent;
/**
*
@@ -37,25 +37,25 @@ import java.util.EventListener;
public interface FullScreenListener extends EventListener {
/**
* Invoked when a window has started to enter full screen.
* @param e containing the specific window entering full screen.
* @param event containing the specific window entering full screen.
*/
public void windowEnteringFullScreen(final FullScreenEvent e);
/**
* Invoked when a window has fully entered full screen.
* @param e containing the specific window which has entered full screen.
* @param event containing the specific window which has entered full screen.
*/
public void windowEnteredFullScreen(final FullScreenEvent e);
/**
* Invoked when a window has started to exit full screen.
* @param e containing the specific window exiting full screen.
* @param event containing the specific window exiting full screen.
*/
public void windowExitingFullScreen(final FullScreenEvent e);
/**
* Invoked when a window has fully exited full screen.
* @param e containing the specific window which has exited full screen.
* @param event containing the specific window which has exited full screen.
*/
public void windowExitedFullScreen(final FullScreenEvent e);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,25 +25,27 @@
package com.apple.eawt;
import java.awt.Component;
import java.awt.Window;
import java.awt.*;
import javax.swing.RootPaneContainer;
import sun.lwawt.macosx.*;
import com.apple.eawt.event.GestureUtilities;
import sun.lwawt.macosx.CPlatformWindow;
/**
* Utility class perform animated full screen actions to top-level {@link Window}s.
*
* This class manages the relationship between {@link Window}s and the {@link FullScreenListener}s
* attached to them. It adds additional functionality to AWT Windows, without adding new API to the
* This class manages the relationship between {@link Windows}s and the {@link FullScreenListener}s
* attached to them. It's design is similar to the Java SE 6u10 {@link com.sun.awt.AWTUtilities}
* class which adds additional functionality to AWT Windows, without adding new API to the
* {@link java.awt.Window} class.
*
* Full screen operations can only be performed on top-level {@link Window}s that are also {@link RootPaneContainer}s.
*
* @see FullScreenAdapter
* @see GestureUtilities
* @see com.sun.awt.AWTUtilities
*
* @since Java for Mac OS X 10.7 Update 1
*/

View File

@@ -53,7 +53,7 @@ public class MacQuitResponse implements QuitResponse {
*/
@Override
public void performQuit() {
if (appEventHandler.currentQuitResponse != this) return;
//if (appEventHandler.currentQuitResponse != this) return;
appEventHandler.performQuit();
}
@@ -63,7 +63,7 @@ public class MacQuitResponse implements QuitResponse {
*/
@Override
public void cancelQuit() {
if (appEventHandler.currentQuitResponse != this) return;
//if (appEventHandler.currentQuitResponse != this) return;
appEventHandler.cancelQuit();
}
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.OpenFilesEvent;
/**
* An implementor is notified when the application is asked to open a list of files.
* This message is only sent if the application has registered that it handles CFBundleDocumentTypes in it's Info.plist.
*
* @see Application#setOpenFileHandler(OpenFilesHandler)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface OpenFilesHandler {
/**
* Called when the application is asked to open a list of files.
* @param e the request to open a list of files, and the search term used to find them, if any.
*/
public void openFiles(final OpenFilesEvent e);
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.OpenURIEvent;
/**
* An implementor is notified when the application is asked to open a URI.
* The application only sends {@link com.apple.eawt.EAWTEvent.OpenURIEvent}s when it has been launched as a bundled Mac application, and it's Info.plist claims URL schemes in it's <code>CFBundleURLTypes</code> entry.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleURLTypes</code> key to your app's Info.plist.
*
* @see Application#setOpenURIHandler(OpenURIHandler)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface OpenURIHandler {
/**
* Called when the application is asked to open a URI
* @param e the request to open a URI
*/
public void openURI(final OpenURIEvent e);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.PreferencesEvent;
/**
* An implementor is notified when the app is asked to show it's preferences UI.
*
* @see Application#setPreferencesHandler(PreferencesHandler)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface PreferencesHandler {
/**
* Called when the app is asked to show it's preferences UI.
* @param e the request to show preferences.
*/
public void handlePreferences(final PreferencesEvent e);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.PrintFilesEvent;
/**
* An implementor can respond to requests to print documents that the app has been registered to handle.
*
* @see Application#setPrintFileHandler(PrintFilesHandler)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface PrintFilesHandler {
/**
* Called when the application is asked to print a list of files.
* @param e the request to print a list of files.
*/
public void printFiles(final PrintFilesEvent e);
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.QuitEvent;
/**
* An implementor determines if requests to quit this application should proceed or cancel.
*
* @see Application#setQuitHandler(QuitHandler)
* @see Application#setQuitStrategy(QuitStrategy)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface QuitHandler {
/**
* Invoked when the application is asked to quit.
*
* Implementors must call either {@link QuitResponse#cancelQuit()}, {@link QuitResponse#performQuit()}, or ensure the application terminates.
* The process (or log-out) requesting this app to quit will be blocked until the {@link QuitResponse} is handled.
* Apps that require complex UI to shutdown may call the {@link QuitResponse} from any thread.
* Your app may be asked to quit multiple times before you have responded to the initial request.
* This handler is called each time a quit is requested, and the same {@link QuitResponse} object is passed until it is handled.
* Once used, the {@link QuitResponse} cannot be used again to change the decision.
*
* @param e the request to quit this application.
* @param response the one-shot response object used to cancel or proceed with the quit action.
*/
public void handleQuitRequestWith(final QuitEvent e, final QuitResponse response);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
/**
* Used to respond to a request to quit the application.
* The QuitResponse may be used after the {@link QuitHandler#handleQuitRequestWith(AppEvent.QuitEvent, QuitResponse)} method has returned, and may be used from any thread.
*
* @see Application#setQuitHandler(QuitHandler)
* @see QuitHandler
* @see Application#setQuitStrategy(QuitStrategy)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public class QuitResponse {
final _AppEventHandler appEventHandler;
QuitResponse(final _AppEventHandler appEventHandler) {
this.appEventHandler = appEventHandler;
}
/**
* Notifies the external quit requester that the quit will proceed, and performs the default {@link QuitStrategy}.
*/
public void performQuit() {
if (appEventHandler.currentQuitResponse != this) return;
appEventHandler.performQuit();
}
/**
* Notifies the external quit requester that the user has explicitly canceled the pending quit, and leaves the application running.
* <b>Note: this will cancel a pending log-out, restart, or shutdown.</b>
*/
public void cancelQuit() {
if (appEventHandler.currentQuitResponse != this) return;
appEventHandler.cancelQuit();
}
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
/**
* The strategy use to shut down the application, if Sudden Termination is not enabled.
*
* @see Application#setQuitHandler(QuitHandler)
* @see Application#setQuitStrategy(QuitStrategy)
* @see Application#enableSuddenTermination()
* @see Application#disableSuddenTermination()
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public enum QuitStrategy {
/**
* Shuts down the application by calling <code>System.exit(0)</code>. This is the default strategy.
*/
SYSTEM_EXIT_0,
/**
* Shuts down the application by closing each window from back-to-front.
*/
CLOSE_ALL_WINDOWS
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.ScreenSleepEvent;
/**
* Implementors receive notification when the displays attached to the system have entered power save sleep.
*
* This notification is useful for discontinuing a costly animation, or indicating that the user is no longer present on a network service.
*
* This message is not sent on Mac OS X versions prior to 10.6.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface ScreenSleepListener extends AppEventListener {
/**
* Called when the system displays have entered power save sleep.
* @param e the screen sleep event
*/
public void screenAboutToSleep(final ScreenSleepEvent e);
/**
* Called when the system displays have awoke from power save sleep.
* @param e the screen sleep event
*/
public void screenAwoke(final ScreenSleepEvent e);
}

View File

@@ -0,0 +1,53 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.SystemSleepEvent;
/**
* Implementors receive notification as the system is entering sleep, and after the system wakes.
*
* This notification is useful for disconnecting from network services prior to sleep, or re-establishing a connection if the network configuration has changed during sleep.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface SystemSleepListener extends AppEventListener {
/**
* Called when the system is about to sleep.
* Note: This message may not be delivered prior to the actual system sleep, and may be processed after the corresponding wake has occurred.
* @param e the system sleep event
*/
public void systemAboutToSleep(final SystemSleepEvent e);
/**
* Called after the system has awoke from sleeping.
* @param e the system sleep event
*/
public void systemAwoke(final SystemSleepEvent e);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import com.apple.eawt.AppEvent.UserSessionEvent;
/**
* Implementors receive notification when Fast User Switching changes the user session.
*
* This notification is useful for discontinuing a costly animation, or indicating that the user is no longer present on a network service.
*
* @see Application#addAppEventListener(AppEventListener)
*
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public interface UserSessionListener extends AppEventListener {
/**
* Called when the user session has been switched away.
* @param e the user session switch event
*/
public void userSessionDeactivated(final UserSessionEvent e);
/**
* Called when the user session has been switched to.
* @param e the user session switch event
*/
public void userSessionActivated(final UserSessionEvent e);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,14 +28,13 @@ package com.apple.eawt;
import java.awt.*;
import java.lang.reflect.*;
import sun.awt.AWTAccessor;
import sun.lwawt.macosx.*;
import sun.lwawt.macosx.CImage.Creator;
import sun.awt.AWTAccessor;
class _AppDockIconHandler {
private static native void nativeSetDockMenu(final long cmenu);
private static native void nativeSetDockIconImage(final long image);
private static native void nativeSetDockIconProgress(final int value);
private static native long nativeGetDockIconImage();
private static native void nativeSetDockIconBadge(final String badge);
@@ -43,6 +42,7 @@ class _AppDockIconHandler {
_AppDockIconHandler() { }
@SuppressWarnings("deprecation")
public void setDockMenu(final PopupMenu menu) {
fDockMenu = menu;
@@ -72,8 +72,9 @@ class _AppDockIconHandler {
public void setDockIconImage(final Image image) {
try {
final CImage cImage = CImage.createFromImage(image);
cImage.execute(_AppDockIconHandler::nativeSetDockIconImage);
final CImage cImage = getCImageCreator().createFromImage(image);
final long nsImagePtr = getNSImagePtrFrom(cImage);
nativeSetDockIconImage(nsImagePtr);
} catch (final Throwable e) {
throw new RuntimeException(e);
}
@@ -83,11 +84,7 @@ class _AppDockIconHandler {
try {
final long dockNSImage = nativeGetDockIconImage();
if (dockNSImage == 0) return null;
final Method getCreatorMethod = CImage.class.getDeclaredMethod(
"getCreator", new Class<?>[]{});
getCreatorMethod.setAccessible(true);
Creator imageCreator = (Creator) getCreatorMethod.invoke(null, new Object[]{});
return imageCreator.createImageUsingNativeSize(dockNSImage);
return getCImageCreator().createImageUsingNativeSize(dockNSImage);
} catch (final Throwable e) {
throw new RuntimeException(e);
}
@@ -97,7 +94,26 @@ class _AppDockIconHandler {
nativeSetDockIconBadge(badge);
}
void setDockIconProgress(int value) {
nativeSetDockIconProgress(value);
@SuppressWarnings("rawtypes")
static Creator getCImageCreator() {
try {
final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
getCreatorMethod.setAccessible(true);
return (Creator)getCreatorMethod.invoke(null, new Object[] {});
} catch (final Throwable e) {
throw new RuntimeException(e);
}
}
static long getNSImagePtrFrom(final CImage cImage) {
if (cImage == null) return 0;
try {
final Field cImagePtrField = CFRetainedResource.class.getDeclaredField("ptr");
cImagePtrField.setAccessible(true);
return cImagePtrField.getLong(cImage);
} catch (final Throwable e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,47 +25,17 @@
package com.apple.eawt;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.desktop.AboutEvent;
import java.awt.desktop.AboutHandler;
import java.awt.desktop.AppForegroundEvent;
import java.awt.desktop.AppForegroundListener;
import java.awt.desktop.AppHiddenEvent;
import java.awt.desktop.AppHiddenListener;
import java.awt.desktop.AppReopenedEvent;
import java.awt.desktop.AppReopenedListener;
import java.awt.desktop.OpenFilesEvent;
import java.awt.desktop.OpenFilesHandler;
import java.awt.desktop.OpenURIEvent;
import java.awt.desktop.OpenURIHandler;
import java.awt.desktop.PreferencesEvent;
import java.awt.desktop.PreferencesHandler;
import java.awt.desktop.PrintFilesEvent;
import java.awt.desktop.PrintFilesHandler;
import java.awt.desktop.QuitEvent;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.QuitStrategy;
import java.awt.desktop.ScreenSleepEvent;
import java.awt.desktop.ScreenSleepListener;
import java.awt.desktop.SystemEventListener;
import java.awt.desktop.SystemSleepEvent;
import java.awt.desktop.SystemSleepListener;
import java.awt.desktop.UserSessionEvent;
import java.awt.desktop.UserSessionEvent.Reason;
import java.awt.desktop.UserSessionListener;
import java.awt.*;
import java.awt.event.WindowEvent;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.LinkedList;
import java.net.*;
import java.util.*;
import java.util.List;
import java.util.Map;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
import com.apple.eawt.AppEvent.*;
class _AppEventHandler {
private static final int NOTIFY_ABOUT = 1;
private static final int NOTIFY_PREFS = 2;
@@ -92,7 +62,7 @@ class _AppEventHandler {
private static native void nativeReplyToAppShouldTerminate(final boolean shouldTerminate);
private static native void nativeRegisterForNotification(final int notification);
static final _AppEventHandler instance = new _AppEventHandler();
final static _AppEventHandler instance = new _AppEventHandler();
static _AppEventHandler getInstance() {
return instance;
}
@@ -114,7 +84,9 @@ class _AppEventHandler {
final _ScreenSleepDispatcher screenSleepDispatcher = new _ScreenSleepDispatcher();
final _SystemSleepDispatcher systemSleepDispatcher = new _SystemSleepDispatcher();
QuitStrategy defaultQuitAction = QuitStrategy.NORMAL_EXIT;
final _AppEventLegacyHandler legacyHandler = new _AppEventLegacyHandler(this);
QuitStrategy defaultQuitAction = QuitStrategy.SYSTEM_EXIT_0;
_AppEventHandler() {
final String strategyProp = System.getProperty("apple.eawt.quitStrategy");
@@ -122,16 +94,15 @@ class _AppEventHandler {
if ("CLOSE_ALL_WINDOWS".equals(strategyProp)) {
setDefaultQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS);
} else if ("SYSTEM_EXIT_O".equals(strategyProp)
|| "NORMAL_EXIT".equals(strategyProp)) {
setDefaultQuitStrategy(QuitStrategy.NORMAL_EXIT);
} else if ("SYSTEM_EXIT_O".equals(strategyProp)) {
setDefaultQuitStrategy(QuitStrategy.SYSTEM_EXIT_0);
} else {
System.err.println("unrecognized apple.eawt.quitStrategy: " + strategyProp);
}
}
void addListener(final SystemEventListener listener) {
if (listener instanceof AppReopenedListener) reOpenAppDispatcher.addListener((AppReopenedListener)listener);
void addListener(final AppEventListener listener) {
if (listener instanceof AppReOpenedListener) reOpenAppDispatcher.addListener((AppReOpenedListener)listener);
if (listener instanceof AppForegroundListener) foregroundAppDispatcher.addListener((AppForegroundListener)listener);
if (listener instanceof AppHiddenListener) hiddenAppDispatcher.addListener((AppHiddenListener)listener);
if (listener instanceof UserSessionListener) userSessionDispatcher.addListener((UserSessionListener)listener);
@@ -139,8 +110,8 @@ class _AppEventHandler {
if (listener instanceof SystemSleepListener) systemSleepDispatcher.addListener((SystemSleepListener)listener);
}
void removeListener(final SystemEventListener listener) {
if (listener instanceof AppReopenedListener) reOpenAppDispatcher.removeListener((AppReopenedListener)listener);
void removeListener(final AppEventListener listener) {
if (listener instanceof AppReOpenedListener) reOpenAppDispatcher.removeListener((AppReOpenedListener)listener);
if (listener instanceof AppForegroundListener) foregroundAppDispatcher.removeListener((AppForegroundListener)listener);
if (listener instanceof AppHiddenListener) hiddenAppDispatcher.removeListener((AppHiddenListener)listener);
if (listener instanceof UserSessionListener) userSessionDispatcher.removeListener((UserSessionListener)listener);
@@ -156,10 +127,10 @@ class _AppEventHandler {
this.defaultQuitAction = defaultQuitAction;
}
MacQuitResponse currentQuitResponse;
synchronized MacQuitResponse obtainQuitResponse() {
QuitResponse currentQuitResponse;
synchronized QuitResponse obtainQuitResponse() {
if (currentQuitResponse != null) return currentQuitResponse;
return currentQuitResponse = new MacQuitResponse(this);
return currentQuitResponse = new QuitResponse(this);
}
synchronized void cancelQuit() {
@@ -171,8 +142,7 @@ class _AppEventHandler {
currentQuitResponse = null;
try {
if (defaultQuitAction == QuitStrategy.NORMAL_EXIT
|| _AppMiscHandlers.isSuddenTerminationEnbaled()) System.exit(0);
if (defaultQuitAction == QuitStrategy.SYSTEM_EXIT_0) System.exit(0);
if (defaultQuitAction != QuitStrategy.CLOSE_ALL_WINDOWS) {
throw new RuntimeException("Unknown quit action");
@@ -300,10 +270,10 @@ class _AppEventHandler {
}
}
class _AppReOpenedDispatcher extends _AppEventMultiplexor<AppReopenedListener> {
void performOnListener(AppReopenedListener listener, final _NativeEvent event) {
final AppReopenedEvent e = new AppReopenedEvent();
listener.appReopened(e);
class _AppReOpenedDispatcher extends _AppEventMultiplexor<AppReOpenedListener> {
void performOnListener(AppReOpenedListener listener, final _NativeEvent event) {
final AppReOpenedEvent e = new AppReOpenedEvent();
listener.appReOpened(e);
}
}
@@ -332,9 +302,7 @@ class _AppEventHandler {
}
class _UserSessionDispatcher extends _BooleanAppEventMultiplexor<UserSessionListener, UserSessionEvent> {
UserSessionEvent createEvent(final boolean isTrue) {
return new UserSessionEvent(Reason.UNSPECIFIED);
}
UserSessionEvent createEvent(final boolean isTrue) { return new UserSessionEvent(); }
void performFalseEventOn(final UserSessionListener listener, final UserSessionEvent e) {
listener.userSessionDeactivated(e);
@@ -423,11 +391,7 @@ class _AppEventHandler {
}
void performUsing(final QuitHandler handler, final _NativeEvent event) {
if (_AppMiscHandlers.isSuddenTerminationEnbaled()) {
performDefaultAction(event);
return;
}
final MacQuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
final QuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
handler.handleQuitRequestWith(new QuitEvent(), response);
}
}
@@ -560,6 +524,9 @@ class _AppEventHandler {
setHandlerContext(AppContext.getAppContext());
// if a new handler is installed, block addition of legacy ApplicationListeners
if (handler == legacyHandler) return;
legacyHandler.blockLegacyAPI();
}
void performDefaultAction(final _NativeEvent event) { } // by default, do nothing
@@ -607,6 +574,10 @@ class _AppEventHandler {
}
}
}
// if a new handler is installed, block addition of legacy ApplicationListeners
if (handler == legacyHandler) return;
legacyHandler.blockLegacyAPI();
}
}
}

View File

@@ -0,0 +1,188 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.eawt;
import java.awt.Toolkit;
import java.io.File;
import java.util.*;
import com.apple.eawt.AppEvent.*;
@SuppressWarnings("deprecation")
class _AppEventLegacyHandler implements AboutHandler, PreferencesHandler, _OpenAppHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler {
final _AppEventHandler parent;
final Vector<ApplicationListener> legacyAppListeners = new Vector<ApplicationListener>();
boolean blockLegacyAPI;
boolean initializedParentDispatchers;
_AppEventLegacyHandler(final _AppEventHandler parent) {
this.parent = parent;
}
void blockLegacyAPI() {
blockLegacyAPI = true;
}
void checkIfLegacyAPIBlocked() {
if (!blockLegacyAPI) return;
throw new IllegalStateException("Cannot add com.apple.eawt.ApplicationListener after installing an app event handler");
}
void addLegacyAppListener(final ApplicationListener listener) {
checkIfLegacyAPIBlocked();
if (!initializedParentDispatchers) {
final _AppMenuBarHandler menuBarHandler = Application.getApplication().menuBarHandler;
final boolean prefsMenuAlreadyExplicitlySet = menuBarHandler.prefsMenuItemExplicitlySet;
parent.aboutDispatcher.setHandler(this);
parent.preferencesDispatcher.setHandler(this);
if (!prefsMenuAlreadyExplicitlySet) {
menuBarHandler.setPreferencesMenuItemVisible(false); // default behavior is not to have a preferences item
}
parent.openAppDispatcher.setHandler(this);
parent.reOpenAppDispatcher.addListener(this);
parent.openFilesDispatcher.setHandler(this);
parent.printFilesDispatcher.setHandler(this);
parent.quitDispatcher.setHandler(this);
initializedParentDispatchers = true;
}
synchronized (legacyAppListeners) {
legacyAppListeners.addElement(listener);
}
}
public void removeLegacyAppListener(final ApplicationListener listener) {
checkIfLegacyAPIBlocked();
synchronized (legacyAppListeners) {
legacyAppListeners.removeElement(listener);
}
}
@Override
public void handleAbout(final AboutEvent e) {
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handleAbout(ae);
}
});
if (ae.isHandled()) return;
parent.openCocoaAboutWindow();
}
@Override
public void handlePreferences(final PreferencesEvent e) {
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handlePreferences(ae);
}
});
}
@Override
public void handleOpenApp() {
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handleOpenApplication(ae);
}
});
}
@Override
public void appReOpened(final AppReOpenedEvent e) {
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handleReOpenApplication(ae);
}
});
}
@Override
public void openFiles(final OpenFilesEvent e) {
final List<File> files = e.getFiles();
for (final File file : files) { // legacy ApplicationListeners only understood one file at a time
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit(), file.getAbsolutePath());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handleOpenFile(ae);
}
});
}
}
@Override
public void printFiles(PrintFilesEvent e) {
final List<File> files = e.getFiles();
for (final File file : files) { // legacy ApplicationListeners only understood one file at a time
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit(), file.getAbsolutePath());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handlePrintFile(ae);
}
});
}
}
@Override
public void handleQuitRequestWith(final QuitEvent e, final QuitResponse response) {
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
public void dispatchEvent(final ApplicationListener listener) {
listener.handleQuit(ae);
}
});
if (ae.isHandled()) {
parent.performQuit();
} else {
parent.cancelQuit();
}
}
interface EventDispatcher {
void dispatchEvent(final ApplicationListener listener);
}
// helper that cycles through the loop and aborts if the event is handled, or there are no listeners
void sendEventToEachListenerUntilHandled(final ApplicationEvent event, final EventDispatcher dispatcher) {
synchronized (legacyAppListeners) {
if (legacyAppListeners.size() == 0) return;
final Enumeration<ApplicationListener> e = legacyAppListeners.elements();
while (e.hasMoreElements() && !event.isHandled()) {
dispatcher.dispatchEvent(e.nextElement());
}
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,17 @@
package com.apple.eawt;
import java.awt.Container;
import java.awt.Frame;
import java.awt.peer.MenuComponentPeer;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JMenuBar;
import javax.swing.*;
import javax.swing.plaf.MenuBarUI;
import com.apple.laf.ScreenMenuBar;
import sun.awt.AWTAccessor;
import sun.lwawt.macosx.CMenuBar;
import com.apple.laf.AquaMenuBarUI;
import sun.awt.AWTAccessor;
class _AppMenuBarHandler {
private static final int MENU_ABOUT = 1;
@@ -52,13 +49,8 @@ class _AppMenuBarHandler {
return instance;
}
private static ScreenMenuBar defaultMenuBar;
// callback from the native delegate -init function
private static void initMenuStates(final boolean aboutMenuItemVisible,
final boolean aboutMenuItemEnabled,
final boolean prefsMenuItemVisible,
final boolean prefsMenuItemEnabled) {
private static void initMenuStates(final boolean aboutMenuItemVisible, final boolean aboutMenuItemEnabled, final boolean prefsMenuItemVisible, final boolean prefsMenuItemEnabled) {
synchronized (instance) {
instance.aboutMenuItemVisible = aboutMenuItemVisible;
instance.aboutMenuItemEnabled = aboutMenuItemEnabled;
@@ -78,9 +70,6 @@ class _AppMenuBarHandler {
void setDefaultMenuBar(final JMenuBar menuBar) {
installDefaultMenuBar(menuBar);
if (menuBar == null) {
return;
}
// scan the current frames, and see if any are foreground
final Frame[] frames = Frame.getFrames();
@@ -104,27 +93,18 @@ class _AppMenuBarHandler {
return (frame.getExtendedState() & Frame.ICONIFIED) != 0;
}
@SuppressWarnings("deprecation")
static void installDefaultMenuBar(final JMenuBar menuBar) {
if (menuBar == null) {
// intentionally clearing the default menu
if (defaultMenuBar != null) {
defaultMenuBar.removeNotify();
defaultMenuBar = null;
}
nativeSetDefaultMenuBar(0);
return;
}
Container parent = menuBar.getParent();
if (parent instanceof JLayeredPane) {
((JLayeredPane) parent).remove(menuBar);
}
MenuBarUI ui = menuBar.getUI();
final MenuBarUI ui = menuBar.getUI();
if (!(ui instanceof AquaMenuBarUI)) {
ui = new AquaMenuBarUI();
menuBar.setUI(ui);
// Aqua was not installed
throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel");
}
final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
@@ -134,14 +114,7 @@ class _AppMenuBarHandler {
throw new IllegalStateException("Application.setDefaultMenuBar() only works if apple.laf.useScreenMenuBar=true");
}
if (screenMenuBar != defaultMenuBar) {
if (defaultMenuBar != null) {
defaultMenuBar.removeNotify();
}
defaultMenuBar = screenMenuBar;
screenMenuBar.addNotify();
}
screenMenuBar.addNotify();
final Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(screenMenuBar);
if (!(peer instanceof CMenuBar)) {
// such a thing should not be possible

View File

@@ -26,8 +26,6 @@
package com.apple.eawt;
class _AppMiscHandlers {
private static boolean isSuddenTerminationEnabled;
private static native void nativeOpenHelpViewer();
private static native void nativeRequestActivation(final boolean allWindows);
@@ -49,16 +47,10 @@ class _AppMiscHandlers {
}
static void enableSuddenTermination() {
isSuddenTerminationEnabled = true;
nativeEnableSuddenTermination();
}
static void disableSuddenTermination() {
isSuddenTerminationEnabled = false;
nativeDisableSuddenTermination();
}
public static boolean isSuddenTerminationEnbaled() {
return isSuddenTerminationEnabled;
}
}

View File

@@ -27,4 +27,4 @@ package com.apple.eawt;
interface _OpenAppHandler {
void handleOpenApp();
}
}

Some files were not shown because too many files have changed in this diff Show More