Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-01-12Bug 570268 - Move bundles to Java 11 where neededAlexander Kurtakov1-5/+5
Move o.e.swt.tools. Some cleanups and clarifications in the code that were flagged after the switch. Change-Id: Iee9389455c475f7206296d13911efe784c868b62 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2021-01-11Bug 559394 - [Cocoa] Fix memmove flags generated by MacGeneratorNikita Nemkin1-6/+4
Remove unnecessary cast and critical flags, add missing no_in/no_out annotations. Fix OS_NATIVE_EXIT macro to prevent the label without statement error in C/C++. Change-Id: I559055dd26361f83df49d3313245d62898811af2 Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2020-05-11Use List.sort directly.Alexander Kurtakov2-7/+8
Instead of Collections.sort(List) Change-Id: I598da6be330e9ee001e78bca0f2d50e545f2e5e1 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
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 Hammer3-43/+33
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-3/+3
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-14Bug 547304 - [cleanup] Fix wrong space/tab indentationPaul Pazderski2-41/+41
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-10Bug 546696 - [Cocoa] Remove MacGenerator 32-bit supportNikita Nemkin1-431/+143
Part 1 of 32-bit removal patch set. Change MacGenerator to only read 64-bit types from .bridgesupport files and generate 64-bit Java code. (For compatibility with existing bridgesupport files, if 64-bit type is missing, then 32-bit type is used as a fallback.) Fix MacGenerator to be able to consume .bridgesupport files generated from 10.14 SDK. Change-Id: I3032956fabc72ae41927987a8e0d4f92918bfe66 Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2019-05-10Bug 546694 - [Cocoa] Re-enable struct generation in MacGeneratorNikita Nemkin1-44/+84
Struct generation was disabled in 6ddf285abe, likely to allow for customization (for example, flattening of NSRect). Partially re-enable struct generation with the help of two new bridgesupport tags (on <struct>): swt_gen_memmove - generate OS.memmove and OS.***_sizeof for the struct. This is independent from swt_gen and allows custom struct definition without losing automatically generated helper functions. swt_gen_tostring - generate simple toString() implementation. This matches previously handwritten toString() code. With this patch, all Cocoa structures except NSRect become auto-genrated. Since memmove generation is now configurable, I've removed unused memmoves. Change-Id: Ia2cd3fcb3bc7cece5668d6c7c32ca1f6d22128ef Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
2019-04-24Bug 546144 - [JNI] Revert some recent jnigen changesNikita Nemkin1-3/+2
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-2/+3
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>
2018-08-20Bug 530393 - EPL 2.0 update for SWT for swt.tools plug-insLars Vogel3-9/+18
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-07-30Bug 514191 - [Cocoa] [10.11] Bridge support files should be updated to ↵Gunnar Wagenknecht1-0/+3
latest macOS supported version 'struct FSRef*' should be 'FSRef*' Change-Id: I8d8d23c1d805a6feac325300abb0249dc39013e5 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2018-07-28Bug 514191 - [Cocoa] [10.11] Bridge support files should be updated to ↵Gunnar Wagenknecht1-0/+4
latest macOS supported version Catch-all replace for common generic types Change-Id: I76df6b0cd570debb9bfb165c0f46b93f1464da80 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2018-07-28Bug 514191 - [Cocoa] [10.11] Bridge support files should be updated to ↵Gunnar Wagenknecht1-0/+3
latest macOS supported version Remove __kindof keyword. This is also a new objective c feature that should be ignored for now. It's like a super/extends in Java generics but we need more details in order to support it. Change-Id: Ife60c4ffc83f39acdb7a8eceb305b2a0d6307d34 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2018-07-28Bug 514191 - Bridge support files should be updated to latest macOSLakshmi Shanmugam1-0/+3
supported version (10.11) strip greater-than sign Change-Id: I094a2ff75645bfad5d8d1633a8360ee496c60531
2018-05-16Bug 534783 – SWT tools isn't rebuilding natives after foreach patchLeo Ufimtsev2-34/+40
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 Kurtakov2-40/+34
Change-Id: I9b24de33ba07df5717bb32326392f24555d5c88d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-01-15Bug 529675 - [sonar] Resolve "Possible null pointer dereference"René Purrio1-0/+3
Change-Id: I4b178bf17231e26b678c86f543fc447b1ac3ceb1 Signed-off-by: René Purrio <rpurrio@itemis.de>
2018-01-07Bug 529494 - Convert to StringBuilderAlexander Kurtakov2-8/+8
Change-Id: Ic959ed6d7ae7aa50da85837105570b2b69ae66d3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-11-27Bug 525976 - Replace if/else cascades by switch statementsKarsten Thoms2-8/+113
- 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-10-10Bug 525436 - Some foreach conversionsAlexander Kurtakov1-13/+10
In swt.tools. Change-Id: I8c1fd577db2bf0e82dc1f2d926c63d0da7d3de52 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-09-27Bug 525262 - Use foreach in swt.tools Alexander Kurtakov1-24/+12
Change-Id: If4ecc910b831382381c9a265b589febfb2544f15 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-09-26Bug 524932 - Stricter warnings for swt toolsAlexander Kurtakov2-27/+24
Enable more warnings and fix them. Change-Id: I2f201327e6cd9176f1447f69857d8e8afd753352 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-09-15Bug 522210 - Resolved inefficient use of keySet iteratorI20170915-1030Karsten Thoms1-11/+10
Change-Id: I79571322f6af34ebab6ef25d6ee0df7fe5a1d5b9 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2017-03-24Bug 502090 - Strip _Nullable and _Nonnull informationGunnar Wagenknecht1-15/+32
The bridgesupport files now contain null annotation information. We might be able to convert them into JDT null annotations but for now they should be removed and not appear in the generated output. Change-Id: I05b5caecd2ed02e5ac8d82ce48517f30b4e2c562 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2017-03-23Bug 502090 - Add an error for invalid enumsGunnar Wagenknecht1-0/+2
This allows better debugging of enums no longer available. Change-Id: I18adf33633a8464d27b0a478201a73aec9acbd20 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2017-03-15Bug 502090 - Add debug info for missing typeGunnar Wagenknecht1-1/+37
The cause is very likely something changed in the underlying frameworks. In this specific example, methods were removed from a class and the class was changed to inherit the methods from a super class. Change-Id: I94114d61fb40b1fceabd863d769b5eb2c14a0459 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2017-03-15Bug 502090 - Throw meaningful error with further diagnostics when nullGunnar Wagenknecht1-30/+31
A null-pointer indicates that something is off with the bridgesupport files. This exception helps identifying the problem. Change-Id: I9aac66119322cd97d2029b4498a8f44f8f413b53 Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2017-03-15Bug 502090 - Handle "instanceof" return typesGunnar Wagenknecht1-0/+7
Change-Id: I1f278847b0295f454ec05113c12cc1bb8775073d Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2016-06-29Bug 497023 - Update swt tools to Java 8 Alexander Kurtakov3-160/+104
* Bump BREE and version. * Use lambdas. Change-Id: I349f3a554821f59d32b8d7a259508fefb04c3f80 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2016-04-01Bug 490864 - Run "Fix Copyrights" on swt.tools and test plug-ins Lars Vogel3-3/+3
This one is for org.eclipse.swt.tools Change-Id: I69cb8ff64e735e52fbde18e09397708d06ffd874 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2015-11-26Bug 476514 - Update swt.tools to Java 1.7Alexander Kurtakov1-7/+2
Use try-with-resources. Change-Id: Ic69389dcf720aab32df58e97f585793bd4911fc8 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2015-09-03Bug 476514 - Update swt.tools to Java 1.7Alexander Kurtakov3-21/+21
Bump BREE and remove redundant type arguments. Change-Id: I92148ce12a7d2581290d87fc92d05263ffcff39c Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2015-02-05Bug 458863 - Replace Vector with ArrayList where appropriate Jacek Sieka1-1/+1
- examples & tools Change-Id: I861981fc3a497c1143adf83f358b1dc61864871f Signed-off-by: Jacek Sieka <arnetheduck@gmail.com>
2015-01-16Bug 457659 - Move swt.tools to Java 1.6Alexander Kurtakov3-21/+25
Bump BREE, fix new warnings, enable save actions for them. Change-Id: I8f7f59d6f2e2a3c10dd45465d09f2ac8f9c9a86a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2013-11-27swt.tools: Suppress warnings.Alexander Kurtakov2-2/+2
Warnings for using rawtypes and deprecated fields and methods are suppressed where not possible to fix. Change-Id: I003e1c66aa1c05149457f0d2aabec137617ffdd8 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2013-11-26swt.tools - last round of bringing source to java 5 lang features.Alexander Kurtakov3-111/+110
Change-Id: I96503a9fe6f42e9ff4789db8a10bf9b81bdce97c Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2013-11-19Remove unnecessary casts.Alexander Kurtakov1-2/+2
Change-Id: I81e44f8b9df39ac1dd63868e5187e3752e191763 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2012-09-27Bug 377107 - no 32bits vm for JDK7 - fix Mac generator to generate 64 bit codeSilenio Quarti1-36/+91
2012-06-27remove dependency on system bridge filesSilenio Quarti1-3/+17
2012-06-25turn structs offsteve1-1/+1
2012-06-25turn off structs gen and add final to sizeofsteve1-4/+7
2012-06-25adding support to generate structsSilenio Quarti2-14/+187
2012-04-19fix arg name when param name and param index is not availableSilenio Quarti2-15/+25
2012-03-05add way to configure library output dirrectory and classes directory ↵Silenio Quarti1-6/+27
independently
2012-03-02generating PI on 10.7Silenio Quarti1-13/+43
2011-08-24Bug 349812 - Rotate gesture not working on 64bit buildSilenio Quarti1-4/+15
2010-03-16sorting xml nodes to avoid changes between OS versionsFelipe Heidrich2-1/+201
2010-03-16Remove dependency on argument names. Arg names can change in different ↵Felipe Heidrich2-6/+23
versions of the OS. Use arg index instead.

Back to the top