From 8011d3cf7426820e6bc661699d87dfb2a7274153 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Jan 13 2016 11:14:47 +0000 Subject: Update to latest release --- diff --git a/0001-Compile-with-Lucene-5.patch b/0001-Compile-with-Lucene-5.patch index f350b7a..5715956 100644 --- a/0001-Compile-with-Lucene-5.patch +++ b/0001-Compile-with-Lucene-5.patch @@ -113,84 +113,6 @@ index 90acbd2..78d8c0c 100644 import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; -@@ -111,7 +121,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskData; - * intensive long-running operation. With about 20,000 tasks in my task list and an SSD, reindexing takes about 90 - * seconds. - *

-- * -+ * - * @author David Green - * @author Steffen Pingel - */ -@@ -145,9 +155,11 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_PERSON = new AbstractTaskSchema.Field( - TASK_ATTRIBUTE_PERSON, Messages.TaskListIndex_field_person, TaskAttribute.TYPE_PERSON, "person"); //$NON-NLS-1$ - -- public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_TASK_KEY = DefaultTaskSchema.getInstance().TASK_KEY; -+ public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_TASK_KEY = DefaultTaskSchema -+ .getInstance().TASK_KEY; - -- public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_SUMMARY = DefaultTaskSchema.getInstance().SUMMARY; -+ public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_SUMMARY = DefaultTaskSchema -+ .getInstance().SUMMARY; - - public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_ATTACHMENT_NAME = new AbstractTaskSchema.Field( - TASK_ATTRIBUTE_ATTACHMENT_NAME, Messages.TaskListIndex_field_attachment, TaskAttribute.TYPE_SHORT_TEXT, -@@ -170,8 +182,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - try { - maintainIndex(m); - } catch (CoreException e) { -- MultiStatus logStatus = new MultiStatus(TasksIndexCore.ID_PLUGIN, 0, -- "Failed to update task list index", e); //$NON-NLS-1$ -+ MultiStatus logStatus = new MultiStatus(TasksIndexCore.ID_PLUGIN, 0, "Failed to update task list index", //$NON-NLS-1$ -+ e); - logStatus.add(e.getStatus()); - StatusHandler.log(logStatus); - } -@@ -193,6 +205,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - private final Set specialFields = new HashSet(); - - private final Set indexedFields = new LinkedHashSet(); -+ - { - specialFields.add(FIELD_IDENTIFIER); - specialFields.add(FIELD_REPOSITORY_URL); -@@ -316,7 +329,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * Create an index on the given task list. Must be matched by a corresponding call to {@link #close()}. -- * -+ * - * @param taskList - * the task list that is to be indexed - * @param dataManager -@@ -334,7 +347,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * Create an index on the given task list. Must be matched by a corresponding call to {@link #close()}. -- * -+ * - * @param taskList - * the task list that is to be indexed - * @param dataManager -@@ -358,7 +371,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * Create an index on the given task list. Must be matched by a corresponding call to {@link #close()}. -- * -+ * - * @param taskList - * the task list that is to be indexed - * @param dataManager -@@ -385,7 +398,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * the delay before reindexing occurs after a task has changed or after {@link #reindex()} is called. -- * -+ * - * @param reindexDelay - * The delay in miliseconds. Specify 0 to indicate no delay. - */ @@ -437,7 +450,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL } } @@ -200,35 +122,6 @@ index 90acbd2..78d8c0c 100644 } catch (IOException e) { StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, "Cannot create task list index", e)); //$NON-NLS-1$ -@@ -459,7 +472,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * the default field used to match tasks when unspecified in the query -- * -+ * - * @param defaultField - * the default field to use in queries, must be one of the {@link #getIndexedFields() indexed fields}. - */ -@@ -536,8 +549,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - try { - maintainIndex(new NullProgressMonitor()); - } catch (CoreException e) { -- MultiStatus logStatus = new MultiStatus(TasksIndexCore.ID_PLUGIN, 0, -- "Failed to update task list index", e); //$NON-NLS-1$ -+ MultiStatus logStatus = new MultiStatus(TasksIndexCore.ID_PLUGIN, 0, "Failed to update task list index", //$NON-NLS-1$ -+ e); - logStatus.add(e.getStatus()); - StatusHandler.log(logStatus); - } -@@ -552,7 +565,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - * this method using the same pattern string do not require use of the backing index, making this method very - * efficient for multiple calls with the same pattern string. Cached results for a given pattern string are - * discarded if this method is called with a different pattern string. -- * -+ * - * @param task - * the task to match - * @param patternString @@ -591,12 +604,6 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL } catch (IOException e) { StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, @@ -242,32 +135,6 @@ index 90acbd2..78d8c0c 100644 } } else { -@@ -625,21 +632,21 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * call to wait until index maintenance has completed -- * -+ * - * @throws InterruptedException - */ - public void waitUntilIdle() throws InterruptedException { - if (!Platform.isRunning() && reindexDelay != 0L) { - // job join() behaviour is not the same when platform is not running -- Logger.getLogger(TaskListIndex.class.getName()).warning( -- "Index job joining may not work properly when Eclipse platform is not running"); //$NON-NLS-1$ -+ Logger.getLogger(TaskListIndex.class.getName()) -+ .warning("Index job joining may not work properly when Eclipse platform is not running"); //$NON-NLS-1$ - } - maintainIndexJob.join(); - } - - /** - * finds tasks that match the given pattern string -- * -+ * - * @param patternString - * the pattern string, used to match tasks - * @param collector @@ -674,12 +681,6 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL } catch (IOException e) { StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, @@ -299,15 +166,6 @@ index 90acbd2..78d8c0c 100644 lastResults = null; } return indexReader; -@@ -816,7 +817,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - /** - * advanced usage: cause the given task to be reindexed using {@link MaintainIndexType#REINDEX reindex scheduling - * rule}. -- * -+ * - * @param task - * the task - * @param taskData @@ -983,15 +984,14 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL if (value == null) { return; @@ -327,7 +185,7 @@ index 90acbd2..78d8c0c 100644 } } } -@@ -1004,19 +1004,18 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL +@@ -1004,13 +1004,12 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL // move the date by the GMT offset if there is any String value = DateTools.dateToString(date, Resolution.HOUR); @@ -344,42 +202,6 @@ index 90acbd2..78d8c0c 100644 } } - /** - * Computes a query element for a field that must lie in a specified date range. -- * -+ * - * @param field - * the field - * @param lowerBoundInclusive -@@ -1027,8 +1026,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - */ - public String computeQueryFieldDateRange(AbstractTaskSchema.Field field, Date lowerBoundInclusive, - Date upperBoundInclusive) { -- return field.getIndexKey() -- + ":[" + DateTools.dateToString(lowerBoundInclusive, Resolution.DAY) + " TO " + DateTools.dateToString(upperBoundInclusive, Resolution.DAY) + "]"; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ -+ return field.getIndexKey() + ":[" + DateTools.dateToString(lowerBoundInclusive, Resolution.DAY) + " TO " //$NON-NLS-1$//$NON-NLS-2$ -+ + DateTools.dateToString(upperBoundInclusive, Resolution.DAY) + "]"; //$NON-NLS-1$ - } - - /** -@@ -1037,7 +1036,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - * the task data. In this way implementations can avoid loading task data if the decision to filter tasks can be - * based on the ITask alone. Implementations that must read the task data in order to determine eligibility for - * indexing should return true for tasks where the provided task data is null. -- * -+ * - * @param task - * the task - * @param taskData -@@ -1051,7 +1050,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - /** - * Escapes special characters in the given literal value so that they are not interpreted as special characters in a - * query. -- * -+ * - * @param value - * the value to escape - * @return a representation of the value with characters escaped @@ -1069,7 +1068,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL try { if (!rebuildIndex) { @@ -389,28 +211,6 @@ index 90acbd2..78d8c0c 100644 reader.close(); } catch (CorruptIndexException e) { rebuildIndex = true; -@@ -1118,8 +1117,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - } - } - -- private void indexQueuedTasks(SubMonitor monitor) throws CorruptIndexException, LockObtainFailedException, -- IOException, CoreException { -+ private void indexQueuedTasks(SubMonitor monitor) -+ throws CorruptIndexException, LockObtainFailedException, IOException, CoreException { - - synchronized (reindexQueue) { - if (reindexQueue.isEmpty()) { -@@ -1200,8 +1199,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - } - -- private IStatus rebuildIndexCompletely(SubMonitor monitor) throws CorruptIndexException, LockObtainFailedException, -- IOException, CoreException { -+ private IStatus rebuildIndexCompletely(SubMonitor monitor) -+ throws CorruptIndexException, LockObtainFailedException, IOException, CoreException { - - MultiStatus multiStatus = new MultiStatus(TasksIndexCore.ID_PLUGIN, 0, null, null); - @@ -1216,7 +1215,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL writer = createIndexWriter(true); } catch (CorruptIndexException e) { @@ -452,11 +252,9 @@ index 90acbd2..78d8c0c 100644 } } -- protected IndexWriter createIndexWriter(boolean create) throws CorruptIndexException, LockObtainFailedException, -- IOException { + protected IndexWriter createIndexWriter(boolean create) + throws CorruptIndexException, LockObtainFailedException, IOException { - return new IndexWriter(directory, TaskAnalyzer.instance(), create, IndexWriter.MaxFieldLength.UNLIMITED); -+ protected IndexWriter createIndexWriter(boolean create) -+ throws CorruptIndexException, LockObtainFailedException, IOException { + IndexWriterConfig writerConfig = new IndexWriterConfig(TaskAnalyzer.instance()); + writerConfig.setInfoStream(InfoStream.NO_OUTPUT); + return new IndexWriter(directory, writerConfig); diff --git a/eclipse-mylyn-fix-task-list.patch b/eclipse-mylyn-fix-task-list.patch deleted file mode 100644 index 511b600..0000000 --- a/eclipse-mylyn-fix-task-list.patch +++ /dev/null @@ -1,47 +0,0 @@ -From cbd98a2f79e98d0bccff707a7536eeedd376fa3f Mon Sep 17 00:00:00 2001 -From: Sam Davis -Date: Wed, 9 Sep 2015 10:11:01 -0700 -Subject: 461443: [gtk3] custom task list drawer not working with GTK3 - -Change-Id: Id293eae26dbd198e4d9e93963c9370ad1513d960 -Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461443 ---- - .../ui/views/CustomTaskListDecorationDrawer.java | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java -index b25e733..8bb0ecd 100644 ---- org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java -+++ org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java -@@ -128,17 +128,17 @@ public class CustomTaskListDecorationDrawer implements Listener { - if (data instanceof ITaskContainer) { - switch (event.type) { - case SWT.EraseItem: { --// if ("gtk".equals(SWT.getPlatform())) { //$NON-NLS-1$ --// // GTK requires drawing on erase event so that images don't disappear when selected. --// if (activationImage != null) { --// drawActivationImage(activationImageOffset, event, activationImage); --// } --// if (!this.synchronizationOverlaid) { --// if (data instanceof ITaskContainer) { --// drawSyncronizationImage((ITaskContainer) data, event); --// } --// } --// } -+ if ("gtk".equals(SWT.getPlatform())) { //$NON-NLS-1$ -+ // GTK requires drawing on erase event so that images don't disappear when selected. -+ if (activationImage != null) { -+ drawActivationImage(activationImageOffset, event, activationImage); -+ } -+ if (!this.synchronizationOverlaid) { -+ if (data instanceof ITaskContainer) { -+ drawSyncronizationImage((ITaskContainer) data, event); -+ } -+ } -+ } - - // TODO: would be nice not to do this on each item's painting - // String text = tree.getFilterControl().getText(); --- -cgit v0.11.2-4-g4a35 - diff --git a/eclipse-mylyn-merge-incubator.patch b/eclipse-mylyn-merge-incubator.patch index 3725bef..33e1464 100644 --- a/eclipse-mylyn-merge-incubator.patch +++ b/eclipse-mylyn-merge-incubator.patch @@ -3,7 +3,7 @@ @@ -13,8 +13,7 @@ id="org.eclipse.mylyn.web.tasks_feature" label="%featureName" - version="3.17.0.qualifier" + version="3.18.0.qualifier" - provider-name="%providerName" - plugin="org.eclipse.mylyn.sandbox.ui"> + provider-name="%providerName"> @@ -15,7 +15,7 @@ @@ -13,8 +13,7 @@ id="org.eclipse.mylyn.trac.wiki_feature" label="%featureName" - version="3.17.0.qualifier" + version="3.18.0.qualifier" - provider-name="%providerName" - plugin="org.eclipse.mylyn.sandbox.ui"> + provider-name="%providerName"> diff --git a/eclipse-mylyn.spec b/eclipse-mylyn.spec index 7d1ade6..bedd7ed 100644 --- a/eclipse-mylyn.spec +++ b/eclipse-mylyn.spec @@ -1,5 +1,5 @@ -%global tag R_3_17_0 -%global incubator_tag af165bfa49a39235763996e38ffa7e7edbacd31d +%global tag R_3_18_0 +%global incubator_tag 4ed20a19954cfd37d6575da179cfe7b1fae0a465 %if 0%{?fedora} >= 24 %global droplets droplets @@ -9,8 +9,8 @@ Name: eclipse-mylyn Summary: Eclipse Mylyn main feature. -Version: 3.17.0 -Release: 3%{?dist} +Version: 3.18.0 +Release: 1%{?dist} License: EPL URL: http://www.eclipse.org/mylyn @@ -26,11 +26,14 @@ Patch1: %{name}-add-apache-xmlrpc.patch Patch2: %{name}-disable-online-tests.patch Patch3: %{name}-merge-incubator.patch Patch4: %{name}-bug-419133.patch +%if 0%{?fedora} >= 23 Patch5: 0001-Compile-with-Lucene-5.patch +%else +Patch5: lucene4.patch +%endif Patch6: %{name}-remove-nullable-annotation.patch Patch7: explicit-hamcrest-use.patch Patch8: %{name}-bree-bump.patch -Patch9: %{name}-fix-task-list.patch BuildArch: noarch @@ -222,10 +225,6 @@ popd pushd org.eclipse.mylyn.tasks %patch8 -p1 popd -%patch9 - -# Work around EBZ #472409 -sed -i "/innerComposite\.setMinSize/ a \\\t\tinnerComposite\.getShell()\.layout();" org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java #remove tests that fail to compile rm -rf org.eclipse.mylyn.commons/org.eclipse.mylyn.commons.ui.tests/src/org/eclipse/mylyn/commons/ui/ShellDragSupportTest.java @@ -371,6 +370,9 @@ install %{SOURCE6} \ %files tests -f .mfiles-tests %changelog +* Tue Jan 12 2016 Mat Booth - 3.18.0-1 +- Update to latest release + * Mon Jan 11 2016 Roland Grunberg - 3.17.0-3 - Bump release for rebuild. diff --git a/fetch-eclipse-mylyn-incubator.sh b/fetch-eclipse-mylyn-incubator.sh index aaae4a9..4d1c04f 100755 --- a/fetch-eclipse-mylyn-incubator.sh +++ b/fetch-eclipse-mylyn-incubator.sh @@ -2,7 +2,7 @@ set -e -RELEASE_TAG="af165bfa49a39235763996e38ffa7e7edbacd31d" +RELEASE_TAG="4ed20a19954cfd37d6575da179cfe7b1fae0a465" FETCHED_SOURCES_NAME="eclipse-mylyn-${RELEASE_TAG}-incubator-fetched-src" #clean up old runs diff --git a/fetch-eclipse-mylyn.sh b/fetch-eclipse-mylyn.sh index 9cc32e1..4587163 100755 --- a/fetch-eclipse-mylyn.sh +++ b/fetch-eclipse-mylyn.sh @@ -2,7 +2,7 @@ set -e -RELEASE_TAG="R_3_17_0" +RELEASE_TAG="R_3_18_0" FETCHED_SOURCES_NAME="eclipse-mylyn-${RELEASE_TAG}-fetched-src" #clean up old runs diff --git a/lucene4.patch b/lucene4.patch new file mode 100644 index 0000000..e175ebb --- /dev/null +++ b/lucene4.patch @@ -0,0 +1,209 @@ +diff --git a/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF +index ee6bb21..7964cbc 100644 +--- a/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF ++++ b/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF +@@ -7,7 +7,9 @@ Bundle-Vendor: %Bundle-Vendor + Require-Bundle: org.eclipse.core.runtime, + org.eclipse.mylyn.tasks.core;bundle-version="3.8.0", + org.eclipse.mylyn.commons.core;bundle-version="3.8.0", +- org.apache.lucene.core;bundle-version="[2.9.1,3.7.0)" ++ org.apache.lucene.core;bundle-version="[4.0.0,5.0.0)", ++ org.apache.lucene.queryparser;bundle-version="[4.0.0,5.0.0)", ++ org.apache.lucene.analysis;bundle-version="[4.0.0,5.0.0)" + Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + Bundle-ActivationPolicy: lazy + Export-Package: org.eclipse.mylyn.internal.tasks.index.core;x-internal:=true +diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskAnalyzer.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskAnalyzer.java +index b1b88c1..581d390 100644 +--- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskAnalyzer.java ++++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskAnalyzer.java +@@ -11,23 +11,27 @@ + *******************************************************************************/ + package org.eclipse.mylyn.internal.tasks.index.core; + +-import org.apache.lucene.analysis.KeywordAnalyzer; +-import org.apache.lucene.analysis.PerFieldAnalyzerWrapper; ++import java.util.HashMap; ++import java.util.Map; ++ ++import org.apache.lucene.analysis.Analyzer; ++import org.apache.lucene.analysis.core.KeywordAnalyzer; ++import org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper; + import org.apache.lucene.analysis.standard.StandardAnalyzer; +-import org.apache.lucene.util.Version; + + /** + * An analyzer that is aware of task fields +- * ++ * + * @author David Green + */ + class TaskAnalyzer { + + public static PerFieldAnalyzerWrapper instance() { +- PerFieldAnalyzerWrapper wrapper = new PerFieldAnalyzerWrapper(new StandardAnalyzer(Version.LUCENE_CURRENT)); +- wrapper.addAnalyzer(TaskListIndex.FIELD_IDENTIFIER.getIndexKey(), new KeywordAnalyzer()); +- wrapper.addAnalyzer(TaskListIndex.FIELD_TASK_KEY.getIndexKey(), new KeywordAnalyzer()); +- wrapper.addAnalyzer(TaskListIndex.FIELD_REPOSITORY_URL.getIndexKey(), new KeywordAnalyzer()); ++ Map analyzerPerField = new HashMap(); ++ analyzerPerField.put(TaskListIndex.FIELD_IDENTIFIER.getIndexKey(), new KeywordAnalyzer()); ++ analyzerPerField.put(TaskListIndex.FIELD_TASK_KEY.getIndexKey(), new KeywordAnalyzer()); ++ analyzerPerField.put(TaskListIndex.FIELD_REPOSITORY_URL.getIndexKey(), new KeywordAnalyzer()); ++ PerFieldAnalyzerWrapper wrapper = new PerFieldAnalyzerWrapper(new StandardAnalyzer(), analyzerPerField); + return wrapper; + } + } +diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java +index 119ab2d..378b3a6 100644 +--- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java ++++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java +@@ -36,14 +36,18 @@ import java.util.logging.Logger; + import org.apache.lucene.document.DateTools; + import org.apache.lucene.document.DateTools.Resolution; + import org.apache.lucene.document.Document; +-import org.apache.lucene.document.Field; + import org.apache.lucene.document.Field.Store; ++import org.apache.lucene.document.StringField; ++import org.apache.lucene.document.TextField; + import org.apache.lucene.index.CorruptIndexException; ++import org.apache.lucene.index.DirectoryReader; + import org.apache.lucene.index.IndexReader; + import org.apache.lucene.index.IndexWriter; ++import org.apache.lucene.index.IndexWriterConfig; ++import org.apache.lucene.index.IndexableField; + import org.apache.lucene.index.Term; +-import org.apache.lucene.queryParser.ParseException; +-import org.apache.lucene.queryParser.QueryParser; ++import org.apache.lucene.queryparser.classic.ParseException; ++import org.apache.lucene.queryparser.classic.QueryParser; + import org.apache.lucene.search.BooleanClause; + import org.apache.lucene.search.BooleanClause.Occur; + import org.apache.lucene.search.BooleanQuery; +@@ -57,6 +61,7 @@ import org.apache.lucene.store.Directory; + import org.apache.lucene.store.FSDirectory; + import org.apache.lucene.store.LockObtainFailedException; + import org.apache.lucene.store.NIOFSDirectory; ++import org.apache.lucene.util.InfoStream; + import org.apache.lucene.util.Version; + import org.eclipse.core.runtime.Assert; + import org.eclipse.core.runtime.CoreException; +@@ -591,12 +596,6 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + } catch (IOException e) { + StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, + "Unexpected failure within task list index", e)); //$NON-NLS-1$ +- } finally { +- try { +- indexSearcher.close(); +- } catch (IOException e) { +- // ignore +- } + } + + } else { +@@ -674,12 +673,6 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + } catch (IOException e) { + StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, + "Unexpected failure within task list index", e)); //$NON-NLS-1$ +- } finally { +- try { +- indexSearcher.close(); +- } catch (IOException e) { +- // ignore +- } + } + } + } finally { +@@ -696,7 +689,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + if (!hasBooleanSpecifiers && defaultField.equals(FIELD_SUMMARY) && !containsSpecialCharacters(patternString)) { + return new PrefixQuery(new Term(defaultField.getIndexKey(), patternString)); + } +- QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, defaultField.getIndexKey(), TaskAnalyzer.instance()); ++ QueryParser qp = new QueryParser(defaultField.getIndexKey(), TaskAnalyzer.instance()); + Query q; + try { + q = qp.parse(patternString); +@@ -769,7 +762,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + try { + synchronized (this) { + if (indexReader == null) { +- indexReader = IndexReader.open(directory, true); ++ indexReader = DirectoryReader.open(directory); + lastResults = null; + } + return indexReader; +@@ -983,15 +976,14 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + if (value == null) { + return; + } +- Field field = document.getField(indexField.getIndexKey()); ++ IndexableField field = document.getField(indexField.getIndexKey()); + if (field == null) { +- field = new Field(indexField.getIndexKey(), value, Store.YES, +- org.apache.lucene.document.Field.Index.ANALYZED); ++ field = new TextField(indexField.getIndexKey(), value, Store.YES); + document.add(field); + } else { + String existingValue = field.stringValue(); + if (!indexField.equals(FIELD_PERSON) || !existingValue.contains(value)) { +- field.setValue(existingValue + " " + value); //$NON-NLS-1$ ++ document.add(new StringField(field.name(), existingValue + " " + value, Store.YES)); //$NON-NLS-1$ + } + } + } +@@ -1004,13 +996,12 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + // move the date by the GMT offset if there is any + + String value = DateTools.dateToString(date, Resolution.HOUR); +- Field field = document.getField(indexField.getIndexKey()); ++ IndexableField field = document.getField(indexField.getIndexKey()); + if (field == null) { +- field = new Field(indexField.getIndexKey(), value, Store.YES, +- org.apache.lucene.document.Field.Index.ANALYZED); ++ field = new TextField(indexField.getIndexKey(), value, Store.YES); + document.add(field); + } else { +- field.setValue(value); ++ document.add(new StringField(field.name(), value, Store.YES)); + } + } + +@@ -1069,7 +1060,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + try { + if (!rebuildIndex) { + try { +- IndexReader reader = IndexReader.open(directory, false); ++ IndexReader reader = DirectoryReader.open(directory); + reader.close(); + } catch (CorruptIndexException e) { + rebuildIndex = true; +@@ -1216,7 +1207,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + writer = createIndexWriter(true); + } catch (CorruptIndexException e) { + if (directory instanceof FSDirectory) { +- cleanDirectory(((FSDirectory) directory).getFile()); ++ cleanDirectory(((FSDirectory) directory).getDirectory()); + writer = createIndexWriter(true); + } else { + throw e; +@@ -1264,7 +1255,9 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + + protected IndexWriter createIndexWriter(boolean create) + throws CorruptIndexException, LockObtainFailedException, IOException { +- return new IndexWriter(directory, TaskAnalyzer.instance(), create, IndexWriter.MaxFieldLength.UNLIMITED); ++ IndexWriterConfig writerConfig = new IndexWriterConfig(Version.LATEST, TaskAnalyzer.instance()); ++ writerConfig.setInfoStream(InfoStream.NO_OUTPUT); ++ return new IndexWriter(directory, writerConfig); + } + + /** +@@ -1283,8 +1276,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + + Document document = new Document(); + +- document.add(new Field(FIELD_IDENTIFIER.getIndexKey(), task.getHandleIdentifier(), Store.YES, +- org.apache.lucene.document.Field.Index.ANALYZED)); ++ document.add(new TextField(FIELD_IDENTIFIER.getIndexKey(), task.getHandleIdentifier(), Store.YES)); + if (taskData == null) { + if ("local".equals(((AbstractTask) task).getConnectorKind())) { //$NON-NLS-1$ + addIndexedAttributes(document, task); + diff --git a/sources b/sources index 9a19389..b4cd01b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -d2fce295f18a774352b2f233cbe26470 eclipse-mylyn-R_3_17_0-fetched-src.tar.xz -d9ac821caaf28b429b15a3e87e0da301 eclipse-mylyn-af165bfa49a39235763996e38ffa7e7edbacd31d-incubator-fetched-src.tar.xz +35dee1060ce47f21b87e9a3c86a2a881 eclipse-mylyn-R_3_18_0-fetched-src.tar.xz +74ddc2d63348398942b7ba147ceeca53 eclipse-mylyn-4ed20a19954cfd37d6575da179cfe7b1fae0a465-incubator-fetched-src.tar.xz