Bug 578946 - Avoid generic-wildcards if possible

Change-Id: I08ac337985055aeacbb38c1b5f4713dbc990190d
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Reviewed-on: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/191166
Tested-by: PDE Bot <pde-bot@eclipse.org>
diff --git a/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
index 9f87877..8e6c7a2 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ui; singleton:=true
-Bundle-Version: 1.2.600.qualifier
+Bundle-Version: 1.2.700.qualifier
 Bundle-Localization: plugin
 Eclipse-LazyStart: true
 Bundle-ActivationPolicy: lazy
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java
index 6293432..bafaca3 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java
@@ -77,7 +77,7 @@
 
 	// the visual selection widget group
 	private TableViewer fTableViewer;
-	Set<?> fProjectsWithSpecifics;
+	Set<IJavaProject> fProjectsWithSpecifics;
 
 	// sizing constants
 	private final static int SIZING_SELECTION_WIDGET_HEIGHT = 250;
@@ -96,7 +96,7 @@
 	 * @param parentShell
 	 * @param projectsWithSpecifics
 	 */
-	public ProjectSelectionDialog(Shell parentShell, Set<?> projectsWithSpecifics) {
+	public ProjectSelectionDialog(Shell parentShell, Set<IJavaProject> projectsWithSpecifics) {
 		super(parentShell);
 		setTitle(PreferenceMessages.ProjectSelectionDialog_title);
 		setMessage(PreferenceMessages.ProjectSelectionDialog_message);
diff --git a/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
index 7f04cc1..058c489 100644
--- a/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.api.tools;singleton:=true
-Bundle-Version: 1.2.800.qualifier
+Bundle-Version: 1.2.900.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
diff --git a/apitools/org.eclipse.pde.api.tools/pom.xml b/apitools/org.eclipse.pde.api.tools/pom.xml
index 8be969a..1a88873 100644
--- a/apitools/org.eclipse.pde.api.tools/pom.xml
+++ b/apitools/org.eclipse.pde.api.tools/pom.xml
@@ -17,7 +17,7 @@
     <version>4.24.0-SNAPSHOT</version>
   </parent>
   <artifactId>org.eclipse.pde.api.tools</artifactId>
-  <version>1.2.800-SNAPSHOT</version>
+  <version>1.2.900-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
   <properties>
     <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java
index bcd88a3..5ca52af 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java
@@ -182,7 +182,7 @@
 	 */
 	private void checkSuperclass() {
 		// check superclass set
-		List<?> superclassList1 = getSuperclassList(this.type1);
+		List<IApiType> superclassList1 = getSuperclassList(this.type1);
 		if (!isStatusOk()) {
 			return;
 		}
@@ -237,7 +237,7 @@
 		// get superclass of descriptor2
 		if (superclassList1 != null && superclassList2 != null) {
 			IApiType superclassType2 = superclassList2.get(0);
-			IApiType superclassType = (IApiType) superclassList1.get(0);
+			IApiType superclassType = superclassList1.get(0);
 			if (!superclassType.getName().equals(superclassType2.getName())) {
 				if (!superclassNames2.contains(superclassType.getName())) {
 					this.addDelta(getElementType(this.type1), IDelta.REMOVED, IDelta.SUPERCLASS, this.currentDescriptorRestrictions, this.type1.getModifiers(), this.type2.getModifiers(), this.type1, this.type1.getName(), Util.getDescriptorName(type1));
@@ -1304,10 +1304,10 @@
 				boolean found = false;
 				if (this.component2 != null) {
 					if (this.type1.isInterface()) {
-						Set<?> interfacesSet = getInterfacesSet(this.type2);
+						Set<IApiType> interfacesSet = getInterfacesSet(this.type2);
 						if (interfacesSet != null) {
-							for (Iterator<?> iterator = interfacesSet.iterator(); iterator.hasNext();) {
-								IApiType superTypeDescriptor = (IApiType) iterator.next();
+							for (Iterator<IApiType> iterator = interfacesSet.iterator(); iterator.hasNext();) {
+								IApiType superTypeDescriptor = iterator.next();
 								IApiField field3 = superTypeDescriptor.getField(name);
 								if (field3 == null) {
 									continue;
@@ -1600,10 +1600,10 @@
 			boolean found = false;
 			if (this.component2 != null && !method.isConstructor()) {
 				if (this.type1.isInterface()) {
-					Set<?> interfacesSet = getInterfacesSet(this.type2);
+					Set<IApiType> interfacesSet = getInterfacesSet(this.type2);
 					if (interfacesSet != null && isStatusOk()) {
-						for (Iterator<?> iterator = interfacesSet.iterator(); iterator.hasNext();) {
-							IApiType superTypeDescriptor = (IApiType) iterator.next();
+						for (Iterator<IApiType> iterator = interfacesSet.iterator(); iterator.hasNext();) {
+							IApiType superTypeDescriptor = iterator.next();
 							IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 							if (method3 == null) {
 								continue;
@@ -1620,10 +1620,10 @@
 						}
 					}
 				} else {
-					List<?> superclassList = getSuperclassList(this.type2, true);
+					List<IApiType> superclassList = getSuperclassList(this.type2, true);
 					if (superclassList != null && isStatusOk()) {
-						loop: for (Iterator<?> iterator = superclassList.iterator(); iterator.hasNext();) {
-							IApiType superTypeDescriptor = (IApiType) iterator.next();
+						loop: for (Iterator<IApiType> iterator = superclassList.iterator(); iterator.hasNext();) {
+							IApiType superTypeDescriptor = iterator.next();
 							IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 							if (method3 == null) {
 								continue;
@@ -1741,10 +1741,10 @@
 						boolean found = false;
 						if (this.component2 != null) {
 							if (this.type1.isInterface()) {
-								Set<?> interfacesSet = getInterfacesSet(this.type2);
+								Set<IApiType> interfacesSet = getInterfacesSet(this.type2);
 								if (interfacesSet != null && isStatusOk()) {
-									for (Iterator<?> iterator = interfacesSet.iterator(); iterator.hasNext();) {
-										IApiType superTypeDescriptor = (IApiType) iterator.next();
+									for (Iterator<IApiType> iterator = interfacesSet.iterator(); iterator.hasNext();) {
+										IApiType superTypeDescriptor = iterator.next();
 										IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 										if (method3 == null) {
 											continue;
@@ -2285,10 +2285,10 @@
 					String name = method.getName();
 					String descriptor = method.getSignature();
 					if (this.type1.isInterface()) {
-						Set<?> interfacesSet = getInterfacesSet(this.type2);
+						Set<IApiType> interfacesSet = getInterfacesSet(this.type2);
 						if (interfacesSet != null && isStatusOk()) {
-							for (Iterator<?> iterator = interfacesSet.iterator(); iterator.hasNext();) {
-								IApiType superTypeDescriptor = (IApiType) iterator.next();
+							for (Iterator<IApiType> iterator = interfacesSet.iterator(); iterator.hasNext();) {
+								IApiType superTypeDescriptor = iterator.next();
 								IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 								if (method3 == null) {
 									continue;
@@ -2302,10 +2302,10 @@
 							}
 						}
 					} else {
-						List<?> superclassList = getSuperclassList(this.type2, true);
+						List<IApiType> superclassList = getSuperclassList(this.type2, true);
 						if (superclassList != null && isStatusOk()) {
-							loop: for (Iterator<?> iterator = superclassList.iterator(); iterator.hasNext();) {
-								IApiType superTypeDescriptor = (IApiType) iterator.next();
+							loop: for (Iterator<IApiType> iterator = superclassList.iterator(); iterator.hasNext();) {
+								IApiType superTypeDescriptor = iterator.next();
 								IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 								if (method3 == null) {
 									continue;
@@ -2345,10 +2345,10 @@
 						String name = method.getName();
 						String descriptor = method.getSignature();
 						if (this.type1.isInterface()) {
-							Set<?> interfacesSet = getInterfacesSet(this.type1);
+							Set<IApiType> interfacesSet = getInterfacesSet(this.type1);
 							if (interfacesSet != null && isStatusOk()) {
-								for (Iterator<?> iterator = interfacesSet.iterator(); iterator.hasNext();) {
-									IApiType superTypeDescriptor = (IApiType) iterator.next();
+								for (Iterator<IApiType> iterator = interfacesSet.iterator(); iterator.hasNext();) {
+									IApiType superTypeDescriptor = iterator.next();
 									IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 									if (method3 == null) {
 										continue;
@@ -2363,10 +2363,10 @@
 								}
 							}
 						} else {
-							List<?> superclassList = getSuperclassList(this.type1, true);
+							List<IApiType> superclassList = getSuperclassList(this.type1, true);
 							if (superclassList != null && isStatusOk()) {
-								loop: for (Iterator<?> iterator = superclassList.iterator(); iterator.hasNext();) {
-									IApiType superTypeDescriptor = (IApiType) iterator.next();
+								loop: for (Iterator<IApiType> iterator = superclassList.iterator(); iterator.hasNext();) {
+									IApiType superTypeDescriptor = iterator.next();
 									IApiMethod method3 = superTypeDescriptor.getMethod(name, descriptor);
 									if (method3 == null) {
 										continue;
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java
index 5879488..62b5505 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java
@@ -610,7 +610,7 @@
 					ASTNode parent = type.getParent();
 					while (parent != null) {
 						try {
-							List<?> typeParameters = null;
+							List<TypeParameter> typeParameters = null;
 							if (parent.getNodeType() == ASTNode.METHOD_DECLARATION) {
 								MethodDeclaration md = (MethodDeclaration) parent;
 								typeParameters = md.typeParameters();
@@ -619,19 +619,16 @@
 								typeParameters = td.typeParameters();
 							}
 							if (typeParameters != null) {
-								for (Object o : typeParameters) {
-									if (o instanceof TypeParameter) {
-										TypeParameter typeParameter = (TypeParameter) o;
-										if (fullyQualifiedName.equals(typeParameter.getName().getFullyQualifiedName())) {
-											if (typeParameter.typeBounds().isEmpty()) {
-												return Signature.createTypeSignature("Object", false); //$NON-NLS-1$
-											} else {
-												// the erasure of a type
-												// variable is the erasure of
-												// its leftmost bound
-												Type bound = (Type) typeParameter.typeBounds().get(0);
-												return getTypeSignature(bound, erased);
-											}
+								for (TypeParameter typeParameter : typeParameters) {
+									if (fullyQualifiedName.equals(typeParameter.getName().getFullyQualifiedName())) {
+										if (typeParameter.typeBounds().isEmpty()) {
+											return Signature.createTypeSignature("Object", false); //$NON-NLS-1$
+										} else {
+											// the erasure of a type
+											// variable is the erasure of
+											// its leftmost bound
+											Type bound = (Type) typeParameter.typeBounds().get(0);
+											return getTypeSignature(bound, erased);
 										}
 									}
 								}
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java
index 5c408e4..2f98363 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java
@@ -408,7 +408,7 @@
 	 *
 	 * @return enumeration of all files in the archive
 	 */
-	public Enumeration<?> entries() {
+	public Enumeration<TarEntry> entries() {
 		return new Enumeration<>() {
 			@Override
 			public boolean hasMoreElements() {
@@ -416,7 +416,7 @@
 			}
 
 			@Override
-			public Object nextElement() {
+			public TarEntry nextElement() {
 				TarEntry oldEntry = curEntry;
 				try {
 					curEntry = entryEnumerationStream.getNextEntry();
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
index 2c43fe6..4e4c95b 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
@@ -112,6 +112,7 @@
 import org.eclipse.jdt.internal.core.ClassFile;
 import org.eclipse.jdt.internal.core.CompilationUnit;
 import org.eclipse.jdt.internal.core.DefaultWorkingCopyOwner;
+import org.eclipse.jdt.internal.core.JavaElement;
 import org.eclipse.jdt.internal.core.JavaProject;
 import org.eclipse.jdt.internal.core.NameLookup;
 import org.eclipse.jdt.internal.core.PackageFragment;
@@ -1212,8 +1213,8 @@
 		IJavaElement packFrag = javaProject.findElement(pathExceptLastSegment, DefaultWorkingCopyOwner.PRIMARY);
 		if (packFrag instanceof PackageFragment) {
 			PackageFragment pf = (PackageFragment) packFrag;
-			ArrayList<?> children = pf.getChildrenOfType(IJavaElement.COMPILATION_UNIT);
-			for (Object object : children) {
+			List<JavaElement> children = pf.getChildrenOfType(IJavaElement.COMPILATION_UNIT);
+			for (JavaElement object : children) {
 				if (object instanceof CompilationUnit) {
 					CompilationUnit compilationUn = (CompilationUnit) object;
 					ITypeRoot typeRoot = compilationUn.getTypeRoot();
@@ -1226,8 +1227,8 @@
 				}
 
 			}
-			ArrayList<?> children2 = pf.getChildrenOfType(IJavaElement.CLASS_FILE);
-			for (Object object : children2) {
+			List<JavaElement> children2 = pf.getChildrenOfType(IJavaElement.CLASS_FILE);
+			for (JavaElement object : children2) {
 				if (object instanceof ClassFile) {
 					ClassFile compilationUn = (ClassFile) object;
 					ITypeRoot typeRoot = compilationUn.getTypeRoot();
@@ -1965,11 +1966,11 @@
 	 */
 	public static void guntar(String zipPath, String destDirPath) throws TarException, IOException {
 		TarFile tarFile = new TarFile(zipPath);
-		Enumeration<?> entries = tarFile.entries();
+		Enumeration<TarEntry> entries = tarFile.entries();
 		byte[] buf = new byte[8192];
 		for (; entries.hasMoreElements();) {
 			TarEntry zEntry;
-			while ((zEntry = (TarEntry) entries.nextElement()) != null) {
+			while ((zEntry = entries.nextElement()) != null) {
 				// if it is empty directory, create it
 				if (zEntry.getFileType() == TarEntry.DIRECTORY) {
 					new File(destDirPath, zEntry.getName()).mkdirs();
diff --git a/ds/org.eclipse.pde.ds.annotations/META-INF/MANIFEST.MF b/ds/org.eclipse.pde.ds.annotations/META-INF/MANIFEST.MF
index 6efb12d..28588b7 100644
--- a/ds/org.eclipse.pde.ds.annotations/META-INF/MANIFEST.MF
+++ b/ds/org.eclipse.pde.ds.annotations/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.pde.ds.annotations;singleton:=true
-Bundle-Version: 1.2.300.qualifier
+Bundle-Version: 1.2.400.qualifier
 Bundle-Activator: org.eclipse.pde.ds.internal.annotations.Activator
 Bundle-Vendor: %Bundle-Vendor
 Require-Bundle: org.eclipse.ui;bundle-version="[3.105.0,4.0.0)",
diff --git a/ds/org.eclipse.pde.ds.annotations/pom.xml b/ds/org.eclipse.pde.ds.annotations/pom.xml
index 2dc0d58..57fe1c2 100644
--- a/ds/org.eclipse.pde.ds.annotations/pom.xml
+++ b/ds/org.eclipse.pde.ds.annotations/pom.xml
@@ -20,6 +20,6 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.ds.annotations</artifactId>
-  <version>1.2.300-SNAPSHOT</version>
+  <version>1.2.400-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ds/org.eclipse.pde.ds.annotations/src/org/eclipse/pde/ds/internal/annotations/DSAnnotationCompilationParticipant.java b/ds/org.eclipse.pde.ds.annotations/src/org/eclipse/pde/ds/internal/annotations/DSAnnotationCompilationParticipant.java
index bafb5d8..61fe29c 100644
--- a/ds/org.eclipse.pde.ds.annotations/src/org/eclipse/pde/ds/internal/annotations/DSAnnotationCompilationParticipant.java
+++ b/ds/org.eclipse.pde.ds.annotations/src/org/eclipse/pde/ds/internal/annotations/DSAnnotationCompilationParticipant.java
@@ -212,7 +212,7 @@
 		ProjectState state = null;
 		try {
 			Object value = project.getProject().getSessionProperty(PROP_STATE);
-			if (value instanceof SoftReference<?>) {
+			if (value instanceof SoftReference) {
 				@SuppressWarnings("unchecked")
 				SoftReference<ProjectState> ref = (SoftReference<ProjectState>) value;
 				state = ref.get();
diff --git a/ds/org.eclipse.pde.ds.tests/META-INF/MANIFEST.MF b/ds/org.eclipse.pde.ds.tests/META-INF/MANIFEST.MF
index 898b27c..57ea746 100644
--- a/ds/org.eclipse.pde.ds.tests/META-INF/MANIFEST.MF
+++ b/ds/org.eclipse.pde.ds.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ds.tests
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.100.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ds.tests.Activator
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
  org.junit;bundle-version="3.8.2",
diff --git a/ds/org.eclipse.pde.ds.tests/pom.xml b/ds/org.eclipse.pde.ds.tests/pom.xml
index f1fd9c1..1d763dc 100644
--- a/ds/org.eclipse.pde.ds.tests/pom.xml
+++ b/ds/org.eclipse.pde.ds.tests/pom.xml
@@ -19,6 +19,6 @@
     <relativePath>../../tests-pom/</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.ds.tests</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.100-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 </project>
diff --git a/ds/org.eclipse.pde.ds.tests/src/org/eclipse/pde/internal/ds/tests/DSObjectTestCase.java b/ds/org.eclipse.pde.ds.tests/src/org/eclipse/pde/internal/ds/tests/DSObjectTestCase.java
index 4ba1fe3..cee5dfe 100644
--- a/ds/org.eclipse.pde.ds.tests/src/org/eclipse/pde/internal/ds/tests/DSObjectTestCase.java
+++ b/ds/org.eclipse.pde.ds.tests/src/org/eclipse/pde/internal/ds/tests/DSObjectTestCase.java
@@ -19,6 +19,7 @@
 
 import java.util.List;
 
+import org.eclipse.pde.internal.core.text.IDocumentElementNode;
 import org.eclipse.pde.internal.ds.core.IDSComponent;
 import org.eclipse.pde.internal.ds.core.IDSDocumentFactory;
 import org.eclipse.pde.internal.ds.core.IDSImplementation;
@@ -66,7 +67,7 @@
 		reference.setReferenceName("ReferenceName");
 		component.addReference(reference);
 
-		List<?> children = component.getChildNodesList();
+		List<IDocumentElementNode> children = component.getChildNodesList();
 		assertTrue(children.size() == 5);
 		assertEquals(component.getModel(), fModel);
 
diff --git a/ds/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF b/ds/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF
index 5495fe0..7b7d89a 100644
--- a/ds/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF
+++ b/ds/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ds.ui;singleton:=true
-Bundle-Version: 1.2.200.qualifier
+Bundle-Version: 1.2.300.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ds.ui.Activator
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
diff --git a/ds/org.eclipse.pde.ds.ui/pom.xml b/ds/org.eclipse.pde.ds.ui/pom.xml
index 92bae14..e111033 100644
--- a/ds/org.eclipse.pde.ds.ui/pom.xml
+++ b/ds/org.eclipse.pde.ds.ui/pom.xml
@@ -19,6 +19,6 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.ds.ui</artifactId>
-  <version>1.2.200-SNAPSHOT</version>
+  <version>1.2.300-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSContentProvider.java b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSContentProvider.java
index bdd0645..48ad2d1 100644
--- a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSContentProvider.java
+++ b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSContentProvider.java
@@ -19,6 +19,7 @@
 
 import org.eclipse.jface.viewers.IContentProvider;
 import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.pde.internal.core.text.IDocumentElementNode;
 import org.eclipse.pde.internal.ds.core.IDSModel;
 import org.eclipse.pde.internal.ds.core.IDSObject;
 
@@ -30,7 +31,7 @@
 		if (parentElement instanceof IDSModel) {
 			return new Object[] { ((IDSModel) parentElement).getDSComponent() };
 		} else if (parentElement instanceof IDSObject) {
-			List<?> list = ((IDSObject) parentElement).getChildNodesList();
+			List<IDocumentElementNode> list = ((IDSObject) parentElement).getChildNodesList();
 			// List is never null
 			if (!list.isEmpty()) {
 				return list.toArray();
diff --git a/ua/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF b/ua/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF
index 1237155..6f73933 100644
--- a/ua/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF
+++ b/ua/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ua.ui;singleton:=true
-Bundle-Version: 1.2.300.qualifier
+Bundle-Version: 1.2.400.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin
 Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
diff --git a/ua/org.eclipse.pde.ua.ui/pom.xml b/ua/org.eclipse.pde.ua.ui/pom.xml
index feee1e7..f7b6a4d 100644
--- a/ua/org.eclipse.pde.ua.ui/pom.xml
+++ b/ua/org.eclipse.pde.ua.ui/pom.xml
@@ -20,7 +20,7 @@
   </parent>
   <groupId>org.eclipse.pde</groupId>
   <artifactId>org.eclipse.pde.ua.ui</artifactId>
-  <version>1.2.300-SNAPSHOT</version>
+  <version>1.2.400-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java
index cd9f2b2..61fe5b0 100755
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSCommandDetails.java
@@ -423,12 +423,12 @@
 		return null;
 	}
 
-	private void updateCommandTable(Map<?, ?> parameters) {
+	private void updateCommandTable(Map<Object, Object> parameters) {
 		// Clear the table contents
 		fCommandTable.clearAll();
 		if (parameters != null && !parameters.isEmpty()) {
 			int rowCount = 0;
-			for (Entry<?, ?> entry : parameters.entrySet()) {
+			for (Entry<Object, Object> entry : parameters.entrySet()) {
 				// Track number of keys / rows processed
 				TableItem item = null;
 				// Determine if there is an existing row already at that index
diff --git a/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF
index c9d27bf..08a0ab0 100644
--- a/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.core; singleton:=true
-Bundle-Version: 3.15.100.qualifier
+Bundle-Version: 3.15.200.qualifier
 Bundle-Activator: org.eclipse.pde.internal.core.PDECore
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
diff --git a/ui/org.eclipse.pde.core/pom.xml b/ui/org.eclipse.pde.core/pom.xml
index f94f992..98622ea 100644
--- a/ui/org.eclipse.pde.core/pom.xml
+++ b/ui/org.eclipse.pde.core/pom.xml
@@ -19,7 +19,7 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.core</artifactId>
-  <version>3.15.100-SNAPSHOT</version>
+  <version>3.15.200-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
   <properties>
     <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java
index c87bf28..a3cdcb9 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java
@@ -36,14 +36,15 @@
 	private static StateObjectFactory FACTORY;
 
 	private final Set<IPluginModelBase> fModels;
-	private final Dictionary<?, ?>[] fProperties;
+	private final Dictionary<String, String>[] fProperties;
 	private State fState;
 
+	@SuppressWarnings("unchecked")
 	public BundleValidationOperation(Set<IPluginModelBase> models) {
-		this(models, new Dictionary[] {TargetPlatformHelper.getTargetEnvironment()});
+		this(models, new Dictionary[] { TargetPlatformHelper.getTargetEnvironment() });
 	}
 
-	public BundleValidationOperation(Set<IPluginModelBase> models, Dictionary<?, ?>[] properties) {
+	public BundleValidationOperation(Set<IPluginModelBase> models, Dictionary<String, String>[] properties) {
 		fModels = models;
 		fProperties = properties;
 	}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java
index db606bd..eaf677c 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java
@@ -62,7 +62,7 @@
 		JavaCore.create(project).setRawClasspath(entries, null);
 	}
 
-	public static IClasspathEntry[] getClasspath(IProject project, IPluginModelBase model, Map<?, ?> sourceLibraryMap, boolean clear, boolean overrideCompliance) throws CoreException {
+	public static IClasspathEntry[] getClasspath(IProject project, IPluginModelBase model, Map<String, IPath> sourceLibraryMap, boolean clear, boolean overrideCompliance) throws CoreException {
 		IJavaProject javaProject = JavaCore.create(project);
 		ArrayList<IClasspathEntry> result = new ArrayList<>();
 		IBuild build = getBuild(project);
@@ -87,7 +87,8 @@
 		return result.toArray(new IClasspathEntry[result.size()]);
 	}
 
-	private static void addSourceAndLibraries(IProject project, IPluginModelBase model, IBuild build, boolean clear, Map<?, ?> sourceLibraryMap, ArrayList<IClasspathEntry> result) throws CoreException {
+	private static void addSourceAndLibraries(IProject project, IPluginModelBase model, IBuild build, boolean clear,
+			Map<String, IPath> sourceLibraryMap, ArrayList<IClasspathEntry> result) throws CoreException {
 		boolean isTestPlugin = hasTestPluginName(project);
 		HashSet<IPath> paths = new HashSet<>();
 
@@ -119,7 +120,7 @@
 			if (buildEntry != null) {
 				addSourceFolder(buildEntry, project, paths, result, isTestPlugin);
 			} else {
-				IPath sourceAttachment = sourceLibraryMap != null ? (IPath) sourceLibraryMap.get(library.getName()) : null;
+				IPath sourceAttachment = sourceLibraryMap != null ? sourceLibraryMap.get(library.getName()) : null;
 				if (library.getName().equals(".")) { //$NON-NLS-1$
 					addJARdPlugin(project, ClasspathUtilCore.getFilename(model), sourceAttachment, attrs, result);
 				} else {
@@ -312,7 +313,7 @@
 	public static void setComplianceOptions(IJavaProject project, String eeId, boolean overrideExisting) {
 		Map<String, String> projectMap = project.getOptions(false);
 		IExecutionEnvironment ee = null;
-		Map<?, ?> options = null;
+		Map<String, String> options = null;
 		if (eeId != null) {
 			ee = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(eeId);
 			if (ee != null) {
@@ -330,12 +331,12 @@
 				return;
 			}
 		} else {
-			String compliance = (String) options.get(JavaCore.COMPILER_COMPLIANCE);
-			Iterator<?> iterator = options.entrySet().iterator();
+			String compliance = options.get(JavaCore.COMPILER_COMPLIANCE);
+			Iterator<Entry<String, String>> iterator = options.entrySet().iterator();
 			while (iterator.hasNext()) {
-				Entry<?, ?> entry = (Entry<?, ?>) iterator.next();
-				String option = (String) entry.getKey();
-				String value = (String) entry.getValue();
+				Entry<String, String> entry = iterator.next();
+				String option = entry.getKey();
+				String value = entry.getValue();
 				if (JavaCore.VERSION_1_3.equals(compliance) || JavaCore.VERSION_1_4.equals(compliance)) {
 					if (JavaCore.COMPILER_PB_ASSERT_IDENTIFIER.equals(option) || JavaCore.COMPILER_PB_ENUM_IDENTIFIER.equals(option)) {
 						// for 1.3 & 1.4 projects, only override the existing setting if the default setting
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
index 4ceaac1..327ec75 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
@@ -192,7 +192,7 @@
 		return (IFeatureModel) feature.getFeatureModel();
 	}
 
-	public static TargetFeature[] createFeatures(String platformHome, ArrayList<?> additionalLocations,
+	public static TargetFeature[] createFeatures(String platformHome, ArrayList<String> additionalLocations,
 			IProgressMonitor monitor) {
 		if (platformHome != null && platformHome.length() > 0) {
 			URL[] featureURLs = PluginPathFinder.getFeaturePaths(platformHome);
@@ -203,7 +203,7 @@
 
 			File[] dirs = new File[additionalLocations.size()];
 			for (int i = 0; i < dirs.length; i++) {
-				String directory = additionalLocations.get(i).toString();
+				String directory = additionalLocations.get(i);
 				File dir = new File(directory, "features"); //$NON-NLS-1$
 				if (!dir.exists()) {
 					dir = new File(directory);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureTable.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureTable.java
index fa173f0..bdf28c6 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureTable.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureTable.java
@@ -118,7 +118,7 @@
 	}
 
 	private IFeatureModel[] getImpl(Idver idver) {
-		ArrayList<?> models = fIdver2models.get(idver);
+		ArrayList<IFeatureModel> models = fIdver2models.get(idver);
 		if (models == null) {
 			return NO_MODELS;
 		}
@@ -164,7 +164,7 @@
 		if (idver == null) {
 			return null;
 		}
-		ArrayList<?> models = fIdver2models.get(idver);
+		ArrayList<IFeatureModel> models = fIdver2models.get(idver);
 		for (int i = 0; i < models.size(); i++) {
 			if (models.get(i) == model) {
 				models.remove(i);
@@ -174,7 +174,7 @@
 		if (models.isEmpty()) {
 			fIdver2models.remove(idver);
 
-			ArrayList<?> idvers = fId2idvers.get(idver.getId());
+			ArrayList<Idver> idvers = fId2idvers.get(idver.getId());
 			for (int i = 0; i < idvers.size(); i++) {
 				if (idvers.get(i).equals(idver)) {
 					idvers.remove(i);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
index 17e3330..4cecd70 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
@@ -237,7 +237,8 @@
 	 * @param osgiBundleList a list of bundles coming from a template config.ini
 	 * @return URL location of the bundles.info or <code>null</code>
 	 */
-	public static URL writeBundlesTxt(Map<?, ?> bundles, int defaultStartLevel, boolean defaultAutoStart, File directory, String osgiBundleList) {
+	public static URL writeBundlesTxt(Map<IPluginModelBase, String> bundles, int defaultStartLevel,
+			boolean defaultAutoStart, File directory, String osgiBundleList) {
 		if (bundles.isEmpty()) {
 			return null;
 		}
@@ -265,8 +266,7 @@
 
 		List<BundleInfo> bundleInfo = new ArrayList<>(bundles.size());
 		List<BundleInfo> sourceInfo = new ArrayList<>(bundles.size());
-		for (final Object name : bundles.keySet()) {
-			final IPluginModelBase currentModel = (IPluginModelBase) name;
+		for (final IPluginModelBase currentModel : bundles.keySet()) {
 			IPluginBase base = currentModel.getPluginBase();
 
 			BundleInfo info = new BundleInfo();
@@ -282,7 +282,7 @@
 				} else if (base != null) {
 					info.setSymbolicName(base.getId());
 					info.setVersion(base.getVersion());
-					String currentLevel = (String) bundles.get(currentModel);
+					String currentLevel = bundles.get(currentModel);
 					// override the start level setting if something comes from the config.ini
 					if (osgiStartLevels.containsKey(base.getId())) {
 						currentLevel = osgiStartLevels.get(base.getId());
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDERegistryStrategy.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDERegistryStrategy.java
index a538b1f..67692a6 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDERegistryStrategy.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDERegistryStrategy.java
@@ -39,7 +39,7 @@
 	/**
 	 * Tracker for the XML parser service
 	 */
-	private ServiceTracker<?, SAXParserFactory> xmlTracker = null;
+	private ServiceTracker<SAXParserFactory, SAXParserFactory> xmlTracker = null;
 
 	private Object fKey = null;
 
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java
index 17d7798..310abc4 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java
@@ -373,8 +373,8 @@
 	}
 
 	private Rule[] getInclusions(Map<BundleDescription, ArrayList<Rule>> map, BundleDescription desc) {
-		ArrayList<?> list = map.get(desc);
-		return list != null ? (Rule[]) list.toArray(new Rule[list.size()]) : new Rule[0];
+		List<Rule> list = map.get(desc);
+		return list != null ? list.toArray(new Rule[list.size()]) : new Rule[0];
 	}
 
 	private void addHostPlugin(HostSpecification hostSpec, HashSet<BundleDescription> added, Map<BundleDescription, ArrayList<Rule>> map, ArrayList<IClasspathEntry> entries) throws CoreException {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java
index 2d97d61..2e7b1b4 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java
@@ -23,11 +23,11 @@
 import java.io.InputStreamReader;
 import java.nio.charset.Charset;
 import java.util.Enumeration;
-import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.IPath;
@@ -58,13 +58,13 @@
 		}
 	}
 
-	public Hashtable<String, Object> getTemplateTable(String pluginId) {
+	public Hashtable<String, String> getTemplateTable(String pluginId) {
 		Properties tracingTemplate = getTracingTemplate();
-		Hashtable<String, Object> defaults = new Hashtable<>();
+		Hashtable<String, String> defaults = new Hashtable<>();
 		for (Enumeration<Object> keys = tracingTemplate.keys(); keys.hasMoreElements();) {
 			String key = keys.nextElement().toString();
 			if (belongsTo(key, pluginId)) {
-				defaults.put(key, tracingTemplate.get(key));
+				defaults.put(key, tracingTemplate.get(key).toString());
 			}
 		}
 		return defaults;
@@ -81,9 +81,9 @@
 		Properties defaults = getTracingTemplateCopy();
 		if (storedOptions != null) {
 			// Load stored values, but only for existing keys
-			Iterator<?> iter = storedOptions.keySet().iterator();
+			Iterator<String> iter = storedOptions.keySet().iterator();
 			while (iter.hasNext()) {
-				String key = iter.next().toString();
+				String key = iter.next();
 				if (defaults.containsKey(key)) {
 					defaults.setProperty(key, storedOptions.get(key));
 				}
@@ -138,9 +138,9 @@
 		}
 	}
 
-	public void save(String filename, Map<String, String> map, HashSet<?> selected) {
+	public void save(String filename, Map<String, String> map, Set<String> selected) {
 		Properties properties = getTracingOptions(map);
-		for (Enumeration<?> keys = properties.keys(); keys.hasMoreElements();) {
+		for (Enumeration<Object> keys = properties.keys(); keys.hasMoreElements();) {
 			String key = keys.nextElement().toString();
 			Path path = new Path(key);
 			if (path.segmentCount() < 1 || !selected.contains(path.segment(0))) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildModel.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildModel.java
index cccf4cc..8b6f30b 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildModel.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildModel.java
@@ -15,7 +15,6 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.Enumeration;
 import java.util.Properties;
 import org.eclipse.pde.core.IModelChangedEvent;
 import org.eclipse.pde.core.ModelChangedEvent;
@@ -75,10 +74,7 @@
 		}
 		fBuild = new Build();
 		fBuild.setModel(this);
-		for (Enumeration<?> names = properties.propertyNames(); names.hasMoreElements();) {
-			String name = names.nextElement().toString();
-			fBuild.processEntry(name, (String) properties.get(name));
-		}
+		properties.forEach((name, value) -> fBuild.processEntry(name.toString(), (String) value));
 		setLoaded(true);
 	}
 
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
index 36bed76..09060fc 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
@@ -396,7 +396,7 @@
 					return; //The project compliance settings matches the BREE
 				}
 
-				Map<?, ?> defaultComplianceOptions = new HashMap<>();
+				Map<String, String> defaultComplianceOptions = new HashMap<>();
 				JavaCore.setComplianceOptions(projectComplianceLevel, defaultComplianceOptions);
 
 				//project compliance does not match the BREE
@@ -478,12 +478,12 @@
 		IJavaProject project = JavaCore.create(fProject);
 		if (project.exists()) {
 
-			Map<?, ?> defaultComplianceOptions = new HashMap<>();
+			Map<String, String> defaultComplianceOptions = new HashMap<>();
 			JavaCore.setComplianceOptions(complianceLevel, defaultComplianceOptions);
 
 			//look for assertIdentifier and enumIdentifier entries in javacWarnings. If any is present let it be, if not warn.
 			String assertIdentifier = project.getOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, false);
-			String defaultAssert = (String) defaultComplianceOptions.get(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER);
+			String defaultAssert = defaultComplianceOptions.get(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER);
 			if (assertIdentifier != null && !assertIdentifier.equalsIgnoreCase(defaultAssert)) {
 				if (JavaCore.ERROR.equalsIgnoreCase(assertIdentifier)) {
 					complianceErrorSettings.add(ASSERT_IDENTIFIER);
@@ -493,7 +493,7 @@
 			}
 
 			String enumIdentifier = project.getOption(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, false);
-			String defaultEnum = (String) defaultComplianceOptions.get(JavaCore.COMPILER_PB_ENUM_IDENTIFIER);
+			String defaultEnum = defaultComplianceOptions.get(JavaCore.COMPILER_PB_ENUM_IDENTIFIER);
 			if (enumIdentifier != null && !enumIdentifier.equalsIgnoreCase(defaultEnum)) {
 				if (JavaCore.ERROR.equalsIgnoreCase(enumIdentifier)) {
 					complianceErrorSettings.add(ENUM_IDENTIFIER);
@@ -1099,7 +1099,7 @@
 		// Check if the project has compiler warnings set
 		IJavaProject project = JavaCore.create(fProject);
 		if (project.exists()) {
-			Map<?, ?> options = project.getOptions(false);
+			Map<String, String> options = project.getOptions(false);
 			// If project specific options are turned on, all options will be stored.  Only need to check if at least one compiler option is set. Currently using the second option on the property page.
 			if (options.containsKey(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS)) {
 				if (useJavaProjectSettings != null) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
index e8c8578..ce24b24 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
@@ -1636,9 +1636,9 @@
 		if (severity == CompilerFlags.IGNORE) {
 			return true;
 		}
-		Enumeration<?> keys = elements[0].getKeys();
+		Enumeration<String> keys = elements[0].getKeys();
 		if (keys != null && keys.hasMoreElements()) {
-			String key = (String) keys.nextElement();
+			String key = keys.nextElement();
 			if ("exceptions".equals(key)) { //$NON-NLS-1$
 				String[] values = elements[0].getAttributes(key);
 				for (String value : values) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java
index 81eadac..b40befd 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java
@@ -24,6 +24,7 @@
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
@@ -304,11 +305,11 @@
 		// Validate min element occurence violations
 		int minSeverity = CompilerFlags.getFlag(fProject, CompilerFlags.P_UNKNOWN_ELEMENT);
 		if (minSeverity != CompilerFlags.IGNORE) {
-			HashSet<?> minElementSet = ElementOccurenceChecker.findMinOccurenceViolations(schemaElement, element);
-			Iterator<?> minIterator = minElementSet.iterator();
+			HashSet<ElementOccurrenceResult> minElementSet = ElementOccurenceChecker.findMinOccurenceViolations(schemaElement, element);
+			Iterator<ElementOccurrenceResult> minIterator = minElementSet.iterator();
 
 			while (minIterator.hasNext()) {
-				reportMinOccurenceViolation(element, (ElementOccurrenceResult) minIterator.next(), minSeverity);
+				reportMinOccurenceViolation(element, minIterator.next(), minSeverity);
 			}
 		}
 	}
@@ -321,10 +322,10 @@
 		// Validate max element occurence violations
 		int maxSeverity = CompilerFlags.getFlag(fProject, CompilerFlags.P_UNKNOWN_ELEMENT);
 		if (maxSeverity != CompilerFlags.IGNORE) {
-			HashSet<?> maxElementSet = ElementOccurenceChecker.findMaxOccurenceViolations(schemaElement, element);
-			Iterator<?> maxIterator = maxElementSet.iterator();
+			HashSet<ElementOccurrenceResult> maxElementSet = ElementOccurenceChecker.findMaxOccurenceViolations(schemaElement, element);
+			Iterator<ElementOccurrenceResult> maxIterator = maxElementSet.iterator();
 			while (maxIterator.hasNext()) {
-				reportMaxOccurenceViolation((ElementOccurrenceResult) maxIterator.next(), maxSeverity);
+				reportMaxOccurenceViolation(maxIterator.next(), maxSeverity);
 			}
 		}
 	}
@@ -680,7 +681,7 @@
 			String basedOn = attInfo.getBasedOn();
 			// only validate if we have a valid value and basedOn value
 			if (value != null && basedOn != null && value.length() > 0 && basedOn.length() > 0) {
-				Map<?, ?> attributes = PDESchemaHelper.getValidAttributes(attInfo);
+				Map<String, IConfigurationElement> attributes = PDESchemaHelper.getValidAttributes(attInfo);
 				if (!attributes.containsKey(value)) { // report error if we are missing something
 					VirtualMarker marker = report(NLS.bind(PDECoreMessages.ExtensionsErrorReporter_unknownIdentifier, (new String[] {attr.getValue(), attr.getName()})), getLine(element, attr.getName()), severity, PDEMarkerFactory.CAT_OTHER);
 					addMarkerAttribute(marker, PDEMarkerFactory.compilerKey,  CompilerFlags.P_UNKNOWN_IDENTIFIER);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEBuilderHelper.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEBuilderHelper.java
index 545eeda..88a9619 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEBuilderHelper.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEBuilderHelper.java
@@ -14,6 +14,7 @@
 package org.eclipse.pde.internal.core.builders;
 
 import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IPath;
@@ -25,7 +26,7 @@
 
 public class PDEBuilderHelper {
 
-	public static String[] getUnlistedClasspaths(ArrayList<?> sourceEntries, IProject project, IClasspathEntry[] cpes) {
+	public static String[] getUnlistedClasspaths(List<IBuildEntry> sourceEntries, IProject project, IClasspathEntry[] cpes) {
 		String[] unlisted = new String[cpes.length];
 		int index = 0;
 		for (IClasspathEntry entry : cpes) {
@@ -35,7 +36,7 @@
 			IPath path = entry.getPath();
 			boolean found = false;
 			for (int j = 0; j < sourceEntries.size(); j++) {
-				IBuildEntry be = (IBuildEntry) sourceEntries.get(j);
+				IBuildEntry be = sourceEntries.get(j);
 				String[] tokens = be.getTokens();
 				for (String token : tokens) {
 					IResource res = project.findMember(token);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
index 80a34e8..001ac1f 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
@@ -296,7 +296,7 @@
 	 */
 	Map<String, List<EncodingEntry>> fCustomEncodings = new HashMap<>();
 
-	public void initialize(ArrayList<?> sourceEntries, ArrayList<?> outputEntries, IClasspathEntry[] cpes, IProject project) {
+	public void initialize(List<IBuildEntry> sourceEntries, List<IBuildEntry> outputEntries, IClasspathEntry[] cpes, IProject project) {
 
 		fProject = project;
 		IPath defaultOutputLocation = null;
@@ -369,8 +369,7 @@
 			}
 		}
 
-		for (Object name : sourceEntries) {
-			IBuildEntry sourceEntry = (IBuildEntry) name;
+		for (IBuildEntry sourceEntry : sourceEntries) {
 			String libName = sourceEntry.getName().substring(PROPERTY_SOURCE_PREFIX.length());
 			if (!pluginLibraryNames.contains(libName)) {
 				prepareError(sourceEntry.getName(), null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingLibrary, libName), PDEMarkerFactory.B_REMOVAL, fSrcLibSeverity,CompilerFlags.P_BUILD_SOURCE_LIBRARY, PDEMarkerFactory.CAT_OTHER);
@@ -388,8 +387,7 @@
 			}
 		}
 
-		for (Object name : outputEntries) {
-			IBuildEntry outputEntry = (IBuildEntry) name;
+		for (IBuildEntry outputEntry : outputEntries) {
 			String libName = outputEntry.getName().substring(PROPERTY_OUTPUT_PREFIX.length());
 			if (!pluginLibraryNames.contains(libName)) {
 				prepareError(outputEntry.getName(), null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingLibrary, libName), PDEMarkerFactory.B_REMOVAL, fOututLibSeverity,CompilerFlags.P_BUILD_OUTPUT_LIBRARY, PDEMarkerFactory.CAT_OTHER);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java
index 7abcc5e..efa8cc2 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java
@@ -62,13 +62,13 @@
 	 *
 	 * @param headers map<String, String> of manifest key and values
 	 */
-	public void load(Map<?, ?> headers) {
+	public void load(Map<String, String> headers) {
 		fDocumentHeaders.clear();
-		Iterator<?> iter = headers.keySet().iterator();
+		Iterator<String> iter = headers.keySet().iterator();
 		while (iter.hasNext()) {
-			String key = iter.next().toString();
+			String key = iter.next();
 			if (headers.get(key) != null) {
-				String value = headers.get(key).toString();
+				String value = headers.get(key);
 				IManifestHeader header = getModel().getFactory().createHeader(key, value);
 				header.update(); // Format the headers, unknown if this step is necessary for new header objects
 				fDocumentHeaders.put(key, header);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java
index 3b2cdcd..ff75527 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java
@@ -15,7 +15,8 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.Properties;
+import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.HostSpecification;
 import org.eclipse.osgi.util.ManifestElement;
@@ -78,7 +79,7 @@
 
 	public void load(BundleDescription desc, PDEState state) {
 		long id = desc.getBundleId();
-		Properties properties = new Properties();
+		Map<String, String> properties = new HashMap<>();
 		properties.put(Constants.BUNDLE_SYMBOLICNAME, desc.getSymbolicName());
 		String value = state.getPluginName(id);
 		if (value != null) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java
index e7b2e19..5960aa6 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java
@@ -483,10 +483,10 @@
 		if (fAntBuildProperties == null) {
 			fAntBuildProperties = new HashMap<>(15);
 
-			List<?> defaultProperties = AntCorePlugin.getPlugin().getPreferences().getProperties();
-			ListIterator<?> li = defaultProperties.listIterator();
+			List<Property> defaultProperties = AntCorePlugin.getPlugin().getPreferences().getProperties();
+			ListIterator<Property> li = defaultProperties.listIterator();
 			while (li.hasNext()) {
-				Property prop = (Property) li.next();
+				Property prop = li.next();
 				fAntBuildProperties.put(prop.getName(), prop.getValue());
 			}
 
@@ -1228,7 +1228,7 @@
 
 		if (fInfo.useWorkspaceCompiledClasses) {
 			getWorkspaceExportHelper().buildBeforeExport(fInfo.items, subMonitor.split(45));
-			Set<?> errors = getWorkspaceExportHelper().checkForErrors(fInfo.items);
+			Set<IProject> errors = getWorkspaceExportHelper().checkForErrors(fInfo.items);
 			subMonitor.split(5);
 			if (!errors.isEmpty()) {
 				return Status.error(NLS.bind(PDECoreMessages.FeatureExportOperation_workspaceBuildErrorsFoundDuringExport, errors));
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginLibrary.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginLibrary.java
index 8fabcf7..9c12ee1 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginLibrary.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginLibrary.java
@@ -16,6 +16,7 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.List;
 import java.util.Locale;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.osgi.service.resolver.BundleDescription;
@@ -159,7 +160,8 @@
 	@Override
 	public void restoreProperty(String name, Object oldValue, Object newValue) throws CoreException {
 		if (name.equals(P_CONTENT_FILTERS)) {
-			ArrayList<?> list = (ArrayList<?>) newValue;
+			@SuppressWarnings("unchecked")
+			List<String> list = (List<String>) newValue;
 			if (list != null) {
 				setContentFilters(list.toArray(new String[list.size()]));
 			} else {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginObject.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginObject.java
index ae9f604..7c166ca 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginObject.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginObject.java
@@ -228,16 +228,6 @@
 		return result;
 	}
 
-	void writeComments(PrintWriter writer, Vector<?> source) {
-		if (source == null) {
-			return;
-		}
-		for (int i = 0; i < source.size(); i++) {
-			String comment = (String) source.elementAt(i);
-			writer.println("<!--" + comment + "-->"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-
 	protected boolean stringEqualWithNull(String a, String b) {
 		return a == null && b == null || a != null && b != null && a.equals(b);
 	}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java
index 54dbe15..3444b14 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java
@@ -92,7 +92,7 @@
 	private String[] fLaunchShortcuts;
 	private String fExportWizard;
 	private final Map<String, String> fHeaders = new HashMap<>();
-	private Map<?, ?> fReadHeaders = null;
+	private Map<String, String> fReadHeaders = null;
 
 	/**
 	 * Constructs a bundle description for the specified project.
@@ -143,7 +143,7 @@
 	 * @param key header name
 	 * @return header value or <code>null</code>
 	 */
-	private String getHeaderValue(Map<?, ?> headers, String key) throws CoreException {
+	private String getHeaderValue(Map<String, String> headers, String key) throws CoreException {
 		ManifestElement[] elements = parseHeader(headers, key);
 		if (elements != null) {
 			if (elements.length > 0) {
@@ -161,8 +161,8 @@
 	 * @return elements or <code>null</code> if none
 	 * @throws CoreException
 	 */
-	private ManifestElement[] parseHeader(Map<?, ?> headers, String key) throws CoreException {
-		String value = (String) headers.get(key);
+	private ManifestElement[] parseHeader(Map<String, String> headers, String key) throws CoreException {
+		String value = headers.get(key);
 		if (value != null) {
 			if (value.trim().length() > 0) {
 				try {
@@ -202,7 +202,7 @@
 
 		IFile manifest = PDEProject.getManifest(project);
 		if (manifest.exists()) {
-			Map<?, ?> headers;
+			Map<String, String> headers;
 			try {
 				headers = ManifestElement.parseBundleManifest(manifest.getContents(), null);
 				fReadHeaders = headers;
@@ -764,7 +764,7 @@
 		}
 		if (fReadHeaders != null) {
 			if (fReadHeaders.containsKey(header)) {
-				String value = (String) fReadHeaders.get(header);
+				String value = fReadHeaders.get(header);
 				if (value == null) {
 					// Return the empty string for present empty headers (instead of null - which means missing)
 					return ""; //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java
index 9474ce2..efed489 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java
@@ -696,12 +696,12 @@
 			}
 			// apply any other headers that have been specified
 			BundleProjectDescription bpd = (BundleProjectDescription) description;
-			Map<?, ?> extraHeaders = bpd.getExtraHeaders();
-			Iterator<?> iterator = extraHeaders.entrySet().iterator();
+			Map<String, String> extraHeaders = bpd.getExtraHeaders();
+			Iterator<Entry<String, String>> iterator = extraHeaders.entrySet().iterator();
 			while (iterator.hasNext()) {
-				Entry<?, ?> entry = (Entry<?, ?>) iterator.next();
-				String name = (String) entry.getKey();
-				String value = (String) entry.getValue();
+				Entry<String, String> entry = iterator.next();
+				String name = entry.getKey();
+				String value = entry.getValue();
 				// translate empty header to a single space to ensure inclusion of empty headers
 				if (value != null && value.trim().length() == 0) {
 					value = " "; //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaElementReference.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaElementReference.java
index fb4e7a2..2c36904 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaElementReference.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaElementReference.java
@@ -16,7 +16,6 @@
 
 import java.io.PrintWriter;
 import java.io.Serializable;
-import java.util.Hashtable;
 import java.util.Vector;
 import org.eclipse.core.runtime.PlatformObject;
 import org.eclipse.pde.core.ISourceObject;
@@ -305,16 +304,6 @@
 		return range == null ? -1 : range[1];
 	}
 
-	void bindSourceLocation(Node node, Hashtable<?, ?> lineTable) {
-		if (lineTable == null) {
-			return;
-		}
-		Integer[] data = (Integer[]) lineTable.get(node);
-		if (data != null) {
-			range = new int[] {data[0].intValue(), data[1].intValue()};
-		}
-	}
-
 	@Override
 	public boolean hasTranslatableContent() {
 		if (element == null) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/ExtensionPluginSearchScope.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/ExtensionPluginSearchScope.java
index 91b66f9..77da0c9 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/ExtensionPluginSearchScope.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/ExtensionPluginSearchScope.java
@@ -13,7 +13,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core.search;
 
-import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.PDEExtensionRegistry;
@@ -27,7 +28,7 @@
 		fInput = input;
 	}
 
-	public ExtensionPluginSearchScope(int workspaceScope, int externalScope, HashSet<?> selectedResources, PluginSearchInput input) {
+	public ExtensionPluginSearchScope(int workspaceScope, int externalScope, Set<IResource> selectedResources, PluginSearchInput input) {
 		super(workspaceScope, externalScope, selectedResources);
 		fInput = input;
 	}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/PluginSearchScope.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/PluginSearchScope.java
index 18f0efa..8033274 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/PluginSearchScope.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/search/PluginSearchScope.java
@@ -15,8 +15,9 @@
 package org.eclipse.pde.internal.core.search;
 
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
 import org.eclipse.pde.internal.core.PDECore;
@@ -34,7 +35,7 @@
 
 	private final int workspaceScope;
 	private final int externalScope;
-	private final HashSet<?> selectedResources;
+	private final Set<IResource> selectedResources;
 
 	/**
 	 * Create a scope object with the provided arguments.
@@ -44,7 +45,7 @@
 	 * EXTERNAL_SCOPE_ALL
 	 * @param selectedResources  goes with SCOPE_WORKING_SETS, otherwise null
 	 */
-	public PluginSearchScope(int workspaceScope, int externalScope, HashSet<?> selectedResources) {
+	public PluginSearchScope(int workspaceScope, int externalScope, Set<IResource> selectedResources) {
 		this.workspaceScope = workspaceScope;
 		this.externalScope = externalScope;
 		this.selectedResources = selectedResources;
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExportTargetJob.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExportTargetJob.java
index 5f14434..9ca37fb 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExportTargetJob.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExportTargetJob.java
@@ -254,10 +254,9 @@
 		exporter.addDestination(createRepoDescriptor(destination, P2TargetUtils.getProfileId(target), RepositoryDescriptor.KIND_ARTIFACT));
 		exporter.addSource(createRepoDescriptor(P2TargetUtils.getBundlePool().getLocation(), null, RepositoryDescriptor.KIND_ARTIFACT));
 
-		IQueryResult<?> ius = P2TargetUtils.getIUs(target, monitor);
+		IQueryResult<IInstallableUnit> ius = P2TargetUtils.getIUs(target, monitor);
 		ArrayList<IInstallableUnit> toExport = new ArrayList<>();
-		for (Object installableUnit : ius) {
-			IInstallableUnit iu = (IInstallableUnit) installableUnit;
+		for (IInstallableUnit iu : ius) {
 			if (shouldExport(iu)) {
 				toExport.add(iu);
 			}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
index 9693246..3a9ede0 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
@@ -174,7 +174,7 @@
 				}
 			}
 
-			List<?> result = TargetDefinition.getMatchingBundles(bundles, matchInfos.toArray(new NameVersionDescriptor[matchInfos.size()]), true);
+			List<TargetBundle> result = TargetDefinition.getMatchingBundles(bundles, matchInfos.toArray(new NameVersionDescriptor[matchInfos.size()]), true);
 			return result.toArray(new TargetBundle[result.size()]);
 		} finally {
 			if (model != null) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
index e253e22..4b2d481 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
@@ -369,18 +369,20 @@
 	public static IProvisioningAgent getAgent() throws CoreException {
 		//Is there already an agent for this location?
 		String filter = "(locationURI=" + AGENT_LOCATION + ")"; //$NON-NLS-1$//$NON-NLS-2$
-		ServiceReference<?>[] serviceReferences = null;
+		ServiceReference<IProvisioningAgent> reference = null;
 		BundleContext context = PDECore.getDefault().getBundleContext();
 		try {
-			serviceReferences = context.getServiceReferences(IProvisioningAgent.SERVICE_NAME, filter);
-			if (serviceReferences != null) {
-				return (IProvisioningAgent) context.getService(serviceReferences[0]);
+			Collection<ServiceReference<IProvisioningAgent>> serviceReferences = context
+					.getServiceReferences(IProvisioningAgent.class, filter);
+			if (!serviceReferences.isEmpty()) {
+				reference = serviceReferences.iterator().next();
+				return context.getService(reference);
 			}
 		} catch (InvalidSyntaxException e) {
 			// ignore
 		} finally {
-			if (serviceReferences != null) {
-				context.ungetService(serviceReferences[0]);
+			if (reference != null) {
+				context.ungetService(reference);
 			}
 		}
 
@@ -580,11 +582,11 @@
 		// check top level IU's. If any have been removed from the containers that are
 		// still in the profile, we need to recreate (rather than uninstall)
 		IUProfilePropertyQuery propertyQuery = new IUProfilePropertyQuery(PROP_INSTALLED_IU, Boolean.toString(true));
-		IQueryResult<?> queryResult = fProfile.query(propertyQuery, null);
-		Iterator<?> iterator = queryResult.iterator();
+		IQueryResult<IInstallableUnit> queryResult = fProfile.query(propertyQuery, null);
+		Iterator<IInstallableUnit> iterator = queryResult.iterator();
 		Set<NameVersionDescriptor> installedIUs = new HashSet<>();
 		while (iterator.hasNext()) {
-			IInstallableUnit unit = (IInstallableUnit) iterator.next();
+			IInstallableUnit unit = iterator.next();
 			installedIUs.add(new NameVersionDescriptor(unit.getId(), unit.getVersion().toString()));
 		}
 		ITargetLocation[] containers = target.getTargetLocations();
@@ -784,7 +786,8 @@
 	 * @return the set of associated IUs
 	 * @throws CoreException if there is a problem discovering the IUs
 	 */
-	public static IQueryResult<?> getIUs(ITargetDefinition target, IProgressMonitor monitor) throws CoreException {
+	public static IQueryResult<IInstallableUnit> getIUs(ITargetDefinition target, IProgressMonitor monitor)
+			throws CoreException {
 		P2TargetUtils synchronizer = getSynchronizer(target);
 		if (synchronizer == null) {
 			return null;
@@ -1262,10 +1265,10 @@
 		}
 
 		// remove all units that are in the current profile but not in the new slice
-		Set<?> toRemove = fProfile.query(QueryUtil.ALL_UNITS, null).toSet();
+		Set<IInstallableUnit> toRemove = fProfile.query(QueryUtil.ALL_UNITS, null).toSet();
 		toRemove.removeAll(newSet);
-		for (Object name : toRemove) {
-			plan.removeInstallableUnit((IInstallableUnit) name);
+		for (IInstallableUnit name : toRemove) {
+			plan.removeInstallableUnit(name);
 		}
 
 		subMonitor.split(5);
@@ -1418,13 +1421,10 @@
 			URI dataArea = location.getDataArea("org.eclipse.equinox.p2.engine"); //$NON-NLS-1$
 			dataArea = URIUtil.append(dataArea, "profileRegistry/" + self.getProfileId() + ".profile"); //$NON-NLS-1$//$NON-NLS-2$
 			ProfileMetadataRepository profileRepo = new ProfileMetadataRepository(getGlobalAgent(), dataArea, null);
-			Collection<?> repos = profileRepo.getReferences();
-			for (Object element : repos) {
-				if (element instanceof IRepositoryReference) {
-					IRepositoryReference reference = (IRepositoryReference) element;
-					if (reference.getType() == IRepository.TYPE_ARTIFACT && reference.getLocation() != null) {
-						additionalRepos.add(reference.getLocation());
-					}
+			Collection<IRepositoryReference> repos = profileRepo.getReferences();
+			for (IRepositoryReference reference : repos) {
+				if (reference.getType() == IRepository.TYPE_ARTIFACT && reference.getLocation() != null) {
+					additionalRepos.add(reference.getLocation());
 				}
 			}
 		} catch (CoreException e) {
@@ -1507,7 +1507,7 @@
 
 			IArtifactRepositoryManager manager;
 			try {
-				Collection<?> toDownload = installableUnit.getArtifacts();
+				Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
 				if (toDownload == null) {
 					return Status.OK_STATUS;
 				}
@@ -1516,8 +1516,7 @@
 				List<IArtifactRequest> artifactRequests = (List<IArtifactRequest>) parameters.get(NATIVE_ARTIFACTS);
 				IArtifactRepository destinationArtifactRepository = getBundlePool();
 				manager = getArtifactRepositoryManager();
-				for (Object name : toDownload) {
-					IArtifactKey keyToDownload = (IArtifactKey) name;
+				for (IArtifactKey keyToDownload : toDownload) {
 					IArtifactRequest request = manager.createMirrorRequest(keyToDownload, destinationArtifactRepository, null, null);
 					artifactRequests.add(request);
 				}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java
index 8593286..78351b3 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java
@@ -722,9 +722,9 @@
 				TargetBundle rb = list.get(list.size() - 1);
 				return rb;
 			}
-			Iterator<?> iterator = list.iterator();
+			Iterator<TargetBundle> iterator = list.iterator();
 			while (iterator.hasNext()) {
-				TargetBundle bundle = (TargetBundle) iterator.next();
+				TargetBundle bundle = iterator.next();
 				if (bundle.getBundleInfo().getVersion().equals(version)) {
 					return bundle;
 				}
@@ -733,7 +733,7 @@
 			// that bundle
 			iterator = list.iterator();
 			while (iterator.hasNext()) {
-				TargetBundle bundle = (TargetBundle) iterator.next();
+				TargetBundle bundle = iterator.next();
 				try{
 					org.osgi.framework.Version bundleVersion = new org.osgi.framework.Version(bundle.getBundleInfo().getVersion());
 					org.osgi.framework.Version infoVersion = new org.osgi.framework.Version(version);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEJavaHelper.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEJavaHelper.java
index 29ecb74..8678549 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEJavaHelper.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEJavaHelper.java
@@ -302,13 +302,13 @@
 		return null;
 	}
 
-	public static IPackageFragment[] getPackageFragments(IJavaProject jProject, Collection<?> existingPackages, boolean allowJava) {
+	public static IPackageFragment[] getPackageFragments(IJavaProject jProject, Collection<String> existingPackages, boolean allowJava) {
 		// for unique package fragments, use getPackageFragmentsHash2
 		HashMap<String, IPackageFragment> map = getPackageFragmentsHash2(jProject, existingPackages, allowJava);
 		return map.values().toArray(new IPackageFragment[map.size()]);
 	}
 
-	public static HashMap<String, IPackageFragment> getPackageFragmentsHash(IJavaProject jProject, Collection<?> existingPackages, boolean allowJava) {
+	public static HashMap<String, IPackageFragment> getPackageFragmentsHash(IJavaProject jProject, Collection<String> existingPackages, boolean allowJava) {
 		HashMap<String, IPackageFragment> map = new LinkedHashMap<>();
 		try {
 			IPackageFragmentRoot[] roots = getRoots(jProject);
@@ -331,7 +331,7 @@
 		}
 		return map;
 	}
-	public static HashMap<String, IPackageFragment> getPackageFragmentsHash2(IJavaProject jProject, Collection<?> existingPackages, boolean allowJava) {
+	public static HashMap<String, IPackageFragment> getPackageFragmentsHash2(IJavaProject jProject, Collection<String> existingPackages, boolean allowJava) {
 		HashMap<String, IPackageFragment> map = new LinkedHashMap<>();
 		try {
 			IPackageFragmentRoot[] roots = getRoots(jProject);
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDETextHelper.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDETextHelper.java
index 9fed6ad..7ebec46 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDETextHelper.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDETextHelper.java
@@ -16,6 +16,8 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -102,11 +104,11 @@
 		return result;
 	}
 
-	public static String translateWriteText(String text, HashMap<?, ?> substituteChars) {
+	public static String translateWriteText(String text, HashMap<Character, String> substituteChars) {
 		return translateWriteText(text, null, substituteChars);
 	}
 
-	public static String translateWriteText(String text, HashSet<?> tagExceptions, HashMap<?, ?> substituteChars) {
+	public static String translateWriteText(String text, HashSet<String> tagExceptions, HashMap<Character, String> substituteChars) {
 		// Ensure not null
 		if (text == null) {
 			return ""; //$NON-NLS-1$
@@ -154,11 +156,11 @@
 		return buffer.toString();
 	}
 
-	private static boolean processSubstituteChars(char currentChar, HashMap<?, ?> substituteChars,
+	private static boolean processSubstituteChars(char currentChar, Map<Character, String> substituteChars,
 			StringBuilder buffer) {
 		Character character = Character.valueOf(currentChar);
 		if (substituteChars.containsKey(character)) {
-			String value = (String) substituteChars.get(character);
+			String value = substituteChars.get(character);
 			if (isDefined(value)) {
 				// Append the value if defined
 				buffer.append(value);
@@ -169,8 +171,8 @@
 		return false;
 	}
 
-	private static boolean processTagExceptions(char currentChar, HashMap<?, ?> substituteChars,
-			HashSet<?> tagExceptions, StringBuilder buffer, int scanLimit, String text, IntegerPointer index) {
+	private static boolean processTagExceptions(char currentChar, Map<Character, String> substituteChars,
+			Set<String> tagExceptions, StringBuilder buffer, int scanLimit, String text, IntegerPointer index) {
 		// If the current character is an open angle bracket, then it may be
 		// part of a valid tag exception
 		if (currentChar == '<') {
@@ -207,7 +209,7 @@
 		return false;
 	}
 
-	private static void processTagExceptionCharacters(HashMap<?, ?> substituteChars, StringBuilder buffer,
+	private static void processTagExceptionCharacters(Map<Character, String> substituteChars, StringBuilder buffer,
 			String text) {
 		// Get the tag name
 		String tagName = getTagName(text);
@@ -270,7 +272,7 @@
 		buffer.append('>');
 	}
 
-	private static boolean isValidTagException(HashSet<?> tagExceptions, String buffer) {
+	private static boolean isValidTagException(Set<String> tagExceptions, String buffer) {
 		// Sample buffer format:
 		// NO '<'
 		// tagName att1="value" att2="value"
@@ -318,12 +320,12 @@
 		return tagName.toString();
 	}
 
-	private static int determineMaxLength(HashSet<?> set) {
-		Iterator<?> iterator = set.iterator();
+	private static int determineMaxLength(Set<String> set) {
+		Iterator<String> iterator = set.iterator();
 		int maxLength = -1;
 		while (iterator.hasNext()) {
 			// Has to be a String
-			String object = (String) iterator.next();
+			String object = iterator.next();
 			if (object.length() > maxLength) {
 				maxLength = object.length();
 			}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEXMLHelper.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEXMLHelper.java
index 57db3be..508a905 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEXMLHelper.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PDEXMLHelper.java
@@ -55,9 +55,9 @@
 		if (fSAXParserQueue.isEmpty()) {
 			parser = fSAXFactory.newSAXParser();
 		} else {
-			SoftReference<?> reference = fSAXParserQueue.remove(0);
+			SoftReference<SAXParser> reference = fSAXParserQueue.remove(0);
 			if (reference.get() != null) {
-				parser = (SAXParser) reference.get();
+				parser = reference.get();
 			} else {
 				parser = fSAXFactory.newSAXParser();
 			}
@@ -71,9 +71,9 @@
 		if (fDOMParserQueue.isEmpty()) {
 			parser = fDOMFactory.newDocumentBuilder();
 		} else {
-			SoftReference<?> reference = fDOMParserQueue.remove(0);
+			SoftReference<DocumentBuilder> reference = fDOMParserQueue.remove(0);
 			if (reference.get() != null) {
-				parser = (DocumentBuilder) reference.get();
+				parser = reference.get();
 			} else {
 				parser = fDOMFactory.newDocumentBuilder();
 			}
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PropertiesUtil.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PropertiesUtil.java
index 2c751a0..8016a95 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PropertiesUtil.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/PropertiesUtil.java
@@ -158,7 +158,7 @@
 		writer.println(PropertiesUtil.createEscapedValue(value));
 	}
 
-	public static void writeKeyValuePair(String indent, String name, Enumeration<?> tokens, PrintWriter writer) {
+	public static void writeKeyValuePair(String indent, String name, Enumeration<String> tokens, PrintWriter writer) {
 		String writableName = createWritableName(name);
 		writer.print(writableName + " = "); //$NON-NLS-1$
 		if (!tokens.hasMoreElements()) {
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java
index 2fd09bf..f3549bc 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/XMLComponentRegistry.java
@@ -138,7 +138,7 @@
 		}
 	}
 
-	public HashMap<?, ?> get(String key, int mapType) {
+	public Map<String, String> get(String key, int mapType) {
 		Map<String, HashMap<String, String>> targetMap = getTargetMap(mapType);
 		if (targetMap == null) {
 			return null;
@@ -148,9 +148,9 @@
 
 	private String getValue(String valueKey, String key, int mapType) {
 		if (key != null) {
-			HashMap<?, ?> map = get(key, mapType);
+			Map<String, String> map = get(key, mapType);
 			if (map != null) {
-				return (String) map.get(valueKey);
+				return map.get(valueKey);
 			}
 		}
 		return null;
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java
index 0559d7d..18c5907 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java
@@ -316,10 +316,10 @@
 	@Override
 	public IDocumentElementNode getChildNode(Class<?> clazz) {
 		// Linear search O(n)
-		ArrayList<?> children = getChildNodesList();
-		Iterator<?> iterator = children.iterator();
+		ArrayList<IDocumentElementNode> children = getChildNodesList();
+		Iterator<IDocumentElementNode> iterator = children.iterator();
 		while (iterator.hasNext()) {
-			IDocumentElementNode node = (IDocumentElementNode) iterator.next();
+			IDocumentElementNode node = iterator.next();
 			if (clazz.isInstance(node)) {
 				return node;
 			}
@@ -331,10 +331,10 @@
 	public int getChildNodeCount(Class<?> clazz) {
 		// Linear search O(n)
 		int count = 0;
-		ArrayList<?> children = getChildNodesList();
-		Iterator<?> iterator = children.iterator();
+		ArrayList<IDocumentElementNode> children = getChildNodesList();
+		Iterator<IDocumentElementNode> iterator = children.iterator();
 		while (iterator.hasNext()) {
-			IDocumentElementNode node = (IDocumentElementNode) iterator.next();
+			IDocumentElementNode node = iterator.next();
 			if (clazz.isInstance(node)) {
 				count++;
 			}
@@ -350,10 +350,10 @@
 	@Override
 	public ArrayList<IDocumentElementNode> getChildNodesList(Class<?>[] classes, boolean match) {
 		ArrayList<IDocumentElementNode> filteredChildren = new ArrayList<>();
-		ArrayList<?> children = getChildNodesList();
-		Iterator<?> iterator = children.iterator();
+		ArrayList<IDocumentElementNode> children = getChildNodesList();
+		Iterator<IDocumentElementNode> iterator = children.iterator();
 		while (iterator.hasNext()) {
-			IDocumentElementNode node = (IDocumentElementNode) iterator.next();
+			IDocumentElementNode node = iterator.next();
 			for (Class<?> clazz : classes) {
 				if (clazz.isInstance(node) == match) {
 					filteredChildren.add(node);
@@ -403,10 +403,10 @@
 
 	@Override
 	public boolean hasChildNodes(Class<?> clazz) {
-		ArrayList<?> children = getChildNodesList();
-		Iterator<?> iterator = children.iterator();
+		ArrayList<IDocumentElementNode> children = getChildNodesList();
+		Iterator<IDocumentElementNode> iterator = children.iterator();
 		while (iterator.hasNext()) {
-			IDocumentElementNode node = (IDocumentElementNode) iterator.next();
+			IDocumentElementNode node = iterator.next();
 			if (clazz.isInstance(node)) {
 				return true;
 			}
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentElementNode.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentElementNode.java
index 8257b8f..d67f391 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentElementNode.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentElementNode.java
@@ -14,8 +14,8 @@
 package org.eclipse.pde.internal.core.text;
 
 import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.TreeMap;
+import java.util.List;
+import java.util.Map;
 import org.eclipse.pde.core.IModel;
 
 public interface IDocumentElementNode extends Serializable, IDocumentRange, IDocumentXMLNode {
@@ -112,10 +112,10 @@
 	public int getNodeAttributesCount();
 
 	// Not used by text edit operations
-	public TreeMap<?, ?> getNodeAttributesMap();
+	public Map<String, IDocumentAttributeNode> getNodeAttributesMap();
 
 	// Not used by text edit operations
-	public ArrayList<?> getChildNodesList();
+	public List<IDocumentElementNode> getChildNodesList();
 
 	// Not used by text edit operations
 	public void reconnect(IDocumentElementNode parent, IModel model);
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentObject.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentObject.java
index cfb5f58..b2cb544 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentObject.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/IDocumentObject.java
@@ -14,7 +14,7 @@
 
 package org.eclipse.pde.internal.core.text;
 
-import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IWritable;
 
@@ -48,9 +48,9 @@
 
 	public int getChildNodeCount(Class<?> clazz);
 
-	public ArrayList<?> getChildNodesList(Class<?> clazz, boolean match);
+	public List<IDocumentElementNode> getChildNodesList(Class<?> clazz, boolean match);
 
-	public ArrayList<?> getChildNodesList(Class<?>[] classes, boolean match);
+	public List<IDocumentElementNode> getChildNodesList(Class<?>[] classes, boolean match);
 
 	public IDocumentElementNode getNextSibling(IDocumentElementNode node, Class<?> clazz);
 
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/Build.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/Build.java
index 13f84af..c7916cf 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/Build.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/Build.java
@@ -70,7 +70,7 @@
 		fEntries.clear();
 		Properties properties = new Properties();
 		properties.load(source);
-		Enumeration<?> keys = properties.keys();
+		Enumeration<Object> keys = properties.keys();
 		while (keys.hasMoreElements()) {
 			String name = keys.nextElement().toString();
 			BuildEntry entry = (BuildEntry) fModel.getFactory().createEntry(name);
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/Bundle.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/Bundle.java
index 89900dd..ae5f50f 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/Bundle.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/Bundle.java
@@ -41,13 +41,13 @@
 	 *
 	 * @param headers the headers to load in this model
 	 */
-	public void load(Map<?, ?> headers) {
+	public void load(Map<String, String> headers) {
 		fDocumentHeaders.clear();
-		Iterator<?> iter = headers.keySet().iterator();
+		Iterator<String> iter = headers.keySet().iterator();
 		while (iter.hasNext()) {
-			String key = iter.next().toString();
+			String key = iter.next();
 			if (key.equals(Constants.BUNDLE_MANIFESTVERSION)) {
-				String value = headers.get(key).toString();
+				String value = headers.get(key);
 				IManifestHeader header = fModel.getFactory().createHeader(key, value);
 				fDocumentHeaders.put(key, header);
 				break;
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageHeader.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageHeader.java
index a689c51..cecca2b 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageHeader.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/ExportPackageHeader.java
@@ -13,7 +13,7 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core.text.bundle;
 
-import java.util.Vector;
+import java.util.List;
 import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
 
@@ -30,7 +30,7 @@
 		return new ExportPackageObject(this, element, getVersionAttribute());
 	}
 
-	public Vector<?> getPackageNames() {
+	public List<String> getPackageNames() {
 		return getElementNames();
 	}
 
diff --git a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/PDEManifestElement.java b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/PDEManifestElement.java
index 4017415..853b29e 100644
--- a/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/PDEManifestElement.java
+++ b/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/bundle/PDEManifestElement.java
@@ -17,6 +17,7 @@
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeMap;
@@ -107,9 +108,10 @@
 			return (String) result;
 		}
 
-		ArrayList<?> valueList = (ArrayList<?>) result;
+		@SuppressWarnings({ "unchecked" })
+		List<String> valueList = (List<String>) result;
 		//return the last value
-		return (String) valueList.get(valueList.size() - 1);
+		return valueList.get(valueList.size() - 1);
 	}
 
 	private String[] getTableValues(TreeMap<String, Serializable> table, String key) {
@@ -123,7 +125,8 @@
 		if (result instanceof String) {
 			return new String[] {(String) result};
 		}
-		ArrayList<?> valueList = (ArrayList<?>) result;
+		@SuppressWarnings("unchecked")
+		List<String> valueList = (List<String>) result;
 		return valueList.toArray(new String[valueList.size()]);
 	}
 
@@ -185,10 +188,10 @@
 
 	private void init(ManifestElement manifestElement) {
 		setValueComponents(manifestElement.getValueComponents());
-		Enumeration<?> attKeys = manifestElement.getKeys();
+		Enumeration<String> attKeys = manifestElement.getKeys();
 		if (attKeys != null) {
 			while (attKeys.hasMoreElements()) {
-				String attKey = (String) attKeys.nextElement();
+				String attKey = attKeys.nextElement();
 				String[] values = ManifestElement.getArrayFromList(manifestElement.getAttribute(attKey));
 				//empty string in attribute, go with default behavior of attribute
 				if (values == null) {
@@ -199,10 +202,10 @@
 				}
 			}
 		}
-		Enumeration<?> dirKeys = manifestElement.getDirectiveKeys();
+		Enumeration<String> dirKeys = manifestElement.getDirectiveKeys();
 		if (dirKeys != null) {
 			while (dirKeys.hasMoreElements()) {
-				String dirKey = (String) dirKeys.nextElement();
+				String dirKey = dirKeys.nextElement();
 				String[] values = ManifestElement.getArrayFromList(manifestElement.getDirective(dirKey));
 				for (String value : values) {
 					addDirective(dirKey, value);
diff --git a/ui/org.eclipse.pde.genericeditor.extension.tests/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.genericeditor.extension.tests/META-INF/MANIFEST.MF
index 4172814..96dc739 100644
--- a/ui/org.eclipse.pde.genericeditor.extension.tests/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.genericeditor.extension.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Tests for Generic Target Platform Editor
 Bundle-SymbolicName: org.eclipse.pde.genericeditor.extension.tests
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: Eclipse.org
 Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/ui/org.eclipse.pde.genericeditor.extension.tests/pom.xml b/ui/org.eclipse.pde.genericeditor.extension.tests/pom.xml
index fdb8f47..4143ccf 100644
--- a/ui/org.eclipse.pde.genericeditor.extension.tests/pom.xml
+++ b/ui/org.eclipse.pde.genericeditor.extension.tests/pom.xml
@@ -18,7 +18,7 @@
     <relativePath>../../tests-pom/</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.genericeditor.extension.tests</artifactId>
-  <version>1.1.0-SNAPSHOT</version>
+  <version>1.1.100-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 
   <properties>
diff --git a/ui/org.eclipse.pde.genericeditor.extension.tests/src/org/eclipse/pde/genericeditor/extension/tests/UpdateUnitVersionsCommandTests.java b/ui/org.eclipse.pde.genericeditor.extension.tests/src/org/eclipse/pde/genericeditor/extension/tests/UpdateUnitVersionsCommandTests.java
index 3b2e37a..f38cbba 100644
--- a/ui/org.eclipse.pde.genericeditor.extension.tests/src/org/eclipse/pde/genericeditor/extension/tests/UpdateUnitVersionsCommandTests.java
+++ b/ui/org.eclipse.pde.genericeditor.extension.tests/src/org/eclipse/pde/genericeditor/extension/tests/UpdateUnitVersionsCommandTests.java
@@ -82,7 +82,8 @@
 
 		Command command = service.getCommand("org.eclipse.pde.updateUnitVersions");
 		Object response = command.executeWithChecks(new ExecutionEvent());
-		String updatedText = (String) ((CompletableFuture<?>) response).get();
+		@SuppressWarnings("unchecked")
+		String updatedText = ((CompletableFuture<String>) response).get();
 		assertNotNull(updatedText);
 
 		Map<String, String> actual = getVersionsForIdsFromTargetFile(updatedText);
diff --git a/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
index 06abbb8..3a5f691 100644
--- a/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.runtime; singleton:=true
-Bundle-Version: 3.7.300.qualifier
+Bundle-Version: 3.7.400.qualifier
 Bundle-Activator: org.eclipse.pde.internal.runtime.PDERuntimePlugin
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
diff --git a/ui/org.eclipse.pde.runtime/pom.xml b/ui/org.eclipse.pde.runtime/pom.xml
index 2e74d65..77c4b04 100644
--- a/ui/org.eclipse.pde.runtime/pom.xml
+++ b/ui/org.eclipse.pde.runtime/pom.xml
@@ -19,7 +19,7 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.runtime</artifactId>
-  <version>3.7.300-SNAPSHOT</version>
+  <version>3.7.400-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
index da9dd4d..d65a656 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
@@ -51,15 +51,6 @@
 		PDERuntimePlugin.getDefault().getBundleContext().removeServiceListener(this);
 	}
 
-	protected static boolean isRegisteredService(org.osgi.framework.Bundle bundle, ServiceReference<?> ref) {
-		return bundle.equals(ref.getBundle());
-	}
-
-	protected static boolean isServiceInUse(org.osgi.framework.Bundle bundle, ServiceReference<?> ref) {
-		org.osgi.framework.Bundle[] usingBundles = ref.getUsingBundles();
-		return (usingBundles != null && Arrays.asList(usingBundles).contains(bundle));
-	}
-
 	@Override
 	public void start(long id) throws BundleException {
 		PDERuntimePlugin.getDefault().getBundleContext().getBundle(id).start();
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
index 4bb2adb..ad7a61d 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
@@ -126,12 +126,12 @@
 
 		if (action instanceof PluginAction) {
 			PluginAction pluginAction = (PluginAction) action;
-			Class<?> clazz = pluginAction.getClass();
+			Class<? extends PluginAction> clazz = pluginAction.getClass();
 			createActionContributionItemText(object, buffer, toolkit, text, clazz, pluginAction);
 
 		} else {
 			// normal JFace Actions
-			Class<?> clazz = action.getClass();
+			Class<? extends IAction> clazz = action.getClass();
 			buffer.append(toolkit.createClassSection(text, PDERuntimeMessages.ActiveMenuSection_5, new Class[] {clazz}));
 			Bundle bundle = FrameworkUtil.getBundle(clazz);
 			toolkit.generatePluginDetailsText(bundle, null, "meow", buffer, text); //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.spy.context/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.spy.context/META-INF/MANIFEST.MF
index c564c9e..3691a3a 100644
--- a/ui/org.eclipse.pde.spy.context/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.spy.context/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.spy.context;singleton:=true
-Bundle-Version: 1.0.200.qualifier
+Bundle-Version: 1.0.300.qualifier
 Bundle-Vendor: %provider-name
 Automatic-Module-Name: org.eclipse.pde.spy.context
 Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/ui/org.eclipse.pde.spy.context/pom.xml b/ui/org.eclipse.pde.spy.context/pom.xml
index 43ca1cb..68cc1d3 100644
--- a/ui/org.eclipse.pde.spy.context/pom.xml
+++ b/ui/org.eclipse.pde.spy.context/pom.xml
@@ -23,6 +23,6 @@
   </properties>
 
   <artifactId>org.eclipse.pde.spy.context</artifactId>
-  <version>1.0.200-SNAPSHOT</version>
+  <version>1.0.300-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ui/org.eclipse.pde.spy.context/src/org/eclipse/pde/internal/spy/context/ContextSpyProvider.java b/ui/org.eclipse.pde.spy.context/src/org/eclipse/pde/internal/spy/context/ContextSpyProvider.java
index 1f8d183..650c18c 100644
--- a/ui/org.eclipse.pde.spy.context/src/org/eclipse/pde/internal/spy/context/ContextSpyProvider.java
+++ b/ui/org.eclipse.pde.spy.context/src/org/eclipse/pde/internal/spy/context/ContextSpyProvider.java
@@ -61,7 +61,7 @@
 	public Object[] getElements(Object inputElement) {
 		if (inputElement instanceof MApplication) {
 			return new Object[] { ((MApplication) inputElement).getContext().getParent() };
-		} else if (inputElement instanceof Collection<?>) {
+		} else if (inputElement instanceof Collection) {
 			return ((Collection<?>) inputElement).toArray();
 		}
 
diff --git a/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
index 6deb6cd..9cb4baa 100644
--- a/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.spy.css;singleton:=true
-Bundle-Version: 0.12.200.qualifier
+Bundle-Version: 0.12.300.qualifier
 Automatic-Module-Name: org.eclipse.pde.spy.css
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0",
diff --git a/ui/org.eclipse.pde.spy.css/pom.xml b/ui/org.eclipse.pde.spy.css/pom.xml
index 1721ede..073c41c 100644
--- a/ui/org.eclipse.pde.spy.css/pom.xml
+++ b/ui/org.eclipse.pde.spy.css/pom.xml
@@ -23,6 +23,6 @@
   </properties>
 
   <artifactId>org.eclipse.pde.spy.css</artifactId>
-  <version>0.12.200-SNAPSHOT</version>
+  <version>0.12.300-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ui/org.eclipse.pde.spy.css/src/org/eclipse/pde/spy/css/WidgetTreeProvider.java b/ui/org.eclipse.pde.spy.css/src/org/eclipse/pde/spy/css/WidgetTreeProvider.java
index 0930145..55e5e9c 100644
--- a/ui/org.eclipse.pde.spy.css/src/org/eclipse/pde/spy/css/WidgetTreeProvider.java
+++ b/ui/org.eclipse.pde.spy.css/src/org/eclipse/pde/spy/css/WidgetTreeProvider.java
@@ -34,7 +34,7 @@
 	public Object[] getElements(Object inputElement) {
 		if (inputElement instanceof Object[]) {
 			return (Object[]) inputElement;
-		} else if (inputElement instanceof Collection<?>) {
+		} else if (inputElement instanceof Collection) {
 			return ((Collection<?>) inputElement).toArray();
 		}
 		return getChildren(inputElement);
diff --git a/ui/org.eclipse.pde.spy.preferences/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.spy.preferences/META-INF/MANIFEST.MF
index 9663c86..80ab59a 100644
--- a/ui/org.eclipse.pde.spy.preferences/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.spy.preferences/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.spy.preferences;singleton:=true
-Bundle-Version: 0.12.200.qualifier
+Bundle-Version: 0.12.300.qualifier
 Automatic-Module-Name: org.eclipse.pde.spy.preferences
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Bundle-Vendor: %provider-name
diff --git a/ui/org.eclipse.pde.spy.preferences/pom.xml b/ui/org.eclipse.pde.spy.preferences/pom.xml
index 910ab09..00b6fa2 100644
--- a/ui/org.eclipse.pde.spy.preferences/pom.xml
+++ b/ui/org.eclipse.pde.spy.preferences/pom.xml
@@ -23,6 +23,6 @@
   </properties>
 
   <artifactId>org.eclipse.pde.spy.preferences</artifactId>
-  <version>0.12.200-SNAPSHOT</version>
+  <version>0.12.300-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ui/org.eclipse.pde.spy.preferences/src/org/eclipse/pde/spy/preferences/parts/PreferenceSpyPart.java b/ui/org.eclipse.pde.spy.preferences/src/org/eclipse/pde/spy/preferences/parts/PreferenceSpyPart.java
index 4d4d736..e5e4c85 100644
--- a/ui/org.eclipse.pde.spy.preferences/src/org/eclipse/pde/spy/preferences/parts/PreferenceSpyPart.java
+++ b/ui/org.eclipse.pde.spy.preferences/src/org/eclipse/pde/spy/preferences/parts/PreferenceSpyPart.java
@@ -176,7 +176,7 @@
 	private PreferenceEntry findPreferenceEntry(PreferenceEntry preferenceEntry) {
 		PreferenceEntry parent = preferenceEntry.getParent();
 		if (parent instanceof PreferenceNodeEntry) {
-			IObservableSet<?> preferenceEntries = ((PreferenceNodeEntry) parent).getPreferenceEntries();
+			IObservableSet<Object> preferenceEntries = ((PreferenceNodeEntry) parent).getPreferenceEntries();
 			for (Object object : preferenceEntries) {
 				if (object instanceof PreferenceEntry) {
 					PreferenceEntry existingPreferenceEntry = (PreferenceEntry) object;
diff --git a/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
index 6b52874..542b829 100644
--- a/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.ui; singleton:=true
-Bundle-Version: 3.13.400.qualifier
+Bundle-Version: 3.13.500.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ui.PDEPlugin
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
diff --git a/ui/org.eclipse.pde.ui/pom.xml b/ui/org.eclipse.pde.ui/pom.xml
index 2ad78cb..2c95ebb 100644
--- a/ui/org.eclipse.pde.ui/pom.xml
+++ b/ui/org.eclipse.pde.ui/pom.xml
@@ -18,6 +18,6 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.pde.ui</artifactId>
-  <version>3.13.400-SNAPSHOT</version>
+  <version>3.13.500-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java
index b612327..087075e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java
@@ -125,12 +125,13 @@
 
 				// Check if the right version exists in the new meta repo
 				Version newVersion = Version.parseVersion(version);
-				IQueryResult<?> queryMatches = metaRepo.query(QueryUtil.createIUQuery(id, newVersion), monitor);
+				IQueryResult<IInstallableUnit> queryMatches = metaRepo.query(QueryUtil.createIUQuery(id, newVersion),
+						monitor);
 				if (queryMatches.isEmpty()) {
 					return Status.error(NLS.bind(PDEUIMessages.RuntimeInstallJob_ErrorCouldNotFindUnitInRepo, id, version));
 				}
 
-				IInstallableUnit iuToInstall = (IInstallableUnit) queryMatches.iterator().next();
+				IInstallableUnit iuToInstall = queryMatches.iterator().next();
 
 				// Find out if the profile already has that iu installed
 				queryMatches = profile.query(QueryUtil.createIUQuery(id), subMonitor.split(1));
@@ -139,7 +140,7 @@
 					toInstall.add(iuToInstall);
 				} else {
 					// There is an existing iu that we need to replace using an installable unit patch
-					IInstallableUnit existingIU = (IInstallableUnit) queryMatches.iterator().next();
+					IInstallableUnit existingIU = queryMatches.iterator().next();
 					toInstall.add(createInstallableUnitPatch(existingIU, newVersion, profile, subMonitor.split(1)));
 				}
 				subMonitor.split(2);
@@ -196,9 +197,10 @@
 
 		// Locate IU's that appoint the existing version of the IU that we are patching.
 		// Add lifecycle requirement on a changed bundle, if it gets updated, then we should uninstall the patch
-		IQueryResult<?> queryMatches = profile.query(QueryUtil.createMatchQuery("requirements.exists(rc | $0 ~= rc)", new Object[] {existingIU}), monitor); //$NON-NLS-1$
+		IQueryResult<IInstallableUnit> queryMatches = profile
+				.query(QueryUtil.createMatchQuery("requirements.exists(rc | $0 ~= rc)", existingIU), monitor); //$NON-NLS-1$
 		if (!queryMatches.isEmpty()) {
-			IInstallableUnit lifecycleUnit = (IInstallableUnit) queryMatches.iterator().next();
+			IInstallableUnit lifecycleUnit = queryMatches.iterator().next();
 			iuPatchDescription.setLifeCycle(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, lifecycleUnit.getId(), new VersionRange(lifecycleUnit.getVersion(), true, lifecycleUnit.getVersion(), true), null, false, false, false));
 		}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandComposerPart.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandComposerPart.java
index 5e2c6de..0ff4b40 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandComposerPart.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandComposerPart.java
@@ -14,6 +14,7 @@
 package org.eclipse.pde.internal.ui.commands;
 
 import java.util.HashMap;
+import org.eclipse.core.commands.IParameter;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.jface.dialogs.IMessageProvider;
@@ -165,7 +166,7 @@
 		return fCommandDetails.getSerializedString();
 	}
 
-	protected HashMap<?, ?> getSelectedCommandsParameters() {
+	protected HashMap<IParameter, String> getSelectedCommandsParameters() {
 		return fCommandDetails.getParameters();
 	}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandDetails.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandDetails.java
index 4af0ec3..f547554 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandDetails.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandDetails.java
@@ -227,11 +227,12 @@
 
 	private class ValuesParameterControl extends SelectionAdapter implements ModifyListener {
 		private final IParameter fParameter;
-		private final Map<?, ?> fValues;
+		private final Map<String, Object> fValues;
 		private final Combo fValuesCombo;
 		private final Button fClearButton;
 
-		public ValuesParameterControl(IParameter parameter, Map<?, ?> values, Combo valuesCombo, Button clearButton) {
+		public ValuesParameterControl(IParameter parameter, Map<String, Object> values, Combo valuesCombo,
+				Button clearButton) {
 			fParameter = parameter;
 			fValues = values;
 
@@ -240,9 +241,9 @@
 			if (fPreSel != null && fValues != null) {
 				Object obj = fPreSel.getParameterMap().get(parameter.getId());
 				if (obj != null) {
-					for (Entry<?, ?> entry : fValues.entrySet()) {
+					for (Entry<String, Object> entry : fValues.entrySet()) {
 						if (obj.equals(entry.getValue())) {
-							fValuesCombo.setText(entry.getKey().toString());
+							fValuesCombo.setText(entry.getKey());
 							break;
 						}
 					}
@@ -414,9 +415,9 @@
 					parameterValuesCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 					fToolkit.adapt(parameterValuesCombo, true, true);
 
-					Map<?, ?> values = parameterValues.getParameterValues();
-					for (Object key : values.keySet())
-						parameterValuesCombo.add((String) key);
+					Map<String, Object> values = parameterValues.getParameterValues();
+					for (String key : values.keySet())
+						parameterValuesCombo.add(key);
 
 					Button clearButton = fToolkit.createButton(paramLine, PDEUIMessages.CommandDetails_clear, SWT.PUSH);
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandTreeContentProvider.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandTreeContentProvider.java
index ce3aa60..be6b2ca 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandTreeContentProvider.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/commands/CommandTreeContentProvider.java
@@ -14,8 +14,7 @@
 package org.eclipse.pde.internal.ui.commands;
 
 import java.util.ArrayList;
-
-import java.util.*;
+import java.util.TreeMap;
 import org.eclipse.core.commands.Category;
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.common.NotDefinedException;
@@ -30,7 +29,6 @@
 
 	private ICommandService fComServ;
 	private TreeMap<Category, ArrayList<Command>> fCatMap; // mapping of commands to category
-	private TreeMap<?, ?> fConMap; // mapping of commands to context
 	private Viewer fViewer;
 	private int fCurContent = F_CAT_CONTENT;
 
@@ -47,7 +45,6 @@
 				return comA.compareTo(comB);
 			return +1; // undefined ids should go last
 		});
-		fConMap = new TreeMap<>();
 		Command[] commands = fComServ.getDefinedCommands();
 		for (Command command : commands) {
 			/*
@@ -86,13 +83,12 @@
 	@Override
 	public void dispose() {
 		fCatMap.clear();
-		fConMap.clear();
 	}
 
 	@Override
 	public Object[] getChildren(Object parentElement) {
 		if (parentElement instanceof Category) {
-			ArrayList<?> list = fCatMap.get(parentElement);
+			ArrayList<Command> list = fCatMap.get(parentElement);
 			if (list != null)
 				return list.toArray(new Command[list.size()]);
 		}
@@ -102,7 +98,7 @@
 	@Override
 	public boolean hasChildren(Object element) {
 		if (element instanceof Category) {
-			ArrayList<?> list = fCatMap.get(element);
+			ArrayList<Command> list = fCatMap.get(element);
 			if (list != null)
 				return !list.isEmpty();
 		}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/AbstractFoldingStructureProvider.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/AbstractFoldingStructureProvider.java
index bcd8f88..7bb3e66 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/AbstractFoldingStructureProvider.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/AbstractFoldingStructureProvider.java
@@ -59,12 +59,12 @@
 		}
 	}
 
-	private Annotation[] computeDifferences(ProjectionAnnotationModel model, Set<?> additions) {
+	private Annotation[] computeDifferences(ProjectionAnnotationModel model, Set<Position> additions) {
 		List<Object> deletions = new ArrayList<>();
-		for (Iterator<?> iter = model.getAnnotationIterator(); iter.hasNext();) {
-			Object annotation = iter.next();
+		for (Iterator<Annotation> iter = model.getAnnotationIterator(); iter.hasNext();) {
+			Annotation annotation = iter.next();
 			if (annotation instanceof ProjectionAnnotation) {
-				Position position = model.getPosition((Annotation) annotation);
+				Position position = model.getPosition(annotation);
 				if (additions.contains(position)) {
 					additions.remove(position);
 				} else {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormTextEditorContributor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormTextEditorContributor.java
index a395b90..5784e20 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormTextEditorContributor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormTextEditorContributor.java
@@ -13,7 +13,7 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor;
 
-import java.util.*;
+import java.util.Map;
 import org.eclipse.jdt.ui.IContextMenuConstants;
 import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
 import org.eclipse.jface.action.*;
@@ -137,12 +137,10 @@
 		rootBars.updateActionBars();
 		if (active) {
 			fSourceActionBars.activate();
-			Map<?, ?> handlers = fSourceActionBars.getGlobalActionHandlers();
+			Map<String, IAction> handlers = fSourceActionBars.getGlobalActionHandlers();
 			if (handlers != null) {
-				Set<?> keys = handlers.keySet();
-				for (Object key : keys) {
-					String id = (String) key;
-					rootBars.setGlobalActionHandler(id, (IAction) handlers.get(id));
+				for (String id : handlers.keySet()) {
+					rootBars.setGlobalActionHandler(id, handlers.get(id));
 				}
 			}
 		} else {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/actions/FormatOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/actions/FormatOperation.java
index 4512067..d0fa63d 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/actions/FormatOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/actions/FormatOperation.java
@@ -78,9 +78,9 @@
 	}
 
 	private static void formatBundle(Bundle bundle) {
-		Iterator<?> headers = bundle.getHeaders().values().iterator();
+		Iterator<IManifestHeader> headers = bundle.getHeaders().values().iterator();
 		while (headers.hasNext())
-			((IManifestHeader) headers.next()).update(true);
+			headers.next().update(true);
 		BundleModel model = (BundleModel) bundle.getModel();
 		model.adjustOffsets(model.getDocument());
 	}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/JARFileFilter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/JARFileFilter.java
index 90e9127..2ffdb74 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/JARFileFilter.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/JARFileFilter.java
@@ -15,6 +15,7 @@
 package org.eclipse.pde.internal.ui.editor.build;
 
 import java.util.HashSet;
+import java.util.Set;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -24,13 +25,13 @@
 
 public class JARFileFilter extends ViewerFilter {
 	private final static String jarExt = "jar"; //$NON-NLS-1$
-	private HashSet<?> fPaths;
+	private Set<IPath> fPaths;
 
 	public JARFileFilter() {
 		fPaths = new HashSet<>();
 	}
 
-	public JARFileFilter(HashSet<?> names) {
+	public JARFileFilter(Set<IPath> names) {
 		fPaths = names;
 	}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java
index c71aafa..a94410c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLContentAssistProcessor.java
@@ -425,11 +425,11 @@
 					// We have a schema complex type.  Either the element has attributes
 					// or the element has children.
 					// Generate the list of element proposals
-					TreeSet<?> elementSet = XMLElementProposalComputer.computeElementProposal(sElement, node);
+					Set<ISchemaElement> elementSet = XMLElementProposalComputer.computeElementProposal(sElement, node);
 					// Filter the list of element proposals
-					Iterator<?> iterator = elementSet.iterator();
+					Iterator<ISchemaElement> iterator = elementSet.iterator();
 					while (iterator.hasNext()) {
-						addToList(propList, filter, (ISchemaObject) iterator.next());
+						addToList(propList, filter, iterator.next());
 					}
 				} else {
 					return null;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/BundleSourcePage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/BundleSourcePage.java
index 5b72db2..4ce497a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/BundleSourcePage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/BundleSourcePage.java
@@ -113,12 +113,11 @@
 		public Object[] getElements(Object parent) {
 			if (parent instanceof BundleModel) {
 				BundleModel model = (BundleModel) parent;
-				Map<?, ?> manifest = ((Bundle) model.getBundle()).getHeaders();
+				Map<String, IManifestHeader> manifest = ((Bundle) model.getBundle()).getHeaders();
 				ArrayList<IDocumentKey> keys = new ArrayList<>();
-				for (Object value : manifest.values()) {
-					IDocumentKey key = (IDocumentKey) value;
-					if (key.getOffset() > -1) {
-						keys.add(key);
+				for (IManifestHeader header : manifest.values()) {
+					if (header.getOffset() > -1) {
+						keys.add(header);
 					}
 				}
 				return keys.toArray();
@@ -278,12 +277,11 @@
 	@Override
 	public IDocumentRange getRangeElement(int offset, boolean searchChildren) {
 		IBundleModel model = (IBundleModel) getInputContext().getModel();
-		Map<?, ?> manifest = ((Bundle) model.getBundle()).getHeaders();
+		Map<String, IManifestHeader> manifest = ((Bundle) model.getBundle()).getHeaders();
 		// Reset
 		resetTargetOutlineSelection();
 		// Search each manifest header
-		for (Object manifestVaue : manifest.values()) {
-			IDocumentRange node = (IDocumentRange) manifestVaue;
+		for (IManifestHeader node : manifest.values()) {
 			// Check to see if the parent is within range
 			if (isWithinCurrentRange(offset, node)) {
 				// Search the children of composite manifest headers first if
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java
index 7fc6086..402a508 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java
@@ -169,7 +169,7 @@
 
 	@Override
 	protected boolean canPaste(Object targetObject, Object[] sourceObjects) {
-		HashMap<?, ?> currentPackageFragments = null;
+		Map<String, IPackageFragment> currentPackageFragments = null;
 		// Only export package objects that represent existing package
 		// fragments within the Java project that this plugin.xml is stored
 		// can be pasted
@@ -194,81 +194,29 @@
 	}
 
 	private boolean canAddExportedPackages() {
-		// Ensure model is editable
-		if (isEditable() == false) {
-			return false;
-		}
-		// Get the model
-		IPluginModelBase model = getModel();
-		// Ensure model is defined
-		if (model == null) {
-			return false;
-		}
-		// Get the underlying resource
-		IResource resource = model.getUnderlyingResource();
-		// Ensure resource is defined
-		if (resource == null) {
-			return false;
-		}
-		// Get the project
-		IProject project = resource.getProject();
-		// Ensure the project is defined
-		if (project == null) {
-			return false;
-		}
-		// Ensure the project is a Java project
-		try {
-			if (project.hasNature(JavaCore.NATURE_ID) == false) {
-				return false;
-			}
-		} catch (CoreException e) {
-			return false;
-		}
-		return true;
+		return isEditable() && getProjectWithJavaNature().isPresent();
 	}
 
-	private HashMap<?, ?> createCurrentExportPackageMap() {
-		// Dummy hash map created in order to return a defined but empty map
-		HashMap<?, ?> packageFragments = new HashMap<>(0);
-		// Get the model
-		IPluginModelBase model = getModel();
-		// Ensure model is defined
-		if (model == null) {
-			return packageFragments;
-		}
-		// Get the underlying resource
-		IResource resource = model.getUnderlyingResource();
-		// Ensure resource is defined
-		if (resource == null) {
-			return packageFragments;
-		}
-		// Get the project
-		IProject project = resource.getProject();
-		// Ensure the project is defined
-		if (project == null) {
-			return packageFragments;
-		}
-		// Ensure the project is a Java project
-		try {
-			if (project.hasNature(JavaCore.NATURE_ID) == false) {
-				return packageFragments;
+	private Optional<IProject> getProjectWithJavaNature() {
+		Optional<IPluginModelBase> model = Optional.ofNullable(getModel());
+		Optional<IProject> project = model.map(IPluginModelBase::getUnderlyingResource).map(IResource::getProject);
+		return project.filter(p -> {
+			try { // Ensure the project is a Java project
+				return p.hasNature(JavaCore.NATURE_ID);
+			} catch (CoreException e) {
+				return false;
 			}
-		} catch (CoreException e) {
-			return packageFragments;
+		});
+	}
+
+	private Map<String, IPackageFragment> createCurrentExportPackageMap() {
+		Optional<IProject> project = getProjectWithJavaNature();
+		if (project.isEmpty()) {
+			return Collections.emptyMap();
 		}
-		// Get the Java project
-		IJavaProject javaProject = JavaCore.create(project);
-		// Ensure the Java project is defined
-		if (javaProject == null) {
-			return packageFragments;
-		}
+		IJavaProject javaProject = JavaCore.create(project.get());
 		// Get the current packages associated with the export package header
-		Vector<?> currentExportPackages = null;
-		if (fHeader == null) {
-			currentExportPackages = new Vector<>();
-		} else {
-			currentExportPackages = fHeader.getPackageNames();
-		}
+		Collection<String> currentExportPackages = fHeader == null ? Collections.emptySet() : fHeader.getPackageNames();
 		// Get a hashtable of all the package fragments that are allowed to
 		// be added to the current export package header
 		// Generally, all package fragments contained in the same Java project
@@ -439,7 +387,7 @@
 			if (project.hasNature(JavaCore.NATURE_ID)) {
 				ILabelProvider labelProvider = new JavaElementLabelProvider();
 				final ConditionalListSelectionDialog dialog = new ConditionalListSelectionDialog(PDEPlugin.getActiveWorkbenchShell(), labelProvider, PDEUIMessages.ExportPackageSection_dialogButtonLabel);
-				final Collection<?> pckgs = fHeader == null ? new Vector<>() : fHeader.getPackageNames();
+				final Collection<String> pckgs = fHeader == null ? Collections.emptySet() : fHeader.getPackageNames();
 				final boolean allowJava = "true".equals(getBundle().getHeader(ICoreConstants.ECLIPSE_JREBUNDLE)); //$NON-NLS-1$
 				Runnable runnable = () -> {
 					ArrayList<IPackageFragment> elements = new ArrayList<>();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
index 5e1b236..8e71681 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
@@ -20,6 +20,7 @@
 package org.eclipse.pde.internal.ui.editor.plugin;
 
 import java.util.*;
+import java.util.List;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.Path;
@@ -669,12 +670,12 @@
 
 	private void handleEdit() {
 		final IStructuredSelection selection = fExtensionTree.getStructuredSelection();
-		ArrayList<?> editorWizards = getEditorWizards(selection);
+		List<IConfigurationElement> editorWizards = getEditorWizards(selection);
 		if (editorWizards == null)
 			return;
 		if (editorWizards.size() == 1) {
 			// open the wizard directly
-			handleEdit((IConfigurationElement) editorWizards.get(0), selection);
+			handleEdit(editorWizards.get(0), selection);
 		} else {
 			IProject project = getPage().getPDEEditor().getCommonProject();
 			IPluginModelBase model = (IPluginModelBase) getPage().getModel();
@@ -694,7 +695,7 @@
 		updateButtons(fFilteredTree.getViewer().getSelection());
 	}
 
-	private ArrayList<?> getEditorWizards(IStructuredSelection selection) {
+	private List<IConfigurationElement> getEditorWizards(IStructuredSelection selection) {
 		if (selection.size() != 1)
 			return null;
 		Object obj = selection.getFirstElement();
@@ -1156,7 +1157,8 @@
 		// We have a schema complex type.  Either the target object has
 		// attributes or the element has children.
 		// Generate the list of element proposals
-		TreeSet<?> elementSet = XMLElementProposalComputer.computeElementProposal(schemaElement, (IDocumentElementNode) targetObject);
+		Set<ISchemaElement> elementSet = XMLElementProposalComputer.computeElementProposal(schemaElement,
+				(IDocumentElementNode) targetObject);
 		// Determine whether we can paste the source elements as children of
 		// the target object
 		if (sourceObjects.length > 1) {
@@ -1171,15 +1173,15 @@
 	 * @param sourceElements
 	 * @param targetElementSet
 	 */
-	private boolean canPasteSourceElements(IPluginElement[] sourceElements, TreeSet<?> targetElementSet) {
+	private boolean canPasteSourceElements(IPluginElement[] sourceElements, Set<ISchemaElement> targetElementSet) {
 		// Performance optimisation
 		// HashSet of schema elements is not comparable for the source
 		// objects (schema elements are transient)
 		// Create a new HashSet with element names for comparison
 		HashSet<String> targetElementNameSet = new HashSet<>();
-		Iterator<?> iterator = targetElementSet.iterator();
+		Iterator<ISchemaElement> iterator = targetElementSet.iterator();
 		while (iterator.hasNext()) {
-			targetElementNameSet.add(((ISchemaElement) iterator.next()).getName());
+			targetElementNameSet.add(iterator.next().getName());
 		}
 		// Paste will be enabled only if all source objects can be pasted
 		// as children into the target element
@@ -1204,15 +1206,15 @@
 	 * @param sourceElement
 	 * @param targetElementSet
 	 */
-	private boolean canPasteSourceElement(IPluginElement sourceElement, TreeSet<?> targetElementSet) {
+	private boolean canPasteSourceElement(IPluginElement sourceElement, Set<ISchemaElement> targetElementSet) {
 		boolean canPaste = false;
 		// Get the source element tag name
 		String sourceTagName = sourceElement.getName();
 		// Iterate over set of valid element proposals
-		Iterator<?> iterator = targetElementSet.iterator();
+		Iterator<ISchemaElement> iterator = targetElementSet.iterator();
 		while (iterator.hasNext()) {
 			// Get the proposal element tag name
-			String targetTagName = ((ISchemaElement) iterator.next()).getName();
+			String targetTagName = iterator.next().getName();
 			// Only a source element that is found within the set of element
 			// proposals can be pasted
 			if (sourceTagName.equals(targetTagName)) {
@@ -1732,12 +1734,12 @@
 		// We have a schema complex type.  Either the target object has
 		// attributes or the element has children.
 		// Generate the list of element proposals
-		TreeSet<?> elementSet = XMLElementProposalComputer.computeElementProposal(schemaElement, targetPluginNode);
+		TreeSet<ISchemaElement> elementSet = XMLElementProposalComputer.computeElementProposal(schemaElement, targetPluginNode);
 		// Iterate over set of valid element proposals
-		Iterator<?> iterator = elementSet.iterator();
+		Iterator<ISchemaElement> iterator = elementSet.iterator();
 		while (iterator.hasNext()) {
 			// Get the proposal element tag name
-			String targetTagName = ((ISchemaElement) iterator.next()).getName();
+			String targetTagName = iterator.next().getName();
 			// Only a source element that is found within the set of element
 			// proposals can be pasted
 			String sourceNodeTagName = ((IDocumentElementNode) sourcePluginObject).getXMLTagName();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PackageSelectionDialog.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PackageSelectionDialog.java
index ed48f56..5e558ed 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PackageSelectionDialog.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PackageSelectionDialog.java
@@ -13,7 +13,7 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.plugin;
 
-import java.util.Vector;
+import java.util.Collection;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.pde.internal.core.util.PDEJavaHelper;
@@ -27,7 +27,7 @@
 	 * @param parent
 	 * @param renderer
 	 */
-	public PackageSelectionDialog(Shell parent, ILabelProvider renderer, IJavaProject jProject, Vector<?> existingPackages, boolean allowJava) {
+	public PackageSelectionDialog(Shell parent, ILabelProvider renderer, IJavaProject jProject, Collection<String> existingPackages, boolean allowJava) {
 		super(parent, renderer);
 		setElements(PDEJavaHelper.getPackageFragments(jProject, existingPackages, allowJava));
 		setMultipleSelection(true);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java
index 1da71c3..cad16c6 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java
@@ -244,7 +244,7 @@
 
 	@Override
 	protected boolean canPaste(Object targetObject, Object[] sourceObjects) {
-		HashSet<?> existingImportsSet = null;
+		Set<String> existingImportsSet = null;
 		// Only import objects that are not already existing imports can be
 		// pasted
 		for (Object sourceObject : sourceObjects) {
@@ -455,7 +455,7 @@
 
 	private IPluginModelBase[] getAvailablePlugins(IPluginModelBase model) {
 		IPluginModelBase[] plugins = PluginRegistry.getActiveModels(false);
-		HashSet<?> existingImports = PluginSelectionDialog.getExistingImports(model, false);
+		Set<String> existingImports = PluginSelectionDialog.getExistingImports(model, false);
 		ArrayList<IPluginModelBase> result = new ArrayList<>();
 		for (int i = 0; i < plugins.length; i++) {
 			if (!existingImports.contains(plugins[i].getPluginBase().getId())) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/rows/IdAttributeRow.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/rows/IdAttributeRow.java
index f2e5873..10a48a5 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/rows/IdAttributeRow.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/rows/IdAttributeRow.java
@@ -46,30 +46,30 @@
 		@Override
 		public String getText(Object element) {
 			if (element instanceof Map.Entry) {
-				Map.Entry<?, ?> entry = (Entry<?, ?>) element;
-				String text = (String) entry.getKey();
-				if (entry.getValue() instanceof IConfigurationElement) {
-					IConfigurationElement value = (IConfigurationElement) entry.getValue();
-					String name = value.getAttribute("name"); //$NON-NLS-1$
+				@SuppressWarnings("unchecked") // filled from corresponding map
+				Entry<String, IConfigurationElement> entry = (Entry<String, IConfigurationElement>) element;
+				String text = entry.getKey();
+				IConfigurationElement value = entry.getValue();
+				String name = value.getAttribute("name"); //$NON-NLS-1$
+				if (name == null) {
+					name = value.getAttribute("label"); //$NON-NLS-1$
 					if (name == null) {
-						name = value.getAttribute("label"); //$NON-NLS-1$
-						if (name == null) {
-							name = value.getAttribute("description"); //$NON-NLS-1$
-						}
+						name = value.getAttribute("description"); //$NON-NLS-1$
 					}
+				}
 
-					String contributor = value.getContributor().getName();
+				String contributor = value.getContributor().getName();
 
-					if (input != null && name != null && name.startsWith("%") && contributor != null) { //$NON-NLS-1$
-						IPluginModelBase model = PluginRegistry.findModel(contributor);
-						name = model.getResourceString(name);
-					}
+				if (input != null && name != null && name.startsWith("%") && contributor != null) { //$NON-NLS-1$
+					IPluginModelBase model = PluginRegistry.findModel(contributor);
+					name = model.getResourceString(name);
+				}
 
-					if (name != null) {
-						text += " - " + name; //$NON-NLS-1$
-					}
-					if (contributor != null)
-						text += " [" + contributor + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+				if (name != null) {
+					text += " - " + name; //$NON-NLS-1$
+				}
+				if (contributor != null) {
+					text += " [" + contributor + "]"; //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				return text;
 			}
@@ -97,8 +97,9 @@
 		dialog.setElements(attributeMap.entrySet().toArray());
 		dialog.setFilter("*"); //$NON-NLS-1$
 		if (dialog.open() == Window.OK) {
-			Map.Entry<?, ?> entry = (Entry<?, ?>) dialog.getFirstResult();
-			text.setText(entry.getKey().toString());
+			@SuppressWarnings({ "unchecked", "rawtypes" })
+			Map.Entry<String, IConfigurationElement> entry = (Entry) dialog.getFirstResult();
+			text.setText(entry.getKey());
 		}
 	}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/AnnotationHover.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/AnnotationHover.java
index ab46b9a..f902675 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/AnnotationHover.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/AnnotationHover.java
@@ -49,9 +49,9 @@
 
 		ArrayList<String> messages = new ArrayList<>();
 
-		Iterator<?> iter = model.getAnnotationIterator();
+		Iterator<Annotation> iter = model.getAnnotationIterator();
 		while (iter.hasNext()) {
-			Object object = iter.next();
+			Annotation object = iter.next();
 			if (object instanceof MarkerAnnotation) {
 				MarkerAnnotation annotation = (MarkerAnnotation) object;
 				if (compareRulerLine(model.getPosition(annotation), document, line)) {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
index 12d843c..8e1ec99 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
@@ -218,7 +218,7 @@
 			IDocument doc = invocationContext.getSourceViewer().getDocument();
 
 			int offset = invocationContext.getOffset();
-			Iterator<?> it = amodel.getAnnotationIterator();
+			Iterator<Annotation> it = amodel.getAnnotationIterator();
 			TreeSet<ICompletionProposal> proposalSet = new TreeSet<>((o1, o2) -> {
 				if (o1 != null && o2 != null) {
 					return o1.getDisplayString().compareToIgnoreCase(o2.getDisplayString());
@@ -226,7 +226,7 @@
 				return 0;
 			});
 			while (it.hasNext()) {
-				Object key = it.next();
+				Annotation key = it.next();
 				if (!(key instanceof SimpleMarkerAnnotation)) {
 					if (key instanceof SpellingAnnotation) {
 						SpellingAnnotation annotation = (SpellingAnnotation) key;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDESelectAnnotationRulerAction.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDESelectAnnotationRulerAction.java
index d7e848f..6069a1b 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDESelectAnnotationRulerAction.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDESelectAnnotationRulerAction.java
@@ -82,11 +82,11 @@
 		if (model == null)
 			return;
 
-		Iterator<?> iter = model.getAnnotationIterator();
+		Iterator<Annotation> iter = model.getAnnotationIterator();
 		int layer = Integer.MIN_VALUE;
 
 		while (iter.hasNext()) {
-			Annotation annotation = (Annotation) iter.next();
+			Annotation annotation = iter.next();
 			if (annotation.isMarkedDeleted())
 				continue;
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java
index f74df70..96c67f4 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java
@@ -98,10 +98,10 @@
 		IAnnotationModel model = getAnnotationModel();
 		if (model == null)
 			return;
-		Iterator<?> iter = model.getAnnotationIterator();
+		Iterator<Annotation> iter = model.getAnnotationIterator();
 
 		while (iter.hasNext()) {
-			Annotation annotation = (Annotation) iter.next();
+			Annotation annotation = iter.next();
 			if (annotation instanceof SpellingAnnotation) {
 				SpellingAnnotation spellingAnnotation = (SpellingAnnotation) annotation;
 				Position position = model.getPosition(spellingAnnotation);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java
index 38bc429..3bc182e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java
@@ -60,9 +60,11 @@
 			case LauncherUtils.GENERATE_CONFIG_INI :
 				return generateConfigIni();
 
-			case LauncherUtils.ORGANIZE_MANIFESTS :
+			case LauncherUtils.ORGANIZE_MANIFESTS:
 				Object[] args2 = (Object[]) source;
-				organizeManifests((ArrayList<?>) args2[0], (IProgressMonitor) args2[1], (Properties) args2[2]);
+				@SuppressWarnings("unchecked")
+				List<IProject> projects = (List<IProject>) args2[0];
+				organizeManifests(projects, (IProgressMonitor) args2[1], (Properties) args2[2]);
 				break;
 
 			case LauncherUtils.SELECT_WORKSPACE_FIELD :
@@ -110,7 +112,7 @@
 		generateErrorDialog(PDEUIMessages.LauncherUtils_workspaceLocked, message, launchConfig, mode);
 	}
 
-	private void organizeManifests(final ArrayList<?> projects, final IProgressMonitor monitor, final Properties lastRun) {
+	private void organizeManifests(List<IProject> projects, IProgressMonitor monitor, Properties lastRun) {
 		Display.getDefault().syncExec(() -> {
 			OrganizeManifestsProcessor processor = new OrganizeManifestsProcessor(projects);
 			initializeProcessor(processor);
@@ -120,9 +122,10 @@
 				// update table for each project with current time stamp
 				Properties table = lastRun;
 				String ts = Long.toString(System.currentTimeMillis());
-				Iterator<?> it = projects.iterator();
+
+				Iterator<IProject> it = projects.iterator();
 				while (it.hasNext())
-					table.put(((IProject) it.next()).getName(), ts);
+					table.put(it.next().getName(), ts);
 			} catch (OperationCanceledException | CoreException e2) {
 			}
 		});
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java
index c60cf38..57eab83 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java
@@ -445,7 +445,7 @@
 		TracingPropertySource source = fPropertySources.get(model);
 		if (source == null) {
 			String id = model.getPluginBase().getId();
-			Hashtable<?, ?> defaults = PDECore.getDefault().getTracingOptionsManager().getTemplateTable(id);
+			Hashtable<String, String> defaults = PDECore.getDefault().getTracingOptionsManager().getTemplateTable(id);
 			source = new TracingPropertySource(model, fMasterOptions, defaults, this);
 			fPropertySources.put(model, source);
 			source.setChanged(true);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java
index 7b00f53..7421711 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java
@@ -28,7 +28,7 @@
 public class TracingPropertySource {
 	private IPluginModelBase fModel;
 	private Vector<PropertyEditor> fDescriptors;
-	private Hashtable<?, ?> fTemplate;
+	private Hashtable<String, String> fTemplate;
 	private Hashtable<String, Object> fValues;
 	private static final String[] fBooleanChoices = {"false", "true"}; //$NON-NLS-1$ //$NON-NLS-2$
 	private Properties fMasterOptions;
@@ -197,7 +197,8 @@
 		}
 	}
 
-	public TracingPropertySource(IPluginModelBase model, Properties masterOptions, Hashtable<?, ?> template, TracingBlock block) {
+	public TracingPropertySource(IPluginModelBase model, Properties masterOptions, Hashtable<String, String> template,
+			TracingBlock block) {
 		fModel = model;
 		fMasterOptions = masterOptions;
 		fTemplate = template;
@@ -212,8 +213,8 @@
 	private Object[] getSortedKeys(int size) {
 		Object[] keyArray = new Object[size];
 		int i = 0;
-		for (Enumeration<?> keys = fTemplate.keys(); keys.hasMoreElements();) {
-			String key = (String) keys.nextElement();
+		for (Enumeration<String> keys = fTemplate.keys(); keys.hasMoreElements();) {
+			String key = keys.nextElement();
 			keyArray[i++] = key;
 		}
 		Arrays.sort(keyArray, this::compareKeys);
@@ -241,7 +242,7 @@
 			IPath path = new Path(key);
 			path = path.removeFirstSegments(1);
 			String shortKey = path.toString();
-			String value = (String) fTemplate.get(key);
+			String value = fTemplate.get(key);
 			String lvalue = null;
 			String masterValue = fMasterOptions.getProperty(key);
 			String commentValue = fMasterOptions.getProperty("#" + key); //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/AvailableFilter.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/AvailableFilter.java
index 8d395bf..3c6f52c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/AvailableFilter.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/AvailableFilter.java
@@ -14,7 +14,7 @@
 
 package org.eclipse.pde.internal.ui.nls;
 
-import java.util.Map;
+import java.util.Set;
 import java.util.regex.Pattern;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.pde.internal.core.util.PatternConstructor;
@@ -22,10 +22,10 @@
 public class AvailableFilter extends ViewerFilter {
 	public static final String WILDCARD = "*"; //$NON-NLS-1$
 	private Pattern fPattern;
-	private final Map<?, ?> selected;
+	private final Set<Object> selected;
 	private final ILabelProvider labelProvider;
 
-	public AvailableFilter(Map<?, ?> selected, ILabelProvider labelProvider) {
+	public AvailableFilter(Set<Object> selected, ILabelProvider labelProvider) {
 		setPattern(WILDCARD);
 		this.selected = selected;
 		this.labelProvider = labelProvider;
@@ -35,7 +35,7 @@
 	public boolean select(Viewer viewer, Object parentElement, Object element) {
 		// filter out any items that are currently selected
 		// on a full refresh, these will have been added back to the list
-		if (selected.containsKey(element))
+		if (selected.contains(element))
 			return false;
 
 		String displayName = labelProvider.getText(element);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java
index 44b38ed..876c12c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java
@@ -161,10 +161,10 @@
 		try {
 			TextFileChange uChange = getChangeForFile(uFile, parentChange);
 
-			Iterator<?> iter = changeFile.getChanges().iterator();
+			Iterator<ModelChangeElement> iter = changeFile.getChanges().iterator();
 
 			while (iter.hasNext()) {
-				ModelChangeElement changeElement = (ModelChangeElement) iter.next();
+				ModelChangeElement changeElement = iter.next();
 				if (changeElement.isExternalized()) {
 					ReplaceEdit uEdit = new ReplaceEdit(changeElement.getOffset(), changeElement.getLength(), changeElement.getExternKey());
 					uChange.getEdit().addChild(uEdit);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizationWizardPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizationWizardPage.java
index fcf4afd..1a370ed 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizationWizardPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizationWizardPage.java
@@ -14,7 +14,12 @@
 
 package org.eclipse.pde.internal.ui.nls;
 
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Collectors;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -55,4 +60,12 @@
 		return text;
 	}
 
+	protected static <T> List<T> getModels(TableViewer viewer, Class<T> clazz) {
+		TableItem[] items = viewer.getTable().getItems();
+		return Arrays.stream(items).map(TableItem::getData).map(clazz::cast).collect(Collectors.toList());
+	}
+
+	protected static <T> Iterator<T> getSelectedModels(TableViewer viewer, Class<T> clazz) {
+		return Arrays.stream(viewer.getStructuredSelection().toArray()).map(clazz::cast).iterator();
+	}
 }
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java
index 9cfb1d4..d94b1a1 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeModelTable.java
@@ -26,9 +26,9 @@
  * @author Team Azure
  *
  */
-public class InternationalizeModelTable {
-	private List<Object> fModels;
-	private List<Object> fPreSelected; //Models preselected by the user
+public class InternationalizeModelTable<T> {
+	private List<T> fModels;
+	private List<T> fPreSelected; // Models preselected by the user
 
 	public InternationalizeModelTable() {
 		fModels = new ArrayList<>();
@@ -41,7 +41,7 @@
 	 * @param model
 	 * @param selected
 	 */
-	public void addToModelTable(Object model, boolean selected) {
+	public void addToModelTable(T model, boolean selected) {
 		if (selected)
 			fPreSelected.add(model);
 		else
@@ -52,7 +52,7 @@
 	 * Adds the model to the model table.
 	 * @param model
 	 */
-	public void addModel(Object model) {
+	public void addModel(T model) {
 		fModels.add(model);
 	}
 
@@ -60,7 +60,7 @@
 	 * Removes the specified model from the model table.
 	 * @param model
 	 */
-	public void removeModel(Object model) {
+	public void removeModel(T model) {
 		fModels.remove(model);
 	}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizard.java
index 2efd02e..3cb2802 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizard.java
@@ -109,7 +109,7 @@
 	 *
 	 * @return the list of plug-ins selected for internationalization
 	 */
-	private List<?> getPluginModelsForInternationalization() {
+	private List<IPluginModelBase> getPluginModelsForInternationalization() {
 		return page1.getModelsToInternationalize();
 	}
 
@@ -117,7 +117,7 @@
 	 *
 	 * @return the list of locales specified for internationalization
 	 */
-	private List<?> getLocalesForInternationalization() {
+	private List<Locale> getLocalesForInternationalization() {
 		return page2.getLocalesForInternationalization();
 	}
 
@@ -172,7 +172,7 @@
 		GetNonExternalizedStringsAction externalize = new GetNonExternalizedStringsAction();
 
 		List<IProject> projects = new ArrayList<>();
-		List<?> pluginModels = getPluginModelsForInternationalization();
+		List<IPluginModelBase> pluginModels = getPluginModelsForInternationalization();
 
 		for (Object pluginModelObject : pluginModels) {
 			IPluginModelBase pluginModel = (IPluginModelBase) pluginModelObject;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardLocalePage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardLocalePage.java
index e6f1e8f..3ff62ca 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardLocalePage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardLocalePage.java
@@ -56,9 +56,9 @@
 	private Text fFilterText;
 	private AvailableFilter fFilter;
 
-	// fSelected is used to track the selection in a HashMap so we can efficiently
-	// filter selected items out of the available item list
-	private HashMap<Object, ?> fSelected;
+	// fSelected is used to track the selection in a HashSet so we can
+	// efficiently filter selected items out of the available item list
+	private Set<Object> fSelected;
 	// used to block the selection listeners from updating button enablement when programatically removing items
 	private boolean fBlockSelectionListeners;
 	private Button fAddButton;
@@ -66,18 +66,19 @@
 	private Button fRemoveButton;
 	private Button fRemoveAllButton;
 
-	private InternationalizeModelTable fInternationalizeModelTable;
+	private InternationalizeModelTable<Locale> fInternationalizeModelTable;
 
 	private ILabelProvider fLabelProvider = PDEPlugin.getDefault().getLabelProvider();
 
 	private static class ContentProvider implements IStructuredContentProvider {
 		@Override
+		@SuppressWarnings("unchecked")
 		public Object[] getElements(Object inputElement) {
-			return ((InternationalizeModelTable) inputElement).getModels();
+			return ((InternationalizeModelTable<Locale>) inputElement).getModels();
 		}
 	}
 
-	public InternationalizeWizardLocalePage(InternationalizeModelTable modelTable, String pageName) {
+	public InternationalizeWizardLocalePage(InternationalizeModelTable<Locale> modelTable, String pageName) {
 		super(pageName);
 		setTitle(PDEUIMessages.InternationalizeWizard_LocalePage_pageTitle);
 		setDescription(PDEUIMessages.InternationalizeWizard_LocalePage_pageDescription);
@@ -86,7 +87,7 @@
 		PDECore.getDefault().getModelManager().getExternalModelManager().addModelProviderListener(this);
 
 		fInternationalizeModelTable = modelTable;
-		fSelected = new HashMap<>();
+		fSelected = new HashSet<>();
 
 		IWizardContainer container = getContainer();
 		if (container != null)
@@ -184,13 +185,8 @@
 		}
 	}
 
-	public List<Object> getLocalesForInternationalization() {
-		TableItem[] items = fSelectedListViewer.getTable().getItems();
-		List<Object> result = new ArrayList<>();
-		for (TableItem item : items) {
-			result.add(item.getData());
-		}
-		return result;
+	public List<Locale> getLocalesForInternationalization() {
+		return getModels(fSelectedListViewer, Locale.class);
 	}
 
 	public void storeSettings() {
@@ -310,7 +306,7 @@
 
 	protected void refreshPage() {
 		fSelectedListViewer.getTable().removeAll();
-		fSelected = new HashMap<>();
+		fSelected = new HashSet<>();
 		fAvailableListViewer.refresh();
 		pageChanged();
 	}
@@ -361,16 +357,13 @@
 	}
 
 	private void handleAdd() {
-		IStructuredSelection ssel = fAvailableListViewer.getStructuredSelection();
-		if (!ssel.isEmpty()) {
+		Iterator<Locale> selectedLocals = getSelectedModels(fAvailableListViewer, Locale.class);
+		if (selectedLocals.hasNext()) {
 			Table table = fAvailableListViewer.getTable();
 			int index = table.getSelectionIndices()[0];
-			Object[] selection = ssel.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object selectedObject : selection) {
-				doAdd(selectedObject);
-			}
+			selectedLocals.forEachRemaining(this::doAdd);
 			setRedraw(true);
 			setBlockSelectionListeners(false);
 			table.setSelection(index < table.getItemCount() ? index : table.getItemCount() - 1);
@@ -379,17 +372,11 @@
 	}
 
 	private void handleAddAll() {
-		TableItem[] items = fAvailableListViewer.getTable().getItems();
-
-		ArrayList<Object> data = new ArrayList<>();
-		for (TableItem item : items) {
-			data.add(item.getData());
-		}
+		List<Locale> data = getModels(fAvailableListViewer, Locale.class);
 		if (!data.isEmpty()) {
-			Object[] datas = data.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object dataObject : datas) {
+			for (Locale dataObject : data) {
 				doAdd(dataObject);
 			}
 			setRedraw(true);
@@ -399,16 +386,13 @@
 	}
 
 	private void handleRemove() {
-		IStructuredSelection ssel = fSelectedListViewer.getStructuredSelection();
-		if (!ssel.isEmpty()) {
+		Iterator<Locale> selectedLocals = getSelectedModels(fSelectedListViewer, Locale.class);
+		if (selectedLocals.hasNext()) {
 			Table table = fSelectedListViewer.getTable();
 			int index = table.getSelectionIndices()[0];
-			Object[] selection = ssel.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object selectedObject : selection) {
-				doRemove(selectedObject);
-			}
+			selectedLocals.forEachRemaining(this::doRemove);
 			setRedraw(true);
 			setBlockSelectionListeners(false);
 			table.setSelection(index < table.getItemCount() ? index : table.getItemCount() - 1);
@@ -416,14 +400,14 @@
 		}
 	}
 
-	private void doAdd(Object o) {
+	private void doAdd(Locale o) {
 		fInternationalizeModelTable.removeModel(o);
 		fSelectedListViewer.add(o);
 		fAvailableListViewer.remove(o);
-		fSelected.put(o, null);
+		fSelected.add(o);
 	}
 
-	private void doRemove(Object o) {
+	private void doRemove(Locale o) {
 		fInternationalizeModelTable.addModel(o);
 		fSelected.remove(o);
 		fSelectedListViewer.remove(o);
@@ -437,17 +421,11 @@
 	}
 
 	private void handleRemoveAll() {
-		TableItem[] items = fSelectedListViewer.getTable().getItems();
-
-		ArrayList<Object> data = new ArrayList<>();
-		for (TableItem item : items) {
-			data.add(item.getData());
-		}
+		List<Locale> data = getModels(fSelectedListViewer, Locale.class);
 		if (!data.isEmpty()) {
-			Object[] datas = data.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object dataObject : datas) {
+			for (Locale dataObject : data) {
 				doRemove(dataObject);
 			}
 			setRedraw(true);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardPluginPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardPluginPage.java
index 9e9db91..0c6708d 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardPluginPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/InternationalizeWizardPluginPage.java
@@ -68,9 +68,9 @@
 	private Text fTemplateText;
 	private AvailableFilter fFilter;
 
-	// Used to track the selection in a HashMap so as to filter
+	// Used to track the selection in a HashSet so as to filter
 	// selected items out of the available item list
-	private final Map<Object, ?> fSelected = new HashMap<>();
+	private final Set<Object> fSelected = new HashSet<>();
 
 	// Used to block the selection listeners from updating button enablement
 	// when programatically removing items
@@ -81,7 +81,7 @@
 	private Button fRemoveAllButton;
 
 	// Used to store the plug-ins
-	private InternationalizeModelTable fInternationalizeModelTable;
+	private InternationalizeModelTable<IPluginModelBase> fInternationalizeModelTable;
 
 	private Button overwriteOption;
 	private Button individualFragments;
@@ -106,7 +106,7 @@
 		}
 	}
 
-	public InternationalizeWizardPluginPage(InternationalizeModelTable modelTable, String pageName) {
+	public InternationalizeWizardPluginPage(InternationalizeModelTable<IPluginModelBase> modelTable, String pageName) {
 
 		super(pageName);
 		setTitle(PDEUIMessages.InternationalizeWizard_PluginPage_pageTitle);
@@ -331,13 +331,8 @@
 		}
 	}
 
-	public List<Object> getModelsToInternationalize() {
-		TableItem[] items = fSelectedViewer.getTable().getItems();
-		List<Object> result = new ArrayList<>();
-		for (TableItem item : items) {
-			result.add(item.getData());
-		}
-		return result;
+	public List<IPluginModelBase> getModelsToInternationalize() {
+		return getModels(fSelectedViewer, IPluginModelBase.class);
 	}
 
 	public void storeSettings() {
@@ -489,16 +484,13 @@
 	}
 
 	private void handleAdd() {
-		IStructuredSelection ssel = fAvailableViewer.getStructuredSelection();
-		if (!ssel.isEmpty()) {
+		Iterator<IPluginModelBase> selectedPlugins = getSelectedModels(fAvailableViewer, IPluginModelBase.class);
+		if (selectedPlugins.hasNext()) {
 			Table table = fAvailableViewer.getTable();
 			int index = table.getSelectionIndices()[0];
-			Object[] selection = ssel.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object selectedObject : selection) {
-				doAdd(selectedObject);
-			}
+			selectedPlugins.forEachRemaining(this::doAdd);
 			setRedraw(true);
 			setBlockSelectionListeners(false);
 			table.setSelection(index < table.getItemCount() ? index : table.getItemCount() - 1);
@@ -507,17 +499,11 @@
 	}
 
 	private void handleAddAll() {
-		TableItem[] items = fAvailableViewer.getTable().getItems();
-
-		ArrayList<Object> data = new ArrayList<>();
-		for (TableItem item : items) {
-			data.add(item.getData());
-		}
+		List<IPluginModelBase> data = getModels(fAvailableViewer, IPluginModelBase.class);
 		if (!data.isEmpty()) {
-			Object[] datas = data.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object dataObject : datas) {
+			for (IPluginModelBase dataObject : data) {
 				doAdd(dataObject);
 			}
 			setRedraw(true);
@@ -527,16 +513,13 @@
 	}
 
 	private void handleRemove() {
-		IStructuredSelection ssel = fSelectedViewer.getStructuredSelection();
-		if (!ssel.isEmpty()) {
+		Iterator<IPluginModelBase> selectedPlugins = getSelectedModels(fSelectedViewer, IPluginModelBase.class);
+		if (selectedPlugins.hasNext()) {
 			Table table = fSelectedViewer.getTable();
 			int index = table.getSelectionIndices()[0];
-			Object[] selection = ssel.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object selectedObject : selection) {
-				doRemove(selectedObject);
-			}
+			selectedPlugins.forEachRemaining(this::doRemove);
 			setRedraw(true);
 			setBlockSelectionListeners(false);
 			table.setSelection(index < table.getItemCount() ? index : table.getItemCount() - 1);
@@ -544,14 +527,14 @@
 		}
 	}
 
-	private void doAdd(Object o) {
+	private void doAdd(IPluginModelBase o) {
 		fInternationalizeModelTable.removeModel(o);
 		fSelectedViewer.add(o);
 		fAvailableViewer.remove(o);
-		fSelected.put(o, null);
+		fSelected.add(o);
 	}
 
-	private void doRemove(Object o) {
+	private void doRemove(IPluginModelBase o) {
 		fInternationalizeModelTable.addModel(o);
 		fSelected.remove(o);
 		fSelectedViewer.remove(o);
@@ -565,17 +548,11 @@
 	}
 
 	private void handleRemoveAll() {
-		TableItem[] items = fSelectedViewer.getTable().getItems();
-
-		ArrayList<Object> data = new ArrayList<>();
-		for (TableItem item : items) {
-			data.add(item.getData());
-		}
+		List<IPluginModelBase> data = getModels(fSelectedViewer, IPluginModelBase.class);
 		if (!data.isEmpty()) {
-			Object[] datas = data.toArray();
 			setBlockSelectionListeners(true);
 			setRedraw(false);
-			for (Object dataObject : datas) {
+			for (IPluginModelBase dataObject : data) {
 				doRemove(dataObject);
 			}
 			setRedraw(true);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java
index 0848958..e1ab0c8 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java
@@ -75,8 +75,8 @@
 
 	private final IWizardContainer container;
 	private final String template;
-	private final List<?> plugins;
-	private final List<?> locales;
+	private final List<IPluginModelBase> plugins;
+	private final List<Locale> locales;
 	private final boolean overwriteWithoutAsking;
 	private IProgressMonitor monitor;
 
@@ -127,7 +127,8 @@
 		}
 	};
 
-	public NLSFragmentGenerator(String template, List<?> plugins, List<?> locales, IWizardContainer container, boolean overwriteWithoutAsking) {
+	public NLSFragmentGenerator(String template, List<IPluginModelBase> plugins, List<Locale> locales,
+			IWizardContainer container, boolean overwriteWithoutAsking) {
 		this.plugins = plugins;
 		this.locales = locales;
 		this.container = container;
@@ -170,16 +171,14 @@
 	 * @throws InvocationTargetException
 	 * @throws InterruptedException
 	 */
-	private void internationalizePlugins(List<?> plugins, List<?> locales, Map<String, Object> overwrites) throws CoreException, IOException, InvocationTargetException, InterruptedException {
+	private void internationalizePlugins(List<IPluginModelBase> plugins, List<Locale> locales,
+			Map<String, Object> overwrites)
+			throws CoreException, IOException, InvocationTargetException, InterruptedException {
 
 		Set<IProject> created = new HashSet<>();
 
-		for (Object pluginObject : plugins) {
-			IPluginModelBase plugin = (IPluginModelBase) pluginObject;
-
-			for (Object localeObject : locales) {
-				Locale locale = (Locale) localeObject;
-
+		for (IPluginModelBase plugin : plugins) {
+			for (Locale locale : locales) {
 				IProject project = getNLProject(plugin, locale);
 				if (created.contains(project) || overwriteWithoutAsking || !project.exists() || OVERWRITE == overwrites.get(project.getName())) {
 					if (!created.contains(project) && project.exists()) {
@@ -201,16 +200,14 @@
 
 	private Object OVERWRITE = new Object();
 
-	private Map<String, Object> promptForOverwrite(List<?> plugins, List<?> locales) {
+	private Map<String, Object> promptForOverwrite(List<IPluginModelBase> plugins, List<Locale> locales) {
 		Map<String, Object> overwrites = new HashMap<>();
 
 		if (overwriteWithoutAsking)
 			return overwrites;
 
-		for (Object name : plugins) {
-			IPluginModelBase plugin = (IPluginModelBase) name;
-			for (Object localeObject : locales) {
-				Locale locale = (Locale) localeObject;
+		for (IPluginModelBase plugin : plugins) {
+			for (Locale locale : locales) {
 				IProject project = getNLProject(plugin, locale);
 
 				if (project.exists() && !overwrites.containsKey(project.getName())) {
@@ -338,10 +335,10 @@
 			//Case 1a: External plug-in is a jar file
 			if (new File(installLocation).isFile()) {
 				try (ZipFile zf = new ZipFile(installLocation)) {
-					for (Enumeration<?> e = zf.entries(); e.hasMoreElements();) {
+					for (Enumeration<? extends ZipEntry> e = zf.entries(); e.hasMoreElements();) {
 						worked();
 
-						ZipEntry zfe = (ZipEntry) e.nextElement();
+						ZipEntry zfe = e.nextElement();
 						String name = zfe.getName();
 
 						String[] segments = name.split(SLASH);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/ComboViewerPart.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/ComboViewerPart.java
index e6c834c..49cb9c8 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/ComboViewerPart.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/ComboViewerPart.java
@@ -15,7 +15,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.parts;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.SWT;
@@ -84,16 +85,6 @@
 		refresh();
 	}
 
-	public void setItems(Collection<?> items) {
-		fObjects.clear();
-		Iterator<?> it = items.iterator();
-		while (it.hasNext()) {
-			Object o = it.next();
-			fObjects.add((o == null) ? NULL_OBJECT : o);
-		}
-		refresh();
-	}
-
 	public void select(Object item) {
 		if (item != null)
 			fComboViewer.setSelection(new StructuredSelection(item));
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/CompilersPreferencePage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/CompilersPreferencePage.java
index fa63184..2956205 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/CompilersPreferencePage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/CompilersPreferencePage.java
@@ -54,7 +54,7 @@
 	/**
 	 * Since {@link #applyData(Object)} can be called before createContents, store the data
 	 */
-	private Map<?, ?> fPageData = null;
+	private Map<String, Object> fPageData = null;
 
 	/**
 	 *
@@ -156,11 +156,12 @@
 	 * @see org.eclipse.jface.preference.PreferencePage#applyData(java.lang.Object)
 	 */
 	@Override
+	@SuppressWarnings("unchecked")
 	public void applyData(Object data) {
 		if (data instanceof Map) {
-			fPageData = (Map<?, ?>) data;
+			fPageData = (Map<String, Object>) data;
 			if (link != null && fPageData.containsKey(NO_LINK)) {
-				link.setVisible(!Boolean.TRUE.equals(((Map<?, ?>) data).get(NO_LINK)));
+				link.setVisible(!Boolean.TRUE.equals(((Map<String, Object>) data).get(NO_LINK)));
 			}
 			if (fBlock == null)
 				return;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java
index 19ade80..b6d0a3b 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java
@@ -447,13 +447,11 @@
 	 * fControlMap
 	 */
 	private void updateControls() {
-		Control control = null;
-		for (HashSet<?> controls : fControlMap.values()) {
+		for (Set<Control> controls : fControlMap.values()) {
 			if (controls == null) {
 				continue;
 			}
-			for (Object controlObject : controls) {
-				control = (Control) controlObject;
+			for (Control control : controls) {
 				if (control instanceof Combo) {
 					Combo combo = (Combo) control;
 					ControlData data = (ControlData) combo.getData();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/ProjectSelectionDialog.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/ProjectSelectionDialog.java
index 7109870..6e5d0a2 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/ProjectSelectionDialog.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/ProjectSelectionDialog.java
@@ -65,7 +65,7 @@
 
 	// the visual selection widget group
 	private TableViewer fTableViewer;
-	private Set<?> fProjectsWithSpecifics;
+	private Set<IJavaProject> fProjectsWithSpecifics;
 
 	// sizing constants
 	private final static int SIZING_SELECTION_WIDGET_HEIGHT = 250;
@@ -83,7 +83,7 @@
 	 * @param parentShell
 	 * @param projectsWithSpecifics
 	 */
-	public ProjectSelectionDialog(Shell parentShell, Set<?> projectsWithSpecifics) {
+	public ProjectSelectionDialog(Shell parentShell, Set<IJavaProject> projectsWithSpecifics) {
 		super(parentShell);
 		setTitle(PDEUIMessages.ProjectSelectionDialog_title);
 		setMessage(PDEUIMessages.ProjectSelectionDialog_message);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java
index 70c449d..dd15c4c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java
@@ -322,7 +322,7 @@
 	/**
 	 * Moved definitions (to be moved on apply)
 	 */
-	private Map<Object, Object> fMoved = new HashMap<>(1);
+	private Map<ITargetDefinition, IPath> fMoved = new HashMap<>(1);
 
 	/**
 	 * The chosen active target (will be loaded on apply)
@@ -657,7 +657,7 @@
 				fTargets.remove(original);
 
 				if (fMoved.containsKey(original)) {
-					Object moveLocation = fMoved.remove(original);
+					IPath moveLocation = fMoved.remove(original);
 					fMoved.put(newTarget, moveLocation);
 				}
 
@@ -733,7 +733,7 @@
 			IFile file = PDECore.getWorkspace().getRoot().getFile(newTargetLoc);
 			ti.setData(DATA_KEY_MOVED_LOCATION, file.getFullPath().toString());
 			IStructuredSelection selection = fTableViewer.getStructuredSelection();
-			fMoved.put(selection.getFirstElement(), wizard.getTargetFileLocation());
+			fMoved.put((ITargetDefinition) selection.getFirstElement(), wizard.getTargetFileLocation());
 			fTableViewer.refresh(true);
 		}
 	}
@@ -859,11 +859,11 @@
 		}
 
 		// Move the marked definitions to workspace
-		for (Entry<Object, Object> entry : fMoved.entrySet()) {
+		for (Entry<ITargetDefinition, IPath> entry : fMoved.entrySet()) {
 			try {
-				ITargetDefinition target = (ITargetDefinition) entry.getKey();
+				ITargetDefinition target = entry.getKey();
 				// IPath path = Path.fromPortableString((String) fMoved.get(target));
-				IFile targetFile = PDECore.getWorkspace().getRoot().getFile((IPath) entry.getValue());
+				IFile targetFile = PDECore.getWorkspace().getRoot().getFile(entry.getValue());
 
 				WorkspaceFileTargetHandle wrkspcTargetHandle = new WorkspaceFileTargetHandle(targetFile);
 				ITargetDefinition newTarget = service.newTarget();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/CompilersPropertyPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/CompilersPropertyPage.java
index 4fec3b6..876fc8f 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/CompilersPropertyPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/CompilersPropertyPage.java
@@ -17,6 +17,7 @@
 import static org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter;
 
 import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.pde.internal.ui.*;
@@ -37,7 +38,7 @@
 	/**
 	 * The data map passed when showing the page
 	 */
-	private HashMap<?, ?> fPageData = null;
+	private Map<String, Object> fPageData = null;
 
 	/**
 	 * The control block
@@ -141,9 +142,10 @@
 	}
 
 	@Override
+	@SuppressWarnings("unchecked")
 	public void applyData(Object data) {
-		if (data instanceof HashMap) {
-			fPageData = (HashMap<?, ?>) data;
+		if (data instanceof Map) {
+			fPageData = (Map<String, Object>) data;
 			if (fWorkspaceLink != null) {
 				fWorkspaceLink.setVisible(!Boolean.TRUE.equals(fPageData.get(CompilersPreferencePage.NO_LINK)));
 			}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/PluginSearchPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/PluginSearchPage.java
index 4f5afe5..4c6db16 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/PluginSearchPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/PluginSearchPage.java
@@ -180,8 +180,8 @@
 		return PluginSearchInput.ELEMENT_EXTENSION_POINT;
 	}
 
-	private HashSet<Object> getSelectedResources() {
-		HashSet<Object> result = new HashSet<>();
+	private Set<IResource> getSelectedResources() {
+		Set<IResource> result = new HashSet<>();
 		int scope = container.getSelectedScope();
 		if (scope == ISearchPageContainer.WORKSPACE_SCOPE)
 			return null;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewBinaryDependenciesOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewBinaryDependenciesOperation.java
index 5d2b278..0138cc4 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewBinaryDependenciesOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewBinaryDependenciesOperation.java
@@ -44,7 +44,7 @@
 	protected void findSecondaryDependencies(String[] secDeps, Set<String> ignorePkgs, Map<ExportPackageDescription, String> additionalDeps, IBundle bundle, boolean useRequireBundle, IProgressMonitor monitor) {
 		SubMonitor subMonitor = SubMonitor.convert(monitor, PDEUIMessages.AddNewDependenciesOperation_searchProject,
 				100);
-		Set<?> projectPkgs = PackageFinder.findPackagesInClassFiles(fClassFiles, subMonitor.split(75));
+		Set<String> projectPkgs = PackageFinder.findPackagesInClassFiles(fClassFiles, subMonitor.split(75));
 		PluginModelManager manager = PDECore.getDefault().getModelManager();
 		IProgressMonitor searchMonitor = subMonitor.split(25);
 		searchMonitor.beginTask("", secDeps.length); //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
index 8f747e2..7eb831a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
@@ -197,9 +197,9 @@
 		Set<String> usesPkgs = pkgsAndUses.get(pkgName);
 		usesPkgs.remove(pkgName);
 		StringBuilder buffer = null;
-		Iterator<?> it = usesPkgs.iterator();
+		Iterator<String> it = usesPkgs.iterator();
 		while (it.hasNext()) {
-			String usedPkgName = (String) it.next();
+			String usedPkgName = it.next();
 			if (usedPkgName.startsWith("java.")) { //$NON-NLS-1$
 				// we should not include java.* packages (bug 167968)
 				it.remove();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/GatherUnusedDependenciesOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/GatherUnusedDependenciesOperation.java
index f865c81..840007b 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/GatherUnusedDependenciesOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/GatherUnusedDependenciesOperation.java
@@ -59,7 +59,7 @@
 	public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
 
 		ImportPackageObject[] packages = null;
-		Collection<?> exportedPackages = null;
+		Collection<String> exportedPackages = null;
 		if (ClasspathUtilCore.hasBundleStructure(fModel)) {
 			IBundle bundle = ((IBundlePluginModelBase) fModel).getBundleModel().getBundle();
 			IManifestHeader header = bundle.getManifestHeader(Constants.IMPORT_PACKAGE);
@@ -148,7 +148,7 @@
 		return !provideJavaClasses(models, monitor);
 	}
 
-	private boolean isUnused(ImportPackageObject pkg, Collection<?> exportedPackages, IProgressMonitor monitor) {
+	private boolean isUnused(ImportPackageObject pkg, Collection<String> exportedPackages, IProgressMonitor monitor) {
 		if (exportedPackages != null && exportedPackages.contains(pkg.getValue())) {
 			return false;
 		}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
index c5b9a69..94408f2 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
@@ -610,7 +610,7 @@
 	 * @return bundle manifest dictionary or <code>null</code> if none
 	 * @throws IOException if unable to parse
 	 */
-	protected Map<?, ?> loadManifest(File bundleLocation) throws IOException {
+	protected Map<String, String> loadManifest(File bundleLocation) throws IOException {
 		ZipFile jarFile = null;
 		InputStream manifestStream = null;
 		String extension = new Path(bundleLocation.getName()).getFileExtension();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
index da49324..75ec2c6 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
@@ -109,7 +109,7 @@
 			return;
 		if (!fOpenPDEEditors.containsKey(project))
 			return;
-		ArrayList<?> list = fOpenPDEEditors.get(project);
+		List<PDEFormEditor> list = fOpenPDEEditors.get(project);
 		list.remove(editor);
 		if (list.isEmpty())
 			fOpenPDEEditors.remove(project);
@@ -143,11 +143,11 @@
 	}
 
 	private static PDEFormEditor getOpenEditor(IProject project, String editorId) {
-		ArrayList<?> list = fOpenPDEEditors.get(project);
+		List<PDEFormEditor> list = fOpenPDEEditors.get(project);
 		if (list == null)
 			return null;
 		for (int i = 0; i < list.size(); i++) {
-			PDEFormEditor editor = (PDEFormEditor) list.get(i);
+			PDEFormEditor editor = list.get(i);
 			if (editor.getEditorSite().getId().equals(editorId))
 				return editor;
 		}
@@ -167,7 +167,7 @@
 		// Get the file's project
 		IProject project = file.getProject();
 		// Check for open editors housed in the specified project
-		ArrayList<?> list = fOpenPDEEditors.get(project);
+		List<PDEFormEditor> list = fOpenPDEEditors.get(project);
 		// No open editors found
 		if (list == null) {
 			return null;
@@ -178,7 +178,7 @@
 		// Check all open editors
 		for (int i = 0; i < list.size(); i++) {
 			// Get the editor
-			PDEFormEditor editor = (PDEFormEditor) list.get(i);
+			PDEFormEditor editor = list.get(i);
 			// Check for the specified type
 			// Get the editor ID
 			String currentEditorID = editor.getEditorSite().getId();
@@ -227,9 +227,9 @@
 	public static IEditingModel getOpenModel(IDocument doc) {
 		Iterator<ArrayList<PDEFormEditor>> it = fOpenPDEEditors.values().iterator();
 		while (it.hasNext()) {
-			ArrayList<?> list = it.next();
+			List<PDEFormEditor> list = it.next();
 			for (int i = 0; i < list.size(); i++) {
-				PDEFormEditor e = (PDEFormEditor) list.get(i);
+				PDEFormEditor e = list.get(i);
 				IPluginModelBase model = (IPluginModelBase) e.getAggregateModel();
 				if (model instanceof IBundlePluginModelBase) {
 					IBundleModel bModel = ((IBundlePluginModelBase) model).getBundleModel();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/TemplateFileGenerator.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/TemplateFileGenerator.java
index 1799408..c8cee84 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/TemplateFileGenerator.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/TemplateFileGenerator.java
@@ -18,7 +18,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
-import java.util.zip.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jdt.core.*;
@@ -260,8 +261,8 @@
 		// Immidiate children
 		Map<String, ZipEntry> childZipEntries = new HashMap<>(); // "dir/" or "dir/file.java"
 
-		for (Enumeration<?> zipEntries = zipFile.entries(); zipEntries.hasMoreElements();) {
-			ZipEntry zipEntry = (ZipEntry) zipEntries.nextElement();
+		for (Enumeration<? extends ZipEntry> zipEntries = zipFile.entries(); zipEntries.hasMoreElements();) {
+			ZipEntry zipEntry = zipEntries.nextElement();
 			IPath entryPath = new Path(zipEntry.getName());
 			if (entryPath.segmentCount() <= pathLength) {
 				// ancestor or current directory
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java
index c3d2340..e50c367 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java
@@ -100,7 +100,7 @@
 			display = Display.getDefault();
 		IPluginModelBase[] models = externalModels.toArray(new IPluginModelBase[externalModels.size()]);
 		if (importType == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
-			Map<?, ?> importMap = getImportDescriptions(display.getActiveShell(), models);
+			Map<IBundleImporter, ScmUrlImportDescription[]> importMap = getImportDescriptions(display.getActiveShell(), models);
 			if (importMap != null) {
 				RepositoryImportWizard wizard = new RepositoryImportWizard(importMap);
 				WizardDialog dialog = new WizardDialog(display.getActiveShell(), wizard);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/BundleProjectConfigurator.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/BundleProjectConfigurator.java
index 775026f..c160541 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/BundleProjectConfigurator.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/BundleProjectConfigurator.java
@@ -88,7 +88,7 @@
 			CoreUtility.addNatureToProject(project, JavaCore.NATURE_ID, monitor);
 			IJavaProject javaProject = JavaCore.create(project);
 			Set<IClasspathEntry> classpath = new HashSet<>();
-			for (Entry<?, ?> entry : buildProperties.entrySet()) {
+			for (Entry<Object, Object> entry : buildProperties.entrySet()) {
 				String entryKey = (String)entry.getKey();
 				if (entryKey.startsWith("src.") || entryKey.startsWith(IBuildEntry.JAR_PREFIX)) { //$NON-NLS-1$
 					for (String token : ((String) entry.getValue()).split(",")) { //$NON-NLS-1$
@@ -146,7 +146,7 @@
 		}
 		try (InputStream stream = buildPropertiesFile.getContents()) {
 			buildProperties.load(stream);
-			for (Entry<?, ?> entry : buildProperties.entrySet()) {
+			for (Entry<Object, Object> entry : buildProperties.entrySet()) {
 				String entryKey = (String) entry.getKey();
 				if (entryKey.startsWith("src.") || entryKey.startsWith(IBuildEntry.JAR_PREFIX) || //$NON-NLS-1$
 						entryKey.startsWith("bin.") || entryKey.startsWith(IBuildEntry.OUTPUT_PREFIX)) { //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/IDefaultValueConsumer.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/IDefaultValueConsumer.java
index 032cbef..235975a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/IDefaultValueConsumer.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/IDefaultValueConsumer.java
@@ -25,7 +25,7 @@
 	 * Initializes the consumer with the values.
 	 * @param values
 	 */
-	void init(Dictionary<?, ?> values);
+	void init(Dictionary<String, String> values);
 
 	/**
 	 * Returns the default value for the given key
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/NewWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/NewWizard.java
index 35d2ada..6eb8f22 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/NewWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/NewWizard.java
@@ -23,7 +23,7 @@
 public class NewWizard extends Wizard implements INewWizard, IDefaultValueConsumer {
 	private org.eclipse.ui.IWorkbench workbench;
 	private org.eclipse.jface.viewers.IStructuredSelection selection;
-	private Dictionary<?, ?> defaultValues;
+	private Dictionary<String, String> defaultValues;
 
 	public NewWizard() {
 		super();
@@ -53,11 +53,11 @@
 	public final String getDefaultValue(String key) {
 		if (defaultValues == null)
 			return null;
-		return (String) defaultValues.get(key);
+		return defaultValues.get(key);
 	}
 
 	@Override
-	public final void init(Dictionary<?, ?> defaultValues) {
+	public final void init(Dictionary<String, String> defaultValues) {
 		this.defaultValues = defaultValues;
 	}
 }
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/WizardListSelectionPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/WizardListSelectionPage.java
index 1ca2ff5..18a570e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/WizardListSelectionPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/WizardListSelectionPage.java
@@ -114,9 +114,9 @@
 		setErrorMessage(null);
 		IStructuredSelection selection = event.getStructuredSelection();
 		WizardElement currentWizardSelection = null;
-		Iterator<?> iter = selection.iterator();
+		Iterator<WizardElement> iter = selection.iterator();
 		if (iter.hasNext())
-			currentWizardSelection = (WizardElement) iter.next();
+			currentWizardSelection = iter.next();
 		if (currentWizardSelection == null) {
 			setDescriptionText(""); //$NON-NLS-1$
 			setSelectedNode(null);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java
index b5520e1..ec1d716 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java
@@ -73,7 +73,7 @@
 	private IPluginModelBase fModel;
 	private Button fFilterCheck;
 	private IPluginExtensionPoint fCurrentPoint;
-	private HashSet<?> fAvailableImports;
+	private Set<String> fAvailableImports;
 	private IProject fProject;
 	private Label fTemplateLabel;
 	private ExtensionTreeSelectionPage fWizardsPage;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java
index d4af201..9ed0c53 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java
@@ -298,7 +298,7 @@
 		if (page.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
 			if (getMessageType() != ERROR && getMessageType() != WARNING) {
 				IPluginModelBase[] selected = getModelsToImport();
-				Set<?> available = page.repositoryModels;
+				Set<Object> available = page.repositoryModels;
 				for (int i = 0; i < selected.length; i++) {
 					if (!available.contains(selected[i])) {
 						setMessage(PDEUIMessages.BaseImportWizardSecondPage_0, WARNING);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java
index 325adb4..9a73dab 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java
@@ -16,7 +16,6 @@
 
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
-import java.util.List;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jdt.core.*;
@@ -132,8 +131,7 @@
 		}
 		File featureDir = new File(model.getInstallLocation());
 
-		importContent(featureDir, project.getFullPath(), FileSystemStructureProvider.INSTANCE, null,
-				subMonitor.split(1));
+		importContent(featureDir, project.getFullPath(), FileSystemStructureProvider.INSTANCE, subMonitor.split(1));
 		IFolder folder = project.getFolder("META-INF"); //$NON-NLS-1$
 		if (folder.exists()) {
 			folder.delete(true, null);
@@ -150,7 +148,8 @@
 		}
 	}
 
-	private void importContent(Object source, IPath destPath, IImportStructureProvider provider, List<?> filesToImport, IProgressMonitor monitor) throws CoreException {
+	private void importContent(Object source, IPath destPath, IImportStructureProvider provider,
+			IProgressMonitor monitor) throws CoreException {
 		IOverwriteQuery query = new IOverwriteQuery() {
 			@Override
 			public String queryOverwrite(String file) {
@@ -159,9 +158,6 @@
 		};
 		ImportOperation op = new ImportOperation(destPath, source, provider, query);
 		op.setCreateContainerStructure(false);
-		if (filesToImport != null) {
-			op.setFilesToImport(filesToImport);
-		}
 
 		try {
 			op.run(monitor);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java
index 50971b0..ca7495a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java
@@ -13,8 +13,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.imports;
 
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
@@ -127,7 +127,7 @@
 		}
 	}
 
-	private ArrayList<?> fPluginProjectList;
+	private List<IPluginModelBase> fPluginProjectList;
 	private FilteredCheckboxTree fFilteredTree;
 	private CachedCheckboxTreeViewer fCheckboxTreeViewer;
 
@@ -136,7 +136,7 @@
 	 * @param parent shell to create this dialog on top of
 	 * @param plugins list of IPluginModelBase objects that have conflicts
 	 */
-	public OverwriteProjectsSelectionDialog(Shell parent, ArrayList<?> plugins) {
+	public OverwriteProjectsSelectionDialog(Shell parent, List<IPluginModelBase> plugins) {
 		super(parent);
 		setTitle(PDEUIMessages.PluginImportOperation_OverwritePluginProjects);
 		Assert.isNotNull(plugins);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java
index 46f0985..300aae3 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java
@@ -40,7 +40,7 @@
 	/**
 	 * Map of import delegates to import descriptions as provided by the {@link BundleProjectService}
 	 */
-	private Map<?, ?> fImportMap;
+	private Map<IBundleImporter, ScmUrlImportDescription[]> fImportMap;
 
 	/**
 	 * Map of importer identifier to associated wizard import page
@@ -54,7 +54,7 @@
 	 *
 	 * @param importMap
 	 */
-	public RepositoryImportWizard(Map<?, ?> importMap) {
+	public RepositoryImportWizard(Map<IBundleImporter, ScmUrlImportDescription[]> importMap) {
 		IDialogSettings masterSettings = PDEPlugin.getDefault().getDialogSettings();
 		setDialogSettings(getSettingsSection(masterSettings));
 		setDefaultPageImageDescriptor(PDEPluginImages.DESC_PLUGIN_IMPORT_WIZ);
@@ -64,12 +64,12 @@
 
 	@Override
 	public void addPages() {
-		Iterator<?> iterator = fImportMap.entrySet().iterator();
+		Iterator<Entry<IBundleImporter, ScmUrlImportDescription[]>> iterator = fImportMap.entrySet().iterator();
 		while (iterator.hasNext()) {
-			Entry<?, ?> entry = (Entry<?, ?>) iterator.next();
-			final IBundleImporter importer = (IBundleImporter) entry.getKey();
+			Entry<IBundleImporter, ScmUrlImportDescription[]> entry = iterator.next();
+			final IBundleImporter importer = entry.getKey();
 			final String importerId = importer.getId();
-			ScmUrlImportDescription[] descriptions = (ScmUrlImportDescription[]) entry.getValue();
+			ScmUrlImportDescription[] descriptions = entry.getValue();
 			IScmUrlImportWizardPage page = fIdToPages.get(importerId);
 			if (page == null) {
 				try {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java
index 1444313..3bdb467 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java
@@ -412,7 +412,7 @@
 			value = "."; //$NON-NLS-1$
 		try {
 			ManifestElement[] elems = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, value);
-			HashMap<String, ArrayList<String>> map = new HashMap<>();
+			Map<String, List<String>> map = new HashMap<>();
 			for (ManifestElement elem : elems) {
 				ArrayList<String> filter = new ArrayList<>();
 				filter.add("*"); //$NON-NLS-1$
@@ -425,8 +425,7 @@
 		}
 	}
 
-	@SuppressWarnings({"unchecked", "rawtypes"})
-	public Set<String> getExports(IProject proj, Map libs) {
+	public Set<String> getExports(IProject proj, Map<String, List<String>> libs) {
 		IFile buildProperties = PDEProject.getBuildProperties(proj);
 		IBuild build = null;
 		if (buildProperties != null) {
@@ -437,15 +436,14 @@
 		return findPackages(proj, libs, build);
 	}
 
-	private Set<String> findPackages(IProject proj, Map<?, List<?>> libs, IBuild build) {
+	private Set<String> findPackages(IProject proj, Map<String, List<String>> libs, IBuild build) {
 		TreeSet<String> result = new TreeSet<>();
 		IJavaProject jp = JavaCore.create(proj);
-		Iterator<?> it = libs.entrySet().iterator();
+		Iterator<Map.Entry<String, List<String>>> it = libs.entrySet().iterator();
 		while (it.hasNext()) {
-			@SuppressWarnings("rawtypes")
-			Map.Entry entry = (Map.Entry) it.next();
-			String libName = entry.getKey().toString();
-			List<?> filter = (List<?>) entry.getValue();
+			Map.Entry<String, List<String>> entry = it.next();
+			String libName = entry.getKey();
+			List<String> filter = entry.getValue();
 			IBuildEntry libEntry = build.getEntry(SOURCE_PREFIX + libName);
 			if (libEntry != null) {
 				String[] tokens = libEntry.getTokens();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductDefinitonWizardPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductDefinitonWizardPage.java
index 48d6fd1..1ea11c9 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductDefinitonWizardPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductDefinitonWizardPage.java
@@ -46,7 +46,7 @@
 	private Text fProductName;
 	private Text fPluginText;
 	private Text fProductText;
-	private Set<?> fProductSet;
+	private Set<String> fProductSet;
 	private Combo fApplicationCombo;
 	private IProduct fProduct;
 
@@ -239,7 +239,7 @@
 		}
 	}
 
-	private Set<?> getProductNameSet() {
+	private Set<String> getProductNameSet() {
 		if (fProductSet == null)
 			fProductSet = TargetPlatformHelper.getProductNameSet();
 		return fProductSet;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionPage.java
index 2f1fc9a..00720c1 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionPage.java
@@ -31,7 +31,7 @@
 public class MoveTargetDefinitionPage extends PDEWizardNewFileCreationPage {
 
 	private static String EXTENSION = "target"; //$NON-NLS-1$
-	private Collection<?> fFilterList;
+	private Collection<IPath> fFilterList;
 
 	public MoveTargetDefinitionPage(String pageName, IStructuredSelection selection) {
 		super(pageName, selection);
@@ -52,7 +52,7 @@
 	 * @param filterFileList
 	 *            <code>Collection</code> of filenames as <code>IPath</code>
 	 */
-	protected void setFilter(Collection<?> filterFileList) {
+	protected void setFilter(Collection<IPath> filterFileList) {
 		fFilterList = filterFileList;
 	}
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionWizard.java
index ba9f87e..2369e32 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionWizard.java
@@ -13,12 +13,11 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.target;
 
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-
 import java.util.Collection;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.pde.internal.ui.PDEPluginImages;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
 
 /**
@@ -29,9 +28,9 @@
 
 	MoveTargetDefinitionPage fPage;
 	IPath fPath;
-	Collection<?> fFilter;
+	Collection<IPath> fFilter;
 
-	public MoveTargetDefinitionWizard(Collection<?> movedTargetDefinitions) {
+	public MoveTargetDefinitionWizard(Collection<IPath> movedTargetDefinitions) {
 		super();
 		fFilter = movedTargetDefinitions;
 		setDefaultPageImageDescriptor(PDEPluginImages.DESC_TARGET_WIZ);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java
index 1186552..9bb98c1 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertJarsAction.java
@@ -49,10 +49,10 @@
 	public void run(IAction action) {
 		Map<Manifest, Object> filesMap = new HashMap<>();
 		Set<IProject> projectSelection = new HashSet<>();
-		Iterator<?> i = selection.toList().iterator();
+		Iterator<IPackageFragmentRoot> i = selection.toList().iterator();
 		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 		while (i.hasNext()) {
-			IPackageFragmentRoot pfr = (IPackageFragmentRoot) i.next();
+			IPackageFragmentRoot pfr = i.next();
 			try {
 				projectSelection.add(pfr.getJavaProject().getProject());
 				IClasspathEntry rawClasspathEntry = pfr.getRawClasspathEntry();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectWizard.java
index 9f0bec7..0ca9b7c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectWizard.java
@@ -29,10 +29,10 @@
 	private static final String STORE_SECTION = "ConvertedProjectWizard"; //$NON-NLS-1$
 
 	private ConvertedProjectsPage mainPage;
-	private Vector<?> selected;
+	private Vector<IProject> selected;
 	private IProject[] fUnconverted;
 
-	public ConvertedProjectWizard(IProject[] projects, Vector<?> initialSelection) {
+	public ConvertedProjectWizard(IProject[] projects, Vector<IProject> initialSelection) {
 		setDefaultPageImageDescriptor(PDEPluginImages.DESC_CONVJPPRJ_WIZ);
 		setWindowTitle(PDEUIMessages.ConvertedProjectWizard_title);
 
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectsPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectsPage.java
index be831a6..6036139 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectsPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertedProjectsPage.java
@@ -70,7 +70,7 @@
 		}
 	}
 
-	public ConvertedProjectsPage(IProject[] projects, Vector<?> initialSelection) {
+	public ConvertedProjectsPage(IProject[] projects, Vector<IProject> initialSelection) {
 		super("convertedProjects"); //$NON-NLS-1$
 		setTitle(PDEUIMessages.ConvertedProjectWizard_title);
 		setDescription(PDEUIMessages.ConvertedProjectWizard_desc);
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java
index f0dde34..81ecb67 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsProcessor.java
@@ -16,8 +16,8 @@
 package org.eclipse.pde.internal.ui.wizards.tools;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
 import org.eclipse.ltk.core.refactoring.*;
@@ -63,10 +63,10 @@
 											// keys
 	protected boolean fAddDependencies = false;
 
-	ArrayList<?> fProjectList;
+	List<IProject> fProjectList;
 	private IProject fCurrentProject;
 
-	public OrganizeManifestsProcessor(ArrayList<?> projects) {
+	public OrganizeManifestsProcessor(List<IProject> projects) {
 		fProjectList = projects;
 	}
 
@@ -93,8 +93,8 @@
 		change.markAsSynthetic();
 
 		SubMonitor subMonitor = SubMonitor.convert(pm, PDEUIMessages.OrganizeManifestJob_taskName, fProjectList.size());
-		for (Iterator<?> i = fProjectList.iterator(); i.hasNext() && !pm.isCanceled();) {
-			CompositeChange projectChange = cleanProject((IProject) i.next(), subMonitor.split(1));
+		for (Iterator<IProject> i = fProjectList.iterator(); i.hasNext() && !pm.isCanceled();) {
+			CompositeChange projectChange = cleanProject(i.next(), subMonitor.split(1));
 			if (projectChange.getChildren().length > 0)
 				change.add(projectChange);
 		}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java
index 0c8223f..2679055 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java
@@ -56,7 +56,7 @@
 	private Button[] fTopLevelButtons; // used for setting page complete state
 
 	private OrganizeManifestsProcessor fProcessor;
-	private Set<?> fCustomProjects;
+	private Set<IProject> fCustomProjects;
 
 	private static String title = PDEUIMessages.OrganizeManifestsWizardPage_title;
 
@@ -101,11 +101,11 @@
 
 		String message;
 		if (fCustomProjects.size() == 1) {
-			message = NLS.bind(PDEUIMessages.OrganizeManifestsWizardPage_ProjectsUsingCustomBuildWarning, ((IProject) fCustomProjects.iterator().next()).getName());
+			message = NLS.bind(PDEUIMessages.OrganizeManifestsWizardPage_ProjectsUsingCustomBuildWarning, fCustomProjects.iterator().next().getName());
 		} else {
 			StringBuilder buf = new StringBuilder();
-			for (Iterator<?> iterator = fCustomProjects.iterator(); iterator.hasNext();) {
-				IProject project = (IProject) iterator.next();
+			for (Iterator<IProject> iterator = fCustomProjects.iterator(); iterator.hasNext();) {
+				IProject project = iterator.next();
 				buf.append(project.getName());
 				if (iterator.hasNext()) {
 					buf.append(',').append(' ');
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/AbstractTemplateSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/AbstractTemplateSection.java
index 23708c5..01c234c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/AbstractTemplateSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/AbstractTemplateSection.java
@@ -444,8 +444,8 @@
 		// Immidiate children
 		Map<String, ZipEntry> childZipEntries = new HashMap<>(); // "dir/" or "dir/file.java"
 
-		for (Enumeration<?> zipEntries = zipFile.entries(); zipEntries.hasMoreElements();) {
-			ZipEntry zipEntry = (ZipEntry) zipEntries.nextElement();
+		for (Enumeration<? extends ZipEntry> zipEntries = zipFile.entries(); zipEntries.hasMoreElements();) {
+			ZipEntry zipEntry = zipEntries.nextElement();
 			IPath entryPath = new Path(zipEntry.getName());
 			if (entryPath.segmentCount() <= pathLength) {
 				// ancestor or current directory
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java
index 390543b..07e0221 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java
@@ -14,6 +14,7 @@
 package org.eclipse.pde.ui.templates;
 
 import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.wizard.IWizard;
 import org.eclipse.jface.wizard.WizardPage;
@@ -33,7 +34,7 @@
 
 public class OptionTemplateWizardPage extends WizardPage {
 	private BaseOptionTemplateSection section;
-	private ArrayList<?> options;
+	private List<TemplateOption> options;
 	private String helpContextId;
 
 	/**
@@ -46,7 +47,8 @@
 	 * @param helpContextId
 	 * 			  the help context id
 	 */
-	public OptionTemplateWizardPage(BaseOptionTemplateSection section, ArrayList<?> options, String helpContextId) {
+	public OptionTemplateWizardPage(BaseOptionTemplateSection section, ArrayList<TemplateOption> options,
+			String helpContextId) {
 		super(""); //$NON-NLS-1$
 		this.section = section;
 		this.options = options;
@@ -69,7 +71,7 @@
 		container.setLayout(layout);
 
 		for (int i = 0; i < options.size(); i++) {
-			TemplateOption option = (TemplateOption) options.get(i);
+			TemplateOption option = options.get(i);
 			option.createControl(container, 2);
 		}
 		if (helpContextId != null)
diff --git a/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF b/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF
index f8778e6..8f76808 100644
--- a/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.ui.trace/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.trace;singleton:=true
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
 Bundle-Activator: org.eclipse.ui.trace.internal.TracingUIActivator
 Bundle-Vendor: %providerName
 Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/ui/org.eclipse.ui.trace/pom.xml b/ui/org.eclipse.ui.trace/pom.xml
index 654a445..41af7ce 100644
--- a/ui/org.eclipse.ui.trace/pom.xml
+++ b/ui/org.eclipse.ui.trace/pom.xml
@@ -18,6 +18,6 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.ui.trace</artifactId>
-  <version>1.2.100-SNAPSHOT</version>
+  <version>1.2.200-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java
index 861a8d6..0fe6598 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/datamodel/TracingComponent.java
@@ -113,7 +113,7 @@
 		// Iterate over each bundle and populate the list of {@link TracingComponentDebugOption} objects.
 		if (bundles.size() > 0) {
 			// get all debug options (this ensures that the disabled debug options are used when populating)
-			final Map<?, ?> currentDebugOptions = DebugOptionsHandler.getDebugOptions().getOptions();
+			final Map<String, String> currentDebugOptions = DebugOptionsHandler.getDebugOptions().getOptions();
 			final Iterator<Bundle> bundleIterator = bundles.iterator();
 			while (bundleIterator.hasNext()) {
 				Bundle bundle = bundleIterator.next();
@@ -126,7 +126,7 @@
 						// check to see if this debug option already exists in the cache
 						String key = (String) option.getKey();
 						String value = (String) option.getValue();
-						final String debugOptionValue = (String) currentDebugOptions.get(key);
+						final String debugOptionValue = currentDebugOptions.get(key);
 						String finalValue = null;
 						if (debugOptionValue != null) {
 							// This entry is already in the debug options - so use its value.
diff --git a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/providers/TracingComponentContentProvider.java b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/providers/TracingComponentContentProvider.java
index 0f670d2..3188bb2 100644
--- a/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/providers/TracingComponentContentProvider.java
+++ b/ui/org.eclipse.ui.trace/src/org/eclipse/ui/trace/internal/providers/TracingComponentContentProvider.java
@@ -43,6 +43,7 @@
 		return hasChildren;
 	}
 
+
 	@Override
 	public Object[] getElements(final Object inputElement) {
 
@@ -51,8 +52,9 @@
 			results = new TracingNode[] {(TracingNode) inputElement};
 		} else if (inputElement instanceof TracingNode[]) {
 			results = (TracingNode[]) inputElement;
-		} else if (inputElement instanceof Collection<?>) {
-			Collection<?> collectionElement = (Collection<?>) inputElement;
+		} else if (inputElement instanceof Collection) {
+			@SuppressWarnings("unchecked")
+			Collection<TracingNode> collectionElement = (Collection<TracingNode>) inputElement;
 			results = collectionElement.toArray(new TracingNode[collectionElement.size()]);
 		}
 		return results;