Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-10-07 16:38:18 +0000
committerChris Goldthorpe2011-10-07 16:38:18 +0000
commit7f08d7619bb29ded890504c4922b69ab1d9e366b (patch)
tree3616257415a88c1538714740395cfcad96721589 /org.eclipse.help.base/src/org/eclipse/help
parent41357258d1bccb46670f9ece250b5f30e43e4aa9 (diff)
downloadeclipse.platform.ua-7f08d7619bb29ded890504c4922b69ab1d9e366b.tar.gz
eclipse.platform.ua-7f08d7619bb29ded890504c4922b69ab1d9e366b.tar.xz
eclipse.platform.ua-7f08d7619bb29ded890504c4922b69ab1d9e366b.zip
Part 2 of fix for Bug 359761 - [Help] Warnings for Generics showing in
org.eclipse.help.base after switch to J2SE-1.5
Diffstat (limited to 'org.eclipse.help.base/src/org/eclipse/help')
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java16
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchQuery.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java26
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java34
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsPhrase.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java10
27 files changed, 129 insertions, 128 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
index 2db667840..acce3b34e 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
@@ -37,7 +37,7 @@ public class CriteriaHelpScope extends AbstractHelpScope {
this.criteriaScope = criteriaScope;
}
- public CriteriaHelpScope(List criteriaScope){
+ public CriteriaHelpScope(List<CriterionResource> criteriaScope){
if(null == criteriaScope) {
this.criteriaScope = new CriterionResource[0];
} else {
@@ -72,11 +72,11 @@ public class CriteriaHelpScope extends AbstractHelpScope {
if(null == criteriaScope){
return true;
}
- Map<String, Set> ownCriteria = getCriteriaInfo(criteriaOfTopic);
- Map<String, Set> scope = getCriteriaInfo(criteriaScope);
+ Map<String, Set<String>> ownCriteria = getCriteriaInfo(criteriaOfTopic);
+ Map<String, Set<String>> scope = getCriteriaInfo(criteriaScope);
outer: for (Iterator<String> keyIterator = scope.keySet().iterator(); keyIterator.hasNext();) {
String key = String.valueOf(keyIterator.next());
- for (Iterator valueIterator = scope.get(key).iterator(); valueIterator.hasNext();) {
+ for (Iterator<String> valueIterator = scope.get(key).iterator(); valueIterator.hasNext();) {
String value = String.valueOf(valueIterator.next());
if (value.equals(UNCATEGORIZED)) {
if (!ownCriteria.containsKey(key)) {
@@ -92,14 +92,14 @@ public class CriteriaHelpScope extends AbstractHelpScope {
return true;
}
- private Map<String, Set> getCriteriaInfo(CriterionResource[] criteria) {
- Map<String, Set> criteriaMap = new HashMap<String, Set>();
+ private Map<String, Set<String>> getCriteriaInfo(CriterionResource[] criteria) {
+ Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
return criteriaMap;
}
- private Map<String, Set> getCriteriaInfo(ICriteria[] criteria) {
- Map<String, Set> criteriaMap = new HashMap<String, Set>();
+ private Map<String, Set<String>> getCriteriaInfo(ICriteria[] criteria) {
+ Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
return criteriaMap;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
index 30f5d4da7..7b2ffb47d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
@@ -99,11 +99,11 @@ public class WorkingSetScope extends AbstractHelpScope {
if(null ==criteria){
return true;
}
- Map<String, Set> ownCriteria = getCriteriaInfo(criteriaOfTopic);
- Map<String, Set> scope = getCriteriaInfo(criteria);
+ Map<String, Set<String>> ownCriteria = getCriteriaInfo(criteriaOfTopic);
+ Map<String, Set<String>> scope = getCriteriaInfo(criteria);
outer: for (Iterator<String> keyIterator = scope.keySet().iterator(); keyIterator.hasNext();) {
String key = String.valueOf(keyIterator.next());
- for (Iterator valueIterator = scope.get(key).iterator(); valueIterator.hasNext();) {
+ for (Iterator<String> valueIterator = scope.get(key).iterator(); valueIterator.hasNext();) {
String value = String.valueOf(valueIterator.next());
if (value.equals(UNCATEGORIZED)) {
if (!ownCriteria.containsKey(key)) {
@@ -119,14 +119,14 @@ public class WorkingSetScope extends AbstractHelpScope {
return true;
}
- private Map<String, Set> getCriteriaInfo(CriterionResource[] criteria) {
- Map<String, Set> criteriaMap = new HashMap<String, Set>();
+ private Map<String, Set<String>> getCriteriaInfo(CriterionResource[] criteria) {
+ Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
return criteriaMap;
}
- private Map<String, Set> getCriteriaInfo(ICriteria[] criteria) {
- Map<String, Set> criteriaMap = new HashMap<String, Set>();
+ private Map<String, Set<String>> getCriteriaInfo(ICriteria[] criteria) {
+ Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
return criteriaMap;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
index b4e55f415..ab8fbec3c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
@@ -36,7 +36,7 @@ public class CriteriaUtilities {
return result;
}
- public static void addCriteriaToMap(Map<String, Set> map, ICriteria[] criteria) {
+ public static void addCriteriaToMap(Map<String, Set<String>> map, ICriteria[] criteria) {
for (int i = 0; i < criteria.length; ++i) {
ICriteria criterion = criteria[i];
String name = criterion.getName();
@@ -53,15 +53,15 @@ public class CriteriaUtilities {
}
}
- public static void addCriteriaToMap(Map<String, Set> map, CriterionResource[] criteria) {
+ public static void addCriteriaToMap(Map<String, Set<String>> map, CriterionResource[] criteria) {
for(int i = 0; i < criteria.length; ++ i){
CriterionResource criterion = criteria[i];
String criterionName = criterion.getCriterionName();
- List criterionValues = criterion.getCriterionValues();
+ List<String> criterionValues = criterion.getCriterionValues();
- Set existedValueSet = map.get(criterionName);
+ Set<String> existedValueSet = map.get(criterionName);
if (null == existedValueSet)
- existedValueSet = new HashSet();
+ existedValueSet = new HashSet<String>();
existedValueSet.addAll(criterionValues);
map.put(criterionName, existedValueSet);
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
index d56f0a8dc..b18b18601 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
@@ -32,11 +32,11 @@ public class Analyzer_en extends Analyzer {
return new PorterStemFilter(new StopFilter(false, new LowerCaseAndDigitsTokenizer(reader), getStopWords(), false));
}
- private Set stopWords;
+ private Set<String> stopWords;
- private Set getStopWords() {
+ private Set<String> getStopWords() {
if ( stopWords == null ) {
- stopWords = new HashSet();
+ stopWords = new HashSet<String>();
for (int i = 0; i < STOP_WORDS.length; i++) {
stopWords.add(STOP_WORDS[i]);
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
index 9cef5e7ea..b18209db4 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -22,7 +22,7 @@ public interface ISearchHitCollector {
*
* @param hits the List of raw hits
*/
- public void addHits(List hits, String wordsSearched);
+ public void addHits(List<SearchHit> hits, String wordsSearched);
/**
* An exception occurred in the search. Implementing subclasses should either
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchQuery.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchQuery.java
index 466c8bc11..22fd673a1 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchQuery.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchQuery.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -16,7 +16,7 @@ public interface ISearchQuery {
/**
* Obtains names of fields in addition to default field
*/
- public Collection getFieldNames();
+ public Collection<String> getFieldNames();
/**
* Obtains search word (user query)
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
index 1b35fe44a..f524df818 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
@@ -110,7 +110,7 @@ class IndexingOperation {
BaseHelpSystem.getLocalSearchManager().clearSearchParticipants();
}
- private Map calculateNewToRemove(Collection<URL> newDocs, Map prebuiltDocs) {
+ private Map<String, String[]> calculateNewToRemove(Collection<URL> newDocs, Map<String, String[]> prebuiltDocs) {
// Calculate document that were in prebuilt indexes, but are not in
// TOCs. (prebuiltDocs - newDocs)
/*
@@ -118,7 +118,7 @@ class IndexingOperation {
* delete completely, or String[] of indexIds with duplicates of the
* document
*/
- Map docsToDelete = prebuiltDocs;
+ Map<String, String[]> docsToDelete = prebuiltDocs;
ArrayList<String> prebuiltHrefs = new ArrayList<String>(prebuiltDocs.keySet());
for (int i = 0; i < prebuiltHrefs.size(); i++) {
String href = prebuiltHrefs.get(i);
@@ -147,13 +147,13 @@ class IndexingOperation {
/**
* Returns documents that must be deleted
*/
- private Map addNewDocuments(IProgressMonitor pm, Collection<URL> newDocs,
+ private Map<String, String[]> addNewDocuments(IProgressMonitor pm, Collection<URL> newDocs,
boolean opened) throws IndexingException {
- Map prebuiltDocs = mergeIndexes(pm, opened);
+ Map<String, String[]> prebuiltDocs = mergeIndexes(pm, opened);
checkCancelled(pm);
Collection<URL> docsToIndex = calculateDocsToAdd(newDocs, prebuiltDocs);
checkCancelled(pm);
- Map docsToDelete = calculateNewToRemove(newDocs, prebuiltDocs);
+ Map<String, String[]> docsToDelete = calculateNewToRemove(newDocs, prebuiltDocs);
pm.beginTask("", 10 * docsToIndex.size() + docsToDelete.size()); //$NON-NLS-1$
checkCancelled(pm);
addDocuments(new SubProgressMonitor(pm, 10 * docsToIndex.size()),
@@ -165,7 +165,7 @@ class IndexingOperation {
return docsToDelete;
}
- private Collection<URL> calculateDocsToAdd(Collection<URL> newDocs, Map prebuiltDocs) {
+ private Collection<URL> calculateDocsToAdd(Collection<URL> newDocs, Map<String, String[]> prebuiltDocs) {
// Calculate documents that were not in prebuilt indexes, and still need
// to be added
// (newDocs minus prebuiltDocs)
@@ -196,7 +196,7 @@ class IndexingOperation {
* delete href, or String[] of indexIds to delete duplicates with
* given index IDs
*/
- private void removeNewDocuments(IProgressMonitor pm, Map docsToDelete)
+ private void removeNewDocuments(IProgressMonitor pm, Map<String, String[]> docsToDelete)
throws IndexingException {
pm = new LazyProgressMonitor(pm);
pm.beginTask("", docsToDelete.size()); //$NON-NLS-1$
@@ -209,7 +209,7 @@ class IndexingOperation {
MultiStatus multiStatus = null;
for (Iterator<String> it = keysToDelete.iterator(); it.hasNext();) {
String href = it.next();
- String[] indexIds = (String[]) docsToDelete.get(href);
+ String[] indexIds = docsToDelete.get(href);
if (indexIds == null) {
// delete all copies
index.removeDocument(href);
@@ -383,7 +383,7 @@ class IndexingOperation {
HelpBasePlugin.logError("Failed to get help search participant id for: " + participants[j].getClass().getName() + "; skipping this one.", t); //$NON-NLS-1$ //$NON-NLS-2$
continue;
}
- Set set;
+ Set<String> set;
try {
set = participants[j].getAllDocuments(index.getLocale());
}
@@ -393,8 +393,8 @@ class IndexingOperation {
continue;
}
- for (Iterator docs = set.iterator(); docs.hasNext();) {
- String doc = (String) docs.next();
+ for (Iterator<String> docs = set.iterator(); docs.hasNext();) {
+ String doc = docs.next();
String id = null;
int qloc = doc.indexOf('?');
if (qloc!= -1) {
@@ -537,12 +537,12 @@ class IndexingOperation {
return indexes;
}
- private Map mergeIndexes(IProgressMonitor monitor, boolean opened)
+ private Map<String, String[]> mergeIndexes(IProgressMonitor monitor, boolean opened)
throws IndexingException {
Collection<String> addedPluginIds = getAddedPlugins(index);
PrebuiltIndexes indexes = getIndexesToAdd(addedPluginIds);
PluginIndex[] pluginIndexes = indexes.getIndexes();
- Map mergedDocs = null;
+ Map<String, String[]> mergedDocs = null;
// Always perform add batch to ensure that index is created and saved
// even if no new documents
if (!index.beginAddBatch(opened)) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
index b507b3a9d..c3b4989d2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
@@ -53,11 +53,11 @@ public class LocalSearchManager {
private static final String SEARCH_PARTICIPANT_XP_FULLNAME = "org.eclipse.help.base.searchParticipant"; //$NON-NLS-1$
private static final String SEARCH_PARTICIPANT_XP_NAME = "searchParticipant"; //$NON-NLS-1$
private static final String BINDING_XP_NAME = "binding"; //$NON-NLS-1$
- private static final Object PARTICIPANTS_NOT_FOUND = new Object();
+ private static final ArrayList<ParticipantDescriptor> PARTICIPANTS_NOT_FOUND = new ArrayList<ParticipantDescriptor>();
private Map<String, Object> indexes = new HashMap<String, Object>();
private Map<String, AnalyzerDescriptor> analyzerDescriptors = new HashMap<String, AnalyzerDescriptor>();
private Map<String, ParticipantDescriptor> searchParticipantsById = new HashMap<String, ParticipantDescriptor>();
- private Map<String, Object> searchParticipantsByPlugin = new HashMap<String, Object>();
+ private Map<String, ArrayList<ParticipantDescriptor>> searchParticipantsByPlugin = new HashMap<String, ArrayList<ParticipantDescriptor>>();
private ArrayList<ParticipantDescriptor> globalSearchParticipants;
private static class ParticipantDescriptor implements IHelpResource {
@@ -225,13 +225,13 @@ public class LocalSearchManager {
public boolean isIndexable(String url) {
url = trimQuery(url);
- ArrayList list = getParticipantDescriptors(getPluginId(url));
+ ArrayList<ParticipantDescriptor> list = getParticipantDescriptors(getPluginId(url));
if (list == null)
return false;
int dotLoc = url.lastIndexOf('.');
String ext = url.substring(dotLoc + 1);
for (int i = 0; i < list.size(); i++) {
- ParticipantDescriptor desc = (ParticipantDescriptor) list.get(i);
+ ParticipantDescriptor desc = list.get(i);
if (desc.matches(ext))
return true;
}
@@ -322,13 +322,13 @@ public class LocalSearchManager {
*/
public SearchParticipant getParticipant(String pluginId, String fileName) {
- ArrayList list = getParticipantDescriptors(pluginId);
+ ArrayList<ParticipantDescriptor> list = getParticipantDescriptors(pluginId);
if (list == null)
return null;
int dotLoc = fileName.lastIndexOf('.');
String ext = fileName.substring(dotLoc + 1);
for (int i = 0; i < list.size(); i++) {
- ParticipantDescriptor desc = (ParticipantDescriptor) list.get(i);
+ ParticipantDescriptor desc = list.get(i);
if (desc.matches(ext))
return desc.getParticipant();
}
@@ -344,11 +344,11 @@ public class LocalSearchManager {
* @return whether or not the participant is bound to the plugin
*/
public boolean isParticipantBound(String pluginId, String participantId) {
- List list = getParticipantDescriptors(pluginId);
+ List<ParticipantDescriptor> list = getParticipantDescriptors(pluginId);
if (list != null) {
- Iterator iter = list.iterator();
+ Iterator<ParticipantDescriptor> iter = list.iterator();
while (iter.hasNext()) {
- ParticipantDescriptor desc = (ParticipantDescriptor)iter.next();
+ ParticipantDescriptor desc = iter.next();
if (participantId.equals(desc.getId())) {
return true;
}
@@ -481,15 +481,15 @@ public class LocalSearchManager {
private ArrayList<ParticipantDescriptor> addBoundDescriptors(ArrayList<ParticipantDescriptor> list, ArrayList<IConfigurationElement> binding) {
for (int i = 0; i < binding.size(); i++) {
IConfigurationElement refEl = binding.get(i);
- Collection<Object> collection = searchParticipantsByPlugin.values();
+ Collection<ArrayList<ParticipantDescriptor>> collection = searchParticipantsByPlugin.values();
boolean found = false;
- for (Iterator<Object> iter = collection.iterator(); iter.hasNext();) {
+ for (Iterator<ArrayList<ParticipantDescriptor>> iter = collection.iterator(); iter.hasNext();) {
if (found)
break;
- Object entry = iter.next();
- if (entry == PARTICIPANTS_NOT_FOUND)
+ ArrayList<ParticipantDescriptor> participants = iter.next();
+ if (participants == PARTICIPANTS_NOT_FOUND)
continue;
- ArrayList participants = (ArrayList) entry;
+ //ArrayList participants = (ArrayList) entry;
for (int j = 0; j < participants.size(); j++) {
ParticipantDescriptor desc = (ParticipantDescriptor) participants.get(j);
if (desc.contains(refEl)) {
@@ -571,8 +571,8 @@ public class LocalSearchManager {
}
}
- private ArrayList getParticipantDescriptors(String pluginId) {
- Object result = searchParticipantsByPlugin.get(pluginId);
+ private ArrayList<ParticipantDescriptor> getParticipantDescriptors(String pluginId) {
+ ArrayList<ParticipantDescriptor> result = searchParticipantsByPlugin.get(pluginId);
if (result == null) {
result = createSearchParticipants(pluginId);
if (result == null)
@@ -581,7 +581,7 @@ public class LocalSearchManager {
}
if (result == PARTICIPANTS_NOT_FOUND)
return null;
- return (ArrayList) result;
+ return (ArrayList<ParticipantDescriptor>) result;
}
public void search(ISearchQuery searchQuery, ISearchHitCollector collector, IProgressMonitor pm)
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java
index d29e35fcc..86de4ee74 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java
@@ -44,7 +44,7 @@ public class LuceneSearchParticipantAdapter extends SearchParticipant {
return searchParticipant.addDocument(searchIndex, pluginId, name, url, id, luceneDoc.getDocument());
}
- public Set getAllDocuments(String locale) {
+ public Set<String> getAllDocuments(String locale) {
return searchParticipant.getAllDocuments(locale);
}
@@ -56,7 +56,7 @@ public class LuceneSearchParticipantAdapter extends SearchParticipant {
return searchParticipant.equals(obj);
}
- public Set getContributingPlugins() {
+ public Set<String> getContributingPlugins() {
return searchParticipant.getContributingPlugins();
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java
index 5998af7fb..a5df71b25 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java
@@ -69,10 +69,10 @@ public class PluginIndex {
return;
}
boolean found = false;
- ArrayList availablePrefixes = ResourceLocator.getPathPrefix(targetIndex
+ ArrayList<String> availablePrefixes = ResourceLocator.getPathPrefix(targetIndex
.getLocale());
for (int i = 0; i < availablePrefixes.size(); i++) {
- String prefix = (String) availablePrefixes.get(i);
+ String prefix = availablePrefixes.get(i);
IPath prefixedPath = new Path(prefix + path);
// find index at this directory in plugin or fragments
URL url = FileLocator.find(bundle, prefixedPath, null);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java
index 25890a225..b0f0b3fe0 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java
@@ -60,7 +60,7 @@ public class PluginVersionInfo extends HelpProperties {
* if true, will cause detect change to ignore saved plugin
* version and behave like there was nothing saved
*/
- public PluginVersionInfo(String name, Collection docBundleIds, File dir,
+ public PluginVersionInfo(String name, Collection<String> docBundleIds, File dir,
boolean ignoreSavedVersions) {
super(name, dir);
this.dir = dir;
@@ -68,10 +68,10 @@ public class PluginVersionInfo extends HelpProperties {
createTable(docBundleIds);
}
- protected void createTable(Collection docBundleIds) {
+ protected void createTable(Collection<String> docBundleIds) {
// create table of current contributions
- for (Iterator it = docBundleIds.iterator(); it.hasNext();) {
- String bundleId = (String) it.next();
+ for (Iterator<String> it = docBundleIds.iterator(); it.hasNext();) {
+ String bundleId = it.next();
Bundle pluginBundle = Platform.getBundle(bundleId);
if (pluginBundle == null) {
continue;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
index e39c29e2a..0df55e0e4 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
@@ -369,7 +369,7 @@ public class QueryBuilder {
* if set to false, default field "contents" and all other fields
* will be searched
*/
- public Query getLuceneQuery(Collection fieldNames, boolean fieldSearchOnly)
+ public Query getLuceneQuery(Collection<String> fieldNames, boolean fieldSearchOnly)
throws QueryTooComplexException {
// split search query into tokens
List<QueryWordsToken> userTokens = tokenizeUserQuery(searchWords);
@@ -385,24 +385,24 @@ public class QueryBuilder {
* if set to false, default field "contents" and all other fields
* will be searched
*/
- private Query buildLuceneQuery(Collection fieldNames,
+ private Query buildLuceneQuery(Collection<String> fieldNames,
boolean fieldSearchOnly) {
String[] fields;
float[] boosts;
if (fieldSearchOnly) {
fields = new String[fieldNames.size()];
boosts = new float[fieldNames.size()];
- Iterator fieldNamesIt = fieldNames.iterator();
+ Iterator<String> fieldNamesIt = fieldNames.iterator();
for (int i = 0; i < fieldNames.size(); i++) {
- fields[i] = (String) fieldNamesIt.next();
+ fields[i] = fieldNamesIt.next();
boosts[i] = 5.0f;
}
} else {
fields = new String[fieldNames.size() + 2];
boosts = new float[fieldNames.size() + 2];
- Iterator fieldNamesIt = fieldNames.iterator();
+ Iterator<String> fieldNamesIt = fieldNames.iterator();
for (int i = 0; i < fieldNames.size(); i++) {
- fields[i] = (String) fieldNamesIt.next();
+ fields[i] = fieldNamesIt.next();
boosts[i] = 5.0f;
}
fields[fieldNames.size()] = "contents"; //$NON-NLS-1$
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsPhrase.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsPhrase.java
index 395b651f3..8a94e89a9 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsPhrase.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsPhrase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -20,10 +20,10 @@ import org.apache.lucene.search.*;
* of several words created by an analyzer
*/
public class QueryWordsPhrase extends QueryWordsToken {
- private List words;
+ private List<String> words;
public QueryWordsPhrase() {
super(QueryWordsToken.PHRASE, ""); //$NON-NLS-1$
- words = new ArrayList();
+ words = new ArrayList<String>();
}
public void addWord(String word) {
words.add(word);
@@ -32,7 +32,7 @@ public class QueryWordsPhrase extends QueryWordsToken {
else
value += " " + word; //$NON-NLS-1$
}
- public List getWords() {
+ public List<String> getWords() {
return words;
}
/**
@@ -40,8 +40,8 @@ public class QueryWordsPhrase extends QueryWordsToken {
*/
public Query createLuceneQuery(String field, float boost) {
PhraseQuery q = new PhraseQuery();
- for (Iterator it = getWords().iterator(); it.hasNext();) {
- String word = (String) it.next();
+ for (Iterator<String> it = getWords().iterator(); it.hasNext();) {
+ String word = it.next();
Term t = new Term(field, word);
q.add(t);
q.setBoost(boost);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java
index b4b369c9d..3990c8664 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java
@@ -1,5 +1,5 @@
/***************************************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved. This program and the
+ * Copyright (c) 2000, 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
@@ -18,7 +18,7 @@ import org.eclipse.help.search.ISearchEngineResult2;
/**
* A search result containing a document reference, score, summary, etc.
*/
-public class SearchHit implements ISearchEngineResult2, Comparable {
+public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
private String href;
private String label;
@@ -53,7 +53,7 @@ public class SearchHit implements ISearchEngineResult2, Comparable {
this.isPotentialHit = isPotentialHit;
}
- public int compareTo(Object o) {
+ public int compareTo(SearchHit o) {
if (o == this) {
return 0;
}
@@ -163,4 +163,5 @@ public class SearchHit implements ISearchEngineResult2, Comparable {
public boolean isPotentialHit() {
return isPotentialHit;
}
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
index 5104aa0c2..e47a6e294 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
@@ -449,15 +449,15 @@ public class SearchIndex implements ISearchIndex, IHelpSearchIndex {
// Create directories to merge and calculate all documents added
// and which are duplicates (to delete later)
for (int p = 0; p < pluginIndexes.length; p++) {
- List indexIds = pluginIndexes[p].getIDs();
- List indexPaths = pluginIndexes[p].getPaths();
+ List<String> indexIds = pluginIndexes[p].getIDs();
+ List<String> indexPaths = pluginIndexes[p].getPaths();
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
for (int i = 0; i < indexPaths.size(); i++) {
- String indexId = (String) indexIds.get(i);
- String indexPath = (String) indexPaths.get(i);
+ String indexId = indexIds.get(i);
+ String indexPath = indexPaths.get(i);
try {
dirList.add(new NIOFSDirectory(new File(indexPath)));
} catch (IOException ioe) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
index 8b5b9d3b4..b31802242 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
@@ -247,13 +247,13 @@ public class SearchManager {
* when flush() is called.
*/
private class BufferedSearchHitCollector implements ISearchHitCollector {
- private Set allHits = new HashSet();
+ private Set<SearchHit> allHits = new HashSet<SearchHit>();
private String wordsSearched = null;
/* (non-Javadoc)
* @see org.eclipse.help.internal.search.ISearchHitCollector#addHits(java.util.List, java.lang.String)
*/
- public void addHits(List hits, String wordsSearched) {
+ public void addHits(List<SearchHit> hits, String wordsSearched) {
if (wordsSearched != null) {
this.wordsSearched = wordsSearched;
}
@@ -266,7 +266,7 @@ public class SearchManager {
*/
public void flush(ISearchHitCollector collector) {
// sort by score
- List hitsList = new ArrayList(allHits);
+ List<SearchHit> hitsList = new ArrayList<SearchHit>(allHits);
Collections.sort(hitsList);
collector.addHits(hitsList, wordsSearched);
allHits.clear();
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
index 0248241ea..8bff51001 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -29,7 +29,7 @@ import org.eclipse.help.internal.base.HelpBasePlugin;
public class SearchProgressMonitor implements IProgressMonitor {
// Progress monitors, indexed by locale
- protected static Map progressMonitors = new HashMap();
+ protected static Map<String, SearchProgressMonitor> progressMonitors = new HashMap<String, SearchProgressMonitor>();
// Dummy collector for triggering a progress monitor
protected static ISearchHitCollector dummy_collector;
@@ -42,7 +42,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
static {
dummy_collector = new ISearchHitCollector() {
- public void addHits(List hits, String s) {
+ public void addHits(List<SearchHit> hits, String s) {
}
public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException {
@@ -150,7 +150,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
// return an existing progress monitor if there is one
if (progressMonitors.get(locale) != null)
- return (SearchProgressMonitor) progressMonitors.get(locale);
+ return progressMonitors.get(locale);
final SearchProgressMonitor pm = new SearchProgressMonitor();
progressMonitors.put(locale, pm);
@@ -205,8 +205,8 @@ public class SearchProgressMonitor implements IProgressMonitor {
/**
* Obtains names of fields in addition to default field
*/
- public Collection getFieldNames() {
- return new ArrayList();
+ public Collection<String> getFieldNames() {
+ return new ArrayList<String>();
}
/**
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java
index 22685647c..1121a10a3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -19,15 +19,15 @@ import org.eclipse.core.runtime.*;
* An implementation of ISearchQuery.
*/
public class SearchQuery implements ISearchQuery {
- Collection fieldNames;
+ Collection<String> fieldNames;
boolean fieldSearch;
String locale;
String searchWord;
public SearchQuery() {
- this("", false, new ArrayList(), Platform.getNL()); //$NON-NLS-1$
+ this("", false, new ArrayList<String>(), Platform.getNL()); //$NON-NLS-1$
}
public SearchQuery(String searchWord, boolean fieldSearch,
- Collection fieldNames, String locale) {
+ Collection<String> fieldNames, String locale) {
this.searchWord = searchWord;
this.fieldSearch = fieldSearch;
this.fieldNames = fieldNames;
@@ -38,7 +38,7 @@ public class SearchQuery implements ISearchQuery {
*
* @return Collection
*/
- public Collection getFieldNames() {
+ public Collection<String> getFieldNames() {
return fieldNames;
}
@@ -75,7 +75,7 @@ public class SearchQuery implements ISearchQuery {
* @param fieldNames
* The fieldNames to set
*/
- public void setFieldNames(Collection fieldNames) {
+ public void setFieldNames(Collection<String> fieldNames) {
this.fieldNames = fieldNames;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
index edd6b2383..1d2c59b37 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
@@ -69,15 +69,15 @@ public class SearchResults implements ISearchHitCollector {
/* (non-Javadoc)
* @see org.eclipse.help.internal.search.ISearchHitCollector#addHits(List, String)
*/
- public void addHits(List hits, String highlightTerms) {
+ public void addHits(List<SearchHit> hits, String highlightTerms) {
String urlEncodedWords = URLCoder.encode(highlightTerms);
List<SearchHit> searchHitList = new ArrayList<SearchHit>();
float scoreScale = 1.0f;
boolean scoreScaleSet = false;
- Iterator iter = hits.iterator();
+ Iterator<SearchHit> iter = hits.iterator();
for (int filteredHits = 0; filteredHits < maxHits && iter.hasNext(); ) {
- SearchHit rawHit = (SearchHit)iter.next();
+ SearchHit rawHit = iter.next();
String href = rawHit.getHref();
IToc toc = null; // the TOC containing the topic
AdaptableHelpResource scope = null;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java
index a6c3fa5a4..407d19f4f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -23,7 +23,7 @@ public class AdaptableTocsArray implements IAdaptable {
IToc[] element;
AdaptableToc[] children;
- HashMap map;
+ HashMap<String, AdaptableToc> map;
/**
* This constructor will be called when wrapping help resources.
@@ -57,7 +57,7 @@ public class AdaptableTocsArray implements IAdaptable {
public AdaptableToc getAdaptableToc(String href) {
if (map == null) {
getChildren(); // make sure children are initialized
- map = new HashMap(children.length);
+ map = new HashMap<String, AdaptableToc>(children.length);
for (int i = 0; i < children.length; i++)
map.put(children[i].getHref(), children[i]);
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java
index 74fb256ed..bc4f3547d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -24,7 +24,7 @@ public class AdaptableTopic extends AdaptableHelpResource {
/**
* Map of all topics with this topic as ancestor
*/
- private Map topicMap;
+ private Map<String, IHelpResource> topicMap;
/**
* This constructor will be called when wrapping help resources.
@@ -72,7 +72,7 @@ public class AdaptableTopic extends AdaptableHelpResource {
if (topicMap == null) {
// traverse TOC and fill in the topicMap
- topicMap = new HashMap();
+ topicMap = new HashMap<String, IHelpResource>();
topicMap.put(getHref(), element);
FastStack stack = new FastStack();
ITopic[] topics = getSubtopics();
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
index ff0f33364..ba8cceb24 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
@@ -24,10 +24,10 @@ public class WorkingSet {
private List<CriterionResource> criteria;
public WorkingSet(String name) {
- this(name, (List) null, (List) null);
+ this(name, (List<AdaptableHelpResource>) null, (List<CriterionResource>) null);
}
- public WorkingSet(String name, List elements) {
+ public WorkingSet(String name, List<AdaptableHelpResource> elements) {
this(name, elements, null);
}
@@ -137,10 +137,10 @@ public class WorkingSet {
CriterionResource criterion = iterator.next();
String criterionName = criterion.getCriterionName();
criterionItem.setAttribute("name", criterionName);//$NON-NLS-1$
- List criterionValues = criterion.getCriterionValues();
+ List<String> criterionValues = criterion.getCriterionValues();
if(!criterionValues.isEmpty()){
- for(Iterator iter = criterionValues.iterator(); iter.hasNext();){
- String value = (String)iter.next();
+ for(Iterator<String> iter = criterionValues.iterator(); iter.hasNext();){
+ String value = iter.next();
if(value != null){
Element item = doc.createElement("item"); //$NON-NLS-1$
criterionItem.appendChild(item);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java
index 4a3ae5bed..c57688851 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -16,7 +16,7 @@ import java.util.Comparator;
/**
* Compares two working sets by name.
*/
-public class WorkingSetComparator implements Comparator {
+public class WorkingSetComparator implements Comparator<WorkingSet> {
private Collator fCollator = Collator.getInstance();
/**
@@ -24,7 +24,7 @@ public class WorkingSetComparator implements Comparator {
*
* @see Comparator#compare(Object, Object)
*/
- public int compare(Object o1, Object o2) {
+ public int compare(WorkingSet o1,WorkingSet o2) {
String name1 = null;
String name2 = null;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
index 258e6cb81..5c20b6530 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
@@ -473,8 +473,8 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
}
List<String> criterionIds = new ArrayList<String>();
if(null != allCriteriaValues){
- for(Iterator iter = allCriteriaValues.keySet().iterator(); iter.hasNext();){
- String criterion = (String) iter.next();
+ for(Iterator<String> iter = allCriteriaValues.keySet().iterator(); iter.hasNext();){
+ String criterion = iter.next();
if(null == criterion || 0 == criterion.length() || 0 == getCriterionValueIds(criterion).length)
continue;
criterionIds.add(criterion);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java b/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
index a9e8d839d..7ab3a7473 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
@@ -169,7 +169,7 @@ public class HelpIndexBuilder {
createInfo(id, fid);
}
- protected void createTable(Collection docBundleIds) {
+ protected void createTable(Collection<String> docBundleIds) {
// do nothing
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java b/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java
index 01f929fd1..ee3c34df9 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java
@@ -62,7 +62,7 @@ import org.osgi.framework.Bundle;
*/
public abstract class LuceneSearchParticipant {
- private static final HashSet EMPTY_SET = new HashSet();
+ private static final HashSet<String> EMPTY_SET = new HashSet<String>();
private String id;
@@ -119,7 +119,7 @@ public abstract class LuceneSearchParticipant {
*
* @return a set of hrefs for documents managed by this participant.
*/
- public Set getAllDocuments(String locale) {
+ public Set<String> getAllDocuments(String locale) {
return EMPTY_SET;
}
@@ -130,7 +130,7 @@ public abstract class LuceneSearchParticipant {
* @return a set of contributing plug-in ids
*/
- public Set getContributingPlugins() {
+ public Set<String> getContributingPlugins() {
return EMPTY_SET;
}
@@ -149,7 +149,7 @@ public abstract class LuceneSearchParticipant {
protected static String resolveVariables(String pluginId, String fileName, String locale) {
if (fileName.indexOf('$') == -1)
return fileName;
- ArrayList prefix = ResourceLocator.getPathPrefix(locale);
+ ArrayList<String> prefix = ResourceLocator.getPathPrefix(locale);
Bundle bundle = Platform.getBundle(pluginId);
if (bundle == null)
return fileName;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java b/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
index 708954c9a..0bc5afcc2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -52,7 +52,7 @@ import org.osgi.framework.Bundle;
*/
public abstract class SearchParticipant {
- private static final HashSet EMPTY_SET = new HashSet();
+ private static final HashSet<String> EMPTY_SET = new HashSet<String>();
private String id;
@@ -107,7 +107,7 @@ public abstract class SearchParticipant {
* @param locale
* the index locale
*
- * @return a set of hrefs for documents managed by this participant.
+ * @return a set<String> of hrefs for documents managed by this participant.
*/
public Set getAllDocuments(String locale) {
return EMPTY_SET;
@@ -117,7 +117,7 @@ public abstract class SearchParticipant {
* Returns a set of identifiers of plug-ins that contribute indexable documents. This method is
* only used for participants that handle documents outside of the help system's TOC.
*
- * @return a set of contributing plug-in ids
+ * @return a set<String> of contributing plug-in ids
*/
public Set getContributingPlugins() {
@@ -139,7 +139,7 @@ public abstract class SearchParticipant {
protected static String resolveVariables(String pluginId, String fileName, String locale) {
if (fileName.indexOf('$') == -1)
return fileName;
- ArrayList prefix = ResourceLocator.getPathPrefix(locale);
+ ArrayList<String> prefix = ResourceLocator.getPathPrefix(locale);
Bundle bundle = Platform.getBundle(pluginId);
if (bundle == null)
return fileName;

Back to the top