From f232417c9a6b4d686c4956127496dfe67d3aaccc Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Jan 13 2016 11:25:21 +0000 Subject: Merge branch 'master' into f22 --- diff --git a/0001-Compile-with-Lucene-5.patch b/0001-Compile-with-Lucene-5.patch new file mode 100644 index 0000000..5715956 --- /dev/null +++ b/0001-Compile-with-Lucene-5.patch @@ -0,0 +1,276 @@ +From 23466c86ec128a29f0226236219c429e26690b43 Mon Sep 17 00:00:00 2001 +From: Alexander Kurtakov +Date: Wed, 24 Jun 2015 09:02:55 +0300 +Subject: [PATCH] Compile with Lucene 5. + +Signed-off-by: Alexander Kurtakov +--- + .../META-INF/MANIFEST.MF | 4 +- + .../internal/tasks/index/core/TaskAnalyzer.java | 20 +-- + .../internal/tasks/index/core/TaskListIndex.java | 146 +++++++++++---------- + 3 files changed, 90 insertions(+), 80 deletions(-) + +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 2a3b1f8..78c5cfa 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="[5.0.0,6.0.0)", ++ org.apache.lucene.queryparser;bundle-version="[5.0.0,6.0.0)", ++ org.apache.lucene.analyzers-common;bundle-version="[5.0.0,6.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 90acbd2..78d8c0c 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 +@@ -17,6 +17,12 @@ import static org.eclipse.mylyn.tasks.core.data.TaskAttribute.META_INDEXED_AS_CO + import java.io.File; + import java.io.FileNotFoundException; + import java.io.IOException; ++import java.nio.file.FileVisitResult; ++import java.nio.file.Files; ++import java.nio.file.Path; ++import java.nio.file.Paths; ++import java.nio.file.SimpleFileVisitor; ++import java.nio.file.attribute.BasicFileAttributes; + import java.util.ArrayList; + import java.util.Collection; + import java.util.Collections; +@@ -36,14 +42,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,7 +67,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.Version; ++import org.apache.lucene.util.InfoStream; + import org.eclipse.core.runtime.Assert; + import org.eclipse.core.runtime.CoreException; + import org.eclipse.core.runtime.IProgressMonitor; +@@ -437,7 +450,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + } + } + try { +- directory = new NIOFSDirectory(indexLocation); ++ directory = new NIOFSDirectory(Paths.get(indexLocation.toURI())); + } catch (IOException e) { + StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, + "Cannot create task list index", e)); //$NON-NLS-1$ +@@ -591,12 +604,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 +681,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 +697,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 +770,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 +984,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 +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); +- 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 +1068,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 +1215,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; +@@ -1248,23 +1247,29 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL + return multiStatus; + } + +- private void cleanDirectory(File file) throws IOException { +- if (file.exists()) { +- File[] children = file.listFiles(); +- if (children != null) { +- for (File child : children) { +- if (child.isDirectory()) { +- cleanDirectory(child); +- } +- child.delete(); ++ private void cleanDirectory(Path file) throws IOException { ++ if (Files.exists(file)) { ++ Files.walkFileTree(file, new SimpleFileVisitor() { ++ @Override ++ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { ++ Files.delete(file); ++ return FileVisitResult.CONTINUE; + } +- } ++ ++ @Override ++ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { ++ Files.delete(dir); ++ return FileVisitResult.CONTINUE; ++ } ++ }); + } + } + + protected IndexWriter createIndexWriter(boolean create) + throws CorruptIndexException, LockObtainFailedException, IOException { +- return new IndexWriter(directory, TaskAnalyzer.instance(), create, IndexWriter.MaxFieldLength.UNLIMITED); ++ IndexWriterConfig writerConfig = new IndexWriterConfig(TaskAnalyzer.instance()); ++ writerConfig.setInfoStream(InfoStream.NO_OUTPUT); ++ return new IndexWriter(directory, writerConfig); + } + + /** +@@ -1283,8 +1288,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); +-- +2.4.3 + diff --git a/eclipse-mylyn-bree-bump.patch b/eclipse-mylyn-bree-bump.patch new file mode 100644 index 0000000..4cd4010 --- /dev/null +++ b/eclipse-mylyn-bree-bump.patch @@ -0,0 +1,13 @@ +diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF +index 5ff8abc..18f9bc8 100644 +--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF ++++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF +@@ -14,7 +14,7 @@ + org.eclipse.mylyn.commons.net, + org.eclipse.equinox.security, + com.google.guava +-Bundle-RequiredExecutionEnvironment: JavaSE-1.7 ++Bundle-RequiredExecutionEnvironment: JavaSE-1.8 + Bundle-ActivationPolicy: lazy + Export-Package: org.eclipse.mylyn.internal.bugzilla.rest.core, + org.eclipse.mylyn.internal.bugzilla.rest.core.response.data 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 6c8920c..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.16.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.16.0.qualifier" + version="3.18.0.qualifier" - provider-name="%providerName" - plugin="org.eclipse.mylyn.sandbox.ui"> + provider-name="%providerName"> diff --git a/eclipse-mylyn-remove-hudson-discovery.patch b/eclipse-mylyn-remove-hudson-discovery.patch index 99dd87c..bb995b0 100644 --- a/eclipse-mylyn-remove-hudson-discovery.patch +++ b/eclipse-mylyn-remove-hudson-discovery.patch @@ -35,258 +35,3 @@ index d3f9f4f..27afb29 100644 - - -diff --git org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonDiscovery.java org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonDiscovery.java -deleted file mode 100644 -index 9500904..0000000 ---- org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonDiscovery.java -+++ /dev/null -@@ -1,208 +0,0 @@ --/******************************************************************************* -- * Copyright (c) 2010, 2011 Itema AS 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: -- * Torkild U. Resheim - initial API and implementation -- * Torkild U. Resheim - Uniquely identify Jenkins servers, bug 341725 -- * Torkild U. Resheim - Distinguish between Hudson and Jenkins, bug 353861 -- * Tasktop Technologies - improvements -- *******************************************************************************/ -- --package org.eclipse.mylyn.internal.hudson.ui; -- --import java.net.URISyntaxException; --import java.util.List; --import java.util.UUID; -- --import org.eclipse.core.runtime.IStatus; --import org.eclipse.core.runtime.Status; --import org.eclipse.ecf.core.ContainerConnectException; --import org.eclipse.ecf.core.ContainerCreateException; --import org.eclipse.ecf.core.ContainerFactory; --import org.eclipse.ecf.core.IContainer; --import org.eclipse.ecf.discovery.IDiscoveryLocator; --import org.eclipse.ecf.discovery.IServiceEvent; --import org.eclipse.ecf.discovery.IServiceInfo; --import org.eclipse.ecf.discovery.IServiceListener; --import org.eclipse.ecf.discovery.IServiceProperties; --import org.eclipse.ecf.discovery.identity.IServiceID; --import org.eclipse.ecf.discovery.identity.IServiceTypeID; --import org.eclipse.mylyn.builds.ui.BuildsUi; --import org.eclipse.mylyn.commons.core.StatusHandler; --import org.eclipse.mylyn.commons.repositories.core.RepositoryLocation; --import org.eclipse.osgi.util.NLS; -- --/** -- * This class implements a mechanism for discovering Hudson and Jenkins servers through the use of Multicast DNS (MDNS). -- * -- * @author Torkild U. Resheim, Itema AS -- * @author Steffen Pingel -- */ --public class HudsonDiscovery { -- /** -- * This class works around a source incompatibility between the org.eclipse.ecf.discovery version in Luna and -- * earlier versions. Version 5.0 added the triggerDiscovery method to IServiceListener. This class can be extended -- * in order to implement this method without the @Overide annotation causing compilation to fail against earlier -- * versions (e.g. Kepler). -- */ -- private static abstract class AbstractServiceListener { -- public abstract boolean triggerDiscovery(); -- } -- -- private final class HudsonServiceListener extends AbstractServiceListener implements IServiceListener { -- public void serviceDiscovered(IServiceEvent anEvent) { -- IServiceInfo serviceInfo = anEvent.getServiceInfo(); -- IServiceID serviceId = serviceInfo.getServiceID(); -- IServiceTypeID serviceTypeId = serviceId.getServiceTypeID(); -- // Note that Jenkins will claim that it's both Jenkins and -- // Hudson for backward compatibility. -- if (serviceTypeId.getName().equals(JENKINS_MDNS_ID)) { -- IServiceProperties properties = serviceInfo.getServiceProperties(); -- try { -- if (properties.getProperty(URL_PROPERTY) == null) { -- notifyMessage(Messages.JenkinsDiscovery_MessageTitle, NLS.bind( -- Messages.JenkinsDiscovery_MissingURL, new Object[] { serviceInfo.getLocation() -- .getHost() })); -- } else { -- issueJenkinsNotification(properties); -- } -- } catch (URISyntaxException e) { -- StatusHandler.log(new Status(IStatus.ERROR, HudsonConnectorUi.ID_PLUGIN, NLS.bind( -- Messages.Discovery_IncorrectURI, new Object[] { properties.getProperty(URL_PROPERTY) -- .toString() }), e)); -- } -- } -- if (serviceTypeId.getName().equals(HUDSON_MDNS_ID)) { -- IServiceProperties properties = serviceInfo.getServiceProperties(); -- try { -- if (properties.getProperty(URL_PROPERTY) == null) { -- notifyMessage(Messages.HudsonDiscovery_MessageTitle, NLS.bind( -- Messages.HudsonDiscovery_MissingURL, -- new Object[] { serviceInfo.getLocation().getHost() })); -- } else { -- issueHudsonNotification(properties); -- } -- } catch (URISyntaxException e) { -- StatusHandler.log(new Status(IStatus.ERROR, HudsonConnectorUi.ID_PLUGIN, NLS.bind( -- Messages.Discovery_IncorrectURI, new Object[] { properties.getProperty(URL_PROPERTY) -- .toString() }), e)); -- } -- } -- } -- -- public void serviceUndiscovered(IServiceEvent anEvent) { -- // Ignore this for now -- } -- -- @Override -- public boolean triggerDiscovery() { -- return false; -- } -- } -- -- private static final String ECF_DISCOVERY_JMDNS = "ecf.discovery.jmdns"; //$NON-NLS-1$ -- -- private static final String HUDSON_MDNS_ID = "_hudson._tcp.local._iana"; //$NON-NLS-1$ -- -- private static final String JENKINS_MDNS_ID = "_jenkins._tcp.local._iana"; //$NON-NLS-1$ -- -- private static final String URL_PROPERTY = "url"; //$NON-NLS-1$ -- -- /** Server id property name (Jenkins only). */ -- private static final String SERVER_ID_PROPERTY = "server-id"; //$NON-NLS-1$ -- -- private IContainer container; -- -- public HudsonDiscovery() { -- } -- -- protected IContainer getContainer() throws ContainerCreateException { -- return ContainerFactory.getDefault().createContainer(ECF_DISCOVERY_JMDNS); -- } -- -- /** -- * Determines whether or not the detected server is a new server or not. -- * -- * @param url -- * the server URL -- * @param id -- * the server identifier -- * @return true if the detected server is new. -- */ -- private boolean isNew(String url, String id) { -- if (url == null) { -- return false; -- } -- List locations = BuildsUi.getServerLocations(); -- for (RepositoryLocation location : locations) { -- if (location.hasUrl(url) || location.getId().equals(id)) { -- return false; -- } -- } -- return true; -- } -- -- public void start() { -- try { -- container = getContainer(); -- final IDiscoveryLocator adapter = (IDiscoveryLocator) container.getAdapter(IDiscoveryLocator.class); -- adapter.addServiceListener(new HudsonServiceListener()); -- container.connect(null, null); -- -- } catch (ContainerCreateException e) { -- StatusHandler.log(new Status(IStatus.WARNING, HudsonConnectorUi.ID_PLUGIN, -- Messages.Discovery_CouldNotStartService, e)); -- } catch (ContainerConnectException e) { -- StatusHandler.log(new Status(IStatus.WARNING, HudsonConnectorUi.ID_PLUGIN, -- Messages.Discovery_CouldNotStartService, e)); -- } -- } -- -- public void stop() { -- if (container != null) { -- container.disconnect(); -- container = null; -- } -- } -- -- private void notifyMessage(String title, String description) { -- BuildsUi.serverDiscovered(title, description); -- } -- -- private void issueHudsonNotification(IServiceProperties properties) throws URISyntaxException { -- String url = properties.getProperty(URL_PROPERTY).toString(); -- String id = getId(properties); -- if (isNew(url, id)) { -- notifyMessage( -- Messages.HudsonDiscovery_MessageTitle, -- NLS.bind(Messages.HudsonDiscovery_MessageText, new Object[] { url, -- Messages.HudsonDiscovery_ServerName, url, id })); -- } -- } -- -- private void issueJenkinsNotification(IServiceProperties properties) throws URISyntaxException { -- String url = properties.getProperty(URL_PROPERTY).toString(); -- String id = getId(properties); -- if (isNew(url, id)) { -- // Change the first segment (org.eclipse.mylyn.hudson) to the id of -- // the new repository type when we start differentiation between the two -- notifyMessage( -- Messages.JenkinsDiscovery_MessageTitle, -- NLS.bind(Messages.JenkinsDiscovery_MessageText, new Object[] { url, -- Messages.JenkinsDiscovery_ServerName, url, id })); -- } -- } -- -- private String getId(IServiceProperties properties) { -- String id = (String) properties.getProperty(SERVER_ID_PROPERTY); -- if (id == null) { -- id = UUID.randomUUID().toString(); -- } -- return id; -- } -- --} -diff --git org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonUiPlugin.java org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonUiPlugin.java -deleted file mode 100644 -index a160eb0..0000000 ---- org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonUiPlugin.java -+++ /dev/null -@@ -1,35 +0,0 @@ --/******************************************************************************* -- * Copyright (c) 2011 Tasktop Technologies. -- * 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: -- * Tasktop Technologies - initial API and implementation -- *******************************************************************************/ -- --package org.eclipse.mylyn.internal.hudson.ui; -- --import org.eclipse.ui.plugin.AbstractUIPlugin; --import org.osgi.framework.BundleContext; -- --/** -- * @author Steffen Pingel -- */ --public class HudsonUiPlugin extends AbstractUIPlugin { -- -- public static String ID_PLUGIN = "org.eclipse.mylyn.hudson.ui"; -- -- public HudsonUiPlugin() { -- } -- -- @Override -- public void stop(BundleContext context) throws Exception { -- if (HudsonStartup.getInstance() != null) { -- HudsonStartup.getInstance().stop(); -- } -- super.stop(context); -- } -- --} diff --git a/eclipse-mylyn.spec b/eclipse-mylyn.spec index f0f6756..bedd7ed 100644 --- a/eclipse-mylyn.spec +++ b/eclipse-mylyn.spec @@ -1,10 +1,16 @@ -%global tag R_3_16_0 -%global incubator_tag 07a5ce39847b8dc5921180942db31d30f9d2d4f8 +%global tag R_3_18_0 +%global incubator_tag 4ed20a19954cfd37d6575da179cfe7b1fae0a465 + +%if 0%{?fedora} >= 24 +%global droplets droplets +%else +%global droplets dropins +%endif Name: eclipse-mylyn Summary: Eclipse Mylyn main feature. -Version: 3.16.0 -Release: 2%{?dist} +Version: 3.18.0 +Release: 1%{?dist} License: EPL URL: http://www.eclipse.org/mylyn @@ -20,10 +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}-fix-task-list.patch +Patch8: %{name}-bree-bump.patch BuildArch: noarch @@ -212,10 +222,14 @@ pushd org.eclipse.mylyn.tasks popd %patch6 %patch7 -%patch8 +pushd org.eclipse.mylyn.tasks +%patch8 -p1 +popd -# 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 +rm -rf org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonDiscovery.java +rm -rf org.eclipse.mylyn.builds/org.eclipse.mylyn.hudson.ui/src/org/eclipse/mylyn/internal/hudson/ui/HudsonUiPlugin.java # Disable plugins we can live without (they are skipped by default anyway) for p in findbugs-maven-plugin maven-pmd-plugin jacoco-maven-plugin ; do @@ -318,7 +332,7 @@ done %mvn_install install %{SOURCE6} \ - %{buildroot}%{_datadir}/eclipse/dropins/mylyn-tasks-bugzilla/eclipse/redhat-bugzilla-custom-transitions.txt + %{buildroot}%{_datadir}/eclipse/%{droplets}/mylyn-tasks-bugzilla/eclipse/redhat-bugzilla-custom-transitions.txt %files -f .mfiles-commons @@ -329,7 +343,7 @@ install %{SOURCE6} \ %files context-cdt -f .mfiles-context-cdt %files tasks-bugzilla -f .mfiles-tasks-bugzilla -%{_datadir}/eclipse/dropins/mylyn-tasks-bugzilla/eclipse/redhat-bugzilla-custom-transitions.txt +%{_datadir}/eclipse/%{droplets}/mylyn-tasks-bugzilla/eclipse/redhat-bugzilla-custom-transitions.txt %files tasks-trac -f .mfiles-tasks-trac @@ -356,10 +370,25 @@ install %{SOURCE6} \ %files tests -f .mfiles-tests %changelog -* Mon Oct 19 2015 Roland Grunberg - 3.16.0-2 +* 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. + +* Mon Oct 19 2015 Roland Grunberg - 3.17.0-2 - Fix Mylyn Task List decorator icons. EBZ #461443 - Fix layout of Task Repository Properties view. EBZ #472409 +* Tue Sep 29 2015 Sopot Cela -3.17.0-1 +- Updated to 3.17.0 for Mars.1 release + +* Mon Aug 31 2015 Roland Grunberg - 3.16.0-3 +- Minor changes to build as a droplet. + +* Tue Jul 28 2015 Roland Grunberg - 3.16.0-2 +- Rebuild for correcting symbolic links to objectweb-asm. + * Thu Jun 25 2015 Alexander Kurtakov 3.16.0-1 - Update to 3.16.0 final release. diff --git a/fetch-eclipse-mylyn-incubator.sh b/fetch-eclipse-mylyn-incubator.sh index 4bed685..4d1c04f 100755 --- a/fetch-eclipse-mylyn-incubator.sh +++ b/fetch-eclipse-mylyn-incubator.sh @@ -2,7 +2,7 @@ set -e -RELEASE_TAG="07a5ce39847b8dc5921180942db31d30f9d2d4f8" +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 0b359e7..4587163 100755 --- a/fetch-eclipse-mylyn.sh +++ b/fetch-eclipse-mylyn.sh @@ -2,7 +2,7 @@ set -e -RELEASE_TAG="R_3_16_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 index 9d22391..e175ebb 100644 --- a/lucene4.patch +++ b/lucene4.patch @@ -87,69 +87,6 @@ index 119ab2d..378b3a6 100644 import org.apache.lucene.util.Version; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; -@@ -111,7 +116,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 - */ -@@ -316,7 +321,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 +339,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 +363,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 +390,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. - */ -@@ -459,7 +464,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}. - */ -@@ -552,7 +557,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 +596,6 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL } catch (IOException e) { StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, @@ -163,24 +100,6 @@ index 119ab2d..378b3a6 100644 } } else { -@@ -625,7 +624,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * call to wait until index maintenance has completed -- * -+ * - * @throws InterruptedException - */ - public void waitUntilIdle() throws InterruptedException { -@@ -639,7 +638,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - - /** - * finds tasks that match the given pattern string -- * -+ * - * @param patternString - * the pattern string, used to match tasks - * @param collector @@ -674,12 +673,6 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL } catch (IOException e) { StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.ID_PLUGIN, @@ -212,15 +131,6 @@ index 119ab2d..378b3a6 100644 lastResults = null; } return indexReader; -@@ -816,7 +809,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 +976,14 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL if (value == null) { return; @@ -240,7 +150,7 @@ index 119ab2d..378b3a6 100644 } } } -@@ -1004,19 +996,18 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL +@@ -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); @@ -257,31 +167,6 @@ index 119ab2d..378b3a6 100644 } } - /** - * Computes a query element for a field that must lie in a specified date range. -- * -+ * - * @param field - * the field - * @param lowerBoundInclusive -@@ -1037,7 +1028,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 +1042,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 +1060,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL try { if (!rebuildIndex) { @@ -291,24 +176,6 @@ index 119ab2d..378b3a6 100644 reader.close(); } catch (CorruptIndexException e) { rebuildIndex = true; -@@ -1119,7 +1110,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - } - - private void indexQueuedTasks(SubMonitor monitor) throws CorruptIndexException, LockObtainFailedException, -- IOException, CoreException { -+ IOException, CoreException { - - synchronized (reindexQueue) { - if (reindexQueue.isEmpty()) { -@@ -1201,7 +1192,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - } - - private IStatus rebuildIndexCompletely(SubMonitor monitor) throws CorruptIndexException, LockObtainFailedException, -- IOException, CoreException { -+ IOException, CoreException { - - MultiStatus multiStatus = new MultiStatus(TasksIndexCore.ID_PLUGIN, 0, null, null); - @@ -1216,7 +1207,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL writer = createIndexWriter(true); } catch (CorruptIndexException e) { @@ -320,8 +187,8 @@ index 119ab2d..378b3a6 100644 throw e; @@ -1264,7 +1255,9 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL - 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); + IndexWriterConfig writerConfig = new IndexWriterConfig(Version.LATEST, TaskAnalyzer.instance()); + writerConfig.setInfoStream(InfoStream.NO_OUTPUT); @@ -339,3 +206,4 @@ index 119ab2d..378b3a6 100644 if (taskData == null) { if ("local".equals(((AbstractTask) task).getConnectorKind())) { //$NON-NLS-1$ addIndexedAttributes(document, task); + diff --git a/sources b/sources index 2c782a2..b4cd01b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -506f61f88fe2ce32f4035edefa195c6e eclipse-mylyn-07a5ce39847b8dc5921180942db31d30f9d2d4f8-incubator-fetched-src.tar.xz -0041dd4c923167273a2e92d85126dc61 eclipse-mylyn-R_3_16_0-fetched-src.tar.xz +35dee1060ce47f21b87e9a3c86a2a881 eclipse-mylyn-R_3_18_0-fetched-src.tar.xz +74ddc2d63348398942b7ba147ceeca53 eclipse-mylyn-4ed20a19954cfd37d6575da179cfe7b1fae0a465-incubator-fetched-src.tar.xz