Generify ArrayList.

Change-Id: Icb3dfc7fb8519a4d25f08c3dabce4a8b073dd880
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 02bc3a4..e1e73f1 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -500,19 +500,19 @@
 	 *            The list of projects to sort.
 	 * @return A new list of projects, ordered by build order.
 	 */
-	private List getBuildOrder(List resourceCollection) {
+	private List<IProject> getBuildOrder(List<IProject> resourceCollection) {
 		String[] orderedNames = ResourcesPlugin.getWorkspace().getDescription().getBuildOrder();
 		if (orderedNames != null) {
-			List orderedProjs = new ArrayList(resourceCollection.size());
+			List<IProject> orderedProjs = new ArrayList<>(resourceCollection.size());
 			//Projects may not be in the build order but should be built if
 			// selected
-			List unorderedProjects = new ArrayList(resourceCollection.size());
+			List<IProject> unorderedProjects = new ArrayList<>(resourceCollection.size());
 			unorderedProjects.addAll(resourceCollection);
 
 			for (int i = 0; i < orderedNames.length; i++) {
 				String projectName = orderedNames[i];
 				for (int j = 0; j < resourceCollection.size(); j++) {
-					IProject proj = (IProject) resourceCollection.get(j);
+					IProject proj = resourceCollection.get(j);
 					if (proj.getName().equals(projectName)) {
 						orderedProjs.add(proj);
 						unorderedProjects.remove(proj);
@@ -527,9 +527,9 @@
 
 		// Try the project prerequisite order then
 		IProject[] projects = new IProject[resourceCollection.size()];
-		projects = (IProject[]) resourceCollection.toArray(projects);
+		projects = resourceCollection.toArray(projects);
 		IWorkspace.ProjectOrder po = ResourcesPlugin.getWorkspace().computeProjectOrder(projects);
-		ArrayList orderedProjs = new ArrayList();
+		ArrayList<IProject> orderedProjs = new ArrayList<>();
 		orderedProjs.addAll(Arrays.asList(po.projects));
 		return orderedProjs;
 	}
@@ -806,9 +806,9 @@
 			ICProject cProject = CDebugUtils.getCProject(configuration);
 			if (cProject != null) {
 				project = cProject.getProject();
-				HashSet projectSet = new HashSet();
+				HashSet<IProject> projectSet = new HashSet<>();
 				getReferencedProjectSet(project, projectSet);
-				orderedProjects = getBuildOrder(new ArrayList(projectSet));
+				orderedProjects = getBuildOrder(new ArrayList<>(projectSet));
 			}
 			monitor.worked(scale);
 
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CommonTabLite.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CommonTabLite.java
index 10d0d92..d1e5557 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CommonTabLite.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CommonTabLite.java
@@ -140,9 +140,6 @@
 		}
 	};
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
-	 */
 	@Override
 	public void createControl(Composite parent) {
 		Composite comp = new Composite(parent, SWT.NONE);
@@ -292,9 +289,6 @@
 		return (IContainer) getWorkspaceRoot().findMember(containerPath);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
 	@Override
 	public void initializeFrom(ILaunchConfiguration configuration) {
 		boolean isShared = !configuration.isLocal();
@@ -324,7 +318,7 @@
 		fFavoritesTable.setInput(config);
 		fFavoritesTable.setCheckedElements(new Object[] {});
 		try {
-			List groups = config.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, new ArrayList());
+			List<String> groups = config.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, new ArrayList<>());
 			if (groups.isEmpty()) {
 				// check old attributes for backwards compatible
 				if (config.getAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, false)) {
@@ -335,10 +329,10 @@
 				}
 			}
 			if (!groups.isEmpty()) {
-				List list = new ArrayList();
-				Iterator iterator = groups.iterator();
+				List<LaunchGroupExtension> list = new ArrayList<>();
+				Iterator<String> iterator = groups.iterator();
 				while (iterator.hasNext()) {
-					String id = (String) iterator.next();
+					String id = iterator.next();
 					LaunchGroupExtension extension = getLaunchConfigurationManager().getLaunchGroup(id);
 					if (extension != null) {
 						list.add(extension);
@@ -391,7 +385,7 @@
 			boolean run = config.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false);
 			if (debug || run) {
 				// old attributes
-				List groups = new ArrayList();
+				List<LaunchGroupExtension> groups = new ArrayList<>();
 				int num = 0;
 				if (debug) {
 					groups.add(getLaunchConfigurationManager().getLaunchGroup(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP));
@@ -417,11 +411,11 @@
 			}
 			config.setAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, (String) null);
 			config.setAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, (String) null);
-			List groups = null;
+			List<String> groups = null;
 			for (int i = 0; i < checked.length; i++) {
 				LaunchGroupExtension group = (LaunchGroupExtension) checked[i];
 				if (groups == null) {
-					groups = new ArrayList();
+					groups = new ArrayList<>();
 				}
 				groups.add(group.getIdentifier());
 			}
@@ -438,9 +432,6 @@
 		return ResourcesPlugin.getWorkspace().getRoot();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
 	@Override
 	public boolean isValid(ILaunchConfiguration config) {
 		setMessage(null);
@@ -469,27 +460,18 @@
 		return true;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
-	 */
 	@Override
 	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
 		config.setContainer(null);
 		setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, config, true, true);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
-	 */
 	@Override
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
 		updateConfigFromLocalShared(configuration);
 		updateConfigFromFavorites(configuration);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
-	 */
 	@Override
 	public String getName() {
 		return LaunchConfigurationsMessages.CommonTab__Common_15;
@@ -505,32 +487,20 @@
 		return "org.eclipse.debug.ui.commonTab"; //$NON-NLS-1$
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave()
-	 */
 	@Override
 	public boolean canSave() {
 		return validateLocalShared();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
-	 */
 	@Override
 	public Image getImage() {
 		return DebugUITools.getImage(IInternalDebugUIConstants.IMG_OBJS_COMMON_TAB);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
-	 */
 	@Override
 	public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
-	 */
 	@Override
 	public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
 	}
@@ -543,7 +513,7 @@
 		@Override
 		public Object[] getElements(Object inputElement) {
 			ILaunchGroup[] groups = DebugUITools.getLaunchGroups();
-			List possibleGroups = new ArrayList();
+			List<ILaunchGroup> possibleGroups = new ArrayList<>();
 			ILaunchConfiguration configuration = (ILaunchConfiguration) inputElement;
 			for (int i = 0; i < groups.length; i++) {
 				ILaunchGroup extension = groups[i];