Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Poon2015-08-11 19:52:30 -0400
committerKenneth Poon2015-08-12 17:01:56 -0400
commit82cd9c122c88a94ef4e7b699b510b40d2991ed11 (patch)
treed50de01274b906f76b5dea0962784b87ef039987
parenteff1cccfaa7d3a6dca543d273e094ba3464bffbc (diff)
downloadorg.eclipse.mylyn.tasks-82cd9c122c88a94ef4e7b699b510b40d2991ed11.tar.gz
org.eclipse.mylyn.tasks-82cd9c122c88a94ef4e7b699b510b40d2991ed11.tar.xz
org.eclipse.mylyn.tasks-82cd9c122c88a94ef4e7b699b510b40d2991ed11.zip
474751: Deprecate TaskDataCollector.MAX_HITS and remove logging
Change-Id: I517252df90afd78f64c081b5a79f59f71d43cc84 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=474751 Signed-off-by: Kenneth Poon <kenneth.poon@tasktop.com>
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java14
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java3
-rw-r--r--org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/Messages.java4
-rw-r--r--org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java15
-rw-r--r--org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/messages.properties2
7 files changed, 10 insertions, 35 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index a31077524..09db50c40 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -718,8 +718,7 @@ public class BugzillaClient {
InputStream stream = getResponseStream(postMethod, monitor);
try {
RepositoryQueryResultsFactory queryFactory = getQueryResultsFactory(stream);
- int count = queryFactory.performQuery(repositoryUrl.toString(), collector, mapper,
- TaskDataCollector.MAX_HITS);
+ int count = queryFactory.performQuery(repositoryUrl.toString(), collector, mapper);
return count > 0;
} finally {
stream.close();
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java
index 2d901598e..6f9ea85fe 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java
@@ -29,10 +29,10 @@ public class RepositoryQueryResultsFactory extends AbstractReportFactory {
/**
* expects rdf returned from repository (ctype=rdf in url)
- *
+ *
* @throws GeneralSecurityException
*/
- public int performQuery(String repositoryUrl, TaskDataCollector collector, TaskAttributeMapper mapper, int maxHits)
+ public int performQuery(String repositoryUrl, TaskDataCollector collector, TaskAttributeMapper mapper)
throws IOException {
SaxBugzillaQueryContentHandler contentHandler = new SaxBugzillaQueryContentHandler(repositoryUrl, collector,
mapper);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
index 8496cc638..a8e611a22 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
@@ -118,8 +118,6 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
}
- public static final String MAX_HITS_REACHED = Messages.SynchronizeQueriesJob_Max_allowed_number_of_hits_returned_exceeded;
-
private final AbstractRepositoryConnector connector;
private final Set<RepositoryQuery> queries;
@@ -248,10 +246,11 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
} catch (OperationCanceledException e) {
return Status.CANCEL_STATUS;
} catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Synchronization failed", e)); //$NON-NLS-1$
+ StatusHandler
+ .log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Synchronization failed", e)); //$NON-NLS-1$
} catch (LinkageError e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, NLS.bind(
- "Synchronization for connector ''{0}'' failed", connector.getConnectorKind()), e)); //$NON-NLS-1$
+ StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
+ NLS.bind("Synchronization for connector ''{0}'' failed", connector.getConnectorKind()), e)); //$NON-NLS-1$
} finally {
monitor.done();
}
@@ -311,11 +310,6 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
}
IStatus result = connector.performQuery(repository, repositoryQuery, collector, event, monitor);
if (result == null || result.isOK()) {
- if (collector.getResultCount() >= TaskDataCollector.MAX_HITS) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, MAX_HITS_REACHED + "\n" //$NON-NLS-1$
- + repositoryQuery.getSummary()));
- }
-
Set<ITask> removedChildren = collector.getRemovedChildren();
if (!removedChildren.isEmpty()) {
taskList.removeFromContainer(repositoryQuery, removedChildren);
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
index da14b6fd2..24ceff9e0 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IStatus;
/**
* This class is used for collecting tasks, e.g. when performing queries on a repository.
- *
+ *
* @author Rob Elves
* @since 3.0
*/
@@ -24,6 +24,7 @@ public abstract class TaskDataCollector {
/**
* @since 3.0
*/
+ @Deprecated
public static final int MAX_HITS = 5000;
public abstract void accept(TaskData taskData);
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/Messages.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/Messages.java
index 8a79ae066..92a599338 100644
--- a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/Messages.java
+++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/Messages.java
@@ -47,8 +47,6 @@ public class Messages extends NLS {
public static String RepositorySearchResultView_Refine_Search_;
- public static String SearchHitCollector_Max_allowed_number_of_hits_returned_exceeded;
-
public static String SearchHitCollector_Querying_Repository_;
public static String SearchHitCollector_Repository_connector_could_not_be_found;
@@ -57,8 +55,6 @@ public class Messages extends NLS {
public static String SearchHitCollector_Search_cancelled;
- public static String SearchHitCollector_Search_returned_maximum_number_of_hits;
-
public static String SearchResultsLabelProvider_OF;
public static String SearchResultTreeContentProvider_Complete;
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
index a9bdaf1ce..79f46653e 100644
--- a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
+++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
@@ -22,7 +22,6 @@ import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
@@ -35,7 +34,7 @@ import org.eclipse.ui.PlatformUI;
/**
* Used for returning results from Eclipse Search view. Collects results of a repository search.
- *
+ *
* @author Rob Elves
* @author Steffen Pingel
*/
@@ -112,18 +111,6 @@ public class SearchHitCollector extends TaskDataCollector implements ISearchQuer
TasksUiInternal.displayStatus(Messages.SearchHitCollector_Search_failed, status);
}
});
- } else {
- if (searchResult.getMatchCount() >= TaskDataCollector.MAX_HITS) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiInternal.displayStatus(
- Messages.SearchHitCollector_Search_returned_maximum_number_of_hits,
- RepositoryStatus.createStatus(repository.getRepositoryUrl(), IStatus.WARNING,
- TasksUiPlugin.ID_PLUGIN,
- Messages.SearchHitCollector_Max_allowed_number_of_hits_returned_exceeded));
- }
- });
- }
}
} else {
return new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, IStatus.OK,
diff --git a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/messages.properties b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/messages.properties
index 1c671e520..b67868eb8 100644
--- a/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/messages.properties
+++ b/org.eclipse.mylyn.tasks.search/src/org/eclipse/mylyn/internal/tasks/ui/search/messages.properties
@@ -20,12 +20,10 @@ RepositorySearchResultView_Open_in_Editor=Open in Editor
RepositorySearchResultView_Open_Search_with_Browser_Label=Open Search with Browser
RepositorySearchResultView_Refine_Search_=Refine Search...
-SearchHitCollector_Max_allowed_number_of_hits_returned_exceeded=Max allowed number of hits returned exceeded. Some hits may not be displayed. Please narrow query scope.
SearchHitCollector_Querying_Repository_=Querying Repository...
SearchHitCollector_Repository_connector_could_not_be_found=Repository connector could not be found
SearchHitCollector_Search_failed=Search failed
SearchHitCollector_Search_cancelled=Search cancelled
-SearchHitCollector_Search_returned_maximum_number_of_hits=Search returned maximum number of hits
SearchResultsLabelProvider_OF={0} of {1}

Back to the top