diff --git a/changelog.preluna b/changelog.pre-mars similarity index 79% rename from changelog.preluna rename to changelog.pre-mars index f4e1f70..7ec3566 100644 --- a/changelog.preluna +++ b/changelog.pre-mars @@ -1,3 +1,250 @@ +* Fri Jan 23 2015 Michael Simacek - 1:4.4.1-17 +- Rebuild against new jetty + +* Mon Jan 19 2015 Mat Booth - 1:4.4.1-16 +- Rebuild for new eclipse-ecf/httpcomponents +- Add patch to explicitly require hamcrest bundle from tests + +* Mon Jan 12 2015 Alexander Kurtakov 1:4.4.1-15 +- Require newer batik with fixed obsoletes. + +* Wed Dec 10 2014 Alexander Kurtakov 1:4.4.1-14 +- Rebuild for new eclipse-ecf. + +* Tue Dec 9 2014 Alexander Kurtakov 1:4.4.1-13 +- Move to slimmer batik-css BR/R. + +* Sat Nov 29 2014 Roland Grunberg - 1:4.4.1-12 +- Make changes necessary for Tycho 0.22.0. + +* Thu Nov 27 2014 Mat Booth - 1:4.4.1-11 +- Update eclipse-build snapshot +- Rebuild for ECF symlink changes + +* Wed Nov 19 2014 Mat Booth - 1:4.4.1-10 +- Update eclipse-build snapshot +- Rebuild for EMF and icu4j symlink changes +- Don't own dirs owned by eclipse-filesystem + +* Tue Nov 18 2014 Mat Booth - 1:4.4.1-9 +- Update dep on icu4j/ECF + +* Mon Nov 17 2014 Mat Booth - 1:4.4.1-8 +- Increase max heap size to 1024m + - But don't do this as a patch, it doesn't work +- Fix build ID to always be lexigraphically higher that upstream + +* Wed Nov 12 2014 Mat Booth - 1:4.4.1-7 +- Backport patch to make workspace selection dialog visible in the task manager +- Tidy up SWT symlinks + +* Wed Oct 29 2014 Roland Grunberg - 1:4.4.1-6 +- Change external plugin references to requirements. +- List external plugin references in the top-level category. + +* Fri Oct 24 2014 Alexander Kurtakov 1:4.4.1-5 +- Rebuild for latest lucene. + +* Mon Oct 20 2014 Roland Grunberg - 1:4.4.1-4 +- Support loading symlinked bundles when location changes. + +* Wed Oct 01 2014 Mat Booth - 1:4.4.1-3 +- Require latest EMF + +* Wed Oct 01 2014 Mat Booth - 1:4.4.1-2 +- Fix s390 launcher build + +* Fri Sep 26 2014 Mat Booth - 1:4.4.1-1 +- Update to Luna SR1 +- Drop upstreamed patch and fix permissions on appdata files + +* Tue Sep 16 2014 Alexander Kurtakov 1:4.4.0-19 +- Fix for autocomplete selection color. +- Rebuild for latest jetty. + +* Tue Sep 09 2014 Mat Booth - 1:4.4.0-18 +- Symlink more equinox and some core jars into javadir +- Enables tycho to unbundle it's eclipse platform jars +- Update dep on lucene + +* Sat Sep 6 2014 Alexander Kurtakov 1:4.4.0-17 +- Rebuild for lucene update. + +* Thu Aug 28 2014 Roland Grunberg - 1:4.4.0-16 +- Non-bootstrap build. + +* Wed Aug 27 2014 Roland Grunberg - 1:4.4.0-15 +- Build Eclipse bootstrapped. + +* Tue Aug 26 2014 Sami Wagiaalla - 1:4.4.0-15 +- Build agianst webkitgtk4. + +* Tue Aug 19 2014 Mat Booth - 1:4.4.0-14 +- Rebuild against new ECF + +* Mon Aug 18 2014 Mat Booth - 1:4.4.0-13 +- Drop custom buildId, to keep it lexographically greater than upstream's + +* Sat Aug 16 2014 Fedora Release Engineering - 1:4.4.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Jul 28 2014 Sami Wagiaalla 1:4.4.0-11 +- Add patch for webkit2 support. + +* Mon Jul 28 2014 Roland Grunberg - 1:4.4.0-10 +- Provide org.eclipse.tycho:org.eclipse.osgi.compatibility.state. + +* Mon Jul 21 2014 Alexander Kurtakov 1:4.4.0-9 +- Rebuild for new ecf and asm. + +* Wed Jul 16 2014 Mat Booth - 1:4.4.0-8 +- Update eclipse-build snapshot +- Tighten up deps on asm + +* Tue Jul 15 2014 Mat Booth - 1:4.4.0-7 +- Add appstream addon metadata for JDT and PDE plugins +- Only use GTK3 by default on F22 or newer, rhbz1118317 + +* Tue Jul 15 2014 Mat Booth - 1:4.4.0-6 +- Backport fix for eclipse bz438992 +- Only assemble products for current running target environment +- Tidy up some unnecessary SCL bits + +* Tue Jul 08 2014 Mat Booth - 1:4.4.0-5 +- Make GTK3 the default SWT implementation in eclipse.ini + +* Wed Jul 02 2014 Mat Booth - 1:4.4.0-4 +- Package the equinox.p2.discovery feature, obsolete the separate package +- Update e-b snapshot +- BR/R: gogo-command >= 0.14 +- Symlink mockito to system jar in testing package + +* Fri Jun 27 2014 Roland Grunberg - 1:4.4.0-3 +- Fix sed delimeter when dealing with paths. + +* Thu Jun 26 2014 Roland Grunberg - 1:4.4.0-2 +- Update eclipse-build with improvements to bundle testing. + +* Wed Jun 25 2014 Mat Booth - 1:4.4.0-1 +- Update to final Luna release +- Rebuild against newer dependencies + +* Tue Jun 24 2014 Alexander Kurtakov 1:4.4.0-0.31.git201406042000 +- Non bootstrap build. + +* Tue Jun 24 2014 Alexander Kurtakov 1:4.4.0-0.30.git201406042000 +- Bootstrap build for aarch64. + +* Fri Jun 13 2014 Michael Simacek - 1:4.4.0-0.29.git201406042000 +- Rebuild against new jetty + +* Tue Jun 10 2014 Alexander Kurtakov 1:4.4.0-0.28.git201406042000 +- Drop jdt mvn depmaps. + +* Thu Jun 05 2014 Mat Booth - 1:4.4.0-0.27.git201406042000 +- Remove pre-built launcher binaries +- Remove last uses of tomcat + +* Tue Jun 03 2014 Mat Booth - 1:4.4.0-0.26.git201406022000 +- Update to latest I-build + +* Fri May 30 2014 Michael Simacek - 1:4.4.0-0.25.git201405252000 +- Rebuild against new jetty + +* Tue May 27 2014 Alexander Kurtakov 1:4.4.0-0.24.git201405252000 +- Pass eclipse.javadoc as param to mvn call to fix javadoc generation. + +* Tue May 27 2014 Alexander Kurtakov 1:4.4.0-0.23.git201405252000 +- Update to latest I-build. + +* Fri May 23 2014 Alexander Kurtakov 1:4.4.0-0.22.git201405112000 +- Rebuild for new lucene/junit metadata. + +* Wed May 21 2014 Alexander Kurtakov 1:4.4.0-0.21.git201405112000 +- Drop tomcat BR/Rs. + +* Wed May 21 2014 Alexander Kurtakov 1:4.4.0-0.20.git201405112000 +- Drop cglib dep. +- Apply jetty 9 patch unconditionally. + +* Mon May 19 2014 Mat Booth - 1:4.4.0-0.19.git201405112000 +- Drop unnecessary BRs +- Update e-b snapshot for new felix-gogo-* jar locations + +* Mon May 12 2014 Alexander Kurtakov 1:4.4.0-0.18.git201405112000 +- Update to latest I-build. +- Move pre-luna changelog to separate file. + +* Wed May 07 2014 Mat Booth - 1:4.4.0-0.17.git201405062000 +- Update to latest I-build of Luna 4.4.0 +- New e-b snapshot for updated gnome appdata +- Rebuilt for new dependency versions. + +* Thu May 01 2014 Mat Booth - 1:4.4.0-0.16.git201405010200 +- Update to latest I-build of Luna 4.4.0 + +* Mon Apr 28 2014 Mat Booth - 1:4.4.0-0.15.git201404280800 +- Don't mirror emf and ecf into the final p2 repository + +* Mon Apr 28 2014 Mat Booth - 1:4.4.0-0.14.git201404280800 +- Update to latest I-build of Luna 4.4.0 + +* Thu Apr 24 2014 Mat Booth - 1:4.4.0-0.13.git201404220800 +- Drop the use of custom jdtpde repository build from e-b +- Don't use a custom product ID +- Add BR on mockito +- Fix pixmaps directory ownership + +* Tue Apr 22 2014 Mat Booth - 1:4.4.0-0.12.git201404220800 +- Update to latest I-build of Luna 4.4.0 +- Enable Java 8 specific bundles +- Rebuild for updated lucene dependency + +* Tue Apr 15 2014 Mat Booth - 1:4.4.0-0.11.git201404150800 +- Update to latest I-build of Luna 4.4.0 +- Fix missing copy resource step on ppc64le +- Don't build bundles that are only applicable on non-linux platforms + +* Thu Apr 10 2014 Mat Booth - 1:4.4.0-0.10.git201404081645 +- Drop unnecessary BR on GConf2-devel +- Drop unneeded patch: fix-swt-build-in-rawhide + +* Thu Apr 10 2014 Mat Booth - 1:4.4.0-0.9.git201404081645 +- Make globbing work on arches that don't have platform specific fragments. + +* Tue Apr 08 2014 Mat Booth - 1:4.4.0-0.8.git201404081645 +- Update to latest I-build of Luna 4.4.0 +- Don't unnecessarily create platform specific fragments for o.e.core.net and + o.e.core.filesystem. +- Accomodate for ppc64le architecture. +- Drop upstreamed patch: objectweb-asm + +* Thu Apr 03 2014 Mat Booth - 1:4.4.0-0.7.git201404011500 +- Fix symlinking junit when it is a directory. + +* Thu Apr 03 2014 Mat Booth - 1:4.4.0-0.6.git201404011500 +- Non-bootstrap build. + +* Wed Apr 02 2014 Mat Booth - 1:4.4.0-0.5.git201404011500 +- Add patch for org.ojectweb.asm -> org.ojectweb.asm.all + +* Wed Apr 02 2014 Mat Booth - 1:4.4.0-0.4.git201404011500 +- Move secondary-arch fragment generation into e-b. + +* Wed Apr 02 2014 Mat Booth - 1:4.4.0-0.3.git201404011500 +- Update eclipse-build snapshot + +* Tue Apr 01 2014 Mat Booth - 1:4.4.0-0.2.git201404011500 +- Update to latest I-build of Luna 4.4.0 +- Require objectweb-asm >= 5.0.1 + +* Mon Mar 24 2014 Mat Booth - 1:4.4.0-0.1.M6 +- Update to M6 pre-release of Luna 4.4.0 +- Bootstrap build +- Drop upstreamed patches: do-not-run-as-root, bug-408505, + bug-404448, osgi-unpack-sources +- Add patch to use mockito-core 1.9 + * Sat Mar 22 2014 Mat Booth - 1:4.3.2-5 - Rebuild for new version of ICU. diff --git a/disable-non-linux.patch b/disable-non-linux.patch index a7a6580..87331a2 100644 --- a/disable-non-linux.patch +++ b/disable-non-linux.patch @@ -114,7 +114,7 @@ id="org.eclipse.core.filebuffers" download-size="0" install-size="0" -@@ -365,35 +357,6 @@ +@@ -351,35 +343,6 @@ unpack="false"/> ---- - .../org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 20 ++++++++++---------- - .../Eclipse SWT PI/gtk/library/os_stats.c | 2 +- - .../Eclipse SWT PI/gtk/library/os_stats.h | 2 +- - .../gtk/org/eclipse/swt/internal/gtk/OS.java | 10 +++++++--- - .../gtk/org/eclipse/swt/widgets/Text.java | 12 ++++++------ - 5 files changed, 25 insertions(+), 21 deletions(-) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -index 7e937f0..c0dff7f 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -@@ -16167,16 +16167,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1text_1view_1new) - } - #endif - --#ifndef NO__1gtk_1text_1view_1scroll_1mark_1onscreen --JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1scroll_1mark_1onscreen) -- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) --{ -- OS_NATIVE_ENTER(env, that, _1gtk_1text_1view_1scroll_1mark_1onscreen_FUNC); -- gtk_text_view_scroll_mark_onscreen((GtkTextView *)arg0, (GtkTextMark *)arg1); -- OS_NATIVE_EXIT(env, that, _1gtk_1text_1view_1scroll_1mark_1onscreen_FUNC); --} --#endif -- - #ifndef NO__1gtk_1text_1view_1scroll_1to_1iter - JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1text_1view_1scroll_1to_1iter) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jdouble arg2, jboolean arg3, jdouble arg4, jdouble arg5) -@@ -16193,6 +16183,16 @@ fail: - } - #endif - -+#ifndef NO__1gtk_1text_1view_1scroll_1to_1mark -+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1scroll_1to_1mark) -+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jboolean arg3, jdouble arg4, jdouble arg5) -+{ -+ OS_NATIVE_ENTER(env, that, _1gtk_1text_1view_1scroll_1to_1mark_FUNC); -+ gtk_text_view_scroll_to_mark((GtkTextView *)arg0, (GtkTextMark *)arg1, (gdouble)arg2, (gboolean)arg3, (gdouble)arg4, (gdouble)arg5); -+ OS_NATIVE_EXIT(env, that, _1gtk_1text_1view_1scroll_1to_1mark_FUNC); -+} -+#endif -+ - #ifndef NO__1gtk_1text_1view_1set_1editable - JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1set_1editable) - (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c -index 82775bd..bd9d7b5 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c -@@ -1183,8 +1183,8 @@ char * OS_nativeFunctionNames[] = { - "_1gtk_1text_1view_1get_1visible_1rect", - "_1gtk_1text_1view_1get_1window", - "_1gtk_1text_1view_1new", -- "_1gtk_1text_1view_1scroll_1mark_1onscreen", - "_1gtk_1text_1view_1scroll_1to_1iter", -+ "_1gtk_1text_1view_1scroll_1to_1mark", - "_1gtk_1text_1view_1set_1editable", - "_1gtk_1text_1view_1set_1justification", - "_1gtk_1text_1view_1set_1tabs", -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h -index a1d68ed..016b472 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h -@@ -1193,8 +1193,8 @@ typedef enum { - _1gtk_1text_1view_1get_1visible_1rect_FUNC, - _1gtk_1text_1view_1get_1window_FUNC, - _1gtk_1text_1view_1new_FUNC, -- _1gtk_1text_1view_1scroll_1mark_1onscreen_FUNC, - _1gtk_1text_1view_1scroll_1to_1iter_FUNC, -+ _1gtk_1text_1view_1scroll_1to_1mark_FUNC, - _1gtk_1text_1view_1set_1editable_FUNC, - _1gtk_1text_1view_1set_1justification_FUNC, - _1gtk_1text_1view_1set_1tabs_FUNC, -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -index cf8cda6..0ee6dda 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -@@ -12528,12 +12528,16 @@ public static final long /*int*/ gtk_text_view_new() { - /** - * @param text_view cast=(GtkTextView *) - * @param mark cast=(GtkTextMark *) -+ * @param within_margin cast=(gdouble) -+ * @param use_align cast=(gboolean) -+ * @param xalign cast=(gdouble) -+ * @param yalign cast=(gdouble) - */ --public static final native void _gtk_text_view_scroll_mark_onscreen(long /*int*/ text_view, long /*int*/ mark); --public static final void gtk_text_view_scroll_mark_onscreen(long /*int*/ text_view, long /*int*/ mark) { -+public static final native void _gtk_text_view_scroll_to_mark(long /*int*/ text_view, long /*int*/ mark, double within_margin, boolean use_align, double xalign, double yalign); -+public static final void gtk_text_view_scroll_to_mark(long /*int*/ text_view, long /*int*/ mark, double within_margin, boolean use_align, double xalign, double yalign) { - lock.lock(); - try { -- _gtk_text_view_scroll_mark_onscreen(text_view, mark); -+ _gtk_text_view_scroll_to_mark(text_view, mark, within_margin, use_align, xalign, yalign); - } finally { - lock.unlock(); - } -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -index 9aa3a52..2865cd5 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -@@ -414,7 +414,7 @@ public void append (String string) { - OS.gtk_text_buffer_insert (bufferHandle, position, buffer, buffer.length); - OS.gtk_text_buffer_place_cursor (bufferHandle, position); - long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); -- OS.gtk_text_view_scroll_mark_onscreen (handle, mark); -+ OS.gtk_text_view_scroll_to_mark (handle, mark, 0, true, 0, 0); - } - applySegments (); - } -@@ -1947,7 +1947,7 @@ public void insert (String string) { - OS.gtk_text_buffer_insert (bufferHandle, start, buffer, buffer.length); - OS.gtk_text_buffer_place_cursor (bufferHandle, start); - long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); -- OS.gtk_text_view_scroll_mark_onscreen (handle, mark); -+ OS.gtk_text_view_scroll_to_mark (handle, mark, 0, true, 0, 0); - } - applySegments (); - } -@@ -2340,7 +2340,7 @@ public void setSelection (int start) { - OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, startIter, start); - OS.gtk_text_buffer_place_cursor (bufferHandle, startIter); - long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); -- OS.gtk_text_view_scroll_mark_onscreen (handle, mark); -+ OS.gtk_text_view_scroll_to_mark (handle, mark, 0, true, 0, 0); - } - } - -@@ -2563,7 +2563,7 @@ void setText (char [] text) { - OS.gtk_text_buffer_get_iter_at_offset (bufferHandle, position, 0); - OS.gtk_text_buffer_place_cursor (bufferHandle, position); - long /*int*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); -- OS.gtk_text_view_scroll_mark_onscreen (handle, mark); -+ OS.gtk_text_view_scroll_to_mark (handle, mark, 0, true, 0, 0); - Arrays.fill (buffer, (byte) 0); - } - sendEvent (SWT.Modify); -@@ -2644,9 +2644,9 @@ public void showSelection () { - checkWidget (); - if ((style & SWT.SINGLE) != 0) return; - long /*int*/ mark = OS.gtk_text_buffer_get_selection_bound (bufferHandle); -- OS.gtk_text_view_scroll_mark_onscreen (handle, mark); -+ OS.gtk_text_view_scroll_to_mark (handle, mark, 0, true, 0, 0); - mark = OS.gtk_text_buffer_get_insert (bufferHandle); -- OS.gtk_text_view_scroll_mark_onscreen (handle, mark); -+ OS.gtk_text_view_scroll_to_mark (handle, mark, 0, true, 0, 0); - } - - int translateOffset (int offset) { --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-466500.patch b/eclipse-bug-466500.patch deleted file mode 100644 index eb126a7..0000000 --- a/eclipse-bug-466500.patch +++ /dev/null @@ -1,47 +0,0 @@ -From ddcfd1f3efd70591480e6c053946618ef6696104 Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Wed, 14 Oct 2015 13:41:06 -0400 -Subject: Bug 466500: [GTK3] Trying to resize quick outline or quick type - hierarchy closes the popup - -In PopupDialog, Shells with no children are closed on deactivation. On -Linux-Gtk, this causes popups like the "Quick Outline" or "Quick -Type Hierarchy" to close prematurely when opening the system menu, -re-sizing, or moving the window with the mouse. - -It is for this reason that we need to exclude the call to asyncClose() -from running on Gtk. This also fixes bug 113577. - -Tested on Gtk3.16.6, and Gtk2.24. - -Change-Id: I4111ad961e2b4e57c90939e7cb0e982b7bf3b894 -Signed-off-by: Eric Williams --- - .../src/org/eclipse/jface/dialogs/PopupDialog.java | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/eclipse.platform.ui/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java b/eclipse.platform.ui/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java -index 2068cc4..0d361af 100644 ---- a/eclipse.platform.ui/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java -+++ b/eclipse.platform.ui/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java -@@ -588,13 +588,17 @@ - /* - * Close if we are deactivating and have no child shells. If we - * have child shells, we are deactivating due to their opening. -- * On X, we receive this when a menu child (such as the system -- * menu) of the shell opens, but I have not found a way to -- * distinguish that case here. Hence bug #113577 still exists. -+ * -+ * Feature in GTK: this causes the Quick Outline/Type Hierarchy -+ * Shell to close on re-size/movement on Gtk3. For this reason, -+ * the asyncClose() call is disabled in GTK. See Eclipse Bugs -+ * 466500 and 113577 for more information. - */ - if (listenToDeactivate && event.widget == getShell() - && getShell().getShells().length == 0) { -- asyncClose(); -+ if (!Util.isGtk()) { -+ asyncClose(); -+ } - } else { - /* - * We typically ignore deactivates to work around diff --git a/eclipse-bug-477487.patch b/eclipse-bug-477487.patch deleted file mode 100644 index ea64851..0000000 --- a/eclipse-bug-477487.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git a/eclipse.platform.ui/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBVisibleContrastColorFactory.java b/eclipse.platform.ui/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBVisibleContrastColorFactory.java -new file mode 100644 -index 0000000..67b33c7 ---- /dev/null -+++ b/eclipse.platform.ui/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/RGBVisibleContrastColorFactory.java -@@ -0,0 +1,106 @@ -+/******************************************************************************* -+ * Copyright (c) 2004, 2011 IBM Corporation and others. -+ * All rights reserved. This program and the accompanying materials -+ * are made available under the terms of the Eclipse Public License v1.0 -+ * which accompanies this distribution, and is available at -+ * http://www.eclipse.org/legal/epl-v10.html -+ * -+ * Contributors: -+ * IBM Corporation - initial API and implementation -+ *******************************************************************************/ -+package org.eclipse.ui.internal.themes; -+ -+import java.util.Hashtable; -+import org.eclipse.core.runtime.CoreException; -+import org.eclipse.core.runtime.IConfigurationElement; -+import org.eclipse.core.runtime.IExecutableExtension; -+import org.eclipse.swt.graphics.RGB; -+import org.eclipse.ui.themes.ColorUtil; -+import org.eclipse.ui.themes.IColorFactory; -+ -+/** -+ * A IColorFactory that may be used to select a color with a higher -+ * contrast. The input colors are specified as per method number two in -+ * {@link org.eclipse.core.runtime.IExecutableExtension}. -+ *

-+ * Example usage: -+ * -+ *

-+ * <colorDefinition
-+ *     label="Declaration view background"
-+ *     id="org.eclipse.jdt.ui.DeclarationView.backgroundColor">
-+ *     <colorFactory
-+ *             plugin="org.eclipse.ui"
-+ *             class="org.eclipse.ui.internal.themes.RGBContrastFactory">
-+ *         <parameter name="foreground" value="0,0,0" />
-+ *         <parameter name="background" value="COLOR_INFO_BACKGROUND" />
-+ *         <parameter name="alternativeBackground" value="COLOR_LIST_BACKGROUND" />
-+ *     </colorFactory>
-+ * </colorDefinition>
-+ * 
-+ * -+ *

-+ * Returns background if foreground is visibly distinct from -+ * background. Otherwise, returns alternativeBackground if -+ * that color has more difference in brightness to the foreground. If both -+ * colors are bad, returns background. The color values may be -+ * specified as RGB triples or as SWT constants. -+ * -+ * @see org.eclipse.swt.SWT -+ * @since 3.107.100 -+ */ -+// This class is used by org.eclipse.jdt.ui/plugin.xml to fix -+// https://bugs.eclipse.org/477487 -+public class RGBVisibleContrastColorFactory implements IColorFactory, IExecutableExtension { -+ private String fg, bg, altBg; -+ -+ @Override -+ public RGB createColor() { -+ RGB cfg, cbg, cbgAlt; -+ -+ if (fg != null) { -+ cfg = ColorUtil.getColorValue(fg); -+ } else { -+ cfg = new RGB(0, 0, 0); -+ } -+ if (bg != null) { -+ cbg = ColorUtil.getColorValue(bg); -+ } else { -+ cbg = new RGB(255, 255, 255); -+ } -+ if (altBg != null) { -+ cbgAlt = ColorUtil.getColorValue(altBg); -+ } else { -+ cbgAlt = new RGB(255, 255, 255); -+ } -+ -+ float bfg = cfg.getHSB()[2]; -+ float bbg = cbg.getHSB()[2]; -+ float bbgAlt = cbgAlt.getHSB()[2]; -+ -+ if (Math.abs(bbg - bfg) < 0.5f && Math.abs(bbgAlt - bfg) > Math.abs(bbg - bfg)) { -+ return cbgAlt; -+ } -+ return cbg; -+ } -+ -+ /** -+ * This executable extension requires parameters to be explicitly declared -+ * via the second method described in the IExecutableExtension -+ * documentation. This class expects that there will be three parameters, -+ * foreground, background and -+ * alternativeBackground. These values may either be RGB -+ * triples or SWT constants. -+ */ -+ @Override -+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) -+ throws CoreException { -+ if (data instanceof Hashtable) { -+ @SuppressWarnings("unchecked") -+ Hashtable table = (Hashtable) data; -+ fg = table.get("foreground"); //$NON-NLS-1$ -+ bg = table.get("background"); //$NON-NLS-1$ -+ altBg = table.get("alternativeBackground"); //$NON-NLS-1$ -+ } -+ } -+} -diff --git a/eclipse.jdt.ui/org.eclipse.jdt.ui/plugin.xml b/org.eclipse.jdt.ui/plugin.xml -index e266d1a..f4b51ed 100644 ---- a/eclipse.jdt.ui/org.eclipse.jdt.ui/plugin.xml -+++ b/eclipse.jdt.ui/org.eclipse.jdt.ui/plugin.xml -@@ -1065,8 +1065,23 @@ - -+ -+ -+ -+ -+ -+ -+ -+ - - %DeclarationViewBackgroundColor.description - --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-478962.patch b/eclipse-bug-478962.patch deleted file mode 100644 index 6b4ce02..0000000 --- a/eclipse-bug-478962.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 87d512619f0b0b05332e4c83f651f29bfa50c5e9 Mon Sep 17 00:00:00 2001 -From: Snjezana Peco -Date: Tue, 24 Nov 2015 13:46:51 +0100 -Subject: Bug 478962 - [GTK3] Eclipse Mars SR1 consumes 60% CPU while idling - -The -https://git.gnome.org/browse/gtk+/commit/?id=fe51ac273c8045279a222c22a52d297d5ede4169 -commit changes the state of a node instead of copying the style info. -When getting some properties (color, background color, border, padding), -SWT changes the state of the node 0 (OS.GTK_STATE_FLAG_NORMAL) which -sometimes causes a widget to continously repaint. -For example: -SWT uses the following method to get the background color: - -OS.gtk_style_context_get_background_color (context, -OS.GTK_STATE_FLAG_NORMAL, rgba); - -This method changes the state of a node to 0 (OS.GTK_STATE_FLAG_NORMAL). -CTabFolder calls the method from inside the paint listener which causes an -infinite painting loop. - -This commit fixes the issue by using the widget's current style state -instead of OS.GTK_STATE_FLAG_NORMAL. - -Change-Id: I4dd27e3f6c5895a115fd76788ca2b2322aad6c4d -Signed-off-by: Snjezana Peco ---- - bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 8 ++++---- - .../gtk/org/eclipse/swt/internal/gtk/OS.java | 4 ++-- - .../gtk/org/eclipse/swt/widgets/Control.java | 17 +++++++++++------ - .../gtk/org/eclipse/swt/widgets/DateTime.java | 8 +++++--- - .../gtk/org/eclipse/swt/widgets/Spinner.java | 5 +++-- - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java | 3 ++- - 6 files changed, 27 insertions(+), 18 deletions(-) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -index c0dff7f..52ade78 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -@@ -18341,18 +18341,18 @@ fail: - #endif - - #ifndef NO__1gtk_1widget_1get_1state_1flags --JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1state_1flags) -+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1state_1flags) - (JNIEnv *env, jclass that, jintLong arg0) - { -- jintLong rc = 0; -+ jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1state_1flags_FUNC); - /* -- rc = (jintLong)gtk_widget_get_state_flags((GtkWidget *)arg0); -+ rc = (jint)gtk_widget_get_state_flags((GtkWidget *)arg0); - */ - { - OS_LOAD_FUNCTION(fp, gtk_widget_get_state_flags) - if (fp) { -- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0); -+ rc = (jint)((jintLong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1state_1flags_FUNC); -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -index 0ee6dda..a7fb6fe 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -@@ -11855,8 +11855,8 @@ public static final void gtk_style_context_restore(long /*int*/ context) { - /** @method flags=dynamic - * @param self cast=(GtkWidget *) - * */ --public static final native long /*int*/ _gtk_widget_get_state_flags(long /*int*/ self); --public static final long /*int*/ gtk_widget_get_state_flags(long /*int*/ self) { -+public static final native int _gtk_widget_get_state_flags(long /*int*/ self); -+public static final int gtk_widget_get_state_flags(long /*int*/ self) { - lock.lock(); - try { - return _gtk_widget_get_state_flags(self); -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -index 7061084..ecf2da0 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -@@ -2585,8 +2585,9 @@ - } - } else { - long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); -+ int styleState = OS.gtk_widget_get_state_flags(handle); - GdkRGBA rgba = new GdkRGBA (); -- OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -+ OS.gtk_style_context_get_background_color (context, styleState, rgba); - if (rgba.alpha == 0) { - return display.COLOR_WIDGET_BACKGROUND; - } -@@ -2625,8 +2626,9 @@ GdkColor getContextBackground () { - GdkColor getContextColor () { - long /*int*/ fontHandle = fontHandle (); - long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); -+ int styleState = OS.gtk_widget_get_state_flags(handle); - GdkRGBA rgba = new GdkRGBA (); -- rgba = display.styleContextGetColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -+ rgba = display.styleContextGetColor (context, styleState, rgba); - GdkColor color = new GdkColor (); - color.red = (short)(rgba.red * 0xFFFF); - color.green = (short)(rgba.green * 0xFFFF); -@@ -2761,7 +2763,8 @@ long /*int*/ getFontDescription () { - long /*int*/ fontHandle = fontHandle (); - if (OS.GTK3) { - long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); -- return OS.gtk_style_context_get_font(context, OS.GTK_STATE_FLAG_NORMAL); -+ int styleState = OS.gtk_widget_get_state_flags(fontHandle); -+ return OS.gtk_style_context_get_font(context, styleState); - } - OS.gtk_widget_realize (fontHandle); - return OS.gtk_style_get_font_desc (OS.gtk_widget_get_style (fontHandle)); -@@ -3021,12 +3024,13 @@ Point getThickness (long /*int*/ widget) { - int xthickness = 0, ythickness = 0; - GtkBorder tmp = new GtkBorder(); - long /*int*/ context = OS.gtk_widget_get_style_context (widget); -+ int styleState = OS.gtk_widget_get_state_flags(widget); - OS.gtk_style_context_save (context); - OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_FRAME); -- OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ OS.gtk_style_context_get_padding (context, styleState, tmp); - xthickness += tmp.left; - ythickness += tmp.top; -- OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ OS.gtk_style_context_get_border (context, styleState, tmp); - xthickness += tmp.left; - ythickness += tmp.top; - OS.gtk_style_context_restore (context); -@@ -5595,7 +5599,8 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us - if (OS.GTK3 && !draw && (state & CANVAS) != 0) { - GdkRGBA rgba = new GdkRGBA(); - long /*int*/ context = OS.gtk_widget_get_style_context (handle); -- OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -+ int styleState = OS.gtk_widget_get_state_flags(handle); -+ OS.gtk_style_context_get_background_color (context, styleState, rgba); - draw = rgba.alpha == 0; - } - if (draw) { -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java -index 12bca54..81780bd 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java -@@ -296,13 +296,14 @@ public Rectangle computeTrim (int x, int y, int width, int height) { - if (OS.GTK3) { - GtkBorder tmp = new GtkBorder (); - long /*int*/ context = OS.gtk_widget_get_style_context (textEntryHandle); -- OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ int styleState = OS.gtk_widget_get_state_flags(textEntryHandle); -+ OS.gtk_style_context_get_padding (context, styleState, tmp); - trim.x -= tmp.left; - trim.y -= tmp.top; - trim.width += tmp.left + tmp.right; - trim.height += tmp.top + tmp.bottom; - if ((style & SWT.BORDER) != 0) { -- OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ OS.gtk_style_context_get_border (context, styleState, tmp); - trim.x -= tmp.left; - trim.y -= tmp.top; - trim.width += tmp.left + tmp.right; -@@ -1738,7 +1739,8 @@ GtkBorder getGtkBorderPadding () { - //In Gtk3, acquire border. - GtkBorder gtkBorderPadding = new GtkBorder (); - long /*int*/ context = OS.gtk_widget_get_style_context (textEntryHandle); -- OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, gtkBorderPadding); -+ int styleState = OS.gtk_widget_get_state_flags(textEntryHandle); -+ OS.gtk_style_context_get_padding (context, styleState, gtkBorderPadding); - return gtkBorderPadding; - } else { - //in GTK2 hard code the padding -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java -index 7550122..3bbb886 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java -@@ -255,9 +255,10 @@ public Rectangle computeTrim (int x, int y, int width, int height) { - if (OS.GTK3) { - GtkBorder tmp = new GtkBorder(); - long /*int*/ context = OS.gtk_widget_get_style_context (handle); -- OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ int styleState = OS.gtk_widget_get_state_flags(handle); -+ OS.gtk_style_context_get_padding (context, styleState, tmp); - if ((style & SWT.BORDER) != 0) { -- OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ OS.gtk_style_context_get_border (context, styleState, tmp); - trim.x -= tmp.left; - trim.y -= tmp.top; - trim.width += tmp.left + tmp.right; -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -index ee9172e..8d5d0ba 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -@@ -591,7 +591,8 @@ public Rectangle computeTrim (int x, int y, int width, int height) { - if (OS.GTK3) { - GtkBorder tmp = new GtkBorder(); - long /*int*/ context = OS.gtk_widget_get_style_context (handle); -- OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ int styleState = OS.gtk_widget_get_state_flags(handle); -+ OS.gtk_style_context_get_padding (context, styleState, tmp); - trim.x -= tmp.left; - trim.y -= tmp.top; - trim.width += tmp.left + tmp.right; -@@ -598,7 +602,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { - trim.width += tmp.left + tmp.right; - trim.height += tmp.top + tmp.bottom; - if ((style & SWT.BORDER) != 0) { -- OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp); -+ OS.gtk_style_context_get_border (context, styleState, tmp); - trim.x -= tmp.left; - trim.y -= tmp.top; - trim.width += tmp.left + tmp.right; --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-480986.patch b/eclipse-bug-480986.patch deleted file mode 100644 index 3010334..0000000 --- a/eclipse-bug-480986.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 531d3f18481988494e77b5f1ded92a7f346ea14d Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Wed, 28 Oct 2015 10:52:36 -0400 -Subject: Bug 480986: [Wayland] Workspace chooser won't launch - -gtk_size_allocate() in Shell is called more often on Wayland. These -additional and unexpected calls trigger an infinite recursive call to -resizeBounds(), which causes non-resizable Shells/Dialogs to crash. - -The fix is to only resize Shells that have the SWT.RESIZE attribute -enabled. - -Tested on Gtk3.16 on Wayland, Gtk3.16 on X, and Gtk2.24. AllNonBrowser -JUnit test cases pass on Gtk3 running X. There are some irregularities -with test cases on Wayland, as outlined in bug 480893. - -Change-Id: I55612d8486cdd512e275a8a7456e0197ed717c75 -Signed-off-by: Eric Williams ---- - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java -index d65af5c..49ae036 100644 ---- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java -+++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java -@@ -1528,10 +1528,15 @@ long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { - OS.gtk_widget_get_allocation (shellHandle, widgetAllocation); - int width = widgetAllocation.width; - int height = widgetAllocation.height; -- if (!resized || oldWidth != width || oldHeight != height) { -+ -+ // Bug 474235: on Wayland gtk_size_allocate() is called more frequently, causing an -+ // infinitely recursive resize call. This causes non-resizable Shells/Dialogs to -+ // crash. Fix: only call resizeBounds() on resizable Shells. -+ if ((!resized || oldWidth != width || oldHeight != height) -+ && (OS.GTK3 && !OS.isX11() ? ((style & SWT.RESIZE) != 0) : true)) { //Wayland - oldWidth = width; - oldHeight = height; -- resizeBounds (width, height, true); -+ resizeBounds (width, height, true); //this is called to resize child widgets when the shell is resized. - } - return 0; - } --- -cgit v0.11.2-4-g4a35 - diff --git a/eclipse-bug-481122.patch b/eclipse-bug-481122.patch deleted file mode 100644 index 28b7d50..0000000 --- a/eclipse-bug-481122.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 3dc220718412431322c00e1f820c9ce0168892f5 Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Mon, 23 Nov 2015 10:37:11 -0500 -Subject: Bug 481122: [GTK3.18+] some set/get Background/Foreground color - methods have no effect - -With changes in GTK3.18 and onward, gtk_style_context_get_color() -behaves differently. In order to correctly fetch the color we must first -save the GtkStyleContext, set its state, fetch the color, and then -restore the GtkStyleContext. Failure to do this on GTK3.18+ leads to -failures in the getForegroundColor() method. - -The convenience method styleContextGetColor() in Display takes care of -the process. - -Tested on GTK 3.18, 3.16, 3.14, 3.8, and 2.24. All foreground color -related tests on GTK3 now pass. GTK2 behaviour remains unchanged. - -Change-Id: I6423edab5038dc0ef54afc6dd826f19fc936f987 -Signed-off-by: Eric Williams ---- - .../gtk/org/eclipse/swt/widgets/Control.java | 2 +- - .../gtk/org/eclipse/swt/widgets/Display.java | 36 ++++++++++++++-------- - .../gtk/org/eclipse/swt/widgets/Text.java | 2 +- - 3 files changed, 26 insertions(+), 14 deletions(-) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -index ffd9d11..7061084 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -@@ -2626,7 +2626,7 @@ GdkColor getContextColor () { - long /*int*/ fontHandle = fontHandle (); - long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); - GdkRGBA rgba = new GdkRGBA (); -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -+ rgba = display.styleContextGetColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba); - GdkColor color = new GdkColor (); - color.red = (short)(rgba.red * 0xFFFF); - color.green = (short)(rgba.green * 0xFFFF); -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java -index 0119882..d7e670c 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java -@@ -2373,8 +2373,7 @@ void initializeSystemColors () { - OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_TOOLTIP); - OS.gtk_style_context_invalidate(context); - GdkRGBA rgba = new GdkRGBA(); -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -- COLOR_INFO_FOREGROUND = toGdkColor (rgba); -+ COLOR_INFO_FOREGROUND = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba)); - getBackgroundColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba); - COLOR_INFO_BACKGROUND = toGdkColor (rgba); - OS.gtk_widget_destroy (tooltipShellHandle); -@@ -2387,8 +2386,7 @@ void initializeSystemColors () { - COLOR_WIDGET_NORMAL_SHADOW = toGdkColor (rgba, 0.7); - COLOR_WIDGET_HIGHLIGHT_SHADOW = toGdkColor (rgba, 1.3); - -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -- COLOR_WIDGET_FOREGROUND = toGdkColor (rgba); -+ COLOR_WIDGET_FOREGROUND = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba)); - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); - COLOR_WIDGET_BACKGROUND = toGdkColor (rgba); - -@@ -2396,17 +2394,14 @@ void initializeSystemColors () { - OS.gtk_style_context_add_class(context, OS.GTK_STYLE_CLASS_VIEW); - OS.gtk_style_context_add_class(context, OS.GTK_STYLE_CLASS_CELL); - OS.gtk_style_context_invalidate(context); -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); -- COLOR_LIST_FOREGROUND = toGdkColor (rgba); -+ COLOR_LIST_FOREGROUND = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba)); - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); - COLOR_LIST_BACKGROUND = toGdkColor (rgba); - OS.gtk_style_context_restore (context); -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); -- COLOR_LIST_SELECTION_TEXT = toGdkColor (rgba); -+ COLOR_LIST_SELECTION_TEXT = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_SELECTED, rgba)); - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); - COLOR_LIST_SELECTION = toGdkColor (rgba); -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_ACTIVE, rgba); -- COLOR_LIST_SELECTION_TEXT_INACTIVE = toGdkColor (rgba); -+ COLOR_LIST_SELECTION_TEXT_INACTIVE = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_ACTIVE, rgba)); - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_ACTIVE, rgba); - COLOR_LIST_SELECTION_INACTIVE = toGdkColor (rgba); - -@@ -2415,8 +2410,7 @@ void initializeSystemColors () { - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); - COLOR_TITLE_BACKGROUND_GRADIENT = toGdkColor (rgba, 1.3); - -- OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba); -- COLOR_TITLE_INACTIVE_FOREGROUND = toGdkColor (rgba); -+ COLOR_TITLE_INACTIVE_FOREGROUND = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba)); - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba); - COLOR_TITLE_INACTIVE_BACKGROUND = toGdkColor (rgba); - COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = toGdkColor (rgba, 1.3); -@@ -2497,6 +2491,24 @@ void initializeSystemColors () { - COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = gdkColor; - } - -+GdkRGBA styleContextGetColor(long /*int*/ context, int flag, GdkRGBA rgba) { -+ /* -+ * Feature in GTK: we need to handle calls to gtk_style_context_get_color() -+ * differently due to changes in GTK3.18+. This solves failing test cases -+ * which started failing after GTK3.16. See Bug 481122 for more info. -+ * Reference: https://blogs.gnome.org/mclasen/2015/11/20/a-gtk-update/ -+ */ -+ if (OS.GTK_VERSION >= OS.VERSION(3, 18, 0)) { -+ OS.gtk_style_context_save(context); -+ OS.gtk_style_context_set_state(context, flag); -+ OS.gtk_style_context_get_color (context, flag, rgba); -+ OS.gtk_style_context_restore(context); -+ } else { -+ OS.gtk_style_context_get_color (context, flag, rgba); -+ } -+ return rgba; -+} -+ - /** - * Returns the single instance of the system taskBar or null - * when there is no system taskBar available for the platform. -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -index 2865cd5..6b68b6a 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java -@@ -1664,7 +1664,7 @@ void drawMessage (long /*int*/ cr) { - if (OS.GTK3) { - long /*int*/ styleContext = OS.gtk_widget_get_style_context (handle); - GdkRGBA rgba = new GdkRGBA (); -- OS.gtk_style_context_get_color (styleContext, OS.GTK_STATE_FLAG_INSENSITIVE, rgba); -+ rgba = display.styleContextGetColor (styleContext, OS.GTK_STATE_FLAG_INSENSITIVE, rgba); - textColor.red = (short)(rgba.red * 0xFFFF); - textColor.green = (short)(rgba.green * 0xFFFF); - textColor.blue = (short)(rgba.blue * 0xFFFF); --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-484696.patch b/eclipse-bug-484696.patch deleted file mode 100644 index 713a380..0000000 --- a/eclipse-bug-484696.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 428cc3497ee844b9262d1bdc7cb09a8332eee87c Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Wed, 23 Dec 2015 09:55:43 -0500 -Subject: [PATCH] Bug 484696: [GTK] Empty repositories view links have white - backgrounds - -After bug 479998, an empty EGit repositories view still has mismatched -label colors. It turns out in this case the background color of the -parent composite was incorrect -- it should have been white (like on -GTK3.14 and earlier) instead of gray. - -In this case the parent composite's background color is set to be that -of the TreeViewer which will display the future repository branches, -information, etc. The default color for Trees/Tables is white. The fixes -for bug 479998 and bug 479998 introduced a small regression which set -the default color of Table/Trees to be gray. The issue in this case does -not lie with the labels but with the color of the parent composite. With -Table/Trees returning their proper default background color (white, or -COLOR_LIST_BACKGROUND), the EGit label issue is fixed. - -Tested on GTK3.18.6, 3.16, 3.14, and 2.24. AllNonBrowser JUnit tests -pass on GTK3 and GTK2. - -Change-Id: I47fe95c1ad5fc87411c0f27ff344f6369c9aa0c6 -Signed-off-by: Eric Williams ---- - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java | 16 +++++++++++++--- - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java | 16 +++++++++++++--- - 2 files changed, 26 insertions(+), 6 deletions(-) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java -index 89bd414..2510efa 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java -@@ -3138,7 +3148,7 @@ void setBackgroundColor (long /*int*/ context, long /*int*/ handle, GdkRGBA rgba - selectedBackground.green = (defaultColor.green & 0xFFFF) / (float)0xFFFF; - selectedBackground.blue = (defaultColor.blue & 0xFFFF) / (float)0xFFFF; - if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) { -- String css = "GtkTreeView {background-color: " + gtk_rgba_to_css_string(rgba) + ";}\n" -+ String css = "GtkTreeView {background-color: " + gtk_rgba_to_css_string(background) + ";}\n" - + "GtkTreeView:selected {background-color: " + gtk_rgba_to_css_string(selectedBackground) + ";}"; - gtk_css_provider_load_from_css(context, css); - } else { -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java -index f8aaa6a..23cf3dc 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java -@@ -3123,7 +3133,7 @@ void setBackgroundColor (long /*int*/ context, long /*int*/ handle, GdkRGBA rgba - selectedBackground.green = (defaultColor.green & 0xFFFF) / (float)0xFFFF; - selectedBackground.blue = (defaultColor.blue & 0xFFFF) / (float)0xFFFF; - if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) { -- String css = "GtkTreeView {background-color: " + gtk_rgba_to_css_string(rgba) + ";}\n" -+ String css = "GtkTreeView {background-color: " + gtk_rgba_to_css_string(background) + ";}\n" - + "GtkTreeView:selected {background-color: " + gtk_rgba_to_css_string(selectedBackground) + ";}"; - gtk_css_provider_load_from_css(context, css); - } else { --- -2.5.0 - diff --git a/eclipse-bug-486069.patch b/eclipse-bug-486069.patch deleted file mode 100644 index 91d8671..0000000 --- a/eclipse-bug-486069.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 1a375bfbb7dca92b102db09891a18eeb80d671f2 Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Tue, 19 Jan 2016 15:16:57 -0500 -Subject: Bug 486069: [Wayland] NullPointerException in TabFolder when running - ControlExample - -This patch adds a missing logic check to prevent a GtkNotebook from -switching to a page that doesn't exist. Wayland seems to trigger an -early page switch, causing gtk_notebook_get_current_page() to return -1. -This will cause a NullPointerException in TabFolder.gtk_switch_page(). - -Tested on GTK3.19.6, and 3.18. AllNonBrowser JUnit tests pass on -GTK3.19.6 (with the exception of an unrelated previously failing test -case). - -Change-Id: I720a7b08c0b49bebce15951f5d5deb00a2304839 -Signed-off-by: Eric Williams --- - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java -index 7344bf7..00e157c 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java -@@ -565,6 +565,8 @@ long /*int*/ gtk_switch_page (long /*int*/ widget, long /*int*/ page, long /*int - if (control != null && !control.isDisposed ()) { - control.setVisible (false); - } -+ } else { -+ return 0; - } - TabItem item = items [(int)/*64*/page_num]; - Control control = item.getControl (); --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-486368.patch b/eclipse-bug-486368.patch deleted file mode 100644 index c02e24f..0000000 --- a/eclipse-bug-486368.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3b20eb8505d7eba958b07ebdccab29881c7016b5 Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Tue, 9 Feb 2016 13:46:03 -0500 -Subject: Bug 486368: [GTK3] Preferences dialog background color garbled - -Restore call to gtk_style_context_set_background() in order to prevent -dialog background color issues on earlier versions of GTK. - -Tested on GTK3.18, 3.16, 3.14, and 2.24. AllNonBrowser JUnit tests pass -on GTK2 and GTK3. - -Change-Id: I1885f7e0a3d9312c4f7fe033c9a80abf31f20182 -Signed-off-by: Eric Williams ---- - bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c -index 8f5d022..032ce43 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c -@@ -512,7 +512,9 @@ static void swt_fixed_realize (GtkWidget *widget) { - window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); - gtk_widget_set_window (widget, window); - gdk_window_set_user_data (window, widget); -- gtk_style_context_set_background (gtk_widget_get_style_context (widget), window); -+ if (NULL != gtk_check_version (3, 18, 0)) { -+ gtk_style_context_set_background (gtk_widget_get_style_context (widget), window); -+ } - } - - static void swt_fixed_map (GtkWidget *widget) { --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-487712.patch b/eclipse-bug-487712.patch deleted file mode 100644 index 871d7ab..0000000 --- a/eclipse-bug-487712.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d0a9c478604ba6a32016a631c6d0b05ac839dffe Mon Sep 17 00:00:00 2001 -From: Alexander Kurtakov -Date: Fri, 12 Feb 2016 11:57:13 +0200 -Subject: Bug 487712 - Snippet128 crashes on Fedora - -Bug in ProgressBar due to calling gdk_window_process_updates which sends -expose events for redrawing purposes. But this event is implementation -detail in GTK3 and shouldn't be used from outside and playing with it -leads to race conditions with webkitgtk. -Also GtkProgressBar redraws properly now so trying to force redraw is -useless on GTK 3. - -Change-Id: I22373b9e33c83759e0ff9dc2d0600fe39cacb91e -Signed-off-by: Alexander Kurtakov ---- - .../gtk/org/eclipse/swt/widgets/ProgressBar.java | 24 ++++++++++++---------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java -index d6749ef..cbdd8c7 100644 ---- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java -+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java -@@ -1,5 +1,5 @@ - /******************************************************************************* -- * Copyright (c) 2000, 2013 IBM Corporation and others. -+ * Copyright (c) 2000, 2016 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at -@@ -301,16 +301,18 @@ void updateBar (int selection, int minimum, int maximum) { - - double fraction = minimum == maximum ? 1 : (double)(selection - minimum) / (maximum - minimum); - OS.gtk_progress_bar_set_fraction (handle, fraction); -- /* -- * Feature in GTK. The progress bar does -- * not redraw right away when a value is -- * changed. This is not strictly incorrect -- * but unexpected. The fix is to force all -- * outstanding redraws to be delivered. -- */ -- long /*int*/ window = paintWindow (); -- OS.gdk_window_process_updates (window, false); -- OS.gdk_flush (); -+ if (!OS.GTK3) { -+ /* -+ * Feature in GTK. The progress bar does -+ * not redraw right away when a value is -+ * changed. This is not strictly incorrect -+ * but unexpected. The fix is to force all -+ * outstanding redraws to be delivered. -+ */ -+ long /*int*/ window = paintWindow (); -+ OS.gdk_window_process_updates (window, false); -+ OS.gdk_flush (); -+ } - } - - void gtk_orientable_set_orientation (long /*int*/ pbar, int orientation) { --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-488226.patch b/eclipse-bug-488226.patch deleted file mode 100644 index c047251..0000000 --- a/eclipse-bug-488226.patch +++ /dev/null @@ -1,318 +0,0 @@ -From 46e387352f469e26ecedddc10ffec2cd16f11d82 Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Fri, 19 Feb 2016 15:59:12 -0500 -Subject: Bug 488226: [GTK3] Content Assist using Table/Tree has wrong - selection background colors - -On GTK3.14 and above, SWT.COLOR_LIST_SELECTION was returning gray -instead of the default (and correct) blue. This causes bugs in -Table/Tree, making highlighted TableItems/TreeItems difficult to read. -COLOR_LIST_BACKGROUND is unaffected. - -System background colors like SWT.COLOR_* are fetched using -gtk_style_context_get_background_color() when SWT loads. This approach -is no longer valid as 1) it is deprecated on the GTK side and 2) it is -unreliable/not guaranteed to work. This patch only changes this behavior -for SWT.COLOR_LIST_SELECTION, but in the future other system colors will -need to be changed as well. - -The fix in this case is to fetch the GTK theme colors of the currently -running system theme from GTK. This can be done using GtkCssProvider. -Once the currently running theme is fetched, the correct selection -background color can be extracted. If there is no selection background -color specified in the theme, then the fall-back is to load the color -via SWT's COLOR_LIST_SELECTION. This ensures that the correct color is -chosen according to GTK, should a theme specify one. - -Tested on GTK3.8, 3.14, 3.16, and 3.18. AllNonBrowser JUnit tests pass -on GTK3 and GTK2. - -Change-Id: Ic9aeb4d35efef961be1f724a2ad7dcc852c06453 -Signed-off-by: Eric Williams ---- - .../Eclipse SWT PI/gtk/library/os.c | 27 ++++++ - .../Eclipse SWT PI/gtk/library/os_custom.h | 1 + - .../Eclipse SWT PI/gtk/library/os_stats.c | 1 + - .../Eclipse SWT PI/gtk/library/os_stats.h | 1 + - .../gtk/org/eclipse/swt/internal/gtk/OS.java | 14 +++ - .../gtk/org/eclipse/swt/widgets/Control.java | 17 +--- - .../gtk/org/eclipse/swt/widgets/Display.java | 108 ++++++++++++++++++++- - 7 files changed, 153 insertions(+), 16 deletions(-) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -index 64e39f3..02dbadd 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c -@@ -10056,6 +10056,33 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1container_1set_1border_1width) - } - #endif - -+#ifndef NO__1gtk_1css_1provider_1get_1named -+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1css_1provider_1get_1named) -+ (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1) -+{ -+ jbyte *lparg0=NULL; -+ jbyte *lparg1=NULL; -+ jintLong rc = 0; -+ OS_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1get_1named_FUNC); -+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; -+ if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; -+/* -+ rc = (jintLong)gtk_css_provider_get_named((const gchar *)lparg0, (const gchar *)lparg1); -+*/ -+ { -+ OS_LOAD_FUNCTION(fp, gtk_css_provider_get_named) -+ if (fp) { -+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *, const gchar *))fp)((const gchar *)lparg0, (const gchar *)lparg1); -+ } -+ } -+fail: -+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); -+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); -+ OS_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1get_1named_FUNC); -+ return rc; -+} -+#endif -+ - #ifndef NO__1gtk_1css_1provider_1load_1from_1data - JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1css_1provider_1load_1from_1data) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2, jintLongArray arg3) -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h -index 7a27475..8e5844b 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h -@@ -530,6 +530,7 @@ - #define gtk_css_provider_load_from_data_LIB LIB_GTK - #define gtk_css_provider_new_LIB LIB_GTK - #define gtk_css_provider_to_string_LIB LIB_GTK -+#define gtk_css_provider_get_named_LIB LIB_GTK - #define gtk_icon_set_render_icon_pixbuf_LIB LIB_GTK - #define gtk_drag_set_icon_surface_LIB LIB_GTK - #define gtk_accel_label_set_accel_LIB LIB_GTK -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c -index 5d77479..670adf8 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c -@@ -729,6 +729,7 @@ char * OS_nativeFunctionNames[] = { - "_1gtk_1container_1remove", - "_1gtk_1container_1resize_1children", - "_1gtk_1container_1set_1border_1width", -+ "_1gtk_1css_1provider_1get_1named", - "_1gtk_1css_1provider_1load_1from_1data", - "_1gtk_1css_1provider_1new", - "_1gtk_1css_1provider_1to_1string", -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h -index a0a30b7..11fdfe4 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h -@@ -739,6 +739,7 @@ typedef enum { - _1gtk_1container_1remove_FUNC, - _1gtk_1container_1resize_1children_FUNC, - _1gtk_1container_1set_1border_1width_FUNC, -+ _1gtk_1css_1provider_1get_1named_FUNC, - _1gtk_1css_1provider_1load_1from_1data_FUNC, - _1gtk_1css_1provider_1new_FUNC, - _1gtk_1css_1provider_1to_1string_FUNC, -diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -index d3e52c3..353d4b7 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -@@ -650,6 +650,7 @@ public class OS extends C { - public static final byte[] gtk_show_input_method_menu = ascii("gtk-show-input-method-menu"); - public static final byte[] gtk_menu_bar_accel = ascii("gtk-menu-bar-accel"); - public static final byte[] gtk_menu_images = ascii("gtk-menu-images"); -+ public static final byte[] gtk_theme_name = ascii("gtk-theme-name"); - public static final byte[] inner_border = ascii("inner-border"); - public static final byte[] has_backward_stepper = ascii("has-backward-stepper"); - public static final byte[] has_secondary_backward_stepper = ascii("has-secondary-backward-stepper"); -@@ -9299,6 +9300,19 @@ public static final long /*int*/gtk_css_provider_to_string(long /*int*/ provider - lock.unlock(); - } - } -+/** @method flags=dynamic -+ * @param name cast=(const gchar *) -+ * @param variant cast=(const gchar *) -+ */ -+public static final native long /*int*/ _gtk_css_provider_get_named (byte[] name, byte[] variant); -+public static final long /*int*/gtk_css_provider_get_named(byte[] name, byte[] variant) { -+ lock.lock(); -+ try { -+ return _gtk_css_provider_get_named(name, variant); -+ } finally { -+ lock.unlock(); -+ } -+} - /** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -index d296192..741a4e2 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java -@@ -4178,7 +4178,7 @@ GdkColor gtk_css_parse_background (long /*int*/ provider) { - shortOutput = cssOutput.substring (startIndex + 18); - // Double check to make sure with have a valid rgb/rgba property - if (shortOutput.contains ("rgba") || shortOutput.contains ("rgb")) { -- rgba = gtk_css_property_to_rgba (shortOutput); -+ rgba = display.gtk_css_property_to_rgba (shortOutput); - } else { - return display.COLOR_WIDGET_BACKGROUND; - } -@@ -4187,7 +4187,7 @@ GdkColor gtk_css_parse_background (long /*int*/ provider) { - shortOutput = cssOutput.substring (startIndex + 13); - // Double check to make sure with have a valid rgb/rgba property - if (shortOutput.contains ("rgba") || shortOutput.contains ("rgb")) { -- rgba = gtk_css_property_to_rgba (shortOutput); -+ rgba = display.gtk_css_property_to_rgba (shortOutput); - } else { - return display.COLOR_WIDGET_BACKGROUND; - } -@@ -4195,18 +4195,6 @@ GdkColor gtk_css_parse_background (long /*int*/ provider) { - return color; - } - --GdkRGBA gtk_css_property_to_rgba(String property) { -- /* Here we convert rgb(...) or rgba(...) properties -- * into GdkRGBA objects using gdk_rgba_parse(). Note -- * that we still need to remove the ";" character from the -- * input string. -- */ -- GdkRGBA rgba = new GdkRGBA (); -- String [] propertyParsed = new String [1]; -- propertyParsed = property.split (";"); -- OS.gdk_rgba_parse (rgba, Converter.wcsToMbcs (null, propertyParsed[0], true)); -- return rgba; --} - - void gtk_css_provider_load_from_css (long /*int*/ context, String css) { - /* Utility function. */ -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java -index 49c0e0d..7dee6d7 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java -@@ -1693,6 +1693,99 @@ long /*int*/ gtk_cell_renderer_toggle_get_type () { - return toggle_renderer_type; - } - -+String gtk_css_default_theme_values (int swt) { -+ /* -+ * This method fetches GTK theme values/properties. This is accomplished -+ * by determining the name of the current system theme loaded, giving that -+ * name to GTK, and then parsing values from the returned theme contents. -+ * -+ * The idea here is that SWT variables that have corresponding GTK theme -+ * elements can be fetched easily by supplying the SWT variable as an -+ * parameter to this method. -+ */ -+ -+ // Find CSS theme name -+ byte [] buffer; -+ int length; -+ long /*int*/ settings = OS.gtk_settings_get_default (); -+ long /*int*/ [] ptr = new long /*int*/ [1]; -+ long /*int*/ str; -+ OS.g_object_get (settings, OS.gtk_theme_name, ptr, 0); -+ if (ptr [0] == 0) { -+ return ""; -+ } -+ length = OS.strlen (ptr [0]); -+ if (length == 0) { -+ return ""; -+ } -+ buffer = new byte [length]; -+ OS.memmove (buffer, ptr [0], length); -+ OS.g_free (ptr [0]); -+ -+ // Fetch the actual theme in char/string format -+ long /*int*/ themeProvider = OS.gtk_css_provider_get_named(buffer, null); -+ str = OS.gtk_css_provider_to_string (themeProvider); -+ length = OS.strlen (str); -+ if (length == 0) { -+ return ""; -+ } -+ buffer = new byte [length]; -+ OS.memmove (buffer, str, length); -+ String cssOutput = new String (Converter.mbcsToWcs (null, buffer)); -+ -+ // Parse the theme values based on the corresponding SWT value -+ // i.e. theme_selected_bg_color in GTK is SWT.COLOR_LIST_SELECTION in SWT -+ String color; -+ switch (swt) { -+ case SWT.COLOR_LIST_SELECTION: -+ /* -+ * These strings are the GTK named colors we are looking for. -+ * -+ * NOTE: we need to be careful of cases where one is being assigned -+ * to the other. For example we do NOT want to parse: -+ * @define-color theme_selected_bg_color selected_bg_color -+ * Instead we want the actual value for selected_bg_color, i.e. -+ * @define-color selected_bg_color rgb(255, 255, 255) -+ * -+ * We also want to filter out any color formats other than #xxyyzz, -+ * rgb(xxx,yyy,zzz) and rgba(www,xxx,yyy,zzz) since gdk_rgba_parse() -+ * can only handle strings in this format. -+ */ -+ int tSelected = cssOutput.indexOf ("@define-color theme_selected_bg_color"); -+ int selected = cssOutput.indexOf ("@define-color selected_bg_color"); -+ if (tSelected != -1) { -+ color = cssOutput.substring(tSelected + 38); -+ if (color.startsWith("#") || color.startsWith("rgb")) { -+ return color; -+ } -+ } -+ if (selected != -1) { -+ color = cssOutput.substring(selected + 32); -+ if (color.startsWith("#") || color.startsWith("rgb")) { -+ return color; -+ } -+ } -+ else { -+ return ""; -+ } -+ default: -+ return ""; -+ } -+} -+ -+GdkRGBA gtk_css_property_to_rgba(String property) { -+ /* Here we convert rgb(...) or rgba(...) properties -+ * into GdkRGBA objects using gdk_rgba_parse(). Note -+ * that we still need to remove the ";" character from the -+ * input string. -+ */ -+ GdkRGBA rgba = new GdkRGBA (); -+ String [] propertyParsed = new String [1]; -+ propertyParsed = property.split (";"); -+ OS.gdk_rgba_parse (rgba, Converter.wcsToMbcs (null, propertyParsed[0], true)); -+ return rgba; -+} -+ - /** - * Returns the default display. One is created (making the - * thread that invokes this method its user-interface thread) -@@ -2409,7 +2502,20 @@ void initializeSystemColors () { - COLOR_LIST_BACKGROUND = toGdkColor (rgba); - OS.gtk_style_context_restore (context); - COLOR_LIST_SELECTION_TEXT = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_SELECTED, rgba)); -- OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); -+ -+ // SWT.COLOR_LIST_SELECTION will be fetched using GTK CSS for GTK3.14+. -+ // TODO: convert other system colors to this method and re-factor. -+ if (OS.GTK_VERSION >= OS.VERSION(3, 14, 0)) { -+ String colorListSelection = gtk_css_default_theme_values(SWT.COLOR_LIST_SELECTION); -+ if (!colorListSelection.isEmpty()) { -+ rgba = gtk_css_property_to_rgba (colorListSelection); -+ } else { -+ OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); -+ } -+ } else { -+ OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); -+ } -+ - COLOR_LIST_SELECTION = toGdkColor (rgba); - COLOR_LIST_SELECTION_TEXT_INACTIVE = toGdkColor (styleContextGetColor (context, OS.GTK_STATE_FLAG_ACTIVE, rgba)); - OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_ACTIVE, rgba); --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-bug-489953.patch b/eclipse-bug-489953.patch deleted file mode 100644 index b4c7514..0000000 --- a/eclipse-bug-489953.patch +++ /dev/null @@ -1,63 +0,0 @@ -From bd2e4b64ecd5e5b0d476810cc1d365ce8f3065c5 Mon Sep 17 00:00:00 2001 -From: Eric Williams -Date: Fri, 18 Mar 2016 11:45:13 -0400 -Subject: Bug 489953: [GTK3.14-] Button background tests fail - -GTK3.14 and below does not have access to CSS parsing methods. There are -however a handful of widgets that use CSS background colors on GTK3.14. -Button is one of these, as CSS theming was introduced to Button to fix -some bugs. - -This means that on GTK3.14 there is a test failure for -Button.getBackground() since SWT cannot parse GTK CSS on GTK3.14. The -solution to keep track of the background color and override -getContextBackground() in Button. This eliminates the last failing color -test case on GTK3.14 - -This modifies behavior for GTK3.14 and below. GTK3.16 behavior is -unaffected as CSS parsing machinery exists for 3.16 and up. - -Tested on GTK3.18, 3.16, 3.14, and 2.24. AllNonBrowserTests pass on GTK3 -and GTK2.--- - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java -index 967550c..9aab8be 100644 ---- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java -+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java -@@ -50,6 +50,7 @@ public class Button extends Control { - ImageList imageList; - Image image; - String text; -+ GdkRGBA background; - - static final int INNER_BORDER = 1; - static final int DEFAULT_BORDER = 1; -@@ -127,6 +128,14 @@ static GtkBorder getBorder (byte[] border, long /*int*/ handle, int defaultBorde - return gtkBorder; - } - -+@Override -+GdkColor getContextBackground () { -+ if (background != null) { -+ return display.toGdkColor (background); -+ } -+ return display.COLOR_WIDGET_BACKGROUND; -+} -+ - /** - * Adds the listener to the collection of listeners who will - * be notified when the control is selected by the user, by sending -@@ -799,6 +808,7 @@ void _setAlignment (int alignment) { - void setBackgroundColor (long /*int*/ context, long /*int*/ handle, GdkRGBA rgba) { - /* Note: this function is called on Gtk3 only */ - -+ background = rgba; - //Pre Gtk 3.10 doesn't handle CSS background color very well for Gtk Check/Radio button. - // 3.10.3 as it was the latest to affect themeing in button. - if (OS.GTK_VERSION < OS.VERSION(3, 10, 3) && (style & (SWT.CHECK | SWT.RADIO)) != 0) { --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-change-build-packagings.patch b/eclipse-change-build-packagings.patch index 62f62eb..960fe8b 100644 --- a/eclipse-change-build-packagings.patch +++ b/eclipse-change-build-packagings.patch @@ -51,7 +51,7 @@ diff --git a/eclipse-editor-scrolling-fix.patch b/eclipse-editor-scrolling-fix.patch deleted file mode 100644 index baa6e06..0000000 --- a/eclipse-editor-scrolling-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7db3fba25fe89240fa80661d81a5dffa2f31ff14 Mon Sep 17 00:00:00 2001 -From: Alexander Kurtakov -Date: Mon, 12 Oct 2015 19:08:43 +0300 -Subject: Bug 479580 - Widgets with V_SCROLL not scrollable - -Hiding scrollbar for widget created with style V_SCROLL shouldn't stop -other means of scrolling e.g. mouse wheel. -The fix is to use new GTK_POLICY_EXTERNAL (added in GTK 3.16) which -allows scrolling when scrollbars invisible which was not the possible -before that. - -Change-Id: Icffb3c7792458369a7a7ee07dc317d83bf0757b2 -Signed-off-by: Alexander Kurtakov ---- - .../Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 1 + - .../Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -index fe8283d..cf8cda6 100644 ---- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java -@@ -363,6 +363,7 @@ public class OS extends C { - public static final int GTK_POLICY_ALWAYS = 0x0; - public static final int GTK_POLICY_AUTOMATIC = 0x1; - public static final int GTK_POLICY_NEVER = 0x2; -+ public static final int GTK_POLICY_EXTERNAL = 0x3; - public static final int GTK_POS_TOP = 0x2; - public static final int GTK_POS_BOTTOM = 0x3; - public static final int GTK_PRINT_CAPABILITY_PAGE_SET = 1 << 0; -diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java -index 2d38a95..7295a27 100644 ---- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java -+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java -@@ -389,6 +389,9 @@ boolean setScrollBarVisible (ScrollBar bar, boolean visible) { - int [] hsp = new int [1], vsp = new int [1]; - OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp); - int policy = visible ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER; -+ if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0) && !visible) { -+ policy = OS.GTK_POLICY_EXTERNAL; -+ } - if ((bar.style & SWT.HORIZONTAL) != 0) { - if (hsp [0] == policy) return false; - hsp [0] = policy; --- -cgit v0.11.2-4-g4a35 - diff --git a/eclipse-feature-plugins-to-category-ius.patch b/eclipse-feature-plugins-to-category-ius.patch index 6753c67..16597b6 100644 --- a/eclipse-feature-plugins-to-category-ius.patch +++ b/eclipse-feature-plugins-to-category-ius.patch @@ -32,10 +32,10 @@ index 0743586..1cbf404 100644 + + -diff --git eclipse.pde/org.eclipse.pde-feature/feature.xml eclipse.pde/org.eclipse.pde-feature/feature.xml +diff --git eclipse.pde.ui/features/org.eclipse.pde-feature/feature.xml eclipse.pde.ui/features/org.eclipse.pde-feature/feature.xml index 88a8daa..382c5ee 100644 ---- eclipse.pde/org.eclipse.pde-feature/feature.xml -+++ eclipse.pde/org.eclipse.pde-feature/feature.xml +--- eclipse.pde.ui/features/org.eclipse.pde-feature/feature.xml ++++ eclipse.pde.ui/features/org.eclipse.pde-feature/feature.xml @@ -82,20 +82,6 @@ unpack="false"/> diff --git a/eclipse-fix-comaptibility-class.patch b/eclipse-fix-comaptibility-class.patch deleted file mode 100644 index fa97a3a..0000000 --- a/eclipse-fix-comaptibility-class.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- eclipse.platform.runtime/bundles/org.eclipse.core.runtime.compatibility.registry/pom.xml.orig 2013-01-28 12:14:02.000000000 +0100 -+++ eclipse.platform.runtime/bundles/org.eclipse.core.runtime.compatibility.registry/pom.xml 2013-01-29 11:02:15.865494675 +0100 -@@ -28,4 +28,35 @@ - - - -+ -+ -+ -+ -+ classes/org/eclipse/core/runtime/IPluginDescriptor.class -+ -+ -+ -+ -+ -+ maven-antrun-plugin -+ 1.7 -+ -+ -+ natives -+ generate-resources -+ -+ -+ -+ -+ -+ -+ run -+ -+ -+ -+ -+ -+ -+ -+ - diff --git a/eclipse-fix-tests.patch b/eclipse-fix-tests.patch index 2c9066e..5b25837 100644 --- a/eclipse-fix-tests.patch +++ b/eclipse-fix-tests.patch @@ -1,17 +1,15 @@ -diff --git eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java -index 945bafa..21dbc62 100644 ---- eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java -+++ eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java -@@ -73,7 +73,7 @@ public class TargetDefinitionPersistenceTests extends TestCase { +--- eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/MinimalTargetDefinitionPersistenceTests.java.orig 2016-04-19 20:07:36.947017206 +0100 ++++ eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/MinimalTargetDefinitionPersistenceTests.java 2016-04-19 20:09:59.166077383 +0100 +@@ -77,7 +77,7 @@ */ protected IPath getJdtFeatureLocation() { IPath path = new Path(TargetPlatform.getDefaultLocation()); - path = path.append("features"); -+ path = path.append("dropins").append("jdt").append("features"); ++ path = path.append("droplets").append("eclipse-jdt").append("eclipse").append("features"); File dir = path.toFile(); assertTrue("Missing features directory", dir.exists() && !dir.isFile()); String[] files = dir.list(); -@@ -668,4 +668,4 @@ public class TargetDefinitionPersistenceTests extends TestCase { +@@ -613,4 +613,4 @@ assertTrue(iubc.getIncludeSource()); } @@ -31,36 +29,6 @@ index f1f38f0..f9111e6 100644 } }); if (children != null && children.length == 1) -diff --git eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java -index 0245d89..e95ff8f 100644 ---- eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java -+++ eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java -@@ -4416,6 +4416,10 @@ public void test434297() { - public void test436542() throws Exception { - String jreDirectory = Util.getJREDirectory(); - String jfxJar = Util.toNativePath(jreDirectory + "/lib/ext/jfxrt.jar"); -+ File file = new File(jfxJar); -+ if (!file.exists()) { -+ return; -+ } - this.runConformTest( - new String[] { - "Utility.java", -diff --git eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java -index 1a0cbcc..ddad62f 100644 ---- eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java -+++ eclipse.jdt.core/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java -@@ -6781,6 +6781,10 @@ public void testBug434582a() { - public void test443467() throws Exception { - String jreDirectory = Util.getJREDirectory(); - String jfxJar = Util.toNativePath(jreDirectory + "/lib/ext/jfxrt.jar"); -+ File file = new File(jfxJar); -+ if (!file.exists()) { -+ return; -+ } - this.runNegativeTestWithExtraLibs( - new String[] { - "BuildIdeMain.java", diff --git eclipse.jdt.core/org.eclipse.jdt.apt.pluggable.tests/build.properties eclipse.jdt.core/org.eclipse.jdt.apt.pluggable.tests/build.properties index 376daa6..1742a8d 100644 --- eclipse.jdt.core/org.eclipse.jdt.apt.pluggable.tests/build.properties diff --git a/eclipse-javaxannotation-import.patch b/eclipse-javaxannotation-import.patch index 8156db5..82fe170 100644 --- a/eclipse-javaxannotation-import.patch +++ b/eclipse-javaxannotation-import.patch @@ -1,7 +1,7 @@ -diff --git a/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF +diff --git a/eclipse.platform.ui/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF b/eclipse.platform.ui/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF index b0d5c82..6ace64c 100644 ---- a/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF -+++ b/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF +--- a/eclipse.platform.ui/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF ++++ b/eclipse.platform.ui/bundles/org.eclipse.e4.ui.swt.gtk/META-INF/MANIFEST.MF @@ -8,5 +8,6 @@ Bundle-Localization: fragment-gtk Bundle-Vendor: %providerName diff --git a/eclipse-lucene-4.patch b/eclipse-lucene-4.patch deleted file mode 100644 index ba49766..0000000 --- a/eclipse-lucene-4.patch +++ /dev/null @@ -1,522 +0,0 @@ -diff --git a/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF b/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF -index ee34c8e..fdef3e6 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF -+++ b/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF -@@ -43,8 +43,8 @@ Require-Bundle: org.eclipse.ant.core;bundle-version="3.2.200";resolution:=option - org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)", - org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport, - org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)", -- org.apache.lucene.analysis;bundle-version="[3.5.0,4.0.0)", -- org.apache.lucene.core;bundle-version="[3.5.0,4.0.0)", -+ org.apache.lucene.analysis;bundle-version="[4.7.0,5.0.0)", -+ org.apache.lucene.core;bundle-version="[4.7.0,5.0.0)", - org.eclipse.core.net;bundle-version="1.2.200" - Import-Package: com.ibm.icu.text, - org.eclipse.equinox.http.jetty;resolution:=optional -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java -index a066aa4..6c41103 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java -@@ -11,10 +11,15 @@ - *******************************************************************************/ - package org.eclipse.help.internal.search; - import java.io.*; --import java.util.HashSet; --import java.util.Set; -+import java.util.ArrayList; -+import java.util.List; - --import org.apache.lucene.analysis.*; -+import org.apache.lucene.analysis.Analyzer; -+import org.apache.lucene.analysis.TokenStream; -+import org.apache.lucene.analysis.Tokenizer; -+import org.apache.lucene.analysis.core.StopFilter; -+import org.apache.lucene.analysis.en.PorterStemFilter; -+import org.apache.lucene.analysis.util.CharArraySet; - import org.apache.lucene.util.Version; - /** - * Lucene Analyzer for English. LowerCaseTokenizer->StopFilter->PorterStemFilter -@@ -27,18 +32,22 @@ public final class Analyzer_en extends Analyzer { - super(); - } - /** -- * Creates a TokenStream which tokenizes all the text in the provided -+ * Creates a TokenStreamComponents which tokenizes all the text in the provided - * Reader. - */ -- public final TokenStream tokenStream(String fieldName, Reader reader) { -- return new PorterStemFilter(new StopFilter(Version.LUCENE_30, new LowerCaseAndDigitsTokenizer(reader), getStopWords(), false)); -+ @Override -+ public final TokenStreamComponents createComponents(String fieldName, Reader reader) { -+ CharArraySet stopWordsSet = StopFilter.makeStopSet(Version.LUCENE_47, getStopWords(), true); -+ Tokenizer source = new LowerCaseAndDigitsTokenizer(reader); -+ TokenStream filter = new PorterStemFilter(new StopFilter(Version.LUCENE_47, source, stopWordsSet)); -+ return new TokenStreamComponents(source, filter); - } - -- private Set stopWords; -+ private List stopWords; - -- private Set getStopWords() { -+ private List getStopWords() { - if ( stopWords == null ) { -- stopWords = new HashSet(); -+ stopWords = new ArrayList(); - for (int i = 0; i < STOP_WORDS.length; i++) { - stopWords.add(STOP_WORDS[i]); - } -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java -index 4109474..2718307 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java -@@ -17,8 +17,8 @@ import java.util.StringTokenizer; - import com.ibm.icu.text.BreakIterator; - - import org.apache.lucene.analysis.Analyzer; --import org.apache.lucene.analysis.LowerCaseFilter; --import org.apache.lucene.analysis.TokenStream; -+import org.apache.lucene.analysis.Tokenizer; -+import org.apache.lucene.analysis.core.LowerCaseFilter; - import org.apache.lucene.util.Version; - import org.eclipse.help.internal.base.HelpBasePlugin; - -@@ -84,11 +84,14 @@ public final class DefaultAnalyzer extends Analyzer { - } - - /** -- * Creates a TokenStream which tokenizes all the text in the provided -+ * Creates a TokenStreamComponents which tokenizes all the text in the provided - * Reader. - */ -- public final TokenStream tokenStream(String fieldName, Reader reader) { -- return new LowerCaseFilter(Version.LUCENE_30, new WordTokenStream(fieldName, reader, locale)); -+ @Override -+ public final TokenStreamComponents createComponents(String fieldName, Reader reader) { -+ Tokenizer source = new WordTokenStream(fieldName, reader, locale); -+ LowerCaseFilter filter = new LowerCaseFilter(Version.LUCENE_47, source); -+ return new TokenStreamComponents(source, filter); - } - - /** -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java -index a475688..91e3cb4 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java -@@ -13,7 +13,7 @@ package org.eclipse.help.internal.search; - - import java.io.*; - --import org.apache.lucene.analysis.*; -+import org.apache.lucene.analysis.util.CharTokenizer; - import org.apache.lucene.util.Version; - - /** -@@ -22,13 +22,14 @@ import org.apache.lucene.util.Version; - public class LowerCaseAndDigitsTokenizer extends CharTokenizer { - - public LowerCaseAndDigitsTokenizer(Reader input) { -- super(Version.LUCENE_30, input); -+ super(Version.LUCENE_47, input); - } - protected char normalize(char c) { - return Character.toLowerCase(c); - } - -- protected boolean isTokenChar(char c) { -+ @Override -+ public boolean isTokenChar(int c) { - return Character.isLetterOrDigit(c); - } - -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java -index 9cc690e..6449adb 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java -@@ -243,16 +243,25 @@ public class QueryBuilder { - private List analyzeText(Analyzer analyzer, String fieldName, String text) { - List words = new ArrayList(1); - Reader reader = new StringReader(text); -- TokenStream tStream = analyzer.tokenStream(fieldName, reader); - -- CharTermAttribute termAttribute = tStream.getAttribute(CharTermAttribute.class); -+ TokenStream tStream = null; - try { -+ tStream = analyzer.tokenStream(fieldName, reader); -+ tStream.reset(); -+ CharTermAttribute termAttribute = (CharTermAttribute) tStream -+ .getAttribute(CharTermAttribute.class); - while (tStream.incrementToken()) { - String term = termAttribute.toString(); - words.add(term); - } -- reader.close(); - } catch (IOException ioe) { -+ } finally { -+ if (tStream != null) { -+ try { -+ tStream.close(); -+ } catch (IOException e) { -+ } -+ } - } - - return words; -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java -index 33c9476..5a46fe5 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java -@@ -33,17 +33,20 @@ import java.util.Set; - import java.util.zip.ZipEntry; - import java.util.zip.ZipInputStream; - --import org.apache.lucene.analysis.LimitTokenCountAnalyzer; -+import org.apache.lucene.analysis.miscellaneous.LimitTokenCountAnalyzer; - import org.apache.lucene.document.Document; - import org.apache.lucene.document.Field; -+import org.apache.lucene.index.AtomicReader; -+import org.apache.lucene.index.DirectoryReader; -+import org.apache.lucene.index.DocsEnum; - import org.apache.lucene.index.IndexReader; - import org.apache.lucene.index.IndexWriter; --import org.apache.lucene.index.Term; --import org.apache.lucene.index.TermDocs; - import org.apache.lucene.index.IndexWriterConfig.OpenMode; - import org.apache.lucene.index.IndexWriterConfig; - import org.apache.lucene.index.LogByteSizeMergePolicy; - import org.apache.lucene.index.LogMergePolicy; -+import org.apache.lucene.index.SlowCompositeReaderWrapper; -+import org.apache.lucene.index.Term; - import org.apache.lucene.search.BooleanQuery; - import org.apache.lucene.search.IndexSearcher; - import org.apache.lucene.search.Query; -@@ -283,7 +286,7 @@ public class SearchIndex implements IHelpSearchIndex { - indexedDocs.restore(); - setInconsistent(true); - LimitTokenCountAnalyzer analyzer = new LimitTokenCountAnalyzer(analyzerDescriptor.getAnalyzer(), 1000000); -- IndexWriterConfig writerConfig = new IndexWriterConfig(org.apache.lucene.util.Version.LUCENE_31, analyzer); -+ IndexWriterConfig writerConfig = new IndexWriterConfig(org.apache.lucene.util.Version.LUCENE_47, analyzer); - writerConfig.setOpenMode(create ? OpenMode.CREATE : OpenMode.APPEND); - LogMergePolicy mergePolicy = new LogByteSizeMergePolicy(); - mergePolicy.setMergeFactor(20); -@@ -307,7 +310,7 @@ public class SearchIndex implements IHelpSearchIndex { - indexedDocs = new HelpProperties(INDEXED_DOCS_FILE, indexDir); - indexedDocs.restore(); - setInconsistent(true); -- ir = IndexReader.open(luceneDirectory, false); -+ ir = DirectoryReader.open(luceneDirectory); - return true; - } catch (IOException e) { - HelpBasePlugin.logError("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$ -@@ -323,7 +326,7 @@ public class SearchIndex implements IHelpSearchIndex { - if (ir != null) { - ir.close(); - } -- ir = IndexReader.open(luceneDirectory, false); -+ ir = DirectoryReader.open(luceneDirectory); - return true; - } catch (IOException e) { - HelpBasePlugin.logError("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$ -@@ -341,7 +344,7 @@ public class SearchIndex implements IHelpSearchIndex { - public IStatus removeDocument(String name) { - Term term = new Term(FIELD_NAME, name); - try { -- ir.deleteDocuments(term); -+ iw.deleteDocuments(term); - indexedDocs.remove(name); - } catch (IOException e) { - return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.ERROR, -@@ -379,7 +382,7 @@ public class SearchIndex implements IHelpSearchIndex { - * know about this change. Close it so that it gets reloaded next search. - */ - if (searcher != null) { -- searcher.close(); -+ searcher.getIndexReader().close(); - searcher = null; - } - return true; -@@ -411,7 +414,7 @@ public class SearchIndex implements IHelpSearchIndex { - * know about this change. Close it so that it gets reloaded next search. - */ - if (searcher != null) { -- searcher.close(); -+ searcher.getIndexReader().close(); - searcher = null; - } - return true; -@@ -525,18 +528,19 @@ public class SearchIndex implements IHelpSearchIndex { - } - - public IStatus removeDuplicates(String name, String[] index_paths) { -- TermDocs hrefDocs = null; -- TermDocs indexDocs = null; -- Term hrefTerm = new Term(FIELD_NAME, name); - try { -+ AtomicReader ar = SlowCompositeReaderWrapper.wrap(ir); -+ DocsEnum hrefDocs = null; -+ DocsEnum indexDocs = null; -+ Term hrefTerm = new Term(FIELD_NAME, name); - for (int i = 0; i < index_paths.length; i++) { - Term indexTerm = new Term(FIELD_INDEX_ID, index_paths[i]); - if (i == 0) { -- hrefDocs = ir.termDocs(hrefTerm); -- indexDocs = ir.termDocs(indexTerm); -+ hrefDocs = ar.termDocsEnum(hrefTerm); -+ indexDocs = ar.termDocsEnum(indexTerm); - } else { -- hrefDocs.seek(hrefTerm); -- indexDocs.seek(indexTerm); -+ hrefDocs = ar.termDocsEnum(hrefTerm); -+ indexDocs = ar.termDocsEnum(indexTerm); - } - removeDocuments(hrefDocs, indexDocs); - } -@@ -545,19 +549,6 @@ public class SearchIndex implements IHelpSearchIndex { - "IO exception occurred while removing duplicates of document " + name //$NON-NLS-1$ - + " from index " + indexDir.getAbsolutePath() + ".", //$NON-NLS-1$ //$NON-NLS-2$ - ioe); -- } finally { -- if (hrefDocs != null) { -- try { -- hrefDocs.close(); -- } catch (IOException e) { -- } -- } -- if (indexDocs != null) { -- try { -- indexDocs.close(); -- } catch (IOException e) { -- } -- } - } - return Status.OK_STATUS; - } -@@ -569,33 +560,33 @@ public class SearchIndex implements IHelpSearchIndex { - * @param docs2 - * @throws IOException - */ -- private void removeDocuments(TermDocs doc1, TermDocs docs2) throws IOException { -- if (!doc1.next()) { -+ private void removeDocuments(DocsEnum doc1, DocsEnum docs2) throws IOException { -+ if (doc1.nextDoc() == DocsEnum.NO_MORE_DOCS) { - return; - } -- if (!docs2.next()) { -+ if (docs2.nextDoc() == DocsEnum.NO_MORE_DOCS) { - return; - } - while (true) { -- if (doc1.doc() < docs2.doc()) { -- if (!doc1.skipTo(docs2.doc())) { -- if (!doc1.next()) { -+ if (doc1.docID() < docs2.docID()) { -+ if (doc1.advance(docs2.docID()) == DocsEnum.NO_MORE_DOCS) { -+ if (doc1.nextDoc() == DocsEnum.NO_MORE_DOCS) { - return; - } - } -- } else if (doc1.doc() > docs2.doc()) { -- if (!docs2.skipTo(doc1.doc())) { -- if (!doc1.next()) { -+ } else if (doc1.docID() > docs2.docID()) { -+ if (docs2.advance(doc1.docID()) == DocsEnum.NO_MORE_DOCS) { -+ if (doc1.nextDoc() == DocsEnum.NO_MORE_DOCS) { - return; - } - } - } -- if (doc1.doc() == docs2.doc()) { -- ir.deleteDocument(doc1.doc()); -- if (!doc1.next()) { -+ if (doc1.docID() == docs2.docID()) { -+ iw.tryDeleteDocument(ir, doc1.docID()); -+ if (doc1.nextDoc() == DocsEnum.NO_MORE_DOCS) { - return; - } -- if (!docs2.next()) { -+ if (docs2.nextDoc() == DocsEnum.NO_MORE_DOCS) { - return; - } - } -@@ -802,7 +793,7 @@ public class SearchIndex implements IHelpSearchIndex { - public void openSearcher() throws IOException { - synchronized (searcherCreateLock) { - if (searcher == null) { -- searcher = new IndexSearcher(IndexReader.open(luceneDirectory, false)); -+ searcher = new IndexSearcher(DirectoryReader.open(luceneDirectory)); - } - } - } -@@ -820,7 +811,7 @@ public class SearchIndex implements IHelpSearchIndex { - if (searches.isEmpty()) { - if (searcher != null) { - try { -- searcher.close(); -+ searcher.getIndexReader().close(); - } catch (IOException ioe) { - } - } -@@ -903,7 +894,7 @@ public class SearchIndex implements IHelpSearchIndex { - IndexWriter cleaner = null; - LimitTokenCountAnalyzer analyzer = new LimitTokenCountAnalyzer(analyzerDescriptor.getAnalyzer(), 10000); - try { -- cleaner = new IndexWriter(luceneDirectory, new IndexWriterConfig(org.apache.lucene.util.Version.LUCENE_31, analyzer).setOpenMode( -+ cleaner = new IndexWriter(luceneDirectory, new IndexWriterConfig(org.apache.lucene.util.Version.LUCENE_47, analyzer).setOpenMode( - OpenMode.CREATE)); - } catch (IOException ioe) { - } finally { -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SmartAnalyzer.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SmartAnalyzer.java -index d0a7bb7..1b20d3b 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SmartAnalyzer.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SmartAnalyzer.java -@@ -10,15 +10,13 @@ - *******************************************************************************/ - package org.eclipse.help.internal.search; - --import java.io.*; -- - import org.apache.lucene.analysis.*; - - /** - * Smart Analyzer. Chooses underlying implementation based on the field which - * text is analyzed. - */ --public final class SmartAnalyzer extends Analyzer { -+public final class SmartAnalyzer extends AnalyzerWrapper { - Analyzer pluggedInAnalyzer; - Analyzer exactAnalyzer; - -@@ -31,14 +29,14 @@ public final class SmartAnalyzer extends Analyzer { - this.exactAnalyzer = new DefaultAnalyzer(locale); - } - /** -- * Creates a TokenStream which tokenizes all the text in the provided -- * Reader. Delegates to DefaultAnalyzer when field used to search for exact -+ * Delegates to DefaultAnalyzer when field used to search for exact - * match, and to plugged-in analyzer for other fields. - */ -- public final TokenStream tokenStream(String fieldName, Reader reader) { -+ @Override -+ public final Analyzer getWrappedAnalyzer(String fieldName) { - if (fieldName != null && fieldName.startsWith("exact_")) { //$NON-NLS-1$ -- return exactAnalyzer.tokenStream(fieldName, reader); -+ return exactAnalyzer; - } -- return pluggedInAnalyzer.tokenStream(fieldName, reader); -+ return pluggedInAnalyzer; - } - } -diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java -index 0b70cf7..106775a 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java -+++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java -@@ -35,6 +35,7 @@ public final class WordTokenStream extends Tokenizer { - * Constructor - */ - public WordTokenStream(String fieldName, Reader reader, Locale locale) { -+ super(reader); - this.reader = reader; - boundary = BreakIterator.getWordInstance(locale); - -@@ -105,6 +106,7 @@ public final class WordTokenStream extends Tokenizer { - } - - public void close() throws IOException { -+ super.close(); - /// Unlikely to be called as this is a reused - if (this.reader != null) { - this.reader.close(); -diff --git a/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF b/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF -index a8177c3..cd99e8a 100644 ---- a/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF -+++ b/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF -@@ -18,15 +18,14 @@ - org.eclipse.ui.intro.universal, - org.eclipse.ui.forms, - org.eclipse.ui.browser;bundle-version="3.2.300", -+ org.apache.lucene.analysis;bundle-version="[4.7.0,5.0.0)", -+ org.apache.lucene.core;bundle-version="[4.7.0,5.0.0)", - org.eclipse.equinox.jsp.jasper;bundle-version="1.0.200", - org.eclipse.equinox.jsp.jasper.registry;bundle-version="1.0.100" - Bundle-ActivationPolicy: lazy - Bundle-Vendor: Eclipse.org - Import-Package: javax.servlet;version="3.1.0", -- javax.servlet.http;version="3.1.0", -- org.apache.lucene.index;core=split;version="[3.5.0,4.0.0)", -- org.apache.lucene.search;core=split;version="[3.5.0,4.0.0)", -- org.apache.lucene.store;core=split;version="[3.5.0,4.0.0)" -+ javax.servlet.http;version="3.1.0" - Bundle-RequiredExecutionEnvironment: JavaSE-1.6 - Export-Package: org.eclipse.ua.tests, - org.eclipse.ua.tests.browser, -diff --git a/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java b/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java -index 640d4c9..8924fa7 100644 ---- a/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java -+++ b/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java -@@ -24,7 +24,7 @@ import junit.framework.TestSuite; - import org.osgi.framework.Bundle; - - import org.apache.lucene.index.CorruptIndexException; --import org.apache.lucene.index.IndexReader; -+import org.apache.lucene.index.DirectoryReader; - import org.apache.lucene.search.IndexSearcher; - import org.apache.lucene.search.Query; - import org.apache.lucene.search.TopDocs; -@@ -157,7 +157,7 @@ public class PrebuiltIndexCompatibility extends TestCase { - IndexSearcher searcher = null; - try { - luceneDirectory = new NIOFSDirectory(new File(filePath)); -- searcher = new IndexSearcher(IndexReader.open(luceneDirectory, true)); -+ searcher = new IndexSearcher(DirectoryReader.open(luceneDirectory)); - TopDocs hits = searcher.search(luceneQuery, 500); - assertEquals(hits.totalHits, 1); - } finally { -@@ -167,7 +167,7 @@ public class PrebuiltIndexCompatibility extends TestCase { - } catch (IOException x) { - } - if (searcher != null) -- searcher.close(); -+ searcher.getIndexReader().close(); - } - } else { - fail("Cannot resolve to file protocol"); -diff --git a/dependencies/replace_platform_plugins_with_symlinks.sh b/dependencies/replace_platform_plugins_with_symlinks.sh -index b818924..f1a67b3 100755 ---- a/dependencies/replace_platform_plugins_with_symlinks.sh -+++ b/dependencies/replace_platform_plugins_with_symlinks.sh -@@ -45,13 +45,7 @@ pushd $1 - _symlink org.apache.felix.gogo.shell_ felix-gogo-shell/org.apache.felix.gogo.shell.jar - _symlink javax.annotation-api_ glassfish-annotation-api.jar - _symlink org.apache.lucene.core_ lucene/lucene-core.jar -- _symlink org.apache.lucene.analyzers-common_ lucene/lucene-analyzers-common.jar -- _symlink org.apache.lucene.analyzers-smartcn_ lucene/lucene-analyzers-smartcn.jar -- _symlink org.apache.lucene.queries lucene/lucene-queries.jar -- _symlink org.apache.lucene.queryparser lucene/lucene-queryparser.jar -- _symlink org.apache.lucene.sandbox_ lucene/lucene-sandbox.jar -- _symlink org.apache.lucene.spatial3d_ lucene/lucene-spatial3d.jar -- _symlink org.apache.lucene.spatial_ lucene/lucene-spatial.jar -+ _symlink org.apache.lucene.analysis_ lucene/lucene-analyzers-common.jar - _symlink com.spatial4j_ spatial4j.jar - _symlink org.apache.xalan xalan-j2.jar - _symlink org.apache.xerces xerces-j2.jar ---- a/eclipse.platform.releng/features/org.eclipse.help-feature/feature.xml -+++ b/eclipse.platform.releng/features/org.eclipse.help-feature/feature.xml -@@ -95,7 +95,7 @@ - - - -- -+ - - - ---- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/category.xml -+++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/category.xml -@@ -50,7 +50,7 @@ - - - -- -+ - - - diff --git a/eclipse-lucene-5.patch b/eclipse-lucene-5.patch index 1a5d281..0d69a3e 100644 --- a/eclipse-lucene-5.patch +++ b/eclipse-lucene-5.patch @@ -7,31 +7,6 @@ Change-Id: I882188205c2c1e2cc1106108680dd4e94570a975 Signed-off-by: Sopot Cela --- -diff --git a/eclipse.platform.ua/org.eclipse.help.base/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.help.base/.settings/org.eclipse.jdt.core.prefs -index 34d2b77..07713d8 100644 ---- a/eclipse.platform.ua/org.eclipse.help.base/.settings/org.eclipse.jdt.core.prefs -+++ b/eclipse.platform.ua/org.eclipse.help.base/.settings/org.eclipse.jdt.core.prefs -@@ -7,9 +7,9 @@ - org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled - org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled - org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate --org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 - org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve --org.eclipse.jdt.core.compiler.compliance=1.5 -+org.eclipse.jdt.core.compiler.compliance=1.7 - org.eclipse.jdt.core.compiler.debug.lineNumber=generate - org.eclipse.jdt.core.compiler.debug.localVariable=generate - org.eclipse.jdt.core.compiler.debug.sourceFile=generate -@@ -98,7 +98,7 @@ - org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore - org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning - org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning --org.eclipse.jdt.core.compiler.source=1.5 -+org.eclipse.jdt.core.compiler.source=1.7 - org.eclipse.jdt.core.formatter.align_type_members_on_columns=false - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 diff --git a/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF b/org.eclipse.help.base/META-INF/MANIFEST.MF index ee34c8e..e4bd703 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF @@ -50,7 +25,7 @@ index ee34c8e..e4bd703 100644 + org.apache.lucene.analyzers-smartcn;bundle-version="5.1.0" Import-Package: com.ibm.icu.text, org.eclipse.equinox.http.jetty;resolution:=optional - Bundle-RequiredExecutionEnvironment: J2SE-1.5 + Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/eclipse.platform.ua/org.eclipse.help.base/plugin.xml b/org.eclipse.help.base/plugin.xml index 07a5a22..4daf3f0 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/plugin.xml @@ -68,19 +43,12 @@ diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/inte index 4ea3b21..704b0e9 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java +++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java -@@ -1,5 +1,5 @@ - /******************************************************************************* -- * Copyright (c) 2012 IBM Corporation and others. -+ * Copyright (c) 2012, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Sopot Cela - Bug 466829 - Migration to Lucene 5 - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.help.internal.search; @@ -19,8 +20,9 @@ @@ -168,7 +136,7 @@ index a066aa4..a2183f9 100644 /** * Constructor for Analyzer_en. */ -@@ -27,18 +34,25 @@ +@@ -27,19 +34,25 @@ super(); } /** @@ -176,9 +144,9 @@ index a066aa4..a2183f9 100644 + * Creates a TokenStreamComponents which tokenizes all the text in the provided * Reader. */ + @Override - public final TokenStream tokenStream(String fieldName, Reader reader) { - return new PorterStemFilter(new StopFilter(Version.LUCENE_30, new LowerCaseAndDigitsTokenizer(reader), getStopWords(), false)); -+ @Override + public final TokenStreamComponents createComponents(String fieldName) { + final Tokenizer source; + source = new LowerCaseAndDigitsTokenizer(); @@ -195,8 +163,8 @@ index a066aa4..a2183f9 100644 - private Set getStopWords() { + private List getStopWords() { if ( stopWords == null ) { -- stopWords = new HashSet(); -+ stopWords = new ArrayList(); +- stopWords = new HashSet<>(); ++ stopWords = new ArrayList<>(); for (int i = 0; i < STOP_WORDS.length; i++) { stopWords.add(STOP_WORDS[i]); } @@ -232,7 +200,7 @@ index 4109474..e3c8722 100644 /** -@@ -84,11 +82,14 @@ +@@ -84,12 +82,14 @@ } /** @@ -240,9 +208,9 @@ index 4109474..e3c8722 100644 + * Creates a TokenStreamComponents which tokenizes all the text in the provided * Reader. */ + @Override - public final TokenStream tokenStream(String fieldName, Reader reader) { - return new LowerCaseFilter(Version.LUCENE_30, new WordTokenStream(fieldName, reader, locale)); -+ @Override + public final TokenStreamComponents createComponents(String fieldName) { + Tokenizer source = new WordTokenStream(locale); + LowerCaseFilter filter = new LowerCaseFilter(source); @@ -254,7 +222,7 @@ diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/inte index a475688..cbb2472 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java +++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java -@@ -8,27 +8,26 @@ +@@ -8,29 +8,27 @@ * Contributors: * IBM Corporation - initial API and implementation * Alexander Kurtakov - Bug 460787 @@ -278,13 +246,15 @@ index a475688..cbb2472 100644 + public LowerCaseAndDigitsTokenizer() { + super(); } - protected char normalize(char c) { + @Override +- protected char normalize(char c) { ++ protected int normalize(int c) { return Character.toLowerCase(c); } -- protected boolean isTokenChar(char c) { -+ @Override -+ public boolean isTokenChar(int c) { + @Override +- protected boolean isTokenChar(char c) { ++ public boolean isTokenChar(int c) { return Character.isLetterOrDigit(c); } @@ -292,13 +262,6 @@ diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/inte index 60a545d..804bf5e 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java +++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java -@@ -1,5 +1,5 @@ - /******************************************************************************* -- * Copyright (c) 2010, 2011 IBM Corporation and others. -+ * Copyright (c) 2010, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: @@ -316,9 +279,9 @@ index 60a545d..804bf5e 100644 import org.eclipse.help.search.ISearchDocument; /** -@@ -31,22 +34,22 @@ - } +@@ -32,25 +35,25 @@ + @Override public void setTitle(String title) { - doc.add(new Field("title", title, Field.Store.NO, Field.Index.ANALYZED)); //$NON-NLS-1$ - doc.add(new Field("exact_title", title, Field.Store.NO, Field.Index.ANALYZED)); //$NON-NLS-1$ @@ -328,11 +291,13 @@ index 60a545d..804bf5e 100644 + doc.add(new StoredField("raw_title", title)); //$NON-NLS-1$ } + @Override public void setSummary(String summary) { - doc.add(new Field("summary", summary, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$ + doc.add(new StoredField("summary", summary)); //$NON-NLS-1$ } + @Override public void addContents(String contents) { - doc.add(new Field("contents", new StringReader(contents))); //$NON-NLS-1$ - doc.add(new Field("exact_contents", new StringReader(contents))); //$NON-NLS-1$ @@ -340,15 +305,16 @@ index 60a545d..804bf5e 100644 + doc.add(new TextField("exact_contents", new StringReader(contents))); //$NON-NLS-1$ } + @Override public void setHasFilters(boolean hasFilters) { - doc.add(new Field("filters", Boolean.toString(hasFilters), Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$ + doc.add(new StoredField("filters", Boolean.toString(hasFilters))); //$NON-NLS-1$ } public Document getDocument() { -@@ -54,8 +57,8 @@ - } +@@ -59,8 +62,8 @@ + @Override public void addContents(Reader contents, Reader exactContents) { - doc.add(new Field("contents", contents)); //$NON-NLS-1$ - doc.add(new Field("exact_contents", exactContents)); //$NON-NLS-1$ @@ -361,13 +327,6 @@ diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/inte index ca9cd67..7952c8d 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java +++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java -@@ -1,5 +1,5 @@ - /******************************************************************************* -- * Copyright (c) 2005, 2014 IBM Corporation and others. -+ * Copyright (c) 2005, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: @@ -376,7 +335,7 @@ index ca9cd67..7952c8d 100644 *******************************************************************************/ package org.eclipse.help.internal.search; -@@ -152,6 +153,7 @@ +@@ -150,6 +151,7 @@ .getProperty(SearchIndex.DEPENDENCIES_KEY_ANALYZER); if (!targetIndex.isLuceneCompatible(lucene) || !targetIndex.isAnalyzerCompatible(analyzer)) { @@ -389,9 +348,9 @@ deleted file mode 100644 index 08cf58a..0000000 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java +++ /dev/null -@@ -1,459 +0,0 @@ +@@ -1,455 +0,0 @@ -/******************************************************************************* -- * Copyright (c) 2000, 2012 IBM Corporation and others. +- * Copyright (c) 2000, 2016 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -434,7 +393,7 @@ index 08cf58a..0000000 - // List of QueryWordsToken - private List analyzedTokens; - // List of words to highlight -- private List highlightWords = new ArrayList(); +- private List highlightWords = new ArrayList<>(); - private Locale locale; - /** - * Creates a query builder for the search word. The search word is processed @@ -456,7 +415,7 @@ index 08cf58a..0000000 - * Splits user query into tokens and returns a list of QueryWordsToken's. - */ - private List tokenizeUserQuery(String searchWords) { -- List tokenList = new ArrayList(); +- List tokenList = new ArrayList<>(); - //Divide along quotation marks - //StringTokenizer qTokenizer = new StringTokenizer(searchWords.trim(), - // "\"", true); //$NON-NLS-1$ @@ -531,7 +490,7 @@ index 08cf58a..0000000 - */ - private List analyzeTokens(List tokens) { - boolean isTokenAfterNot = false; -- List newTokens = new ArrayList(); +- List newTokens = new ArrayList<>(); - int wildCardTermCount = 0; - for (int i = 0; i < tokens.size(); i++) { - QueryWordsToken token = tokens.get(i); @@ -633,17 +592,13 @@ index 08cf58a..0000000 - * @return List of String - */ - private List analyzeText(Analyzer analyzer, String fieldName, String text) { -- List words = new ArrayList(1); -- Reader reader = new StringReader(text); -- TokenStream tStream = analyzer.tokenStream(fieldName, reader); -- -- CharTermAttribute termAttribute = tStream.getAttribute(CharTermAttribute.class); -- try { +- List words = new ArrayList<>(1); +- try (Reader reader = new StringReader(text); TokenStream tStream = analyzer.tokenStream(fieldName, reader)) { +- CharTermAttribute termAttribute = tStream.getAttribute(CharTermAttribute.class); - while (tStream.incrementToken()) { - String term = termAttribute.toString(); - words.add(term); - } -- reader.close(); - } catch (IOException ioe) { - } - @@ -675,8 +630,8 @@ index 08cf58a..0000000 - */ - private List getRequiredQueries(List tokens, String[] fieldNames, - float[] boosts) { -- List oredQueries = new ArrayList(); -- ArrayList requiredQueryTokens = new ArrayList(); +- List oredQueries = new ArrayList<>(); +- ArrayList requiredQueryTokens = new ArrayList<>(); - for (int i = 0; i < tokens.size(); i++) { - QueryWordsToken token = tokens.get(i); - if (token.type != QueryWordsToken.OR) { @@ -686,7 +641,7 @@ index 08cf58a..0000000 - fieldNames, boosts); - if (reqQuery != null) - oredQueries.add(reqQuery); -- requiredQueryTokens = new ArrayList(); +- requiredQueryTokens = new ArrayList<>(); - } - } - Query reqQuery = getRequiredQuery(requiredQueryTokens, fieldNames, @@ -854,9 +809,9 @@ deleted file mode 100644 index 324b8e1..0000000 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsExactPhrase.java +++ /dev/null -@@ -1,50 +0,0 @@ +@@ -1,51 +0,0 @@ -/******************************************************************************* -- * Copyright (c) 2000, 2011 IBM Corporation and others. +- * Copyright (c) 2000, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -879,7 +834,7 @@ index 324b8e1..0000000 - private List words; - public QueryWordsExactPhrase() { - super(QueryWordsToken.EXACT_PHRASE, ""); //$NON-NLS-1$ -- words = new ArrayList(); +- words = new ArrayList<>(); - } - public void addWord(String word) { - words.add(word); @@ -894,6 +849,7 @@ index 324b8e1..0000000 - /** - * Creates a lucene query for a field - */ +- @Override - public Query createLuceneQuery(String field, float boost) { - PhraseQuery q = new PhraseQuery(); - for (Iterator it = getWords().iterator(); it.hasNext();) { @@ -910,9 +866,9 @@ deleted file mode 100644 index 8a94e89..0000000 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsPhrase.java +++ /dev/null -@@ -1,51 +0,0 @@ +@@ -1,52 +0,0 @@ -/******************************************************************************* -- * Copyright (c) 2000, 2011 IBM Corporation and others. +- * Copyright (c) 2000, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -936,7 +892,7 @@ index 8a94e89..0000000 - private List words; - public QueryWordsPhrase() { - super(QueryWordsToken.PHRASE, ""); //$NON-NLS-1$ -- words = new ArrayList(); +- words = new ArrayList<>(); - } - public void addWord(String word) { - words.add(word); @@ -951,6 +907,7 @@ index 8a94e89..0000000 - /** - * Creates a lucene query for a field - */ +- @Override - public Query createLuceneQuery(String field, float boost) { - PhraseQuery q = new PhraseQuery(); - for (Iterator it = getWords().iterator(); it.hasNext();) { @@ -1053,27 +1010,6 @@ diff --git a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/inte index 67963a5..131ac65 100644 --- a/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java +++ b/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java -@@ -1,14 +1,13 @@ - /******************************************************************************* -- * Copyright (c) 2000, 2014 IBM Corporation and others. -- * All rights reserved. This program and the accompanying materials -- * are made available under the terms of the Eclipse Public License v1.0 -+ * Copyright (c) 2000, 2015 IBM Corporation and others. All rights reserved. This program and the -+ * accompanying materials are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * -- * Contributors: -- * IBM Corporation - initial API and implementation -- * Holger Voormann - fix for bug 426785 (http://eclip.se/426785) -- * Alexander Kurtakov - Bug 460787 -+ * Contributors: IBM Corporation - initial API and implementation -+ * Holger Voormann - fix for bug 426785 (http://eclip.se/426785) -+ * Alexander Kurtakov - Bug 460787 -+ * Sopot Cela - Bug 466829 - Migration to Lucene 5 - *******************************************************************************/ - package org.eclipse.help.internal.search; - @@ -17,6 +16,7 @@ import java.io.IOException; import java.io.InputStream; @@ -1134,15 +1070,6 @@ index 67963a5..131ac65 100644 private String locale; -@@ -133,7 +143,7 @@ - private Collection searches = new ArrayList(); - - private FileLock lock; -- private RandomAccessFile raf = null; -+ private RandomAccessFile raf = null; - - /** - * Constructor. @@ -170,7 +180,7 @@ inconsistencyFile = new File(indexDir.getParentFile(), locale + ".inconsistent"); //$NON-NLS-1$ htmlSearchParticipant = new HTMLSearchParticipant(indexDir.getAbsolutePath()); @@ -1491,14 +1418,13 @@ index 67963a5..131ac65 100644 } catch (BooleanQuery.TooManyClauses tmc) { collector.addQTCException(new QueryTooComplexException()); } catch (QueryTooComplexException qe) { -@@ -647,6 +701,19 @@ +@@ -647,6 +701,18 @@ } finally { unregisterSearch(Thread.currentThread()); } + } + + private boolean isWildcardQuery(String searchWord) { -+ + return searchWord.contains("?")|| searchWord.contains("*"); //$NON-NLS-1$//$NON-NLS-2$ + } + @@ -1510,26 +1436,8 @@ index 67963a5..131ac65 100644 + return sb.toString(); } - public String getLocale() { -@@ -660,13 +727,13 @@ - if (docPlugins == null) { - Set totalIds = new HashSet(); - IExtensionRegistry registry = Platform.getExtensionRegistry(); -- IExtensionPoint extensionPoint = registry.getExtensionPoint(TocFileProvider.EXTENSION_POINT_ID_TOC); -+ IExtensionPoint extensionPoint = registry -+ .getExtensionPoint(TocFileProvider.EXTENSION_POINT_ID_TOC); - IExtension[] extensions = extensionPoint.getExtensions(); -- for (int i=0;i() , false); +- try (Directory luceneDirectory = new NIOFSDirectory(new File(filePath)); +- IndexSearcher searcher = new IndexSearcher(IndexReader.open(luceneDirectory, true))) { + StandardAnalyzer standardAnalyzer = new StandardAnalyzer(); + QueryBuilder builder = new QueryBuilder(standardAnalyzer); + Query luceneQuery = builder.createBooleanQuery("contents", "eclipse"); - Directory luceneDirectory = null; - IndexSearcher searcher = null; - try { -- luceneDirectory = new NIOFSDirectory(new File(filePath)); -- searcher = new IndexSearcher(IndexReader.open(luceneDirectory, true)); -+ luceneDirectory = new NIOFSDirectory(new File(filePath).toPath()); -+ searcher = new IndexSearcher(DirectoryReader.open(luceneDirectory)); ++ try (Directory luceneDirectory = new NIOFSDirectory(new File(filePath).toPath())) { ++ IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(luceneDirectory)); TopDocs hits = searcher.search(luceneQuery, 500); -- assertEquals(hits.totalHits, 1); -+ assertEquals(1, hits.totalHits ); - } finally { - if (luceneDirectory != null) - try { -@@ -167,13 +155,13 @@ - } catch (IOException x) { - } - if (searcher != null) -- searcher.close(); -+ searcher.getIndexReader().close(); + assertEquals(hits.totalHits, 1); } - } else { - fail("Cannot resolve to file protocol"); - } - } -- -+ - /* - * Tests the isCompatible method in PluginIndex - */ -@@ -186,22 +174,20 @@ - public PluginIndex createPluginIndex(String versionDirectory) { - PluginIndex pluginIndex; - SearchIndexWithIndexingProgress index = BaseHelpSystem.getLocalSearchManager().getIndex("en_us".toString()); -- BaseHelpSystem.getLocalSearchManager().ensureIndexUpdated( -- new NullProgressMonitor(), -- index); -+ BaseHelpSystem.getLocalSearchManager().ensureIndexUpdated(new NullProgressMonitor(), index); - pluginIndex = new PluginIndex("org.eclipse.ua.tests", "data/help/searchindex/" + versionDirectory, index); - return pluginIndex; - } -- -+ - /* -- * Tests the isLuceneCompatible method in SearchIndex -+ * Tests the isLuceneCompatible method in SearchIndex - */ - private void checkLuceneCompatible(String version, boolean expected) { - SearchIndexWithIndexingProgress index = BaseHelpSystem.getLocalSearchManager().getIndex("en_us".toString()); -- BaseHelpSystem.getLocalSearchManager().ensureIndexUpdated( -- new NullProgressMonitor(), -- index); -+ BaseHelpSystem.getLocalSearchManager().ensureIndexUpdated(new NullProgressMonitor(), index); - assertEquals(expected, index.isLuceneCompatible(version)); - } - -+ -+ - } diff --git a/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java index 223e42a..2e782c3 100644 --- a/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java +++ b/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java -@@ -1,5 +1,5 @@ - /******************************************************************************* -- * Copyright (c) 2010 IBM Corporation and others. -+ * Copyright (c) 2010, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: @@ -2241,15 +1912,15 @@ index 223e42a..2e782c3 100644 *******************************************************************************/ package org.eclipse.ua.tests.help.search; -@@ -40,7 +41,7 @@ - } +@@ -35,7 +36,7 @@ + @Test public void testSearchUsingAndInSeparateDocs() { - SearchTestUtils.searchAllLocales("jduehdye and olhoykk", new String[0]); + SearchTestUtils.searchAllLocales("jduehdye AND olhoykk", new String[0]); - } + } - public void testSearchExactMatch() { + @Test --- a/eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/pom.xml +++ b/eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/pom.xml @@ -101,7 +101,7 @@ diff --git a/eclipse-mockito.patch b/eclipse-mockito.patch index cb8fa43..20ae6c7 100644 --- a/eclipse-mockito.patch +++ b/eclipse-mockito.patch @@ -23,7 +23,7 @@ + org.hamcrest.core, + org.mockito.mockito-core, org.eclipse.e4.ui.css.core;bundle-version="0.10.100" - Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy --- eclipse.platform.ui/tests/org.eclipse.e4.ui.tests.css.swt/META-INF/MANIFEST.MF.orig 2014-04-22 14:31:35.155774270 +0100 +++ eclipse.platform.ui/tests/org.eclipse.e4.ui.tests.css.swt/META-INF/MANIFEST.MF 2014-04-22 14:33:47.599498477 +0100 @@ -37,29 +37,4 @@ + org.mockito.mockito-core, org.eclipse.equinox.preferences;bundle-version="3.5.200" Bundle-ActivationPolicy: lazy - Bundle-RequiredExecutionEnvironment: JavaSE-1.7 ---- eclipse.platform.releng/features/org.eclipse.sdk.tests/feature.xml.orig 2014-03-26 11:39:33.756282231 +0000 -+++ eclipse.platform.releng/features/org.eclipse.sdk.tests/feature.xml 2014-03-26 13:03:00.971974954 +0000 -@@ -469,13 +469,6 @@ - unpack="false"/> - - -- -- - - ---- eclipse.pde/org.eclipse.pde-feature/pom.xml.bak 2013-01-29 11:22:47.065953870 +0100 -+++ eclipse.pde/org.eclipse.pde-feature/pom.xml 2013-01-29 11:23:18.630196529 +0100 -@@ -37,6 +37,8 @@ +--- eclipse.pde.ui/features/org.eclipse.pde-feature/pom.xml.bak 2013-01-29 11:22:47.065953870 +0100 ++++ eclipse.pde.ui/features/org.eclipse.pde-feature/pom.xml 2013-01-29 11:23:18.630196529 +0100 +@@ -38,6 +38,8 @@ @@ -70,40 +70,6 @@ ---- eclipse.platform.releng/features/org.eclipse.platform-feature/sourceTemplateFeature/build.properties.bak 2013-03-14 11:18:11.000000000 +0100 -+++ eclipse.platform.releng/features/org.eclipse.platform-feature/sourceTemplateFeature/build.properties 2013-03-14 12:45:12.956174290 +0100 -@@ -15,10 +15,7 @@ - license.html - - --generate.feature@org.eclipse.rcp.source=org.eclipse.rcp,feature@org.eclipse.e4.rcp.source,plugin@com.ibm.icu.source;version=50.1.0.qualifier;unpack="false",\ --plugin@org.apache.felix.gogo.command.source;version=0.10.0.qualifier;unpack="false",\ --plugin@org.apache.felix.gogo.runtime.source;version=0.10.0.qualifier;unpack="false",\ --plugin@org.apache.felix.gogo.shell.source;version=0.10.0.qualifier;unpack="false" -+generate.feature@org.eclipse.rcp.source=org.eclipse.rcp,feature@org.eclipse.e4.rcp.source - - generate.feature@org.eclipse.equinox.p2.user.ui.source=org.eclipse.equinox.p2.user.ui,\ - feature@org.eclipse.equinox.p2.core.feature.source,\ -@@ -31,16 +28,6 @@ - plugin@org.eclipse.ecf.provider.filetransfer.source;version=3.2.0.qualifier;unpack="false",\ - plugin@org.eclipse.ecf.provider.filetransfer.ssl.source;version=1.0.0.qualifier;unpack="false",\ - plugin@org.eclipse.ecf.provider.filetransfer.httpclient4.source;version=1.0.200.qualifier;unpack="false",\ -- plugin@org.eclipse.ecf.provider.filetransfer.httpclient4.ssl.source;version=1.0.0.qualifier;unpack="false",\ -- plugin@org.apache.commons.codec.source;version=1.4.0.qualifier;unpack="false,\ -- plugin@org.apache.commons.httpclient.source;version=3.1.0.qualifier;unpack="false" -+ plugin@org.eclipse.ecf.provider.filetransfer.httpclient4.ssl.source;version=1.0.0.qualifier;unpack="false" - --generate.feature@org.eclipse.e4.rcp.source=org.eclipse.e4.rcp,\ -- plugin@javax.annotation.source;version=1.1.0.qualifier;unpack="false",\ -- plugin@javax.inject.source;version=1.0.0.qualifier;unpack="false",\ -- plugin@org.apache.batik.css.source;version=1.6.0.qualifier;unpack="false",\ -- plugin@org.apache.batik.util.gui.source;version=1.6.0.qualifier;unpack="false",\ -- plugin@org.apache.batik.util.source;version=1.6.0.qualifier;unpack="false",\ -- plugin@org.w3c.dom.smil.source;version=1.0.0.qualifier;unpack="false",\ -- plugin@org.w3c.dom.svg.source;version=1.1.0.qualifier;unpack="false",\ -- plugin@org.w3c.css.sac.source;version=1.3.1.qualifier;unpack="false" -+generate.feature@org.eclipse.e4.rcp.source=org.eclipse.e4.rcp -\ No newline at end of file --- eclipse.platform.releng/features/org.eclipse.platform-feature/pom.xml.orig 2014-11-28 15:27:07.874872769 +0000 +++ eclipse.platform.releng/features/org.eclipse.platform-feature/pom.xml 2014-11-28 15:31:02.592652099 +0000 @@ -74,6 +74,13 @@ @@ -145,42 +111,6 @@ ---- eclipse.platform.releng/features/org.eclipse.sdk/build.properties.orig 2015-03-18 09:32:34.661736950 +0000 -+++ eclipse.platform.releng/features/org.eclipse.sdk/build.properties 2015-03-18 09:33:37.948838036 +0000 -@@ -11,31 +11,12 @@ - bin.includes=feature.xml,feature.properties - - generate.feature@org.eclipse.platform.source=org.eclipse.platform,feature@org.eclipse.rcp.source,feature@org.eclipse.equinox.p2.user.ui.source;optional="true",plugin@org.eclipse.platform.doc.isv;unpack="false",\ -- plugin@org.apache.ant.source;version=1.8.4.qualifier;unpack="false",\ -- plugin@com.jcraft.jsch.source;version=0.1.46.qualifier;unpack="false",\ - exclude@org.eclipse.platform.doc.user - - generate.feature@org.eclipse.jdt.source=org.eclipse.jdt, plugin@org.eclipse.jdt.doc.isv;unpack="false",\ --plugin@org.junit.source;version=4.10.0.qualifier;unpack="false",\ --plugin@org.hamcrest.core.source;version=1.1.0.qualifier;unpack="false",\ - exclude@org.eclipse.jdt.doc.user --generate.feature@org.eclipse.pde.source=org.eclipse.pde,plugin@org.objectweb.asm.source;version=3.3.1.qualifier;unpack="false",exclude@org.eclipse.pde.doc.user -+generate.feature@org.eclipse.pde.source=org.eclipse.pde,exclude@org.eclipse.pde.doc.user - generate.feature@org.eclipse.cvs.source=org.eclipse.cvs --generate.feature@org.eclipse.help.source=org.eclipse.help,\ -- plugin@javax.servlet.source;version=3.0.0.qualifier;unpack="false",\ -- plugin@javax.servlet.jsp.source;version=2.2.0.qualifier;unpack="false",\ -- plugin@org.apache.jasper.glassfish.source;version=2.2.2.qualifier;unpack="false",\ -- plugin@com.sun.el.source;version=2.2.0.qualifier;unpack="false",\ -- plugin@org.apache.commons.logging.source;version=1.0.4.qualifier;unpack="false",\ -- plugin@org.apache.lucene.analysis.source;version=3.5.0.qualifier;unpack="false",\ -- plugin@org.apache.lucene.core.source;version=3.5.0.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.continuation.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.http.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.io.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.security.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.server.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.servlet.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@org.eclipse.jetty.util.source;version=8.1.9.qualifier;unpack="false",\ -- plugin@javax.el.source;version=2.2.0.qualifier;unpack="false" -+generate.feature@org.eclipse.help.source=org.eclipse.help - - generatedVersionLength=45 --- eclipse.platform.ui/features/org.eclipse.e4.rcp/pom.xml.orig 2014-05-26 18:37:25.406426611 +0300 +++ eclipse.platform.ui/features/org.eclipse.e4.rcp/pom.xml 2014-05-26 18:37:47.327449374 +0300 @@ -54,6 +54,21 @@ diff --git a/eclipse-p2-pick-up-renamed-jars.patch b/eclipse-p2-pick-up-renamed-jars.patch index 8a85fe3..a10bf5b 100644 --- a/eclipse-p2-pick-up-renamed-jars.patch +++ b/eclipse-p2-pick-up-renamed-jars.patch @@ -1,6 +1,6 @@ --- rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java.orig 2012-05-05 15:24:03.000000000 +0200 +++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java 2012-05-17 16:14:48.607827015 +0200 -@@ -752,7 +752,7 @@ +@@ -807,7 +807,7 @@ //First check to see if there is already an IU around for this IInstallableUnit bundleIU = queryForIU(result, bundleDescriptions[i].getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())); IArtifactKey key = createBundleArtifactKey(bd.getSymbolicName(), bd.getVersion().toString()); diff --git a/eclipse-pde-tp-support-droplets.patch b/eclipse-pde-tp-support-droplets.patch index 704982f..e46c8f1 100644 --- a/eclipse-pde-tp-support-droplets.patch +++ b/eclipse-pde-tp-support-droplets.patch @@ -16,7 +16,7 @@ index 7c20994..ab702e3 100644 @@ -102,5 +102,6 @@ Require-Bundle: org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)" Eclipse-LazyStart: true - Bundle-RequiredExecutionEnvironment: JavaSE-1.6 + Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: com.ibm.icu.util +Import-Package: com.ibm.icu.util, + org.eclipse.equinox.internal.simpleconfigurator.utils diff --git a/eclipse-pluginconverter-warning.patch b/eclipse-pluginconverter-warning.patch new file mode 100644 index 0000000..5b4c22c --- /dev/null +++ b/eclipse-pluginconverter-warning.patch @@ -0,0 +1,11 @@ +--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java.orig 2016-04-17 00:05:41.751589113 +0100 ++++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java 2016-04-17 00:11:13.032263291 +0100 +@@ -519,8 +519,6 @@ + try { + converter = acquirePluginConverter(); + if (converter == null) { +- String message = NLS.bind(Messages.exception_noPluginConverter, bundleLocation); +- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message)); + return null; + } + return converter.convertManifest(bundleLocation, false, null, true, null); diff --git a/eclipse-policy-comparators.patch b/eclipse-policy-comparators.patch deleted file mode 100644 index 5ba1091..0000000 --- a/eclipse-policy-comparators.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- eclipse.platform.team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DiffViewerComparator.java.orig 2014-03-27 10:48:13.547706443 +0000 -+++ eclipse.platform.team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DiffViewerComparator.java 2014-03-27 10:52:42.615751600 +0000 -@@ -49,7 +49,7 @@ - - return oldStart0 - oldStart1; - } -- return Policy.getComparator().compare(arg0, arg1); -+ return Policy.getComparator().compare((String)arg0, (String)arg1); - } - }; - } ---- eclipse.platform.ui/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java.orig 2014-03-27 11:27:35.233213660 +0000 -+++ eclipse.platform.ui/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java 2014-03-27 12:19:30.696748271 +0000 -@@ -14,6 +14,7 @@ - import java.lang.reflect.InvocationTargetException; - import java.net.URL; - import java.util.ArrayList; -+import java.util.Comparator; - import java.util.Iterator; - import java.util.Map; - import java.util.TreeMap; -@@ -228,7 +229,7 @@ - // show Help button in JFace dialogs - TrayDialog.setDialogHelpAvailable(true); - -- Policy.setComparator(Collator.getInstance()); -+ Policy.setComparator((Comparator)Collator.getInstance()); - } - - @Override diff --git a/eclipse-remove-jgit-provider.patch b/eclipse-remove-jgit-provider.patch index 2e6faa2..b10d555 100644 --- a/eclipse-remove-jgit-provider.patch +++ b/eclipse-remove-jgit-provider.patch @@ -18,13 +18,13 @@ false - 'v'yyyyMMdd-HHmm + ${qualifier.format} - jgit + pom.xml - ${jgit.dirtyWorkingTree} + ${jgit.dirtyWorkingTree-platformDefault} - +