Bug 491265 - Generify org.eclipse.ui.intro* 

* Fix remaining warnings in o.e.ui.intro.universal.
* Enable more compiler warnings to make them visible in workbench.
* Add missing Override annotations.

Change-Id: Ide01e15c99735134ae47cf7754001b577d36c28b
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java
index a558fff..b8d33f6 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/contentdetect/ContentDetectorTest.java
@@ -108,8 +108,8 @@
 		assertFalse(detector.isNewContentAvailable());
 		// Make the first extension appear new
 		helper.saveExtensionCount(extensionCount - 1);
-		Set<?> contributors = helper.getContributors();
-		String firstContribution = (String) contributors.iterator().next();
+		Set<String> contributors = helper.getContributors();
+		String firstContribution = contributors.iterator().next();
 		String copyOfFirstContribution = "" + firstContribution;
 		contributors.remove(firstContribution);
 		helper.saveContributors(contributors);
diff --git a/org.eclipse.ui.intro.universal/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.ui.intro.universal/.settings/org.eclipse.jdt.core.prefs
index 940d8ee..9447df6 100644
--- a/org.eclipse.ui.intro.universal/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.ui.intro.universal/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,13 @@
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
@@ -10,53 +19,88 @@
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
 org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedImport=warning
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java
index 277f894..9a404f4 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java
@@ -178,6 +178,7 @@
 			return nameNoMnemonic;
 		}
 
+		@Override
 		public boolean equals(Object obj) {
 			if (obj == this)
 				return true;
@@ -190,6 +191,7 @@
 			return false;
 		}
 
+		@Override
 		public String toString() {
 			return name;
 		}
@@ -197,6 +199,7 @@
 
 	class TableContentProvider implements IStructuredContentProvider {
 
+		@Override
 		public Object[] getElements(Object inputElement) {
 			if (inputElement == ROOT_PAGE_TABLE)
 				return ROOT_PAGE_TABLE;
@@ -209,9 +212,11 @@
 			return new Object[0];
 		}
 
+		@Override
 		public void dispose() {
 		}
 
+		@Override
 		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
 		}
 	}
@@ -225,6 +230,7 @@
 			this.viewer = viewer;
 		}
 
+		@Override
 		public void dragStart(DragSourceEvent event) {
 			IStructuredSelection ssel = (IStructuredSelection) viewer.getSelection();
 			if (ssel.size() > 0) {
@@ -234,17 +240,19 @@
 			}
 		};
 
+		@Override
 		public void dragSetData(DragSourceEvent event) {
 			IStructuredSelection ssel = (IStructuredSelection) viewer.getSelection();
 			BaseData[] array = new BaseData[ssel.size()];
 			int i = 0;
-			for (Iterator iter = ssel.iterator(); iter.hasNext();) {
-				array[i++] = (BaseData) iter.next();
+			for (Iterator<BaseData> iter = ssel.iterator(); iter.hasNext();) {
+				array[i++] = iter.next();
 			}
 			event.data = array;
 			sel = array;
 		}
 
+		@Override
 		public void dragFinished(DragSourceEvent event) {
 			if (event.detail == DND.DROP_MOVE) {
 				GroupData gd = (GroupData) viewer.getInput();
@@ -268,6 +276,7 @@
 			super(viewer);
 		}
 
+		@Override
 		public boolean performDrop(Object data) {
 			BaseData target = (BaseData) getCurrentTarget();
 			int loc = getCurrentLocation();
@@ -311,6 +320,7 @@
 			return -1;
 		}
 
+		@Override
 		public boolean validateDrop(Object target, int operation, TransferData transferType) {
 			return ExtensionDataTransfer.getInstance().isSupportedType(transferType);
 		}
@@ -318,6 +328,7 @@
 
 	class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
 
+		@Override
 		public String getText(Object obj) {
 			if (obj instanceof RootPage) {
 				return ((RootPage) obj).getNameNoMnemonic();
@@ -339,6 +350,7 @@
 			return super.getText(obj);
 		}
 		
+		@Override
 		public Image getImage(Object obj) {
 			if (obj instanceof ExtensionData) {
 				ExtensionData ed = (ExtensionData) obj;
@@ -359,12 +371,14 @@
 			return null;
 		}
 
+		@Override
 		public Image getColumnImage(Object element, int columnIndex) {
 			if (columnIndex == 0)
 				return getImage(element);
 			return null;
 		}
 
+		@Override
 		public String getColumnText(Object element, int columnIndex) {
 			if (columnIndex == 1 || element instanceof IntroTheme || element instanceof RootPage)
 				return getText(element);
@@ -429,6 +443,7 @@
 		tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
 		tabFolder.addSelectionListener(new SelectionAdapter() {
 
+			@Override
 			public void widgetSelected(SelectionEvent e) {
 				TabItem[] selection = tabFolder.getSelection();
 				onTabChange(selection[0]);
@@ -445,6 +460,7 @@
 			serialize.setText(Messages.WelcomeCustomizationPreferencePage_serialize);
 			serialize.addSelectionListener(new SelectionAdapter() {
 
+				@Override
 				public void widgetSelected(SelectionEvent e) {
 					doSerializeState();
 				}
@@ -657,9 +673,9 @@
 	}
 
 	public void dispose() {
-		Iterator iter = themeList.iterator();
+		Iterator<IntroTheme> iter = themeList.iterator();
 		while (iter.hasNext()) {
-			((IntroTheme)iter.next()).dispose();
+			iter.next().dispose();
 		}
 		extensionImage.dispose();
 		ihighImage.dispose();
@@ -672,7 +688,7 @@
 	private void updateIntroThemeFromData() {
 		if (introThemeId != null) {
 			for (int i = 0; i < themeList.size(); i++) {
-				IntroTheme theme = (IntroTheme) themeList.get(i);
+				IntroTheme theme = themeList.get(i);
 				if (theme.getId().equals(introThemeId)) {
 					introTheme = theme;
 					break;
@@ -713,6 +729,7 @@
 	public boolean performOk() {
 		saveData();
 		BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
+			@Override
 			public void run() {
 				restartIntro();
 			}
@@ -781,7 +798,7 @@
 		for (int i = 0; i < introRootPages.size(); i++) {
 			if (i > 0)
 				sbuf.append(","); //$NON-NLS-1$
-			sbuf.append((String) introRootPages.get(i));
+			sbuf.append(introRootPages.get(i));
 		}
 		String key = pid + "_" + INTRO_ROOT_PAGES; //$NON-NLS-1$
 		uprefs.put(key, sbuf.toString());
@@ -858,6 +875,7 @@
 		themes.setContentProvider(contentProvider);
 		themes.setLabelProvider(labelProvider);
 		themes.addSelectionChangedListener(new ISelectionChangedListener() {
+			@Override
 			public void selectionChanged(SelectionChangedEvent e) {
 				Object sel = ((StructuredSelection) e.getSelection()).getFirstElement();
 				introTheme = (IntroTheme) sel;
@@ -875,6 +893,7 @@
 		themePreview.setLayoutData(gd);
 		themePreview.addPaintListener(new PaintListener() {
 
+			@Override
 			public void paintControl(PaintEvent e) {
 				if (introTheme == null)
 					return;
@@ -897,6 +916,7 @@
 		// Filter empty pages
 		ViewerFilter[] rootPageFilters = new ViewerFilter[] {
 			new ViewerFilter() {
+				@Override
 				public boolean select(Viewer viewer, Object parentElement,
 						Object element) {
 					if (element instanceof RootPage) {
@@ -914,6 +934,7 @@
 		rootPages.getControl().setLayoutData(gd);
 		rootPages.addCheckStateListener(new ICheckStateListener() {
 
+			@Override
 			public void checkStateChanged(CheckStateChangedEvent event) {
 				RootPage page = (RootPage) event.getElement();
 				boolean checked = event.getChecked();
@@ -976,7 +997,7 @@
 
 	private boolean getRootPageSelected(String id) {
 		for (int i = 0; i < introRootPages.size(); i++) {
-			String cid = (String) introRootPages.get(i);
+			String cid = introRootPages.get(i);
 			if (cid.equals(id))
 				return true;
 		}
@@ -994,6 +1015,7 @@
 		manager.setRemoveAllWhenShown(true);
 		manager.addMenuListener(new IMenuListener() {
 
+			@Override
 			public void menuAboutToShow(IMenuManager manager) {
 				fillPopupMenu(manager, viewer);
 			}
@@ -1021,10 +1043,12 @@
 				IUniversalIntroConstants.P_NAME });
 		viewer.setCellModifier(new ICellModifier() {
 
+			@Override
 			public boolean canModify(Object element, String property) {
 				return property.equals(IUniversalIntroConstants.P_IMPORTANCE);
 			}
 
+			@Override
 			public Object getValue(Object element, String property) {
 				if (element instanceof ExtensionData) {
 					ExtensionData ed = (ExtensionData) element;
@@ -1034,6 +1058,7 @@
 				return null;
 			}
 
+			@Override
 			public void modify(Object element, String property, Object value) {
 				Integer ivalue = (Integer) value;
 				TableItem item = (TableItem) element;
@@ -1055,6 +1080,7 @@
 		
 		manager.add(new Separator());
 		Action addSeparator = new Action(Messages.WelcomeCustomizationPreferencePage_addSeparator) {
+			@Override
 			public void run() {
 				doAddSeparator(viewer);
 			}
@@ -1066,12 +1092,14 @@
 		if (ssel.size() == 1 && viewer != available) {
 			Action upAction = new Action(Messages.WelcomeCustomizationPreferencePage_up) {
 
+				@Override
 				public void run() {
 					doMove(viewer, true);
 				}
 			};
 			Action downAction = new Action(Messages.WelcomeCustomizationPreferencePage_down) {
 
+				@Override
 				public void run() {
 					doMove(viewer, false);
 				}
@@ -1096,7 +1124,7 @@
 			
 			boolean addDeleteSeparator=false;
 			
-			for (Iterator iter=ssel.iterator(); iter.hasNext();) {
+			for (Iterator<?> iter=ssel.iterator(); iter.hasNext();) {
 				Object obj = iter.next();
 				if (obj instanceof SeparatorData)
 					addDeleteSeparator=true;
@@ -1107,6 +1135,7 @@
 			}
 			if (addDeleteSeparator) {
 				Action deleteSeparator = new Action(Messages.WelcomeCustomizationPreferencePage_removeSeparator) {
+					@Override
 					public void run() {
 						doRemoveSeparators(viewer);
 					}
@@ -1122,6 +1151,7 @@
 			return;
 		Action action = new Action(name) {
 
+			@Override
 			public void run() {
 				doMoveTo(source, target);
 			}
@@ -1154,8 +1184,8 @@
 	private void doRemoveSeparators(Viewer viewer) {
 		StructuredSelection ssel = ((StructuredSelection) viewer.getSelection());
 		GroupData gd = (GroupData) viewer.getInput();
-		for (Iterator iter=ssel.iterator(); iter.hasNext();) {
-			SeparatorData sdata = (SeparatorData)iter.next();
+		for (Iterator<SeparatorData> iter=ssel.iterator(); iter.hasNext();) {
+			SeparatorData sdata = iter.next();
 			gd.remove(sdata);
 		}
 		viewer.refresh();
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationDialog.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationDialog.java
index cf865ad..7d9f46e 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationDialog.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationDialog.java
@@ -36,6 +36,7 @@
 		this.pageId = pageId;
 	}
 	
+	@Override
 	protected Control createDialogArea(Composite parent) {
 		CustomizationContentsArea contents = getContentsArea();
 		contents.setShell(getShell());
@@ -46,6 +47,7 @@
 		return outerContainer;
 	}
 	
+	@Override
 	protected void okPressed() {
 		if (getContentsArea().performOk()) {
 		    getContentsArea().dispose();
@@ -53,12 +55,14 @@
 		super.okPressed();
 	}
 	
+	@Override
 	protected void cancelPressed() {
 	    getContentsArea().dispose();
 	    super.cancelPressed();
 	}
 
-    protected void configureShell(Shell newShell) {
+    @Override
+	protected void configureShell(Shell newShell) {
 	    super.configureShell(newShell);	
 		newShell.setText(Messages.WelcomeCustomizationPreferencePage_Customize); 
 	    newShell.setImage(ImageUtil.createImage("full/elcl16/configure.gif")); //$NON-NLS-1$);
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizeAction.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizeAction.java
index a57c3b8..fd2c69a 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizeAction.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizeAction.java
@@ -24,6 +24,7 @@
 		this.site = site;
 	}
 	
+	@Override
 	public void run() {
 		String pageId = IntroPlugin.getDefault().getIntroModelRoot().getCurrentPageId();
 		run(pageId);
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionData.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionData.java
index 413f8ce..75cba9e 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionData.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionData.java
@@ -109,10 +109,12 @@
 		return IMPORTANCE_TABLE[fImportance];
 	}
 
+	@Override
 	public String toString() {
 		return name != null ? name : id;
 	}
 
+	@Override
 	public void write(PrintWriter writer, String indent) {
 		writer.print(indent);
 		writer.print("<extension id=\"" + id + "\""); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionDataTransfer.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionDataTransfer.java
index af1b4d8..101178b 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionDataTransfer.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/ExtensionDataTransfer.java
@@ -31,14 +31,17 @@
 		return _instance;
 	}
 
+	@Override
 	protected String[] getTypeNames() {
 		return new String[] { MYTYPENAME };
 	}
 
+	@Override
 	protected int[] getTypeIds() {
 		return new int[] { MYTYPEID };
 	}
 
+	@Override
 	public void javaToNative(Object object, TransferData transferData) {
 		if (!checkMyType(object) || !isSupportedType(transferData)) {
 			DND.error(DND.ERROR_INVALID_DATA);
@@ -70,6 +73,7 @@
 		}
 	}
 
+	@Override
 	public Object nativeToJava(TransferData transferData) {
 		if (isSupportedType(transferData)) {
 			byte[] buffer = (byte[]) super.nativeToJava(transferData);
@@ -129,6 +133,7 @@
 		return true;
 	}
 
+	@Override
 	protected boolean validate(Object object) {
 		return checkMyType(object);
 	}
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IntroData.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IntroData.java
index 1a90e35..00b42aa 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IntroData.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IntroData.java
@@ -52,7 +52,7 @@
 	}
 	
 	public PageData getPage(String pageId) {
-		return (PageData)pages.get(pageId);
+		return pages.get(pageId);
 	}
 
 	public boolean isActive() {
@@ -132,7 +132,7 @@
 	    if (path.charAt(path.length()-1)!='@')
 	    	return;
 	    String pageId = path.substring(0, at);
-	    PageData pd = (PageData)pages.get(pageId);
+	    PageData pd = pages.get(pageId);
 	    if (pd==null) {
 	    	pd = new PageData(pageId);
 	    	pages.put(pageId, pd);
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/SeparatorData.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/SeparatorData.java
index 872841c..8e4eb27 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/SeparatorData.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/SeparatorData.java
@@ -21,6 +21,7 @@
 		this.id = id;
 	}
 
+	@Override
 	public void write(PrintWriter writer, String indent) {
 		writer.print(indent);
 		writer.print("<separator id=\""); //$NON-NLS-1$
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java
index 4e9b135..941eaa2 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroConfigurer.java
@@ -54,6 +54,7 @@
 		loadData();
 	}
 
+	@Override
 	public String getVariable(String variableName) {
 		if (variableName.equals(HIGH_CONTRAST)) {
 			boolean highContrast = ImageUtil.isHighContrast();
@@ -100,6 +101,7 @@
 	 * 
 	 * @see org.eclipse.ui.intro.config.IntroConfigurer#getMixinStyle(java.lang.String)
 	 */
+	@Override
 	public String getMixinStyle(String pageId, String extensionId) {
 		// if active product has a preference, use it
 		if (primaryIntroData != null) {
@@ -208,6 +210,7 @@
 		return value;
 	}
 
+	@Override
 	public IntroElement[] getGroupChildren(String pageId, String groupId) {
 		// root-like pages have more details on the page and action links
 		boolean rootLike = pageId.equals(ID_ROOT) || isStartPage(pageId) || pageId.equals(ID_STANDBY);
@@ -224,6 +227,7 @@
 		return new IntroElement[0];
 	}
 
+	@Override
 	public IntroElement[] getLaunchBarShortcuts() {
 		ArrayList<IntroElement> links = new ArrayList<>();
 		String ids = getVariable(VAR_INTRO_ROOT_PAGES);
@@ -240,7 +244,7 @@
 	}
 
 	private IntroElement[] getRootPageLinks(boolean standby) {
-		ArrayList<IntroElement> links = new ArrayList<IntroElement>();
+		ArrayList<IntroElement> links = new ArrayList<>();
 		String ids = getVariable(VAR_INTRO_ROOT_PAGES);
 		if (ids != null) {
 			StringTokenizer stok = new StringTokenizer(ids, ","); //$NON-NLS-1$
@@ -274,7 +278,7 @@
 	}
 
 	private IntroElement[] getNavLinks(String pageId) {
-		ArrayList<IntroElement> links = new ArrayList<IntroElement>();
+		ArrayList<IntroElement> links = new ArrayList<>();
 		String ids = getVariable(VAR_INTRO_ROOT_PAGES);		
 		/*
 		 * In high contrast mode the workbench link must be generated in the nav links 
@@ -500,7 +504,7 @@
 			}
 		}
 		// load all other installed (but not running) products' intro data
-		List<IntroData> result = new ArrayList<IntroData>();
+		List<IntroData> result = new ArrayList<>();
 		Properties[] prefs = ProductPreferences.getProductPreferences(false);
 		for (int i=0;i<prefs.length;++i) {
 			String key = UniversalIntroPlugin.PLUGIN_ID + '/' + VAR_INTRO_DATA;
@@ -519,7 +523,7 @@
 	}
 
 	private IntroElement[] getContent(String pageId, String groupId) {
-		List<IntroElement> result = new ArrayList<IntroElement>();
+		List<IntroElement> result = new ArrayList<>();
 		if (!ContentDetector.getNewContributors().isEmpty()) {
 			// Add a new content fallback anchor
 			IntroElement fallback = new IntroElement("anchor"); //$NON-NLS-1$
@@ -554,10 +558,9 @@
 			}
 		}
 
-		@SuppressWarnings("unchecked")
 		List<IntroElement>[] secondaryAnchors = secondaryAnchorsList.toArray(new List[secondaryAnchorsList.size()]);
 		if (sequenceResolver == null) {
-			sequenceResolver = new SequenceResolver<IntroElement>();
+			sequenceResolver = new SequenceResolver<>();
 		}
 		return sequenceResolver.getSequence(primaryAnchors, secondaryAnchors);
 	}
@@ -565,13 +568,14 @@
 	private List<IntroElement> getAnchors(IntroData data, String pageId, String groupId) {
 		PageData pdata = data.getPage(pageId);
 		if (pdata != null) {
-			List<IntroElement> anchors = new ArrayList<IntroElement>();
+			List<IntroElement> anchors = new ArrayList<>();
 			pdata.addAnchors(anchors, groupId);
 			return anchors;
 		}
 		return null;
 	}
 	
+	@Override
 	public String resolvePath(String extensionId, String path) {
 		boolean extensionRelativePath = false;
 		IPath ipath = new Path(path);
@@ -666,6 +670,7 @@
 		return false;
 	}
 
+	@Override
 	public void init(IIntroSite site, Map<String, String> themeProperties) {
 		super.init(site, themeProperties);
 		Action customizeAction = new CustomizeAction(site);
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroPlugin.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroPlugin.java
index 1794a44..bfc6a36 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroPlugin.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroPlugin.java
@@ -113,12 +113,8 @@
     }
 
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
-     */
-    public void start(BundleContext context) throws Exception {
+    @Override
+	public void start(BundleContext context) throws Exception {
         super.start(context);
         inst = this;
         if (Log.logInfo)
@@ -126,12 +122,8 @@
 
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
-     */
-    public void stop(BundleContext context) throws Exception {
+    @Override
+	public void stop(BundleContext context) throws Exception {
     	resetVolatileImageRegistry();
         super.stop(context);
     }
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java
index b5e45a8..4fb1621 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java
@@ -43,29 +43,35 @@
 		return contentsArea;
 	}
 
+	@Override
 	protected Control createContents(Composite parent) {
 		getContentsArea().setShell(getShell());
 		return getContentsArea().createContents(parent);
 	}
 
+	@Override
 	public void dispose() {
 		getContentsArea().dispose();
 		super.dispose();
 	}
 
+	@Override
 	public boolean performOk() {
 		return getContentsArea().performOk();
 	}
 
+	@Override
 	protected void performDefaults() {
 		getContentsArea().performDefaults();
 	}
 
 
+	@Override
 	public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
 			throws CoreException {
 	}
 
+	@Override
 	public void init(IWorkbench workbench) {
 	}
 	
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetectHelper.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetectHelper.java
index d5fe114..90bb6f6 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetectHelper.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetectHelper.java
@@ -77,11 +77,11 @@
 		return extensionCount.intValue();
 	}
 
-	public void saveContributors(Set contributors) {
+	public void saveContributors(Set<String> contributors) {
 		XMLMemento writeMemento = XMLMemento.createWriteRoot(ROOT);
-		for (Iterator iter = contributors.iterator(); iter.hasNext();) {
+		for (Iterator<String> iter = contributors.iterator(); iter.hasNext();) {
 			IMemento childMemento = writeMemento.createChild(CONTRIBUTOR);
-			childMemento.putString(NAME, (String)iter.next());
+			childMemento.putString(NAME, iter.next());
 		}
 		saveMemento(writeMemento, EXTENSION_NAMES_XML);
 	}
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetector.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetector.java
index 2cf1572..bd239ca 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetector.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetector.java
@@ -20,12 +20,13 @@
 
 public class ContentDetector extends IntroContentDetector {
 
-	private static Set newContributors;
+	private static Set<String> newContributors;
 	private static boolean detectorCalled = false;
 	
 	public ContentDetector() {
 	}
 
+	@Override
 	public boolean isNewContentAvailable() {		
 		try {
 			detectorCalled = true;
@@ -57,7 +58,7 @@
 		} catch (Exception e) { 
 			return false;
 		}
-		newContributors = new HashSet();
+		newContributors = new HashSet<>();
 		return false;
 	}
 	
@@ -65,7 +66,7 @@
 	 * @return The set of the ids of config extensions which are new since the last time
 	 * intro was opened. May be null if there are no contributors.
 	 */
-	public static Set getNewContributors() {
+	public static Set<String> getNewContributors() {
 		if (!detectorCalled) {
 		    detectorCalled = true;
 		    new ContentDetector().isNewContentAvailable();
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/BundleUtil.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/BundleUtil.java
index bb7f564..65a6f4c 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/BundleUtil.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/BundleUtil.java
@@ -62,7 +62,7 @@
      * @return
      */
     public static String getBundleHeader(Bundle bundle, String key) {
-        return (String) bundle.getHeaders().get(key);
+        return bundle.getHeaders().get(key);
     }
 
 
diff --git a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java
index c58f8a4..631d34c 100644
--- a/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java
+++ b/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java
@@ -46,11 +46,7 @@
 	private String propertyName;
 	private static final String WELCOME_CUSTOMIZATION_PREFERENCE_PAGE = "welcomeCustomization"; //$NON-NLS-1$
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.IExecutableExtensionFactory#create()
-	 */
+	@Override
 	public Object create() throws CoreException {
 		if (WELCOME_CUSTOMIZATION_PREFERENCE_PAGE.equals(id))
 			return configure(new WelcomeCustomizationPreferencePage());
@@ -66,12 +62,7 @@
 		return obj;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
-	 *      java.lang.String, java.lang.Object)
-	 */
+	@Override
 	public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
 			throws CoreException {
 		if (data instanceof String)