Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-10-04Bug 576422 - Remove chromium sourcesAlexander Kurtakov1-1/+0
Delete build machinery and sources Change-Id: I390fa30ec20fd2e3517f0a312c9f0ed85a3eabad Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/186113 Tested-by: Platform Bot <platform-bot@eclipse.org> Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
2021-08-30Bug 575713 - Fix 'JNIGeneratorApp all' to not search for missing stuffAlexandr Miloslavskiy1-3/+1
Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com> Change-Id: I838d75417a6283c4b0873e168e4b0e83ee77c4bd Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184783
2021-08-10Bug 575044 - [GTK4] Separate GTK3 & GTK4 native functions with sharedPaul D'Pong1-2/+4
Java class parameters - Changed NativesGeneration to only add os_structs.h when generating gtk3 or gtk4 (before it would generate in the atk file which is incorrect) - This patch include the added include in the gtk3.c & gtk4.c file - Moved gtk_menu_popup_at_rect to test if building works correctly with this new change Change-Id: I5d57e45a3eef681559be59d7527d1cd394a9bfb4 Signed-off-by: Paul D'Pong <sdamrong@redhat.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/183855 Tested-by: Platform Bot <platform-bot@eclipse.org> Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
2021-08-10Bug 575044 - [GTK4] Separate GTK3 & GTK4 native functions with sharedPaul D'Pong1-0/+6
Java class parameters - Added check & #include in NativesGenerator which account for generation of GTK version dependent natives that need common structures such as GdkRectangle, GtkBorder, etc which are stored in os_struct.h Change-Id: Iff60b7b98f0be3e1b1af2a666e9740fdd5f372e6 Signed-off-by: Paul D'Pong <sdamrong@redhat.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/183385 Tested-by: Platform Bot <platform-bot@eclipse.org> Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
2021-06-27Bug 574416 - 4.21 Y-Build: Y20210623-0320 - Comparator Errors FoundSravan Kumar Lakkimsetti2-2/+2
Change-Id: I9d60bb755f895f21ede6fb302d5f509b772245a2 Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/182496 Tested-by: Platform Bot <platform-bot@eclipse.org>
2021-04-10Use JLS_Latest in swt tools.Alexander Kurtakov2-2/+2
Change-Id: Ic6f64d431f212c8398815a34d446703de1a04cae
2021-01-26Bug 570533 - [GTK4] Make separate GTK3.java and GTK4.java native wrappersAlexandr Miloslavskiy1-0/+2
This patch lays the necessary groundwork for GTK3 and GTK4 separation Change-Id: Ifa7f1a7eaa65cca4c6735ca668aa995c61d77ba0 Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2021-01-26Bug 570533 - Change JniGenerator to create empty struct filesAlexandr Miloslavskiy1-6/+0
Previously, if there were no structs to generate, JniGenerator did nothing at all. This caused two problems: 1) If there was some stale file, it left it as is 2) For newly added files, such as in next commit, it didn't create .c file, which makes it hard to write proper makefiles: if the file is missing, that would be a compilation error. If the structs.c is not mentioned in makefile, that would cause a pitfall for future changes which may add some structs and be puzzled by runtime errors. I have tested JniGenerator on all 3 platforms and there are no side effects of this change for existing files. Change-Id: I3fd4696fa18391a12b832c0dd8665426afabfd2d Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2021-01-20Bug 570178 - [GTK] Hide GTK/GDK/GLib deprecation warningsAlexandr Miloslavskiy3-1/+14
Only specific warnings are hidden, so that any new deprecations become visible later. This patch makes compile output 193 lines shorter - this was a lot and killed any incentive to actually look at compile warnings at all. Change-Id: I88d704aecef68f8d1e9729fa772d378066800f6c Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2021-01-12Bug 570244 - [JNI] Remove 64-bit compatibility macros jintLong/jfloatDoubleNikita Nemkin10-104/+96
Finish the work that started in Bug 559057 an continued in Bug 564303. Change-Id: Ie4d407440e62bfb39e85fa613f1fc9972d98dc42 Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2021-01-12Stop using deprecated AST JLS versionAlexander Kurtakov2-4/+4
Change-Id: I87017191a733d6b715f799f598be4972ffbd9ca1 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2021-01-04Use String.join() in SWT toolsCarsten Hammer2-13/+2
Change-Id: Ib8245fb17ae64483f818d38021f13b93be186d83 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
2020-07-25Remove unused parameters from SWT tools.Alexander Kurtakov6-14/+9
Change-Id: I078faef960a62fa985b26b4be4c32587a87d7f0e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-07-25Switch AST to JLS 11 in swt.tools.Alexander Kurtakov2-2/+2
Preliminary step for when SWT moves to Java 11. Change-Id: If79e61772a690c3aeb22ec310a8804a1c8887e0f Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-07-20Bug 549585 - Contribute Chromium support to SWTGuillermo Zunino3-0/+28
Initial chromium contribution. Follows the existing swt structure for building and packaging. Added SWT.CHROMIUM constant and modified BrowserFactory classes. Added new source plugin org.eclipse.swt.browser.chromium with the java, c jni and rust source code. This contains buildChromium.xml with ant tasks to build rust code. Minimal modifications to existing ant build scripts to support building and packaging chromium.swt fragments. Binaries repo contains 3 new fragments with OS specific build and binaries. New Chromium Test class added. Minimal changes to jni generation and increment tools version. Browser examples can be run by passing -Dorg.eclipse.swt.browser.DefaultType=chromium. It requires built fragment .jar added to classpath. CEF binaries are required to run examples and should be put in ~/.swt/lib/*/*/chromium-3071/. Build instructions: As usual with mvn and -Dnative property to build natives. Two flags introduced in fragment poms: -DskipRust (to skip building rust) -DskipJni (to skip building chromium jni) Build will download CEF in order to build. Only requirement should be rust installed (https://www.rust-lang.org/). === Steps to run test: To run Test_org_eclipse_swt_browser_Chromium tests, built jars need to be in classpath: 0. Build swt: mvn clean install -Pbuild-individual-bundles 1. Build jars in eclipse.platform.swt.binaries: mvn package -Pbuild-individual-bundles 2. Install "CEF binaries for Chromium SWT Browser" from http://dl.maketechnology.io/chromium-cef/rls/repository/ in Eclipse Using Help > Install new Software or adding it to the target platform or get the jars in any way. 3. In Eclipse, create a Junit Run Configuration for Test_org_eclipse_swt_browser_Chromium class. In Classpath tab, add external jars: to jar built on 1), for example: - eclipse.platform.swt.binaries/bundles/org.eclipse.swt.browser.chromium.gtk.linux.x86_64/target/org.eclipse.swt.browser.chromium.gtk.linux.x86_64-3.114.100-SNAPSHOT.jar to jar installed on 2), for example: - ~/.p2/pool/plugins/com.make.chromium.cef.gtk.linux.x86_64_0.4.0.201908130254.jar 4. Run it. === Steps to run examples/snippets: Any browser example/snippet can be run adding the jars to classpath (as described in run test) and using system property -Dorg.eclipse.swt.browser.DefaultType=chromium === Steps to build natives: Binaries are committed so this is optional. 1. Install rust (https://www.rust-lang.org/) 2. Run mvn build in eclipse.platform.swt.binaries with -Dnative as usual, for example: mvn verify -Pbuild-individual-bundles -Dnative=gtk.linux.x86_64 mvn verify -Pbuild-individual-bundles -Dnative=cocoa.macosx.x86_64 mvn verify -Pbuild-individual-bundles -Dnative=win32.win32.x86_64 Two sets of binaries are built and copied in the specific fragments, rust libs and the jni lib. Each can be skipped with -DskipRust and -DskipJni respectively Without rust installed the jni lib can still be built using -DskipRust. Change-Id: I2ff7998c5734512bb83de0097de2b684faade59a Signed-off-by: Guillermo Zunino <guillez@gmail.com>
2020-06-29Bug 564303 - Clean up SWT Tools of 32-bit supportPaul D'Pong16-354/+95
Removed JNI64 flag, and comparisons between 32 & 64 bit types/functions. Changed functions & interfaces accordingly, to take away this dependency. Change-Id: I66adb0a4716f14a83df534c6c20f81a7ad60fc87 Signed-off-by: Paul D'Pong <sdamrong@redhat.com>
2020-05-04Bug 562754 - JNI code generation breaks on @param without descriptionPaul Pazderski1-2/+2
Change-Id: Ic73e5c55c4efbbde19f71db9a067a97834d2b0c8 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
2020-01-10Use System.lineSeparator()Alexander Kurtakov1-3/+3
Benefit of this way rather than System.getProperty("line.separator") is that there are no security checks. Change-Id: I89bc3b8490f47498e161736a9ab5756fd88835a9 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-12-11Use jdk 5 for-each loopCarsten Hammer18-147/+74
Replace simple uses of Iterator with a corresponding for-loop. Also add missing braces on loops as necessary. Change-Id: If8f4e897bf119d129d690f82ec3db7782e7a82b0 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
2019-07-05Using indexOf char instead of indexOf StringLars Vogel1-1/+1
See https://sourceforge.net/p/findbugs/feature-requests/300/#cb7f for a performance related discussion Change-Id: I255d2fa2b525281d9a6724aadbf85828236dbb30 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2019-06-25Bug 548491 - [regression][mac] Cheese in java editorTill Brychcy1-0/+2
Change-Id: I32415326801837c10bc4fb6d7e18d832c20b3645
2019-06-18Bug 548363 - Update JNI code with "contains" instead of "indexOf"Lars Vogel6-50/+50
Change-Id: Ifed0b4daac134d189b52cd1f2beab42e0e0079cd Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2019-06-14Bug 547304 - [cleanup] Fix wrong space/tab indentationPaul Pazderski3-5/+5
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: Ib7b260691acee06845cc580dd8cb859de0da8bf1
2019-05-09Remove unused parameters in NativesGenerator.Alexander Kurtakov1-5/+5
Change-Id: I04b625e3f709d81543d207f0f421dfa786567eb3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-04-24Bug 546144 - [JNI] Revert some recent jnigen changesNikita Nemkin1-21/+3
Revert "Bug 515610 - [GTK] SWT generates incorrect fall-through for memmove()" This reverts commit 4c3b9d2b9864a1910c5116168456ab215a2dc2aa. Change-Id: Iea193f29a877face605deaa51bfce96027f7d7ac Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2019-04-24Bug 546144 - [JNI] Revert some recent jnigen changesNikita Nemkin1-33/+4
Revert "Bug 534923 - Cocoa: objc_msgSend is called incorrectly from os.c" This reverts commit 94bbab9593afe86192ce9ff1c7d23f9003c3ef5e. Change-Id: If227caf179ffc8cb018c343d3b99d3535aea8d04 Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2019-02-05Bug 534923 - Cocoa: objc_msgSend is called incorrectly from os.cThomas Wolf1-4/+33
C calling conventions may be different for vararg and non-vararg functions. Change the generated code to not cast vararg functions to function pointers with non-vararg profiles. Instead annotate the objc_msgSend* functions in MacGenerator as "fixedargs=2" (meaning: it's a vararg function with two fixed parameters), and change the NativesGenerator to use this annotation to generate a cast to a function pointer with a vararg profile with that many fixed parameters. "fixedargs=0" or absence of the "fixedargs" annotation means all parameters are fixed; there are no varargs. The behavior in this case in unchanged. The casting cannot be avoided altogether; the objc_msgSend*_stret functions _must_ be casted. Also use BOOL as return type for the cast of objc_msgSendSuper_bool, not just for objc_msgSend_bool. Verified that casting to a profile with varargs indeed makes the compiler generate the assembly code that on x86_64 does clear register %al, as it should per the ABI spec.[1] The old code generated did not do this. (Verified with with cc -S using Apple's clang and inspecting the assembler output; on OS X 10.14.2.) Ran the new MacGenerator to regenerate the Cocoa OS.java, then ran the new JNIGenerator to regenerate the Cocoa os.c. Re-built the binary library. Set up an Eclipse using this rebuilt library and ran all SWT tests. All tests passed locally. [1] https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf Change-Id: Ib03226ad9ecdf4bfcf789cd2b42f592b9a2b9021 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-02-04Bug 544085 - [JNI] Insert correct newline character into generated codeNikita Nemkin1-2/+2
Change-Id: I167eb7bcdeda257af27a01da1c053778fe7a3786 Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2018-10-05Bug 530393 - Fix copyright headers in generated JNI filesNikita Nemkin1-6/+6
Restore newline escapes lost during EPL-2.0 conversion. Change-Id: If55a6e5a74e172fd10c641e4edbdcf590faf8e1f Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2018-08-20Bug 530393 - EPL 2.0 update for SWT for swt.tools plug-insLars Vogel41-129/+258
This updates files to EPL 2.0. Regex used for replacement: find . -type f ! -name "*.exsd" ! -name "org.eclipse.jdt.ui.prefs" -exec sed -i 's/Eclipse Public License v1.0/Eclipse Public License 2.0/g' {} + find . -type f ! -name "*.exsd" ! -name "org.eclipse.jdt.ui.prefs" -exec sed -i -E 's/([[:blank:]]*[^[:blank:]])*([[:blank:]]*)http:\/\/www.eclipse.org\/legal\/epl-v10.html/\1\2https:\/\/www.eclipse.org\/legal\/epl-2.0\/\ \1\ \1\2SPDX-License-Identifier: EPL-2.0/' {} + # Get rid of the All rights reserved find . -type f ! -name "*.exsd" ! -name "org.eclipse.jdt.ui.prefs" ! -name "pom.xml" -exec sed -i -E 's/([[:blank:]]*[^[:blank:]])*([[:blank:]]*)(All rights reserved. )/\1\n\1\2/' {} + Change-Id: Ia82f1301d4f811557057db226c1f04098f45f9de Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2018-05-16Bug 534783 – SWT tools isn't rebuilding natives after foreach patchLeo Ufimtsev19-77/+129
Revert "For each conversion in swt.tools." This reverts commit 9a92da14a27e579409c00ff3eefd197eac4209da. https://bugs.eclipse.org/bugs/show_bug.cgi?id=534783 Change-Id: I464b41bdc9bdd125b1f56b501e226fb89ceca310 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2018-04-27For each conversion in swt.tools.Alexander Kurtakov19-129/+77
Change-Id: I9b24de33ba07df5717bb32326392f24555d5c88d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-01-15Bug 529675 - [sonar] Resolve "Possible null pointer dereference"René Purrio2-0/+9
Change-Id: I4b178bf17231e26b678c86f543fc447b1ac3ceb1 Signed-off-by: René Purrio <rpurrio@itemis.de>
2018-01-07Bug 529494 - Convert to StringBuilderAlexander Kurtakov6-18/+18
Change-Id: Ic959ed6d7ae7aa50da85837105570b2b69ae66d3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-11-27Bug 525976 - Replace if/else cascades by switch statementsKarsten Thoms1-2/+8
- Added enum Selector that lists all used selectors Mixed hand-crafted & generated code - OS: - Use Selector literal values for selector constants initialization - Added a map for mapping Long selector value to their Selector literal - MacGenerator: - Extended generator to write selector literals to Selector.java - Changed generation of selector constants in OS.java - Regenerated code with MacGenerator - MacGeneratorView: Improved error message when target root folder is not available - JNIGenerator: Ignore CCE for enum types Change-Id: Ic62f9e8a36b7c8dd103a0efb04bfc242f4bf757a Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2017-11-20Bug 525436 - Some foreach conversionsAlexander Kurtakov1-1/+2
Fix wrong param types iteration. Change-Id: I84087c0cb84317ebeb791391067832e459a7e636 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-10-10Bug 525436 - Some foreach conversionsAlexander Kurtakov1-2/+1
In swt.tools. Change-Id: I8c1fd577db2bf0e82dc1f2d926c63d0da7d3de52 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-09-27Bug 525262 - Use foreach in swt.tools Alexander Kurtakov7-36/+17
Change-Id: If4ecc910b831382381c9a265b589febfb2544f15 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-09-26Bug 524932 - Stricter warnings for swt toolsAlexander Kurtakov6-33/+32
Enable more warnings and fix them. Change-Id: I2f201327e6cd9176f1447f69857d8e8afd753352 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-06-27Bug 518542: Remove XULRunner related code from SWT source repositoryAlexander Kurtakov1-3/+1
Remove mozilla generation from swt.tools so it no longer fails with NPE when Mozilla sources are removed. Change-Id: Idc704da81862662b85cced93a5c1319d0f236a9b Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-05-02Bug 515610 - [GTK] SWT generates incorrect fall-through for memmove()Martin Oberhuber1-4/+22
An incorrect fall-through in generated C code for memmove() led to producing code which could memmove() to NULL pointer destination or from a NULL pointer source. Even in case this was just dead code and could never execute, it led to an unnecessary inefficiency in the default case (an extra jmp instruction to jump over the dead code). This is resolved by a better generator, which generates an earlier jump to fail: thus avoiding the undesired fall-through. Patchset 4: (Leo) - Win32's OS.java doesn't have memmove, only MoveMemory, so Win32 not affected. - Adding Cocoa's resulting os.c of this patch. (I launched a child eclipse with this patch to have newest SWT tools, then set .classpath_cocoa -> .classpath and modified OS.java for cocoa) Change-Id: I9f9153ae3f41f4aea3a9f9439e92a892224b1475 Signed-off-by: Martin Oberhuber <martin.oberhuber@windriver.com> Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2016-09-26Bug 501877 - Remove cde bindingsAlexander Kurtakov1-1/+0
* Delete the binding. * Remove support for building it from build scripts. * Cleanup swt.tools to not care for cde binding * Simplify Program class to be GIO only. Change-Id: I7fb77788933f6535b2281f15d75413256b48d11e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2016-09-20Bug 501816 - Remove gnome bindings Alexander Kurtakov2-26/+0
Remove all references from build and tools files. Change-Id: I5726f0a31117aa458da357fbb3709ac6d1788588 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2016-09-08Bug 500363: Native auto generated files should mention that they areLeo Ufimtsev1-0/+7
auto generated When doing work with native files, it's not clear as to which files are auto generated and which files are written manually. Especially when you are just starting to work with native C code. I added a method to JNIGenerator.java that inserts a note to every generated file about the file being auto-generated. [Update Patchset 3] - The updated patchset updates contains auto-generated files for all platforms. - Fixed typo and added name of generator class. Change-Id: I7fdac972eb2cb829316d0e970601ed4c87e6008b Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500363 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2016-06-29Bug 497023 - Update swt tools to Java 8 Alexander Kurtakov2-450/+326
* Bump BREE and version. * Use lambdas. Change-Id: I349f3a554821f59d32b8d7a259508fefb04c3f80 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2016-04-02Bug 490861 - Replace new Integer() with Integer.valueOf() in rest ofLars Vogel1-5/+5
org.eclipse.swt repo This one is for tools Change-Id: I63f76c054ed09fb8c8c76fdad174f93788f8ccbd Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2016-04-01Bug 490864 - Run "Fix Copyrights" on swt.tools and test plug-ins Lars Vogel28-28/+28
This one is for org.eclipse.swt.tools Change-Id: I69cb8ff64e735e52fbde18e09397708d06ffd874 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2015-11-27Bug 476514 - Update swt.tools to Java 1.7Alexander Kurtakov1-13/+5
Remaining try-with-resources cases. Change-Id: I67ca20605b41c23e27bbdf7dd94568f624f076dd Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2015-11-26Bug 476514 - Update swt.tools to Java 1.7Alexander Kurtakov3-30/+11
Use try-with-resources. Change-Id: Ic69389dcf720aab32df58e97f585793bd4911fc8 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2015-11-23Bug 463924 - Hashtable -> HashMap, MapJacek Sieka3-8/+8
Convert all Hashtable usages to HashMap, Map Change-Id: Ia95db6ba3a82d6f4eaed6abef4c4381eb43d886c Signed-off-by: Jacek Sieka <arnetheduck@gmail.com>

Back to the top