diff --git a/README.md b/README.md index e5048cf..0ace7a0 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ release is created. The following lists the steps to install the suite: - **The main module**: DJ Native Swing Integration - **The native module**: DJ Native Swing Integration - [Your OS/Arch] 7. Click on the "Install" button and follow the instructions of the install wizard. +8. Add the following option to `netbeans_default_options` property in netbeans.conf +file, located at [NETBEANS INSTALL DIR]/etc (global config) or [HOME DIR]/.netbeans/[NETBEANS VERSION]/etc +(user config, may not exist): + - **-J-Dsun.awt.disableMixing=true** +9. Restart NetBeans. ## Configuration diff --git a/djns-swt-cocoa-macosx-aarch64/manifest.mf b/djns-swt-cocoa-macosx-aarch64/manifest.mf index 3c9d398..bf376e4 100644 --- a/djns-swt-cocoa-macosx-aarch64/manifest.mf +++ b/djns-swt-cocoa-macosx-aarch64/manifest.mf @@ -2,5 +2,5 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: chrriis.dj.nativeswing.swtcore.cocoa.macosx.aarch64 OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtcore/cocoa/macosx/aarch64/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt-cocoa-macosx-aarch64/nbproject/genfiles.properties b/djns-swt-cocoa-macosx-aarch64/nbproject/genfiles.properties index a0e43d3..5cb6b49 100644 --- a/djns-swt-cocoa-macosx-aarch64/nbproject/genfiles.properties +++ b/djns-swt-cocoa-macosx-aarch64/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=b73d1e95 +build.xml.data.CRC32=10726abe build.xml.script.CRC32=a26f62a4 build.xml.stylesheet.CRC32=15ca8a54@2.92 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=b73d1e95 +nbproject/build-impl.xml.data.CRC32=10726abe nbproject/build-impl.xml.script.CRC32=c8510446 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt-cocoa-macosx-aarch64/nbproject/project.xml b/djns-swt-cocoa-macosx-aarch64/nbproject/project.xml index d5d7c48..4c0fd7f 100644 --- a/djns-swt-cocoa-macosx-aarch64/nbproject/project.xml +++ b/djns-swt-cocoa-macosx-aarch64/nbproject/project.xml @@ -14,6 +14,24 @@ 1.0 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.openide.util.lookup diff --git a/djns-swt-cocoa-macosx-x86_64/manifest.mf b/djns-swt-cocoa-macosx-x86_64/manifest.mf index b176057..ec83500 100644 --- a/djns-swt-cocoa-macosx-x86_64/manifest.mf +++ b/djns-swt-cocoa-macosx-x86_64/manifest.mf @@ -2,5 +2,5 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: chrriis.dj.nativeswing.swtcore.cocoa.macosx.x86_64 OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtcore/cocoa/macosx/x86_64/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt-cocoa-macosx-x86_64/nbproject/genfiles.properties b/djns-swt-cocoa-macosx-x86_64/nbproject/genfiles.properties index d2a0666..aa8e34a 100644 --- a/djns-swt-cocoa-macosx-x86_64/nbproject/genfiles.properties +++ b/djns-swt-cocoa-macosx-x86_64/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=80ae4190 +build.xml.data.CRC32=c371825b build.xml.script.CRC32=862c6b80 build.xml.stylesheet.CRC32=15ca8a54@2.92 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=80ae4190 +nbproject/build-impl.xml.data.CRC32=c371825b nbproject/build-impl.xml.script.CRC32=425cae01 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt-cocoa-macosx-x86_64/nbproject/project.xml b/djns-swt-cocoa-macosx-x86_64/nbproject/project.xml index 5aad303..2f403e4 100644 --- a/djns-swt-cocoa-macosx-x86_64/nbproject/project.xml +++ b/djns-swt-cocoa-macosx-x86_64/nbproject/project.xml @@ -14,6 +14,24 @@ 1.0 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.openide.util.lookup diff --git a/djns-swt-gtk-linux-aarch64/manifest.mf b/djns-swt-gtk-linux-aarch64/manifest.mf index 98aad39..dc57a97 100644 --- a/djns-swt-gtk-linux-aarch64/manifest.mf +++ b/djns-swt-gtk-linux-aarch64/manifest.mf @@ -2,5 +2,5 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: chrriis.dj.nativeswing.swtcore.gtk.linux.aarch64 OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtcore/gtk/linux/aarch64/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt-gtk-linux-aarch64/nbproject/genfiles.properties b/djns-swt-gtk-linux-aarch64/nbproject/genfiles.properties index e2453a9..b19a6b5 100644 --- a/djns-swt-gtk-linux-aarch64/nbproject/genfiles.properties +++ b/djns-swt-gtk-linux-aarch64/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=de29771e +build.xml.data.CRC32=9783eefa build.xml.script.CRC32=30a1f23c build.xml.stylesheet.CRC32=15ca8a54@2.92 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=de29771e +nbproject/build-impl.xml.data.CRC32=9783eefa nbproject/build-impl.xml.script.CRC32=be0ec097 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt-gtk-linux-aarch64/nbproject/project.xml b/djns-swt-gtk-linux-aarch64/nbproject/project.xml index 546dd1b..3393fc8 100644 --- a/djns-swt-gtk-linux-aarch64/nbproject/project.xml +++ b/djns-swt-gtk-linux-aarch64/nbproject/project.xml @@ -14,6 +14,24 @@ 1.0 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.openide.util.lookup diff --git a/djns-swt-gtk-linux-ppc64/manifest.mf b/djns-swt-gtk-linux-ppc64/manifest.mf index cafbc70..efb7dac 100644 --- a/djns-swt-gtk-linux-ppc64/manifest.mf +++ b/djns-swt-gtk-linux-ppc64/manifest.mf @@ -2,5 +2,5 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: chrriis.dj.nativeswing.swtcore.gtk.linux.ppc64 OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtcore/gtk/linux/ppc64/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt-gtk-linux-ppc64/nbproject/genfiles.properties b/djns-swt-gtk-linux-ppc64/nbproject/genfiles.properties index c623e05..c43d09b 100644 --- a/djns-swt-gtk-linux-ppc64/nbproject/genfiles.properties +++ b/djns-swt-gtk-linux-ppc64/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=0b689509 +build.xml.data.CRC32=7abb78fc build.xml.script.CRC32=4ed57078 build.xml.stylesheet.CRC32=15ca8a54@2.92 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=0b689509 +nbproject/build-impl.xml.data.CRC32=7abb78fc nbproject/build-impl.xml.script.CRC32=e3c014c2 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt-gtk-linux-ppc64/nbproject/project.xml b/djns-swt-gtk-linux-ppc64/nbproject/project.xml index b34f35a..9710c8f 100644 --- a/djns-swt-gtk-linux-ppc64/nbproject/project.xml +++ b/djns-swt-gtk-linux-ppc64/nbproject/project.xml @@ -14,6 +14,24 @@ 1.0 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.openide.util.lookup diff --git a/djns-swt-gtk-linux-x86_64/manifest.mf b/djns-swt-gtk-linux-x86_64/manifest.mf index f897c5e..b48afd1 100644 --- a/djns-swt-gtk-linux-x86_64/manifest.mf +++ b/djns-swt-gtk-linux-x86_64/manifest.mf @@ -2,5 +2,5 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: chrriis.dj.nativeswing.swtcore.gtk.linux.x86_64 OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtcore/gtk/linux/x86_64/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt-gtk-linux-x86_64/nbproject/genfiles.properties b/djns-swt-gtk-linux-x86_64/nbproject/genfiles.properties index 6fd9407..c07a973 100644 --- a/djns-swt-gtk-linux-x86_64/nbproject/genfiles.properties +++ b/djns-swt-gtk-linux-x86_64/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=7e9f711f +build.xml.data.CRC32=32b3b48e build.xml.script.CRC32=12845596 build.xml.stylesheet.CRC32=15ca8a54@2.92 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=7e9f711f +nbproject/build-impl.xml.data.CRC32=32b3b48e nbproject/build-impl.xml.script.CRC32=c1d9ef41 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt-gtk-linux-x86_64/nbproject/project.xml b/djns-swt-gtk-linux-x86_64/nbproject/project.xml index 22369f1..bea5e3d 100644 --- a/djns-swt-gtk-linux-x86_64/nbproject/project.xml +++ b/djns-swt-gtk-linux-x86_64/nbproject/project.xml @@ -14,6 +14,24 @@ 1.0 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.openide.util.lookup diff --git a/djns-swt-win32-win32-x86_64/manifest.mf b/djns-swt-win32-win32-x86_64/manifest.mf index bdc3865..837adce 100644 --- a/djns-swt-win32-win32-x86_64/manifest.mf +++ b/djns-swt-win32-win32-x86_64/manifest.mf @@ -2,5 +2,5 @@ Manifest-Version: 1.0 AutoUpdate-Show-In-Client: true OpenIDE-Module: chrriis.dj.nativeswing.swtcore.win32.win32.x86_64 OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtcore/win32/win32/x86_64/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt-win32-win32-x86_64/nbproject/genfiles.properties b/djns-swt-win32-win32-x86_64/nbproject/genfiles.properties index 86a897d..51cf3fb 100644 --- a/djns-swt-win32-win32-x86_64/nbproject/genfiles.properties +++ b/djns-swt-win32-win32-x86_64/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=d1e1da1d +build.xml.data.CRC32=eef0937c build.xml.script.CRC32=7d38c2ab build.xml.stylesheet.CRC32=15ca8a54@2.92 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=d1e1da1d +nbproject/build-impl.xml.data.CRC32=eef0937c nbproject/build-impl.xml.script.CRC32=c16237f3 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt-win32-win32-x86_64/nbproject/project.xml b/djns-swt-win32-win32-x86_64/nbproject/project.xml index 265cdba..07a5ba5 100644 --- a/djns-swt-win32-win32-x86_64/nbproject/project.xml +++ b/djns-swt-win32-win32-x86_64/nbproject/project.xml @@ -14,6 +14,24 @@ 1.0 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.openide.util.lookup diff --git a/djns-swt/ivy.xml b/djns-swt/ivy.xml index ed0f1f1..2d2838a 100644 --- a/djns-swt/ivy.xml +++ b/djns-swt/ivy.xml @@ -1,7 +1,6 @@ - diff --git a/djns-swt/manifest.mf b/djns-swt/manifest.mf index f72f89f..11997d5 100644 --- a/djns-swt/manifest.mf +++ b/djns-swt/manifest.mf @@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false OpenIDE-Module: chrriis.dj.nativeswing.swtimpl OpenIDE-Module-Install: chrriis/dj/nativeswing/swtimpl/Installer.class OpenIDE-Module-Localizing-Bundle: chrriis/dj/nativeswing/swtimpl/Bundle.properties -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns-swt/nbproject/genfiles.properties b/djns-swt/nbproject/genfiles.properties index ec6c062..83d0e62 100644 --- a/djns-swt/nbproject/genfiles.properties +++ b/djns-swt/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=219829ed build.xml.stylesheet.CRC32=15ca8a54@2.80 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=a6ea132a +nbproject/build-impl.xml.data.CRC32=ef6b0d8d nbproject/build-impl.xml.script.CRC32=37231e19 nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.92 diff --git a/djns-swt/nbproject/project.properties b/djns-swt/nbproject/project.properties index 406a8ec..b2c2562 100644 --- a/djns-swt/nbproject/project.properties +++ b/djns-swt/nbproject/project.properties @@ -1,6 +1,7 @@ file.reference.DJNativeSwing-SWTAPI.jar=release/modules/DJNativeSwing-SWTAPI.jar file.reference.DJNativeSwing.jar=release/modules/DJNativeSwing.jar file.reference.jna-5.2.0.jar=release/modules/ext/jna-5.2.0.jar +file.reference.jna-platform-5.2.0.jar=release/modules/ext/jna-platform-5.2.0.jar javac.source=11 javac.compilerargs=-Xlint -Xlint:-serial license.file=../LICENSE diff --git a/djns-swt/nbproject/project.xml b/djns-swt/nbproject/project.xml index 7663a4b..a9ebc60 100644 --- a/djns-swt/nbproject/project.xml +++ b/djns-swt/nbproject/project.xml @@ -15,6 +15,24 @@ 1.55 + + org.netbeans.libs.jna + + + + 2 + 2.15 + + + + org.netbeans.libs.jna.platform + + + + 2 + 2.15 + + org.netbeans.modules.autoupdate.services @@ -70,9 +88,6 @@ chrriis.dj.nativeswing.swtimpl.netbeans chrriis.dj.nativeswing.swtimpl.utilities chrriis.dj.nativeswing.swtimpl.utilities.internal - com.sun.jna - com.sun.jna.ptr - com.sun.jna.win32 DJNativeSwing.jar @@ -82,10 +97,6 @@ DJNativeSwing-SWTAPI.jar release/modules/DJNativeSwing-SWTAPI.jar - - ext/jna-5.2.0.jar - release/modules/ext/jna-5.2.0.jar - diff --git a/djns/manifest.mf b/djns/manifest.mf index 86790f9..63db526 100644 --- a/djns/manifest.mf +++ b/djns/manifest.mf @@ -5,5 +5,5 @@ OpenIDE-Module-Install: pt/cjmach/netbeans/djns/Installer.class OpenIDE-Module-Layer: pt/cjmach/netbeans/djns/layer.xml OpenIDE-Module-Localizing-Bundle: pt/cjmach/netbeans/djns/Bundle.properties OpenIDE-Module-Requires: org.openide.windows.WindowManager -OpenIDE-Module-Specification-Version: 1.2.2 +OpenIDE-Module-Specification-Version: 1.3.0 diff --git a/djns/src/pt/cjmach/netbeans/djns/browser/DjnsBrowserImpl.java b/djns/src/pt/cjmach/netbeans/djns/browser/DjnsBrowserImpl.java index 6c9d15f..cb93bde 100644 --- a/djns/src/pt/cjmach/netbeans/djns/browser/DjnsBrowserImpl.java +++ b/djns/src/pt/cjmach/netbeans/djns/browser/DjnsBrowserImpl.java @@ -74,7 +74,7 @@ public void dispose() { @Override public JWebBrowser getComponent() { if (browser == null) { - browser = new JWebBrowser(NSComponentOptions.destroyOnFinalization()); + browser = new JWebBrowser(NSComponentOptions.destroyOnFinalization(), NSComponentOptions.proxyComponentHierarchy()); browser.setDefaultPopupMenuRegistered(false); browser.setBarsVisible(false); browser.addWebBrowserListener(browserListener); diff --git a/djns/src/pt/cjmach/netbeans/djns/browser/HtmlPreviewMultiViewElement.java b/djns/src/pt/cjmach/netbeans/djns/browser/HtmlPreviewMultiViewElement.java index 0bf9069..0466d8a 100644 --- a/djns/src/pt/cjmach/netbeans/djns/browser/HtmlPreviewMultiViewElement.java +++ b/djns/src/pt/cjmach/netbeans/djns/browser/HtmlPreviewMultiViewElement.java @@ -17,12 +17,11 @@ */ package pt.cjmach.netbeans.djns.browser; -import chrriis.dj.nativeswing.NSComponentOptions; -import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser; import java.awt.EventQueue; import java.util.Collection; import org.netbeans.core.spi.multiview.MultiViewElement; import org.netbeans.core.spi.multiview.text.MultiViewEditorElement; +import org.openide.awt.HtmlBrowser; import org.openide.cookies.SaveCookie; import org.openide.filesystems.FileObject; import org.openide.loaders.DataObject; @@ -45,7 +44,7 @@ }) public class HtmlPreviewMultiViewElement extends MultiViewEditorElement { - private JWebBrowser browser; + private HtmlBrowser browser; Lookup.Result saveCookieResult; public HtmlPreviewMultiViewElement(Lookup lookup) { @@ -60,26 +59,23 @@ public HtmlPreviewMultiViewElement(Lookup lookup) { saveCookieResult.addLookupListener((e) -> { Collection cookies = saveCookieResult.allInstances(); if (cookies.isEmpty()) { - EventQueue.invokeLater(() -> { - getVisualRepresentation().reloadPage(); - }); + if (browser != null) { + EventQueue.invokeLater(() -> { + browser.getBrowserImpl().reloadDocument(); + }); + } } }); } @Override - public JWebBrowser getVisualRepresentation() { + public HtmlBrowser getVisualRepresentation() { if (browser == null) { - browser = new JWebBrowser( - NSComponentOptions.destroyOnFinalization(), - NSComponentOptions.proxyComponentHierarchy()); - browser.setJavascriptEnabled(true); - browser.setDefaultPopupMenuRegistered(false); - browser.setBarsVisible(false); + browser = new DjnsBrowser(false, false); DataObject htmlObject = getLookup().lookup(DataObject.class); FileObject file = htmlObject.getPrimaryFile(); - browser.navigate(file.toURL().toString()); + browser.setURL(file.toURL()); } return browser; }