diff options
author | Alexander Kurtakov | 2016-06-28 05:38:38 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-06-28 05:38:38 +0000 |
commit | 9fefeae4ecc76a7da901b593d9d0cc238c7cb654 (patch) | |
tree | 12dd21526fcdc5b35cf9dc3280b6044e4213b7f6 | |
parent | dde1bcf707eac2b5c454295f2b0f37c3207b3ba4 (diff) | |
download | eclipse.platform.ua-9fefeae4ecc76a7da901b593d9d0cc238c7cb654.tar.gz eclipse.platform.ua-9fefeae4ecc76a7da901b593d9d0cc238c7cb654.tar.xz eclipse.platform.ua-9fefeae4ecc76a7da901b593d9d0cc238c7cb654.zip |
Bug 496890 - Update o.e.help.ui to Java 8
Bump BREE, version minor to reflect that and generify codebase.
Change-Id: I19fefe2997bfb171f655a5c7680128a9ee5533f3
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
30 files changed, 123 insertions, 113 deletions
diff --git a/org.eclipse.help.ui/.classpath b/org.eclipse.help.ui/.classpath index ce7393340..eca7bdba8 100644 --- a/org.eclipse.help.ui/.classpath +++ b/org.eclipse.help.ui/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/org.eclipse.help.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.help.ui/.settings/org.eclipse.jdt.core.prefs index b078685bc..f73010a66 100644 --- a/org.eclipse.help.ui/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.help.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,16 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning @@ -53,7 +54,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.3 +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,NORMAL org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,HELP @@ -123,7 +124,12 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert diff --git a/org.eclipse.help.ui/META-INF/MANIFEST.MF b/org.eclipse.help.ui/META-INF/MANIFEST.MF index b0259749e..7d26916ce 100644 --- a/org.eclipse.help.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.help.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %help_system_plugin_name Bundle-SymbolicName: org.eclipse.help.ui; singleton:=true -Bundle-Version: 4.0.200.qualifier +Bundle-Version: 4.1.0.qualifier Bundle-Activator: org.eclipse.help.ui.internal.HelpUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -24,5 +24,5 @@ Require-Bundle: org.eclipse.help.base;bundle-version="[4.0.0,5.0.0)";visibility: org.eclipse.core.expressions;bundle-version="3.4.200" Eclipse-LazyStart: true Import-Package: com.ibm.icu.text -Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.help.ui/pom.xml b/org.eclipse.help.ui/pom.xml index a4499e2b6..96482e824 100644 --- a/org.eclipse.help.ui/pom.xml +++ b/org.eclipse.help.ui/pom.xml @@ -18,6 +18,6 @@ </parent> <groupId>org.eclipse.help</groupId> <artifactId>org.eclipse.help.ui</artifactId> - <version>4.0.200-SNAPSHOT</version> + <version>4.1.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java index 0605f4963..839b14b3a 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -52,7 +52,7 @@ public abstract class RootScopePage extends PreferencePage implements private Text descText; - private Hashtable disabledStates = new Hashtable(); + private Hashtable<Control, Boolean> disabledStates = new Hashtable<>(); private Label spacer; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java index 25341f0af..28b662d9e 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -254,6 +254,7 @@ public class HelpActivitySupport implements IHelpActivitySupport { * * @see org.eclipse.help.internal.base.IHelpActivitySupport#enableActivities(java.lang.String) */ + @SuppressWarnings("unchecked") public void enableActivities(String href) { if (href.startsWith("/")) { //$NON-NLS-1$ href = href.substring(1); @@ -261,13 +262,13 @@ public class HelpActivitySupport implements IHelpActivitySupport { IIdentifier identifier = activitySupport.getActivityManager() .getIdentifier(href); - Set activitityIds = identifier.getActivityIds(); + Set<String> activitityIds = identifier.getActivityIds(); if (activitityIds.isEmpty()) { // if there are no activities that match // this identifier, do nothing. return; } - Set enabledIds = new HashSet(activitySupport.getActivityManager() + Set<String> enabledIds = new HashSet(activitySupport.getActivityManager() .getEnabledActivityIds()); enabledIds.addAll(activitityIds); activitySupport.setEnabledActivityIds(enabledIds); diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java index 0a49f51b8..e53cfdc7d 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,13 +34,13 @@ public class HyperlinkHandler private Color foreground; private Color activeBackground; private Color activeForeground; - private Hashtable hyperlinkListeners; + private Hashtable<Control, IHyperlinkListener> hyperlinkListeners; private Control lastLink; /** * HyperlinkHandler constructor comment. */ public HyperlinkHandler() { - hyperlinkListeners = new Hashtable(); + hyperlinkListeners = new Hashtable<>(); hyperlinkCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_HAND); busyCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_WAIT); } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java index c0fe69b1c..b22c7cc2f 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,10 +36,10 @@ public class StyledLineWrapper implements StyledTextContent { private Drawable drawable; /** Lines after splitting */ - private ArrayList lines = new ArrayList(); + private ArrayList<String> lines = new ArrayList<>(); /** Style ranges, per line */ - private ArrayList lineStyleRanges = new ArrayList(); + private ArrayList<StyleRange> lineStyleRanges = new ArrayList<>(); /** Character count */ private int charCount = -1; @@ -189,7 +189,7 @@ public class StyledLineWrapper implements StyledTextContent { */ private void processLineBreaks(String text) { // Create the original lines with style stripped - lines = new ArrayList(); + lines = new ArrayList<>(); char[] textChars = getUnstyledText(text).toCharArray(); int start = 0; for (int i = start; i < textChars.length; i++) { @@ -268,7 +268,7 @@ public class StyledLineWrapper implements StyledTextContent { */ private void processStyles(String text) { // create a new array of styles - lineStyleRanges = new ArrayList(); + lineStyleRanges = new ArrayList<>(); // first, remove the line breaks text = text.replaceAll("\n|\r", ""); //$NON-NLS-1$ //$NON-NLS-2$ int offset = 0; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java index 774c2176f..4879d9424 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -76,7 +76,7 @@ public class EmbeddedBrowser { private String statusText; private int x, y, w, h; private long modalRequestTime = 0; - private Vector closeListeners = new Vector(1); + private Vector<IBrowserCloseListener> closeListeners = new Vector<>(1); /** * Constructor for main help window instance */ @@ -416,7 +416,7 @@ public class EmbeddedBrowser { private static Image[] createImages() { String[] productImageURLs = getProductImageURLs(); if (productImageURLs != null) { - ArrayList shellImgs = new ArrayList(); + ArrayList<Image> shellImgs = new ArrayList<>(); for (int i = 0; i < productImageURLs.length; i++) { if ("".equals(productImageURLs[i])) { //$NON-NLS-1$ continue; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java index 32271ce4c..ffe50d0cf 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2011 IBM Corporation and others. + * Copyright (c) 2006, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -138,7 +138,7 @@ public class HelpContentPreferencePage extends PreferencePage implements prefs.putBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, searchLocalHelpLast.getSelection()); - List ics = table.getICs(); + List<IC> ics = table.getICs(); ICPreferences.setICs(ics); RemoteHelp.notifyPreferenceChange(); diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java index 9de49f64d..b27a157e4 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -206,7 +206,7 @@ public class ICButtons implements SelectionListener{ {
int index = page.getTable().getTable().getSelectionIndices()[0];
- List ics = page.getTable().getICs();
+ List<IC> ics = page.getTable().getICs();
IC x = (IC) ics.get(index);
IC y = (IC) ics.get(index+offset);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java index 7ca7f572a..607e9b912 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ public class ICPreferences { public final static String DELIMITER = ","; //$NON-NLS-1$
- public static void setICs(List ics)
+ public static void setICs(List<IC> ics)
{
String name = "", host = "", path = "", protocol="", port = "", enabled = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
@@ -63,7 +63,7 @@ public class ICPreferences { HelpPlugin.getTocManager().clearCache();
}
- public static List getICs()
+ public static List<IC> getICs()
{
return prefsToICs(
ICPreferences.get("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME).split(DELIMITER), //$NON-NLS-1$
@@ -74,9 +74,9 @@ public class ICPreferences { ICPreferences.get("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled).split(DELIMITER)); //$NON-NLS-1$
}
- public static List prefsToICs(String names[],String protocols[],String hosts[],String ports[],String paths[],String states[])
+ public static List<IC> prefsToICs(String names[],String protocols[],String hosts[],String ports[],String paths[],String states[])
{
- List ics = new ArrayList();
+ List<IC> ics = new ArrayList<>();
for (int i=0;i<names.length;i++)
{
@@ -102,7 +102,7 @@ public class ICPreferences { - public static List getDefaultICs()
+ public static List<IC> getDefaultICs()
{
return prefsToICs(
getDefault("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME).split(DELIMITER), //$NON-NLS-1$
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java index aac6745a0..7fcdabe44 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -137,18 +137,19 @@ public class ICTable { */
class ICContentProvider implements IStructuredContentProvider
{
- private List content = new ArrayList();
+ private List<IC> content = new ArrayList<>();
public void dispose() {
content = null;
}
+ @SuppressWarnings("unchecked")
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- content = (List)newInput;
+ content = (List<IC>)newInput;
}
- public Object[] getElements(Object inputElement) {
- return (Object[])content.toArray(new Object[content.size()]);
+ public IC[] getElements(Object inputElement) {
+ return (IC[])content.toArray(new Object[content.size()]);
}
}
@@ -211,10 +212,10 @@ public class ICTable { /**
* Return the RemoteICList
*/
- public List getICs() {
+ public List<IC> getICs() {
ICContentProvider p = (ICContentProvider)viewer.getContentProvider();
- Object objs[] = p.getElements(null);
- List content = new ArrayList();
+ IC objs[] = p.getElements(null);
+ List<IC> content = new ArrayList<>();
for (int o=0;o<objs.length;o++)
content.add(objs[o]);
return content;
@@ -247,7 +248,7 @@ public class ICTable { public void addIC(IC ic)
{
- List content = getICs();
+ List<IC> content = getICs();
content.add(ic);
getTableViewer().getContentProvider().inputChanged(
getTableViewer(), null, content);
@@ -257,7 +258,7 @@ public class ICTable { public void editIC(IC ic)
{
- List content = getICs();
+ List<IC> content = getICs();
content.set(getTable().getSelectionIndex(), ic);
getTableViewer().replace(ic,getTable().getSelectionIndex());
getTableViewer().getContentProvider().inputChanged(
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java index 9e160c5d4..b6f3719e5 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -73,7 +73,7 @@ public class InfoCenterPage extends RootScopePage { public void load(IPreferenceStore store) { String elements = store.getString(getKey(InfoCenterSearchScopeFactory.P_TOCS)); StringTokenizer stok = new StringTokenizer(elements, InfoCenterSearchScopeFactory.TOC_SEPARATOR); - ArrayList list = new ArrayList(); + ArrayList<AdaptableHelpResource> list = new ArrayList<>(); while (stok.hasMoreTokens()) { final String url = stok.nextToken(); AdaptableHelpResource res = find(url); @@ -430,6 +430,7 @@ public class InfoCenterPage extends RootScopePage { } } + @SuppressWarnings("unchecked") private void findCheckedElements(java.util.List checkedResources, Object parent) { Object[] children = treeContentProvider.getChildren(parent); @@ -458,7 +459,7 @@ public class InfoCenterPage extends RootScopePage { } public void updateWorkingSet() { - ArrayList elements = new ArrayList(10); + ArrayList<AdaptableHelpResource> elements = new ArrayList<>(10); findCheckedElements(elements, tree.getInput()); workingSet.setElements((AdaptableHelpResource[]) elements .toArray(new AdaptableHelpResource[elements.size()])); diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java index 7cbdafb7c..594711899 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,7 +40,7 @@ public class InfoCenterSearchScopeFactory implements ISearchScopeFactory { String tvalue = getProperty(P_TOCS, store, engineId, parameters); if (tvalue!=null && tvalue.length()>0) { StringTokenizer stok = new StringTokenizer(tvalue, TOC_SEPARATOR); - ArrayList list = new ArrayList(); + ArrayList<String> list = new ArrayList<>(); while (stok.hasMoreTokens()) { String toc = stok.nextToken(); list.add(toc); diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java index c78339b3c..7ca32fb99 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -304,6 +304,7 @@ public class LocalHelpPage extends RootScopePage { } } + @SuppressWarnings("unchecked") private void findCheckedElements(java.util.List checkedResources, Object parent, CheckboxTreeViewer tree, ITreeContentProvider contentProvider) { Object[] children = contentProvider.getChildren(parent); @@ -318,7 +319,7 @@ public class LocalHelpPage extends RootScopePage { private CriterionResource[] findCheckedCriteria(Object parent, CheckboxTreeViewer tree, ITreeContentProvider contentProvider) { Object[] children = contentProvider.getChildren(parent); - List resources = new ArrayList(); + List<CriterionResource> resources = new ArrayList<>(); for (int i = 0; i < children.length; i++) { // First level children are names CriterionName name = (CriterionName) children[i]; @@ -355,7 +356,7 @@ public class LocalHelpPage extends RootScopePage { } public WorkingSet getWorkingSet() { - ArrayList elements = new ArrayList(10); + ArrayList<AdaptableHelpResource> elements = new ArrayList<>(10); CriterionResource[] criteria; if (!HelpPlugin.getCriteriaManager().isCriteriaEnabled()) { criteria = new CriterionResource[0]; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java index 97c404743..2a8a4ae3d 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -428,8 +428,8 @@ public class ContextHelpPart extends SectionPart implements IHelpPart { private class SearchTerms { - private List terms = new ArrayList(); - private Set termSet = new HashSet(); + private List<String> terms = new ArrayList<>(); + private Set<String> termSet = new HashSet<>(); public void add(String term) { if (term == null ) return; String lowerCaseTerm = term.toLowerCase(); diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java index 02941308e..3032bdec3 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -19,11 +19,11 @@ import org.eclipse.jface.viewers.ViewerComparator; public class ContextHelpSorter extends ViewerComparator { private IContext2 context; - private LinkedList list; + private LinkedList<String> list; public ContextHelpSorter(IContext2 context) { super(ReusableHelpPart.SHARED_COLLATOR); - list = new LinkedList(); + list = new LinkedList<>(); this.context = context; } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java index 241480592..a173858fb 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -266,7 +266,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart { searchQuery.setSearchWord(phrase); SearchResults localResults = new SearchResults(null, DynamicHelpPart.SHORT_COUNT * 2, Platform.getNL()) { - public void addHits(List hits, String highlightTerms) { + public void addHits(List<SearchHit> hits, String highlightTerms) { // don't highlight any terms for dynamic help part super.addHits(hits, ""); //$NON-NLS-1$ } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java index 2259424fe..8547ddae0 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,7 +35,7 @@ public class EngineDescriptor implements IEngineDescriptor { private EngineTypeDescriptor etdesc; - private Hashtable parameters; + private Hashtable<String, Object> parameters; //private boolean removable; @@ -143,7 +143,7 @@ public class EngineDescriptor implements IEngineDescriptor { public Dictionary getParameters() { if (parameters != null) return parameters; - parameters = new Hashtable(); + parameters = new Hashtable<>(); parameters.put(P_MASTER, isEnabled() ? Boolean.TRUE : Boolean.FALSE); if (config != null) { IConfigurationElement[] params = config.getChildren("param"); //$NON-NLS-1$ diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java index 28423f99b..9be207b0c 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ import org.w3c.dom.*; import org.xml.sax.*; public class EngineDescriptorManager extends Observable implements IHelpUIConstants { - private ArrayList descriptors; + private ArrayList<EngineDescriptor> descriptors; private EngineTypeDescriptor[] engineTypes; @@ -46,7 +46,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta } public EngineDescriptorManager() { - descriptors = new ArrayList(); + descriptors = new ArrayList<>(); load(); } @@ -160,8 +160,8 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta } private Hashtable loadEngineTypes(IConfigurationElement[] elements) { - Hashtable result = new Hashtable(); - ArrayList list = new ArrayList(); + Hashtable<String, EngineTypeDescriptor> result = new Hashtable<>(); + ArrayList<EngineTypeDescriptor> list = new ArrayList<>(); for (int i = 0; i < elements.length; i++) { IConfigurationElement element = elements[i]; if (element.getName().equals("engineType")) { //$NON-NLS-1$ @@ -241,7 +241,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta } public String computeNewId(String typeId) { - ArrayList used = new ArrayList(); + ArrayList<Integer> used = new ArrayList<>(); for (int i=0; i<descriptors.size(); i++) { EngineDescriptor ed = (EngineDescriptor)descriptors.get(i); if (!ed.isUserDefined()) continue; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java index fcf99a0e7..6f5d91b4a 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -68,7 +68,7 @@ public class EngineResultSection { private IStatus errorStatus; - private ArrayList hits; + private ArrayList<ISearchEngineResult> hits; private Section section; @@ -95,7 +95,7 @@ public class EngineResultSection { public EngineResultSection(SearchResultsPart part, EngineDescriptor desc) { this.part = part; this.desc = desc; - hits = new ArrayList(); + hits = new ArrayList<>(); sorter = new FederatedSearchSorter(); } @@ -283,10 +283,10 @@ public class EngineResultSection { } private ISearchEngineResult[] getResults() { - ArrayList list = hits; + ArrayList<ISearchEngineResult> list = hits; if (desc.getEngineTypeId().equals(IHelpUIConstants.INTERNAL_HELP_ID)) { if (part.parent.isFilteredByRoles()) { - list = new ArrayList(); + list = new ArrayList<>(); for (int i = 0; i < hits.size(); i++) { ISearchEngineResult hit = (ISearchEngineResult) hits.get(i); if (HelpBasePlugin.getActivitySupport().isEnabled(hit.getHref())) diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java index bd9851e56..8148c3f12 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.*; import org.eclipse.ui.dialogs.SelectionStatusDialog; public class RenameDialog extends SelectionStatusDialog { - private ArrayList oldNames; + private ArrayList<String> oldNames; private String oldName; private String newName; private Text text; @@ -60,7 +60,7 @@ public class RenameDialog extends SelectionStatusDialog { } public void initialize(){ - oldNames = new ArrayList(); + oldNames = new ArrayList<>(); setStatusLineAboveButtons(true); this.setHelpAvailable(false); } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java index 1951c74c5..3cd58217b 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -143,7 +143,7 @@ public class ReusableHelpPart implements IHelpUIConstants, private String defaultContextHelpText; - private ArrayList pages; + private ArrayList<IHelpPartPage> pages; private Action backAction; @@ -307,14 +307,14 @@ public class ReusableHelpPart implements IHelpUIConstants, private IMenuManager subMenuManager; - protected ArrayList partRecs; + protected ArrayList<PartRec> partRecs; private int nflexible; public HelpPartPage(String id, String text) { this.id = id; this.text = text; - partRecs = new ArrayList(); + partRecs = new ArrayList<>(); if (ReusableHelpPart.this.actionBars != null) { // Help View bars = new SubActionBars(ReusableHelpPart.this.actionBars); @@ -474,7 +474,7 @@ public class ReusableHelpPart implements IHelpUIConstants, public void setVisible(boolean visible) { if (bars != null) bars.clearGlobalActionHandlers(); - ArrayList tabList = new ArrayList(); + ArrayList<Control> tabList = new ArrayList<>(); for (int i = 0; i < partRecs.size(); i++) { PartRec rec = (PartRec) partRecs.get(i); if (visible) { @@ -742,7 +742,7 @@ public class ReusableHelpPart implements IHelpUIConstants, } private void definePages() { - pages = new ArrayList(); + pages = new ArrayList<>(); // federated search page HelpPartPage page = new HelpPartPage(HV_FSEARCH_PAGE, Messages.ReusableHelpPart_searchPage_name, @@ -1254,7 +1254,7 @@ public class ReusableHelpPart implements IHelpUIConstants, EngineDescriptor desc = getEngineManager().findEngine(engineId); if (desc==null) return; - HashMap args = new HashMap(); + HashMap<String, Object> args = new HashMap<>(); HelpURLConnection.parseQuery(url.substring(qloc+1), args); ((ISearchEngine2)desc.getEngine()).open((String)args.get("id")); //$NON-NLS-1$ return; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java index 0c61273c9..6dc6a3b4a 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,12 +14,12 @@ import java.util.LinkedList; public class ReusableHelpPartHistory { private static final int CAPACITY = 50; - private LinkedList queue; + private LinkedList<HistoryEntry> queue; private int cursor = -1; private boolean blocked; public ReusableHelpPartHistory() { - queue = new LinkedList(); + queue = new LinkedList<>(); } public void addEntry(HistoryEntry entry) { diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java index e2bec2ca0..f0fa1f576 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2005 IBM Corporation and others. + * Copyright (c) 2004, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.*; public class ScopePreferenceDialog extends PreferenceDialog { private EngineDescriptorManager descManager; - private ArrayList pendingOperations; + private ArrayList<PendingOperation> pendingOperations; class PendingOperation { int action; @@ -142,7 +142,7 @@ public class ScopePreferenceDialog extends PreferenceDialog { private void scheduleOperation(int action, EngineDescriptor desc) { if (pendingOperations==null) - pendingOperations = new ArrayList(); + pendingOperations = new ArrayList<>(); pendingOperations.add(new PendingOperation(action, desc)); } protected void okPressed() { diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java index ddf8b260c..d255dd203 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -85,8 +85,8 @@ public class ScopeSetDialog extends TrayDialog { private Button editButton; private Button renameButton; private Button removeButton; - private ArrayList sets; - private ArrayList operations; + private ArrayList<ScopeSet> sets; + private ArrayList<PendingOperation> operations; private IStructuredContentProvider contentProvider; private Button showAllRadio; @@ -214,8 +214,8 @@ public class ScopeSetDialog extends TrayDialog { initialSelection = scopeSet; } - private ArrayList extractSets(ScopeSet[] array) { - ArrayList list = new ArrayList(); + private ArrayList<ScopeSet> extractSets(ScopeSet[] array) { + ArrayList<ScopeSet> list = new ArrayList<>(); for (int i=0; i<array.length; i++) { list.add(array[i]); } @@ -333,7 +333,7 @@ public class ScopeSetDialog extends TrayDialog { result = new Object[] { scope }; } - private void setResult(List newResult) { + private void setResult(List<?> newResult) { if (newResult == null) { result = null; } else { @@ -386,7 +386,7 @@ public class ScopeSetDialog extends TrayDialog { } private String getDefaultName() { - Set namesInUse = new HashSet(); + Set<String> namesInUse = new HashSet<>(); for (int i=0; i<sets.size(); i++) { ScopeSet set = (ScopeSet)sets.get(i); namesInUse.add(set.getName().toLowerCase()); @@ -475,7 +475,7 @@ public class ScopeSetDialog extends TrayDialog { private void scheduleOperation(PendingOperation op) { if (operations==null) - operations = new ArrayList(); + operations = new ArrayList<>(); operations.add(op); } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java index 88c13b237..64091b00e 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,7 +28,7 @@ public class ScopeSetManager extends Observable { private static final String ACTIVE_SET = "activeScopeSet"; //$NON-NLS-1$ - private ArrayList sets; + private ArrayList<ScopeSet> sets; private ScopeSet defSet; @@ -89,7 +89,7 @@ public class ScopeSetManager extends Observable { } public ScopeSet[] getScopeSets(boolean implicit) { - ArrayList result = new ArrayList(); + ArrayList<ScopeSet> result = new ArrayList<>(); for (int i = 0; i < sets.size(); i++) { ScopeSet set = (ScopeSet) sets.get(i); if (set.isImplicit() == implicit) @@ -101,7 +101,7 @@ public class ScopeSetManager extends Observable { } private void loadScopeSets() { - sets = new ArrayList(); + sets = new ArrayList<>(); IPath location = HelpUIPlugin.getDefault().getStateLocation(); location = location.append("scope_sets"); //$NON-NLS-1$ File dir = location.toFile(); diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java index acd240910..e47114805 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -523,8 +523,8 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo private void updateSearchCombo(HistoryScopeSet current) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=95479 ScopeSet[] sets = scopeSetManager.getScopeSets(true); - ArrayList items = new ArrayList(); - ArrayList toDelete = new ArrayList(); + ArrayList<String> items = new ArrayList<>(); + ArrayList<HistoryScopeSet> toDelete = new ArrayList<HistoryScopeSet>(); // if (current!=null) // items.add(current.getExpression()); for (int i = sets.length - 1; i >= 0; i--) { @@ -570,10 +570,10 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo if (switchedSet) setActiveScopeSet(set); } - ArrayList entries = new ArrayList(); + ArrayList<FederatedSearchEntry> entries = new ArrayList<>(); final SearchResultsPart results = (SearchResultsPart) parent .findPart(IHelpUIConstants.HV_FSEARCH_RESULT); - ArrayList eds = new ArrayList(); + ArrayList<EngineDescriptor> eds = new ArrayList<>(); EngineDescriptor[] engineDescriptors = parent.getEngineManager().getDescriptors(); for (int i = 0; i < engineDescriptors.length; i++) { final EngineDescriptor ed = engineDescriptors[i]; diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java index 717e18f1b..25e21955f 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -66,7 +66,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart { private Action showDescriptionAction; - private ArrayList results; + private ArrayList<EngineResultSection> results; //private String phrase; @@ -105,7 +105,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart { tlayout.topMargin = 0; tlayout.bottomMargin = 0; innerForm.getBody().setLayout(tlayout); - results = new ArrayList(); + results = new ArrayList<>(); contributeToToolBar(tbm); } |