o.e.dltk.tcl.ui - Move to Java 8.

And modernize codebase accordingly.

Change-Id: Ib2bc98aceed7845a1151c8c299a0410802ce7448
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/.classpath b/tcl/plugins/org.eclipse.dltk.tcl.ui/.classpath
index 304e861..eca7bdb 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/.classpath
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/.settings/org.eclipse.jdt.core.prefs b/tcl/plugins/org.eclipse.dltk.tcl.ui/.settings/org.eclipse.jdt.core.prefs
index b079a10..5f9185c 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,112 @@
-#Fri Oct 22 23:45:34 CEST 2010
 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.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+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.source=1.5
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+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=warning
+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=ignore
+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=warning
+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.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.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=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
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -88,9 +185,12 @@
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
 org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/META-INF/MANIFEST.MF b/tcl/plugins/org.eclipse.dltk.tcl.ui/META-INF/MANIFEST.MF
index 6155fc6..05ce936 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/META-INF/MANIFEST.MF
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/META-INF/MANIFEST.MF
@@ -42,4 +42,4 @@
  org.eclipse.dltk.tcl.ui.manpages.dialogs,
  org.eclipse.dltk.tcl.ui.semantilhighlighting,
  org.eclipse.dltk.tcl.ui.text
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/DefaultTclSemanticHighlightingExtension.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/DefaultTclSemanticHighlightingExtension.java
index b094034..0ca7ab6 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/DefaultTclSemanticHighlightingExtension.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/DefaultTclSemanticHighlightingExtension.java
@@ -33,12 +33,11 @@
 import org.eclipse.dltk.ui.preferences.PreferencesMessages;
 import org.eclipse.emf.common.util.EList;
 
-public class DefaultTclSemanticHighlightingExtension implements
-		ISemanticHighlightingExtension {
+public class DefaultTclSemanticHighlightingExtension
+		implements ISemanticHighlightingExtension {
 
 	private SemanticHighlighting[] highlightings = new SemanticHighlighting[] {
-			new TclTextTools.SH(
-					TclPreferenceConstants.EDITOR_PROCEDURES_COLOR,
+			new TclTextTools.SH(TclPreferenceConstants.EDITOR_PROCEDURES_COLOR,
 					null,
 					PreferencesMessages.DLTKEditorPreferencePage_function_colors),
 			new TclTextTools.SH(TclPreferenceConstants.EDITOR_ARGUMENTS_COLOR,
@@ -90,16 +89,16 @@
 		if (node instanceof TypeDeclaration) {
 
 			TypeDeclaration t = (TypeDeclaration) node;
-			List children;
+			List<ASTNode> children;
 
 			// Handle base classes highlighting
 			ASTListNode s = t.getSuperClasses();
 
 			if (s != null && s.getChilds() != null) {
 				children = s.getChilds();
-				Iterator it = children.iterator();
+				Iterator<ASTNode> it = children.iterator();
 				while (it.hasNext()) {
-					ASTNode n = (ASTNode) it.next();
+					ASTNode n = it.next();
 
 					requestor.addPosition(n.sourceStart(), n.sourceEnd(),
 							HL_BASE_CLASSES);
@@ -114,19 +113,21 @@
 
 	}
 
+	@Override
 	public void processNode(ASTNode node,
 			ISemanticHighlightingRequestor requestor) {
 		calculatePositions(node, requestor);
 
 	}
 
+	@Override
 	public SemanticHighlighting[] getHighlightings() {
 		return highlightings;
 	}
 
 	/**
 	 * Perform strings highlighting.
-	 * 
+	 *
 	 * @since 2.0
 	 */
 	public void doOtherHighlighting(IModuleSource code,
@@ -136,7 +137,8 @@
 			return;
 		}
 		ModuleDeclaration moduleDeclaration = SourceParserUtil
-				.getModuleDeclaration((org.eclipse.dltk.core.ISourceModule) modelElement);
+				.getModuleDeclaration(
+						(org.eclipse.dltk.core.ISourceModule) modelElement);
 		if (moduleDeclaration instanceof TclModuleDeclaration) {
 			TclModuleDeclaration tclModule = (TclModuleDeclaration) moduleDeclaration;
 			TclModule module = tclModule.getTclModule();
@@ -168,9 +170,11 @@
 										}
 										// Add region from pos to pos2
 										semanticHighlightingRequestor
-												.addPosition(arg.getStart()
-														+ pos, arg.getStart()
-														+ pos2 + 1, HL_STRINGS);
+												.addPosition(
+														arg.getStart() + pos,
+														arg.getStart() + pos2
+																+ 1,
+														HL_STRINGS);
 										pos = value.indexOf('\"', pos2 + 1);
 									}
 								}
@@ -218,16 +222,18 @@
 												.get(i);
 										if (tclArgument instanceof StringArgument) {
 											semanticHighlightingRequestor
-													.addPosition(tclArgument
-															.getStart(),
+													.addPosition(
+															tclArgument
+																	.getStart(),
 															tclArgument
 																	.getEnd(),
 															HL_STRINGS);
 										}
 										if (tclArgument instanceof VariableReference) {
 											semanticHighlightingRequestor
-													.addPosition(tclArgument
-															.getStart(),
+													.addPosition(
+															tclArgument
+																	.getStart(),
 															tclArgument
 																	.getEnd(),
 															HL_VARIABLES);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableBlock.java
index ce78544..fce4d5f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableBlock.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009 xored software, Inc.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -44,10 +44,11 @@
 /**
  * Control used to edit the environment variables associated with a Interpreter
  * install
+ * 
  * @since 2.0
  */
-public class GlobalVariableBlock implements SelectionListener,
-		ISelectionChangedListener {
+public class GlobalVariableBlock
+		implements SelectionListener, ISelectionChangedListener {
 
 	private static final String NAME_LABEL = TclInterpreterMessages.GlobalVariableBlock_Name;
 	private static final String VALUE_LABEL = TclInterpreterMessages.GlobalVariableBlock_Value;
@@ -67,7 +68,7 @@
 
 	/**
 	 * Creates and returns the source lookup control.
-	 * 
+	 *
 	 * @param parent
 	 *            the parent widget of this control
 	 */
@@ -109,7 +110,7 @@
 
 	/**
 	 * Creates and returns a button
-	 * 
+	 *
 	 * @param parent
 	 *            parent widget
 	 * @param label
@@ -141,11 +142,13 @@
 		updateDialogStatus(status);
 	}
 
+	@Override
 	public void widgetSelected(SelectionEvent e) {
 		Object source = e.getSource();
 		if (source == fRemoveButton) {
-			fContentProvider.remove(((IStructuredSelection) fVariablesViewer
-					.getSelection()).toList());
+			fContentProvider.remove(
+					((IStructuredSelection) fVariablesViewer.getSelection())
+							.toList());
 		} else if (source == fAddButton) {
 			handleAdd();
 		} else if (source == fEditButton) {
@@ -160,8 +163,7 @@
 		if (var == null) {
 			return;
 		}
-		MultipleInputDialog dialog = new MultipleInputDialog(
-				fDialog.getShell(),
+		MultipleInputDialog dialog = new MultipleInputDialog(fDialog.getShell(),
 				TclInterpreterMessages.GlobalVariableBlock_EditTitle);
 		dialog.addTextField(NAME_LABEL, var.getName(), false);
 		dialog.addVariablesField(VALUE_LABEL, var.getValue(), true);
@@ -185,6 +187,7 @@
 		}
 	}
 
+	@Override
 	public void widgetDefaultSelected(SelectionEvent e) {
 	}
 
@@ -192,16 +195,15 @@
 		GlobalVariableEntry newVar = add();
 		if (newVar != null) {
 			fContentProvider.replaceVariable(newVar, null);
-			fVariablesViewer
-					.setSelection(new StructuredSelection(newVar), true);
+			fVariablesViewer.setSelection(new StructuredSelection(newVar),
+					true);
 			fVariablesViewer.refresh();
 			update();
 		}
 	}
 
 	private GlobalVariableEntry add() {
-		MultipleInputDialog dialog = new MultipleInputDialog(
-				fDialog.getShell(),
+		MultipleInputDialog dialog = new MultipleInputDialog(fDialog.getShell(),
 				TclInterpreterMessages.GlobalVariableBlock_AddTitle);
 		dialog.addTextField(NAME_LABEL, null, false);
 		dialog.addVariablesField(VALUE_LABEL, null, true);
@@ -220,6 +222,7 @@
 		return null;
 	}
 
+	@Override
 	public void selectionChanged(SelectionChangedEvent event) {
 		updateButtons();
 	}
@@ -235,20 +238,20 @@
 	}
 
 	public void setValues(final EMap<String, VariableValue> vars) {
-		List<GlobalVariableEntry> list = new ArrayList<GlobalVariableEntry>();
+		List<GlobalVariableEntry> list = new ArrayList<>();
 		for (Map.Entry<String, VariableValue> entry : vars.entrySet()) {
 			if (entry.getValue() != null) {
-				list.add(new GlobalVariableEntry(entry.getKey(), entry
-						.getValue().getValue()));
+				list.add(new GlobalVariableEntry(entry.getKey(),
+						entry.getValue().getValue()));
 			}
 		}
-		fContentProvider.setVariables(list.toArray(new GlobalVariableEntry[list
-				.size()]));
+		fContentProvider.setVariables(
+				list.toArray(new GlobalVariableEntry[list.size()]));
 		update();
 	}
 
 	public EMap<String, VariableValue> getValues() {
-		EMap<String, VariableValue> map = new BasicEMap<String, VariableValue>();
+		EMap<String, VariableValue> map = new BasicEMap<>();
 		for (GlobalVariableEntry var : fContentProvider.getVariables()) {
 			VariableValue value = TclPackagesFactory.eINSTANCE
 					.createVariableValue();
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableContentProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableContentProvider.java
index 3563b68..8622cef 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableContentProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/GlobalVariableContentProvider.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -31,13 +31,16 @@
 
 	private GlobalVariableEntry[] fVariables = new GlobalVariableEntry[0];
 
+	@Override
 	public void dispose() {
 	}
 
+	@Override
 	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
 		fViewer = viewer;
 	}
 
+	@Override
 	public Object[] getElements(Object inputElement) {
 		return fVariables;
 	}
@@ -59,7 +62,7 @@
 	 * Remove the libraries contained in the given selection.
 	 */
 	public void remove(Collection<?> selection) {
-		List<GlobalVariableEntry> newVars = new ArrayList<GlobalVariableEntry>();
+		List<GlobalVariableEntry> newVars = new ArrayList<>();
 		for (int i = 0; i < fVariables.length; i++) {
 			newVars.add(fVariables[i]);
 		}
@@ -76,7 +79,7 @@
 	 * Attempts to add the given variable. Returns whether the variable was
 	 * added or not (as when the user answers not to overwrite an existing
 	 * variable).
-	 * 
+	 *
 	 * @param variable
 	 *            the variable to add
 	 * @param oldVariable
@@ -86,19 +89,18 @@
 	public boolean replaceVariable(GlobalVariableEntry variable,
 			GlobalVariableEntry oldVariable) {
 		String name = variable.getName();
-		List<GlobalVariableEntry> newVars = new ArrayList<GlobalVariableEntry>();
+		List<GlobalVariableEntry> newVars = new ArrayList<>();
 		newVars.addAll(Arrays.asList(fVariables));
-		for (Iterator<GlobalVariableEntry> i = newVars.iterator(); i.hasNext();) {
+		for (Iterator<GlobalVariableEntry> i = newVars.iterator(); i
+				.hasNext();) {
 			GlobalVariableEntry existingVariable = i.next();
 			if (existingVariable.getName().equals(name)) {
-				boolean overWrite = MessageDialog
-						.openQuestion(
-								fViewer.getControl().getShell(),
-								TclInterpreterMessages.GlobalVariableContentProvider_overwriteTitle,
-								NLS
-										.bind(
-												TclInterpreterMessages.GlobalVariableContentProvider_overwriteMessage,
-												name));
+				boolean overWrite = MessageDialog.openQuestion(
+						fViewer.getControl().getShell(),
+						TclInterpreterMessages.GlobalVariableContentProvider_overwriteTitle,
+						NLS.bind(
+								TclInterpreterMessages.GlobalVariableContentProvider_overwriteMessage,
+								name));
 				if (!overWrite) {
 					return false;
 				}
@@ -114,14 +116,17 @@
 		return true;
 	}
 
+	@Override
 	public Object[] getChildren(Object parentElement) {
 		return null;
 	}
 
+	@Override
 	public Object getParent(Object element) {
 		return null;
 	}
 
+	@Override
 	public boolean hasChildren(Object element) {
 		return false;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/PackagesSourcesHover.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/PackagesSourcesHover.java
index 3700afe..6747fd3 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/PackagesSourcesHover.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/PackagesSourcesHover.java
@@ -65,8 +65,9 @@
 		for (TclSourceEntry entry : info.getSourced()) {
 			if (entry.getStart() <= hoverRegion.getOffset()
 					&& hoverRegion.getOffset() <= entry.getEnd()) {
-				final String hover = describe(entry, moduleInfo
-						.getSourceCorrections(), "Source information:");
+				final String hover = describe(entry,
+						moduleInfo.getSourceCorrections(),
+						"Source information:");
 				if (hover != null) {
 					return hover;
 				}
@@ -75,8 +76,9 @@
 		for (TclSourceEntry entry : info.getRequired()) {
 			if (entry.getStart() <= hoverRegion.getOffset()
 					&& hoverRegion.getOffset() <= entry.getEnd()) {
-				final String hover = describe(entry, moduleInfo
-						.getPackageCorrections(), "Require information:");
+				final String hover = describe(entry,
+						moduleInfo.getPackageCorrections(),
+						"Require information:");
 				if (hover != null) {
 					return null;
 				}
@@ -92,8 +94,8 @@
 		boolean added = false;
 		for (UserCorrection userCorrection : corrections) {
 			if (userCorrection.getOriginalValue().equals(entry.getValue())) {
-				List<String> userValue = new ArrayList<String>(userCorrection
-						.getUserValue());
+				List<String> userValue = new ArrayList<>(
+						userCorrection.getUserValue());
 				Collections.sort(userValue);
 				buffer.append("<ul>"); //$NON-NLS-1$
 				for (String value : userValue) {
@@ -140,8 +142,8 @@
 
 	private TclModuleInfo loadModuleInfo(ISourceModule sourceModule) {
 		final List<TclModuleInfo> projectModules = TclPackagesManager
-				.getProjectModules(sourceModule.getScriptProject()
-						.getElementName());
+				.getProjectModules(
+						sourceModule.getScriptProject().getElementName());
 		final String handle = sourceModule.getHandleIdentifier();
 		for (TclModuleInfo tclModuleInfo : projectModules) {
 			if (tclModuleInfo.getHandle().equals(handle)) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclCodeTemplateArea.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclCodeTemplateArea.java
index ed06076..cb2d287 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclCodeTemplateArea.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclCodeTemplateArea.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -19,23 +19,17 @@
 	private static final String PREF_ID = "org.eclipse.dltk.tcl.preferences.code.templates"; //$NON-NLS-1$
 	private static final String PROP_ID = "org.eclipse.dltk.tcl.propertyPage.CodeTemplatePage"; //$NON-NLS-1$
 
-	/*
-	 * @see ICodeTemplateArea#getCodeTemplateAccess()
-	 */
+	@Override
 	public ICodeTemplateAccess getTemplateAccess() {
 		return TclUI.getDefault().getCodeTemplateAccess();
 	}
 
-	/*
-	 * @see ICodeTemplateArea#getCodeTemplatePreferencePageId()
-	 */
+	@Override
 	public String getTemplatePreferencePageId() {
 		return PREF_ID;
 	}
 
-	/*
-	 * @see ICodeTemplateArea#getCodeTemplatePropertyPageId()
-	 */
+	@Override
 	public String getTemplatePropertyPageId() {
 		return PROP_ID;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclScriptFileConfigurator.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclScriptFileConfigurator.java
index 93d438d..7e8832b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclScriptFileConfigurator.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclScriptFileConfigurator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -19,6 +19,7 @@
 
 public class TclScriptFileConfigurator implements IScriptFileConfigurator {
 
+	@Override
 	public void configure(IFile file) throws CoreException {
 		final String value = file.getPersistentProperty(IDE.EDITOR_KEY);
 		if (value == null) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclSemanticPositionUpdater.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclSemanticPositionUpdater.java
index fe760fe..c0a09d8 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclSemanticPositionUpdater.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclSemanticPositionUpdater.java
@@ -22,8 +22,9 @@
 		this.extensions = extensions;
 	}
 
+	@Override
 	public SemanticHighlighting[] getSemanticHighlightings() {
-		List<SemanticHighlighting> highlightings = new ArrayList<SemanticHighlighting>();
+		List<SemanticHighlighting> highlightings = new ArrayList<>();
 		for (int i = 0; i < extensions.length; i++) {
 			SemanticHighlighting[] hl = extensions[i].getHighlightings();
 			if (hl != null) {
@@ -38,6 +39,7 @@
 		return ret;
 	}
 
+	@Override
 	protected String getNature() {
 		return TclNature.NATURE_ID;
 	}
@@ -48,6 +50,7 @@
 		if (declaration != null) {
 			declaration.traverse(new ASTVisitor() {
 
+				@Override
 				public boolean visitGeneral(ASTNode node) throws Exception {
 					for (int i = 0; i < extensions.length; i++) {
 						extensions[i].processNode(node,
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUI.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUI.java
index 6956a34..5623788 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUI.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUI.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -83,7 +83,7 @@
 	/**
 	 * Returns an image descriptor for the image file at the given plug-in
 	 * relative path.
-	 * 
+	 *
 	 * @param path
 	 *            the path
 	 * @return the image descriptor
@@ -105,10 +105,8 @@
 	}
 
 	public static void error(String message) {
-		plugin.getLog()
-				.log(
-						new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK,
-								message, null));
+		plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK,
+				message, null));
 	}
 
 	public static void error(Throwable t) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUILanguageToolkit.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUILanguageToolkit.java
index f0236f2..9f6d0bc 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUILanguageToolkit.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUILanguageToolkit.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui;
 
@@ -47,6 +46,7 @@
 	}
 
 	private static class TclScriptElementLabels extends ScriptElementLabels {
+		@Override
 		public void getElementLabel(IModelElement element, long flags,
 				StringBuffer buf) {
 			StringBuffer buffer = new StringBuffer(60);
@@ -64,17 +64,18 @@
 		protected void getImportContainerLabel(IModelElement element,
 				long flags, StringBuffer buf) {
 			IImportContainer container = (IImportContainer) element;
-			if (TclConstants.SOURCE_CONTAINER.equals(container
-					.getContainerName())) {
+			if (TclConstants.SOURCE_CONTAINER
+					.equals(container.getContainerName())) {
 				buf.append("sourced files");
-			} else if (TclConstants.REQUIRE_CONTAINER.equals(container
-					.getContainerName())) {
+			} else if (TclConstants.REQUIRE_CONTAINER
+					.equals(container.getContainerName())) {
 				buf.append("required packages");
 			} else {
 				super.getImportContainerLabel(element, flags, buf);
 			}
 		}
 
+		@Override
 		public void getScriptFolderLabel(IProjectFragment pack, long flags,
 				StringBuffer buf) {
 			if (pack instanceof TclPackageFragment
@@ -87,6 +88,7 @@
 			super.getScriptFolderLabel(pack, flags, buf);
 		}
 
+		@Override
 		public void getProjectFragmentLabel(IProjectFragment root, long flags,
 				StringBuffer buf) {
 			if (root instanceof TclPackageFragment) {
@@ -100,6 +102,7 @@
 			super.getProjectFragmentLabel(root, flags, buf);
 		};
 
+		@Override
 		protected void getScriptFolderLabel(IScriptFolder folder, long flags,
 				StringBuffer buf) {
 			// if( folder instanceof PodSourcesFolder ) {
@@ -145,6 +148,7 @@
 			}
 		}
 
+		@Override
 		protected void getScriptFolderLabel(IScriptFolder folder,
 				StringBuffer buf) {
 			if (folder instanceof TclPackageElement
@@ -156,6 +160,7 @@
 			buf.append(name);
 		}
 
+		@Override
 		protected void getSourceModule(ISourceModule module, long flags,
 				StringBuffer buf) {
 			if (getFlag(flags, CU_QUALIFIED)) {
@@ -169,25 +174,29 @@
 			buf.append(module.getElementName());
 
 			if (getFlag(flags, CU_POST_QUALIFIED)) {
-				if ((!(module instanceof TclPackageSourceModule || module instanceof TclSourcesSourceModule))) {
+				if ((!(module instanceof TclPackageSourceModule
+						|| module instanceof TclSourcesSourceModule))) {
 					buf.append(CONCAT_STRING);
 				}
-				getScriptFolderLabel((IScriptFolder) module.getParent(), flags
-						& QUALIFIER_FLAGS, buf);
+				getScriptFolderLabel((IScriptFolder) module.getParent(),
+						flags & QUALIFIER_FLAGS, buf);
 			}
 		};
 	};
 
 	private static TclScriptElementLabels sInstance = new TclScriptElementLabels();
 
+	@Override
 	public ScriptElementLabels getScriptElementLabels() {
 		return sInstance;
 	}
 
+	@Override
 	public IPreferenceStore getPreferenceStore() {
 		return TclUI.getDefault().getPreferenceStore();
 	}
 
+	@Override
 	public IDLTKLanguageToolkit getCoreToolkit() {
 		return TclLanguageToolkit.getDefault();
 	}
@@ -196,33 +205,40 @@
 		return TclUI.getDefault().getDialogSettings();
 	}
 
+	@Override
 	public String getPartitioningId() {
 		return TclConstants.TCL_PARTITIONING;
 	}
 
+	@Override
 	public String getEditorId(Object inputElement) {
 		return "org.eclipse.dltk.tcl.ui.editor.TclEditor"; //$NON-NLS-1$
 	}
 
+	@Override
 	public String getInterpreterContainerId() {
 		return "org.eclipse.dltk.tcl.launching.INTERPRETER_CONTAINER"; //$NON-NLS-1$
 	}
 
+	@Override
 	public ScriptUILabelProvider createScriptUILabelProvider() {
 		return null;
 	}
 
+	@Override
 	public boolean getProvideMembers(ISourceModule element) {
 		return true;
 	}
 
+	@Override
 	public ScriptTextTools getTextTools() {
 		return TclUI.getDefault().internalgetTextTools();
 	}
 
+	@Override
 	public ScriptSourceViewerConfiguration createSourceViewerConfiguration() {
-		return new SimpleTclSourceViewerConfiguration(getTextTools()
-				.getColorManager(), getPreferenceStore(), null,
+		return new SimpleTclSourceViewerConfiguration(
+				getTextTools().getColorManager(), getPreferenceStore(), null,
 				getPartitioningId(), false);
 	}
 
@@ -238,14 +254,17 @@
 			"org.eclipse.dltk.tcl.ui.assistance" //$NON-NLS-1$
 	};
 
+	@Override
 	public String getInterpreterPreferencePage() {
 		return INTERPRETERS_PREFERENCE_PAGE_ID;
 	}
 
+	@Override
 	public String getDebugPreferencePage() {
 		return DEBUG_PREFERENCE_PAGE_ID;
 	}
 
+	@Override
 	public String[] getEditorPreferencePages() {
 		return EDITOR_PREFERENCE_PAGES_IDS;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUIPreferenceInitializer.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUIPreferenceInitializer.java
index d7a6742..23667cc 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUIPreferenceInitializer.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/TclUIPreferenceInitializer.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui;
 
@@ -18,17 +17,17 @@
 
 public class TclUIPreferenceInitializer extends AbstractPreferenceInitializer {
 
+	@Override
 	public void initializeDefaultPreferences() {
 		IPreferenceStore store = TclUI.getDefault().getPreferenceStore();
 
 		EditorsUI.useAnnotationsPreferencePage(store);
 		EditorsUI.useQuickDiffPreferencePage(store);
 		TclPreferenceConstants.initializeDefaultValues(store);
-		SemanticHighlightingUtils.initializeDefaultValues(store, TclUI
-				.getDefault().getTextTools().getSemanticHighlightings());
-		store
-				.setDefault(TclPreferenceConstants.FORMATTER_ID,
-						Util.EMPTY_STRING);
+		SemanticHighlightingUtils.initializeDefaultValues(store,
+				TclUI.getDefault().getTextTools().getSemanticHighlightings());
+		store.setDefault(TclPreferenceConstants.FORMATTER_ID,
+				Util.EMPTY_STRING);
 	}
 
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/RemoveSourceAssociation.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/RemoveSourceAssociation.java
index f507a76..e5f14af 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/RemoveSourceAssociation.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/RemoveSourceAssociation.java
@@ -23,12 +23,15 @@
 	public RemoveSourceAssociation() {
 	}
 
+	@Override
 	public void dispose() {
 	}
 
+	@Override
 	public void init(IWorkbenchWindow window) {
 	}
 
+	@Override
 	public void run(IAction action) {
 		if (selection == null) {
 			return;
@@ -44,6 +47,7 @@
 		}
 	}
 
+	@Override
 	public void selectionChanged(IAction action, ISelection selection) {
 		if (selection != null && selection instanceof IStructuredSelection) {
 			this.selection = (IStructuredSelection) selection;
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenMethodAction.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenMethodAction.java
index f5139c8..1062ab9 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenMethodAction.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenMethodAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -17,6 +17,7 @@
 
 public class TclOpenMethodAction extends OpenMethodAction {
 
+	@Override
 	protected IDLTKUILanguageToolkit getUILanguageToolkit() {
 		return TclUILanguageToolkit.getInstance();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeAction.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeAction.java
index 09b9a50..bb1dc47 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeAction.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeAction.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.actions;
 
@@ -14,22 +13,27 @@
 import org.eclipse.dltk.ui.actions.OpenTypeAction;
 
 public class TclOpenTypeAction extends OpenTypeAction {
+	@Override
 	protected IDLTKUILanguageToolkit getUILanguageToolkit() {
 		return TclUILanguageToolkit.getInstance();
 	}
 
+	@Override
 	protected String getOpenTypeErrorMessage() {
 		return "An exception occurred while opening the namespace/class.";
 	}
 
+	@Override
 	protected String getOpenTypeErrorTitle() {
 		return "Open Namespace/Class";
 	}
 
+	@Override
 	protected String getOpenTypeDialogMessage() {
 		return "&Select a namespace/class to open (? = any character, * = any String, TZ = TimeZone):";
 	}
 
+	@Override
 	protected String getOpenTypeDialogTitle() {
 		return "Open Namespace/Class";
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeInHierarchyAction.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeInHierarchyAction.java
index f3a8e36..23abfdb 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeInHierarchyAction.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/actions/TclOpenTypeInHierarchyAction.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.actions;
 
@@ -14,6 +13,7 @@
 import org.eclipse.dltk.ui.actions.OpenTypeInHierarchyAction;
 
 public class TclOpenTypeInHierarchyAction extends OpenTypeInHierarchyAction {
+	@Override
 	protected IDLTKUILanguageToolkit getLanguageToolkit() {
 		return TclUILanguageToolkit.getInstance();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclBrowsingPerspectiveFactory.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclBrowsingPerspectiveFactory.java
index ae66d40..a3303f9 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclBrowsingPerspectiveFactory.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclBrowsingPerspectiveFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@
 		super();
 	}
 
+	@Override
 	public void createInitialLayout(IPageLayout layout) {
 		createHorizontalLayout(layout);
 
@@ -75,15 +76,15 @@
 				ID_PACKAGES_VIEW);
 
 		IPlaceholderFolderLayout placeHolderLeft = layout
-				.createPlaceholderFolder(
-						"left", IPageLayout.LEFT, (float) 0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+				.createPlaceholderFolder("left", IPageLayout.LEFT, (float) 0.25, //$NON-NLS-1$
+						IPageLayout.ID_EDITOR_AREA);
 		placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
 		placeHolderLeft.addPlaceholder(DLTKUIPlugin.ID_SCRIPTEXPLORER);
 		placeHolderLeft.addPlaceholder(IPageLayout.ID_RES_NAV);
 
 		IPlaceholderFolderLayout placeHolderBottom = layout
-				.createPlaceholderFolder(
-						"bottom", IPageLayout.BOTTOM, (float) 0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+				.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, //$NON-NLS-1$
+						(float) 0.75, IPageLayout.ID_EDITOR_AREA);
 		placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
 		placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
 
@@ -99,8 +100,8 @@
 
 		layout.addNewWizardShortcut(TclPerspective.NEW_FOLDER_WIZARD);
 		layout.addNewWizardShortcut(TclPerspective.NEW_FILE_WIZARD);
-		layout
-				.addNewWizardShortcut(TclPerspective.NEW_UNTITLED_TEXT_FILE_WIZARD);
+		layout.addNewWizardShortcut(
+				TclPerspective.NEW_UNTITLED_TEXT_FILE_WIZARD);
 	}
 
 	protected void addShowViewShortcuts(IPageLayout layout) {
@@ -117,8 +118,8 @@
 	}
 
 	private boolean shouldShowProjectsView() {
-		return fgModelElementFromAction == null
-				|| fgModelElementFromAction.getElementType() == IModelElement.SCRIPT_MODEL;
+		return fgModelElementFromAction == null || fgModelElementFromAction
+				.getElementType() == IModelElement.SCRIPT_MODEL;
 	}
 
 	private boolean shouldShowPackagesView() {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclDecoratingModelLabelProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclDecoratingModelLabelProvider.java
index 9be6547..6afd730 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclDecoratingModelLabelProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclDecoratingModelLabelProvider.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -17,13 +17,14 @@
 import org.eclipse.dltk.ui.viewsupport.DecoratingModelLabelProvider;
 import org.eclipse.dltk.ui.viewsupport.ScriptUILabelProvider;
 
-public class TclDecoratingModelLabelProvider extends
-		DecoratingModelLabelProvider {
+public class TclDecoratingModelLabelProvider
+		extends DecoratingModelLabelProvider {
 
 	/**
 	 * @param labelProvider
 	 */
-	public TclDecoratingModelLabelProvider(ScriptUILabelProvider labelProvider) {
+	public TclDecoratingModelLabelProvider(
+			ScriptUILabelProvider labelProvider) {
 		super(labelProvider);
 	}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclProjectAndSourceFolderContentProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclProjectAndSourceFolderContentProvider.java
index 8b513db..f8052e9 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclProjectAndSourceFolderContentProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/browsing/TclProjectAndSourceFolderContentProvider.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -22,8 +22,8 @@
 import org.eclipse.dltk.ui.browsing.ProjectAndSourceFolderContentProvider;
 import org.eclipse.dltk.ui.browsing.ScriptBrowsingPart;
 
-public class TclProjectAndSourceFolderContentProvider extends
-		ProjectAndSourceFolderContentProvider {
+public class TclProjectAndSourceFolderContentProvider
+		extends ProjectAndSourceFolderContentProvider {
 
 	public TclProjectAndSourceFolderContentProvider(
 			ScriptBrowsingPart browsingPart,
@@ -37,7 +37,7 @@
 		if (!project.getProject().isOpen())
 			return NO_CHILDREN;
 		IProjectFragment[] roots = project.getProjectFragments();
-		final List list = new ArrayList(roots.length);
+		final List<IProjectFragment> list = new ArrayList<>(roots.length);
 		// filter out package fragments that correspond to projects and
 		// replace them with the package fragments directly
 		for (int i = 0; i < roots.length; i++) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/compare/TclMergeViewerCreator.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/compare/TclMergeViewerCreator.java
index 0ac354a..8f6ddbd 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/compare/TclMergeViewerCreator.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/compare/TclMergeViewerCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -18,6 +18,7 @@
 
 public class TclMergeViewerCreator implements IViewerCreator {
 
+	@Override
 	public Viewer createViewer(Composite parent, CompareConfiguration cfg) {
 		return new TclMergeViewer(parent, cfg);
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsBlock.java
index 57dafc3..89c17ab 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsBlock.java
@@ -122,6 +122,7 @@
 			}
 		}
 
+		@Override
 		public Font getFont(Object element) {
 			if (element instanceof Documentation) {
 				final Documentation doc = (Documentation) element;
@@ -142,6 +143,7 @@
 		public ManLocationsContentProvider() {
 		}
 
+		@Override
 		public Object[] getChildren(Object parentElement) {
 			if (parentElement instanceof Documentation) {
 				final EList<ManPageFolder> folders = ((Documentation) parentElement)
@@ -151,16 +153,19 @@
 			return new Object[0];
 		}
 
+		@Override
 		public Object getParent(Object element) {
 			return null;
 		}
 
+		@Override
 		public boolean hasChildren(Object element) {
 			if (element instanceof Documentation)
 				return true;
 			return false;
 		}
 
+		@Override
 		public Object[] getElements(Object inputElement) {
 			if (inputElement instanceof ManPageResource) {
 				final List<Documentation> docs = ((ManPageResource) inputElement)
@@ -171,9 +176,11 @@
 			}
 		}
 
+		@Override
 		public void dispose() {
 		}
 
+		@Override
 		public void inputChanged(Viewer viewer, Object oldInput,
 				Object newInput) {
 		}
@@ -400,6 +407,7 @@
 	/*
 	 * @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent)
 	 */
+	@Override
 	public void selectionChanged(SelectionChangedEvent event) {
 		updateButtons();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsDialog.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsDialog.java
index 598e317..92fe7b2 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsDialog.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/ManPagesLocationsDialog.java
@@ -17,7 +17,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.dltk.tcl.internal.ui.TclUI;
 import org.eclipse.dltk.tcl.ui.manpages.Documentation;
@@ -35,12 +34,9 @@
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerComparator;
@@ -136,11 +132,7 @@
 		pathGD.heightHint = convertHeightInCharsToPixels(16);
 		pathGD.widthHint = convertWidthInCharsToPixels(64);
 		pathViewer.getControl().setLayoutData(pathGD);
-		pathViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				pathSelectionChanged();
-			}
-		});
+		pathViewer.addSelectionChangedListener(event -> pathSelectionChanged());
 		final Composite buttonComp = new Composite(pathComp, SWT.NONE);
 		final GridLayout buttonLayout = new GridLayout();
 		buttonLayout.marginHeight = buttonLayout.marginWidth = 0;
@@ -178,6 +170,7 @@
 
 	static class FolderContentProvider implements ITreeContentProvider {
 
+		@Override
 		public Object[] getChildren(Object parentElement) {
 			if (parentElement instanceof ManPageFolder) {
 				final ManPageFolder folder = (ManPageFolder) parentElement;
@@ -187,6 +180,7 @@
 			return new Object[0];
 		}
 
+		@Override
 		public Object getParent(Object element) {
 			if (element instanceof EObject) {
 				return ((EObject) element).eContainer();
@@ -195,6 +189,7 @@
 			}
 		}
 
+		@Override
 		public boolean hasChildren(Object element) {
 			if (element instanceof ManPageFolder) {
 				final ManPageFolder folder = (ManPageFolder) element;
@@ -203,6 +198,7 @@
 			return false;
 		}
 
+		@Override
 		public Object[] getElements(Object inputElement) {
 			if (inputElement instanceof Documentation) {
 				final Documentation doc = (Documentation) inputElement;
@@ -212,9 +208,11 @@
 			return new Object[0];
 		}
 
+		@Override
 		public void dispose() {
 		}
 
+		@Override
 		public void inputChanged(Viewer viewer, Object oldInput,
 				Object newInput) {
 		}
@@ -258,15 +256,12 @@
 				ProgressMonitorDialog dialog2 = new TimeTriggeredProgressMonitorDialog(
 						null, 500);
 				try {
-					dialog2.run(true, true, new IRunnableWithProgress() {
-						public void run(IProgressMonitor monitor) {
-							monitor.beginTask(
-									ManPagesMessages.ManPagesLocationsDialog_7,
-									1);
-							final ManPageFinder finder = new ManPageFinder();
-							finder.find(documentation, file);
-							monitor.done();
-						}
+					dialog2.run(true, true, monitor -> {
+						monitor.beginTask(
+								ManPagesMessages.ManPagesLocationsDialog_7, 1);
+						final ManPageFinder finder = new ManPageFinder();
+						finder.find(documentation, file);
+						monitor.done();
 					});
 				} catch (InvocationTargetException e) {
 					TclUI.error(e);
@@ -328,6 +323,7 @@
 
 	private int busyCounter = 0;
 
+	@Override
 	public void modifyText(ModifyEvent e) {
 		if (busyCounter > 0) {
 			return;
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclCommentDocumentationProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclCommentDocumentationProvider.java
index 70edf65..ad82875 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclCommentDocumentationProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclCommentDocumentationProvider.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.documentation;
 
@@ -24,8 +23,8 @@
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.Document;
 
-public class TclCommentDocumentationProvider implements
-		IScriptDocumentationProvider {
+public class TclCommentDocumentationProvider
+		implements IScriptDocumentationProvider {
 
 	private static final char COMMENT_SIGN = '#';
 
@@ -33,7 +32,7 @@
 		return d.get(d.getLineOffset(line), d.getLineLength(line));
 	}
 
-	protected List getHeaderComment(IMember member) {
+	protected List<String> getHeaderComment(IMember member) {
 		// if (member instanceof IField) {
 		// return null;
 		// }
@@ -65,13 +64,14 @@
 				int line = doc.getLineOfOffset(start);
 				--line; // look on the previous line
 				if (line >= 0) {
-					final List result = new ArrayList();
+					final List<String> result = new ArrayList<>();
 					do {
 						final String curLine = getLine(doc, line).trim();
 						if (curLine.length() > 0
 								&& curLine.charAt(0) == COMMENT_SIGN) {
 							result.add(0, curLine);
-						} else if (!(curLine.length() == 0 && result.isEmpty())) {
+						} else if (!(curLine.length() == 0
+								&& result.isEmpty())) {
 							// skip empty lines between comment and code only
 							break;
 						}
@@ -88,9 +88,10 @@
 		return null;
 	}
 
+	@Override
 	public Reader getInfo(IMember member, boolean lookIntoParents,
 			boolean lookIntoExternal) {
-		final List header = getHeaderComment(member);
+		final List<String> header = getHeaderComment(member);
 		if (header != null && !header.isEmpty()) {
 			return new StringReader(convertToHTML(header));
 		} else {
@@ -98,11 +99,11 @@
 		}
 	}
 
-	protected String convertToHTML(List header) {
+	protected String convertToHTML(List<String> header) {
 		final StringBuffer result = new StringBuffer();
 		boolean paragraphStarted = false;
 		for (int line = 0; line < header.size(); line++) {
-			String str = (String) header.get(line);
+			String str = header.get(line);
 			int begin = 0;
 			int end = str.length();
 			while (begin < end && str.charAt(begin) == COMMENT_SIGN) {
@@ -154,6 +155,7 @@
 
 	private static final String LINE_BREAK = "<br>\n"; //$NON-NLS-1$
 
+	@Override
 	public Reader getInfo(String content) {
 		return null;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclManPagesDocumentationProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclManPagesDocumentationProvider.java
index 62ca7cd..38fc574 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclManPagesDocumentationProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/documentation/TclManPagesDocumentationProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,32 +28,33 @@
 import org.eclipse.dltk.tcl.ui.manpages.ManPageLoader;
 import org.eclipse.dltk.tcl.ui.manpages.ManPageResource;
 import org.eclipse.dltk.tcl.ui.manpages.ManpagesPackage;
-import org.eclipse.dltk.ui.documentation.DocumentationUtils;
 import org.eclipse.dltk.ui.documentation.DocumentationFileResponse;
+import org.eclipse.dltk.ui.documentation.DocumentationUtils;
 import org.eclipse.dltk.ui.documentation.IDocumentationResponse;
 import org.eclipse.dltk.ui.documentation.IScriptDocumentationProvider;
 import org.eclipse.dltk.ui.documentation.IScriptDocumentationProviderExtension;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
 
 public class TclManPagesDocumentationProvider implements
 		IScriptDocumentationProvider, IScriptDocumentationProviderExtension {
 
 	private ManPageResource manPages = null;
 
+	@Override
 	public Reader getInfo(IMember element, boolean lookIntoParents,
 			boolean lookIntoExternal) {
 		final IProjectFragment fragment = (IProjectFragment) element
 				.getAncestor(IModelElement.PROJECT_FRAGMENT);
 		if (fragment != null && fragment.isBuiltin()) {
-			return DocumentationUtils.getReader(describeKeyword(element
-					.getElementName(), element));
+			return DocumentationUtils.getReader(
+					describeKeyword(element.getElementName(), element));
 		}
 
 		return null;
 	}
 
+	@Override
 	public Reader getInfo(String content) {
 		return DocumentationUtils.getReader(describeKeyword(content, null));
 	}
@@ -69,11 +70,7 @@
 
 		this.manPages = ManPageLoader.load();
 		if (this.manPages != null && changeListener == null) {
-			changeListener = new IPropertyChangeListener() {
-				public void propertyChange(PropertyChangeEvent event) {
-					initalizeLocations(true);
-				}
-			};
+			changeListener = event -> initalizeLocations(true);
 			prefStore.addPropertyChangeListener(changeListener);
 		}
 	}
@@ -95,10 +92,11 @@
 				}
 				if (install != null) {
 					final InterpreterDocumentation iDoc = (InterpreterDocumentation) install
-							.findExtension(ManpagesPackage.Literals.INTERPRETER_DOCUMENTATION);
+							.findExtension(
+									ManpagesPackage.Literals.INTERPRETER_DOCUMENTATION);
 					if (iDoc != null) {
-						final Documentation doc = manPages.findById(iDoc
-								.getDocumentationId());
+						final Documentation doc = manPages
+								.findById(iDoc.getDocumentationId());
 						if (doc != null) {
 							return doc;
 						}
@@ -109,6 +107,7 @@
 		return manPages.findDefault();
 	}
 
+	@Override
 	public IDocumentationResponse describeKeyword(String keyword,
 			IModelElement context) {
 		final Documentation documentation = selectSource(context);
@@ -119,8 +118,8 @@
 					// Try to use first word only
 					final int spacePos = keyword.indexOf(' ');
 					if (spacePos != -1) {
-						filename = f.getKeywords().get(
-								keyword.substring(0, spacePos));
+						filename = f.getKeywords()
+								.get(keyword.substring(0, spacePos));
 					}
 				}
 				if (filename != null) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclDocumentSetupParticipant.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclDocumentSetupParticipant.java
index c2552e8..a8c8890 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclDocumentSetupParticipant.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclDocumentSetupParticipant.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.editor;
 
@@ -17,10 +16,10 @@
 
 public class TclDocumentSetupParticipant implements IDocumentSetupParticipant {
 
+	@Override
 	public void setup(IDocument document) {
 		TclTextTools tools = TclUI.getDefault().getTextTools();
-		tools
-				.setupDocumentPartitioner(document,
-						TclPartitions.TCL_PARTITIONING);
+		tools.setupDocumentPartitioner(document,
+				TclPartitions.TCL_PARTITIONING);
 	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclEditor.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclEditor.java
index 089b16c..2e3925f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclEditor.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclEditor.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.editor;
 
@@ -42,6 +41,7 @@
 
 	private IFoldingStructureProvider foldingProvider;
 
+	@Override
 	protected void initializeEditor() {
 		super.initializeEditor();
 
@@ -49,9 +49,7 @@
 		setRulerContextMenuId(RULER_CONTEXT);
 	}
 
-	/*
-	 * @see ScriptEditor#createPartControl(Composite)
-	 */
+	@Override
 	public void createPartControl(Composite parent) {
 		super.createPartControl(parent);
 		ISourceViewer sourceViewer = getSourceViewer();
@@ -65,33 +63,41 @@
 			TclPreferenceConstants.EDITOR_FOLDING_EXCLUDE_LIST,
 			TclPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST, };
 
+	@Override
 	protected String[] getFoldingEventPreferenceKeys() {
 		return properties;
 	}
 
+	@Override
 	public IPreferenceStore getScriptPreferenceStore() {
 		return TclUI.getDefault().getPreferenceStore();
 	}
 
+	@Override
 	public ScriptTextTools getTextTools() {
 		return TclUI.getDefault().getTextTools();
 	}
 
+	@Override
 	protected ScriptOutlinePage doCreateOutlinePage() {
-		return new TclOutlinePage(this, TclUI.getDefault().getPreferenceStore());
+		return new TclOutlinePage(this,
+				TclUI.getDefault().getPreferenceStore());
 	}
 
+	@Override
 	protected void connectPartitioningToElement(IEditorInput input,
 			IDocument document) {
 		if (document instanceof IDocumentExtension3) {
 			IDocumentExtension3 doc = (IDocumentExtension3) document;
-			if (doc.getDocumentPartitioner(TclPartitions.TCL_PARTITIONING) == null) {
+			if (doc.getDocumentPartitioner(
+					TclPartitions.TCL_PARTITIONING) == null) {
 				IDocumentSetupParticipant participant = new TclDocumentSetupParticipant();
 				participant.setup(document);
 			}
 		}
 	}
 
+	@Override
 	protected IFoldingStructureProvider getFoldingStructureProvider() {
 		if (foldingProvider == null) {
 			foldingProvider = new TclFoldingStructureProvider();
@@ -100,18 +106,23 @@
 		return foldingProvider;
 	}
 
+	@Override
 	public String getEditorId() {
 		return EDITOR_ID;
 	}
 
+	@Override
 	protected void initializeKeyBindingScopes() {
-		setKeyBindingScopes(new String[] { "org.eclipse.dltk.ui.tclEditorScope" }); //$NON-NLS-1$
+		setKeyBindingScopes(
+				new String[] { "org.eclipse.dltk.ui.tclEditorScope" }); //$NON-NLS-1$
 	}
 
+	@Override
 	public IDLTKLanguageToolkit getLanguageToolkit() {
 		return TclLanguageToolkit.getDefault();
 	}
 
+	@Override
 	public String getCallHierarchyID() {
 		return "org.eclipse.dltk.callhierarchy.view"; //$NON-NLS-1$
 	}
@@ -121,9 +132,7 @@
 		return new TclPairMatcher();
 	}
 
-	/*
-	 * @see ScriptEditor#dispose()
-	 */
+	@Override
 	public void dispose() {
 		ISourceViewer sourceViewer = getSourceViewer();
 		if (sourceViewer instanceof ITextViewerExtension)
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlineLabelDecorator.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlineLabelDecorator.java
index ca19ca1..c692e06 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlineLabelDecorator.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlineLabelDecorator.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.editor;
 
@@ -23,11 +22,12 @@
 import org.eclipse.jface.viewers.ILabelDecorator;
 import org.eclipse.swt.graphics.Image;
 
-public class TclOutlineLabelDecorator extends BaseLabelProvider implements
-		ILabelDecorator {
+public class TclOutlineLabelDecorator extends BaseLabelProvider
+		implements ILabelDecorator {
 	public TclOutlineLabelDecorator() {
 	}
 
+	@Override
 	public String decorateText(String text, Object element) {
 		return text;
 	}
@@ -46,6 +46,7 @@
 		}
 	}
 
+	@Override
 	public Image decorateImage(Image image, Object obj) {
 		try {
 			if (obj instanceof IMember) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlinePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlinePage.java
index f3f74d1..c852956 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlinePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/editor/TclOutlinePage.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.editor;
 
@@ -37,7 +36,7 @@
 		IToolBarManager toolBarManager = actionBars.getToolBarManager();
 		MemberFilterActionGroup fMemberFilterActionGroup = new MemberFilterActionGroup(
 				fOutlineViewer, fStore);
-		List<MemberFilterAction> actions = new ArrayList<MemberFilterAction>(3);
+		List<MemberFilterAction> actions = new ArrayList<>(3);
 
 		// variables
 		// TODO help support IDLTKHelpContextIds.FILTER_FIELDS_ACTION;
@@ -45,10 +44,10 @@
 				fMemberFilterActionGroup,
 				ActionMessages.MemberFilterActionGroup_hide_variables_label,
 				new ModelElementFilter(IModelElement.FIELD), null, true);
-		hideVariables
-				.setDescription(ActionMessages.MemberFilterActionGroup_hide_variables_description);
-		hideVariables
-				.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_variables_tooltip);
+		hideVariables.setDescription(
+				ActionMessages.MemberFilterActionGroup_hide_variables_description);
+		hideVariables.setToolTipText(
+				ActionMessages.MemberFilterActionGroup_hide_variables_tooltip);
 		DLTKPluginImages.setLocalImageDescriptors(hideVariables,
 				"filter_fields.gif"); //$NON-NLS-1$
 		actions.add(hideVariables);
@@ -59,10 +58,10 @@
 				fMemberFilterActionGroup,
 				ActionMessages.MemberFilterActionGroup_hide_procedures_label,
 				new ModelElementFilter(IModelElement.METHOD), null, true);
-		hideProcedures
-				.setDescription(ActionMessages.MemberFilterActionGroup_hide_procedures_description);
-		hideProcedures
-				.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_procedures_tooltip);
+		hideProcedures.setDescription(
+				ActionMessages.MemberFilterActionGroup_hide_procedures_description);
+		hideProcedures.setToolTipText(
+				ActionMessages.MemberFilterActionGroup_hide_procedures_tooltip);
 		// TODO: add correct icon
 		DLTKPluginImages.setLocalImageDescriptors(hideProcedures,
 				"filter_methods.gif"); //$NON-NLS-1$
@@ -74,10 +73,10 @@
 				fMemberFilterActionGroup,
 				ActionMessages.MemberFilterActionGroup_hide_namespaces_label,
 				new ModelElementFilter(IModelElement.TYPE), null, true);
-		hideNamespaces
-				.setDescription(ActionMessages.MemberFilterActionGroup_hide_namespaces_description);
-		hideNamespaces
-				.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_namespaces_tooltip);
+		hideNamespaces.setDescription(
+				ActionMessages.MemberFilterActionGroup_hide_namespaces_description);
+		hideNamespaces.setToolTipText(
+				ActionMessages.MemberFilterActionGroup_hide_namespaces_tooltip);
 		DLTKPluginImages.setLocalImageDescriptors(hideNamespaces,
 				"filter_classes.gif"); //$NON-NLS-1$
 		actions.add(hideNamespaces);
@@ -87,10 +86,10 @@
 				fMemberFilterActionGroup,
 				ActionMessages.MemberFilterActionGroup_hide_private_label,
 				new ModelElementFlagsFilter(Modifiers.AccPrivate), null, true);
-		hidePrivate
-				.setDescription(ActionMessages.MemberFilterActionGroup_hide_private_description);
-		hidePrivate
-				.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_private_tooltip);
+		hidePrivate.setDescription(
+				ActionMessages.MemberFilterActionGroup_hide_private_description);
+		hidePrivate.setToolTipText(
+				ActionMessages.MemberFilterActionGroup_hide_private_tooltip);
 		DLTKPluginImages.setLocalImageDescriptors(hidePrivate,
 				"filter_private.gif"); //$NON-NLS-1$
 		actions.add(hidePrivate);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/hierarchy/TclHierarchyInformationControl.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/hierarchy/TclHierarchyInformationControl.java
index 21383eb..28c5d75 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/hierarchy/TclHierarchyInformationControl.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/hierarchy/TclHierarchyInformationControl.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.hierarchy;
 
@@ -14,13 +13,15 @@
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.swt.widgets.Shell;
 
-public class TclHierarchyInformationControl extends
-		HierarchyInformationControl {
+public class TclHierarchyInformationControl
+		extends HierarchyInformationControl {
 
-	public TclHierarchyInformationControl(Shell parent, int shellStyle, int treeStyle) {
+	public TclHierarchyInformationControl(Shell parent, int shellStyle,
+			int treeStyle) {
 		super(parent, shellStyle, treeStyle);
 	}
 
+	@Override
 	protected IPreferenceStore getPreferenceStore() {
 		return TclUI.getDefault().getPreferenceStore();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/infoviews/TclDocumentationView.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/infoviews/TclDocumentationView.java
index ee2e8ce..b03fdf0 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/infoviews/TclDocumentationView.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/infoviews/TclDocumentationView.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.infoviews;
 
@@ -14,12 +13,13 @@
 import org.eclipse.dltk.ui.infoviews.AbstractDocumentationView;
 import org.eclipse.jface.preference.IPreferenceStore;
 
-
 public class TclDocumentationView extends AbstractDocumentationView {
+	@Override
 	protected IPreferenceStore getPreferenceStore() {
 		return TclUI.getDefault().getPreferenceStore();
 	}
 
+	@Override
 	protected String getNature() {
 		return TclNature.NATURE_ID;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementListAdapterFactory.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementListAdapterFactory.java
index ff383af..c5d7ab2 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementListAdapterFactory.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementListAdapterFactory.java
@@ -15,10 +15,12 @@
 public class ElementListAdapterFactory implements IAdapterFactory {
 	private static Class<?>[] PROPERTIES = new Class[] { IModelElement.class };
 
+	@Override
 	public Class<?>[] getAdapterList() {
 		return PROPERTIES;
 	}
 
+	@Override
 	@SuppressWarnings("unchecked")
 	public <T> T getAdapter(Object element, Class<T> key) {
 		if (IModelElement.class.equals(key)) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementsView.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementsView.java
index 0b8c062..f654c74 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementsView.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/ElementsView.java
@@ -51,9 +51,6 @@
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.ITreeSelection;
 import org.eclipse.jface.viewers.TreeViewer;
@@ -83,12 +80,13 @@
 		return TclUI.getDefault().getPreferenceStore();
 	}
 
-	private class ElementsTreeViewer extends TreeViewer implements
-			IFilterElementNameProvider {
+	private class ElementsTreeViewer extends TreeViewer
+			implements IFilterElementNameProvider {
 		public ElementsTreeViewer(Composite container, int border) {
 			super(container, border);
 		}
 
+		@Override
 		public String getElementName(Object element) {
 			return labelProvider.getText(element);
 		}
@@ -103,10 +101,11 @@
 			setImageDescriptor(DLTKPluginImages
 					.getDescriptor(DLTKPluginImages.IMG_OBJS_PACKAGE));
 			boolean checked = getStore().getBoolean(
-					getPreferencesId() + "ToggleExternalAction.isChecked"); //$NON-NLS-1$		
+					getPreferencesId() + "ToggleExternalAction.isChecked"); //$NON-NLS-1$
 			valueChanged(checked, false);
 		}
 
+		@Override
 		public void run() {
 			valueChanged(isChecked(), true);
 		}
@@ -114,27 +113,26 @@
 		private void valueChanged(final boolean on, boolean store) {
 			setChecked(on);
 			if (store)
-				getStore()
-						.setValue(
-								getPreferencesId()
-										+ "ToggleExternalAction.isChecked", on); //$NON-NLS-1$
+				getStore().setValue(
+						getPreferencesId() + "ToggleExternalAction.isChecked", //$NON-NLS-1$
+						on);
 			BusyIndicator.showWhile(treeViewer.getControl().getDisplay(),
-					new Runnable() {
-						public void run() {
-							lookIntoExternal = on;
-							provider.clear();
-							runAsync();
-						}
+					() -> {
+						lookIntoExternal = on;
+						provider.clear();
+						runAsync();
 					});
 		}
 	}
 
 	class LexicalSortingAction extends Action {
 		private ModelElementSorter fSorter = new ModelElementSorter() {
+			@Override
 			protected String getElementName(Object element) {
 				return labelProvider.getText(element);
 			}
 
+			@Override
 			public int compare(Viewer viewer, Object e1, Object e2) {
 				Object o1 = e1;
 				Object o2 = e2;
@@ -151,8 +149,8 @@
 		public LexicalSortingAction() {
 			super();
 			if (DLTKCore.DEBUG) {
-				System.err
-						.println("LexicalSortingAction: Need to set correct info here.");
+				System.err.println(
+						"LexicalSortingAction: Need to set correct info here.");
 			}
 			// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
 			// IDLTKHelpContextIds.LEXICAL_SORTING_OUTLINE_ACTION);
@@ -160,10 +158,11 @@
 			DLTKPluginImages.setLocalImageDescriptors(this,
 					"alphab_sort_co.gif"); //$NON-NLS-1$
 			boolean checked = getStore().getBoolean(
-					getPreferencesId() + "LexicalSortingAction.isChecked"); //$NON-NLS-1$		
+					getPreferencesId() + "LexicalSortingAction.isChecked"); //$NON-NLS-1$
 			valueChanged(checked, false);
 		}
 
+		@Override
 		public void run() {
 			valueChanged(isChecked(), true);
 		}
@@ -171,16 +170,11 @@
 		private void valueChanged(final boolean on, boolean store) {
 			setChecked(on);
 			BusyIndicator.showWhile(treeViewer.getControl().getDisplay(),
-					new Runnable() {
-						public void run() {
-							treeViewer.setComparator(on ? fSorter : null);
-						}
-					});
+					() -> treeViewer.setComparator(on ? fSorter : null));
 			if (store)
-				getStore()
-						.setValue(
-								getPreferencesId()
-										+ "LexicalSortingAction.isChecked", on); //$NON-NLS-1$			
+				getStore().setValue(
+						getPreferencesId() + "LexicalSortingAction.isChecked", //$NON-NLS-1$
+						on);
 		}
 	}
 
@@ -202,10 +196,12 @@
 			return null;
 		}
 
+		@Override
 		public String toString() {
 			return this.name;
 		}
 
+		@Override
 		public int hashCode() {
 			final int PRIME = 31;
 			int result = 1;
@@ -213,6 +209,7 @@
 			return result;
 		}
 
+		@Override
 		public boolean equals(Object obj) {
 			if (this == obj)
 				return true;
@@ -233,12 +230,14 @@
 			return this.childs;
 		}
 
-		public Object getAdapter(Class adapter) {
+		@SuppressWarnings("unchecked")
+		@Override
+		public <T> T getAdapter(Class<T> adapter) {
 			if (adapter == IModelElement.class) {
-				return getFirstElement();
+				return (T) getFirstElement();
 			}
 			if (adapter == List.class) {
-				return childs;
+				return (T) childs;
 			}
 			return null;
 		}
@@ -250,6 +249,7 @@
 
 		public ElementsContentProvider() {
 			DLTKCore.addElementChangedListener(new IElementChangedListener() {
+				@Override
 				public void elementChanged(ElementChangedEvent event) {
 					IModelElementDelta delta = event.getDelta();
 					processChildren(delta);
@@ -265,16 +265,19 @@
 					if (delta.getKind() == IModelElementDelta.REMOVED) {
 						removeTypesJob(element);
 					}
-					if ((delta.getFlags() & IModelElementDelta.F_ADDED_TO_BUILDPATH) != 0) {
+					if ((delta.getFlags()
+							& IModelElementDelta.F_ADDED_TO_BUILDPATH) != 0) {
 						addElementsJob(element);
 					}
-					if ((delta.getFlags() & IModelElementDelta.F_REMOVED_FROM_BUILDPATH) != 0) {
+					if ((delta.getFlags()
+							& IModelElementDelta.F_REMOVED_FROM_BUILDPATH) != 0) {
 						synchronized (elements) {
 							elements.clear();
 						}
 						runAsync();
 					}
-					if ((delta.getFlags() & IModelElementDelta.F_CHILDREN) != 0) {
+					if ((delta.getFlags()
+							& IModelElementDelta.F_CHILDREN) != 0) {
 						IModelElementDelta[] affectedChildren = delta
 								.getAffectedChildren();
 						for (int i = 0; i < affectedChildren.length; i++) {
@@ -286,6 +289,7 @@
 			});
 		}
 
+		@Override
 		public synchronized Object[] getChildren(Object parentElement) {
 			if (parentElement instanceof IWorkspaceRoot) {
 				List result = new ArrayList();
@@ -310,6 +314,7 @@
 			return NO_ELEMENT;
 		}
 
+		@Override
 		public Object getParent(Object element) {
 			if (element instanceof IModelElement) {
 				return ResourcesPlugin.getWorkspace().getRoot();
@@ -317,6 +322,7 @@
 			return NO_ELEMENT;
 		}
 
+		@Override
 		public boolean hasChildren(Object element) {
 			if (element instanceof IWorkspaceRoot) {
 				return true;
@@ -324,21 +330,25 @@
 			return false;
 		}
 
+		@Override
 		public Object[] getElements(Object inputElement) {
 			return getChildren(inputElement);
 		}
 
+		@Override
 		public void dispose() {
 		}
 
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		@Override
+		public void inputChanged(Viewer viewer, Object oldInput,
+				Object newInput) {
 		}
 
 		synchronized public void addElement(IModelElement element) {
 			IDLTKLanguageToolkit languageToolkit = DLTKLanguageManager
 					.getLanguageToolkit(element);
-			if (!languageToolkit.getNatureId().equals(
-					TclLanguageToolkit.getDefault().getNatureId())) {
+			if (!languageToolkit.getNatureId()
+					.equals(TclLanguageToolkit.getDefault().getNatureId())) {
 				return;
 			}
 
@@ -386,8 +396,8 @@
 
 	public abstract String getElementName(Object o);
 
-	public class ElementsViewLabelProvider extends ScriptUILabelProvider
-			implements IBaseLabelProvider {
+	public class ElementsViewLabelProvider extends ScriptUILabelProvider {
+		@Override
 		public Image getImage(Object element) {
 			if (element instanceof ElementList) {
 				return getImage(((ElementList) element).getFirstElement());
@@ -407,6 +417,7 @@
 			return super.getText(element);
 		}
 
+		@Override
 		public String getText(Object element) {
 			String text = getElementName(element);
 			if (text != null) {
@@ -435,7 +446,8 @@
 		if (element instanceof ISourceModule)
 			asyncRefresh();
 		boolean bad = !lookIntoExternal
-				&& (element instanceof ExternalScriptFolder || element instanceof IExternalSourceModule);
+				&& (element instanceof ExternalScriptFolder
+						|| element instanceof IExternalSourceModule);
 		if (element instanceof IParent && !bad) {
 			IModelElement[] children = null;
 			try {
@@ -460,6 +472,7 @@
 
 	private void addElementsJob(final IModelElement element) {
 		Job job = new Job(getTitle()) {
+			@Override
 			protected IStatus run(IProgressMonitor monitor) {
 				addElements(element, monitor);
 				monitor.done();
@@ -472,9 +485,8 @@
 	private void removeElements(IModelElement element) {
 		IDLTKLanguageToolkit languageToolkit = DLTKLanguageManager
 				.getLanguageToolkit(element);
-		if (languageToolkit != null
-				&& !languageToolkit.getNatureId().equals(
-						TclLanguageToolkit.getDefault().getNatureId())) {
+		if (languageToolkit != null && !languageToolkit.getNatureId()
+				.equals(TclLanguageToolkit.getDefault().getNatureId())) {
 			return;
 		}
 		if (isElement(element)) {
@@ -501,6 +513,7 @@
 
 	private void removeTypesJob(final IModelElement element) {
 		Job job = new Job(getTitle()) {
+			@Override
 			protected IStatus run(IProgressMonitor monitor) {
 				removeElements(element);
 				monitor.done();
@@ -511,11 +524,9 @@
 	}
 
 	private void asyncRefresh() {
-		Display.getDefault().asyncExec(new Runnable() {
-			public void run() {
-				if (treeViewer != null && !treeViewer.getTree().isDisposed()) {
-					treeViewer.refresh(true);
-				}
+		Display.getDefault().asyncExec(() -> {
+			if (treeViewer != null && !treeViewer.getTree().isDisposed()) {
+				treeViewer.refresh(true);
 			}
 		});
 	}
@@ -529,6 +540,7 @@
 			currentJob = null;
 		}
 		Job job = new Job(getJobTitle()) {
+			@Override
 			protected IStatus run(IProgressMonitor monitor) {
 				IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
 						.getProjects();
@@ -559,6 +571,7 @@
 		currentJob = job;
 	}
 
+	@Override
 	public void createPartControl(Composite parent) {
 		Composite container = new Composite(parent, SWT.NONE);
 		container.setLayout(new FillLayout());
@@ -568,39 +581,36 @@
 		treeViewer.setLabelProvider(labelProvider);
 		treeViewer.setContentProvider(provider);
 		treeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
-		treeViewer.addDoubleClickListener(new IDoubleClickListener() {
-			public void doubleClick(DoubleClickEvent event) {
-				ITreeSelection selection = (ITreeSelection) (event
-						.getSelection());
-				Object source = selection.getFirstElement();
-				if (source == null)
-					return;
-				try {
-					if (source instanceof IModelElement) {
-						IEditorPart editor = EditorUtility.openInEditor(source);
-						EditorUtility.revealInEditor(editor,
-								(IModelElement) source);
-					} else if (source instanceof ElementList) {
-						ElementList el = (ElementList) source;
-						List elements = el.getElements();
-						if (elements != null) {
-							for (int i = 0; i < elements.size(); ++i) {
-								Object element = elements.get(i);
-								if (element instanceof IModelElement) {
-									IEditorPart editor = EditorUtility
-											.openInEditor(element);
-									EditorUtility.revealInEditor(editor,
-											(IModelElement) element);
-								} else
-									EditorUtility.openInEditor(element);
-							}
+		treeViewer.addDoubleClickListener(event -> {
+			ITreeSelection selection = (ITreeSelection) (event.getSelection());
+			Object source = selection.getFirstElement();
+			if (source == null)
+				return;
+			try {
+				if (source instanceof IModelElement) {
+					IEditorPart editor1 = EditorUtility.openInEditor(source);
+					EditorUtility.revealInEditor(editor1,
+							(IModelElement) source);
+				} else if (source instanceof ElementList) {
+					ElementList el = (ElementList) source;
+					List elements = el.getElements();
+					if (elements != null) {
+						for (int i = 0; i < elements.size(); ++i) {
+							Object element = elements.get(i);
+							if (element instanceof IModelElement) {
+								IEditorPart editor2 = EditorUtility
+										.openInEditor(element);
+								EditorUtility.revealInEditor(editor2,
+										(IModelElement) element);
+							} else
+								EditorUtility.openInEditor(element);
 						}
 					}
-				} catch (PartInitException e) {
-					e.printStackTrace();
-				} catch (ModelException e) {
-					e.printStackTrace();
 				}
+			} catch (PartInitException e1) {
+				e1.printStackTrace();
+			} catch (ModelException e2) {
+				e2.printStackTrace();
 			}
 		});
 		IViewSite site = (IViewSite) this.getSite();
@@ -631,6 +641,7 @@
 		// viewMenuManager.add(fToggleLinkingAction);
 	}
 
+	@Override
 	public void dispose() {
 		if (fCustomFiltersActionGroup != null) {
 			fCustomFiltersActionGroup.dispose();
@@ -639,6 +650,7 @@
 		super.dispose();
 	}
 
+	@Override
 	public void setFocus() {
 	}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/FunctionsView.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/FunctionsView.java
index 84fa411..37ea479 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/FunctionsView.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/FunctionsView.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.navigation;
 
@@ -16,35 +15,35 @@
 import org.eclipse.dltk.core.IType;
 
 public class FunctionsView extends ElementsView {
-	//TODO: Remove into preferences
+	// TODO: Remove into preferences
 	private boolean processNamespaceMethods = false;
-	public String getElementName(Object element) {		
-		if( element instanceof IMethod ) {
-			String buffer = "";			
-			IModelElement el  = (IModelElement)element;
-			while( el != null ) {
+
+	@Override
+	public String getElementName(Object element) {
+		if (element instanceof IMethod) {
+			String buffer = "";
+			IModelElement el = (IModelElement) element;
+			while (el != null) {
 				String str = getOriginalElementText(el);
-				if( str.startsWith("::")) {
+				if (str.startsWith("::")) {
 					buffer = str + buffer;
-				}
-				else {
+				} else {
 					buffer = "::" + str + buffer;
 				}
-				if( el instanceof IParent ) {
+				if (el instanceof IParent) {
 					IModelElement parent = el.getParent();
-					if( parent instanceof IType ) {
+					if (parent instanceof IType) {
 						el = parent;
-					}
-					else {
+					} else {
 						el = null;
 					}
-				}
-				else {
+				} else {
 					el = null;
 				}
 			}
-			String from = ((IMethod)element).getAncestor(IModelElement.SCRIPT_FOLDER).getElementName();
-			if( from.length() > 0 ) {				
+			String from = ((IMethod) element)
+					.getAncestor(IModelElement.SCRIPT_FOLDER).getElementName();
+			if (from.length() > 0) {
 				return buffer + " (" + from + ")";
 			}
 			return buffer;
@@ -52,25 +51,28 @@
 		return null;
 	}
 
+	@Override
 	public String getJobTitle() {
 		return "Functions view search...";
 	}
 
+	@Override
 	public boolean isElement(IModelElement e) {
 		return e instanceof IMethod;
-	}	
-	
+	}
+
+	@Override
 	public boolean needProcessChildren(IModelElement e) {
-		if( e instanceof IType ) {
+		if (e instanceof IType) {
 			return processNamespaceMethods;
-		}		
-		else if( e instanceof IMethod || e instanceof IField  ) {
+		} else if (e instanceof IMethod || e instanceof IField) {
 			return false;
-		}			
+		}
 		return true;
 	}
 
-	protected String getPreferencesId() {		
+	@Override
+	protected String getPreferencesId() {
 		return "FunctionsView_";
-	}	
+	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/NamespacesView.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/NamespacesView.java
index a7ea010..f4b37fc 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/NamespacesView.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/NamespacesView.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.navigation;
 
@@ -15,29 +14,28 @@
 
 public class NamespacesView extends ElementsView {
 
-	public String getElementName(Object element) {		
-		if( element instanceof IType ) {
-			String buffer = "";			
-			IType type = (IType)element;
-			while( type != null ) {
+	@Override
+	public String getElementName(Object element) {
+		if (element instanceof IType) {
+			String buffer = "";
+			IType type = (IType) element;
+			while (type != null) {
 				String str = getOriginalElementText(type);
-				if( str.startsWith("::")) {
+				if (str.startsWith("::")) {
 					buffer = str + buffer;
-				}
-				else {
+				} else {
 					buffer = "::" + str + buffer;
 				}
-				
+
 				IModelElement parent = type.getParent();
-				if( parent instanceof IType ) {
-					type = (IType)parent;
-				}
-				else {
+				if (parent instanceof IType) {
+					type = (IType) parent;
+				} else {
 					type = null;
 				}
 			}
-			String from = ((IType)element).getScriptFolder().getElementName();
-			if( from.length() > 0 ) {				
+			String from = ((IType) element).getScriptFolder().getElementName();
+			if (from.length() > 0) {
 				return buffer + " (" + from + ")";
 			}
 			return buffer;
@@ -45,21 +43,26 @@
 		return null;
 	}
 
+	@Override
 	public String getJobTitle() {
 		return "Namespaces view search...";
 	}
 
+	@Override
 	public boolean isElement(IModelElement e) {
 		return e instanceof IType;
 	}
 
+	@Override
 	public boolean needProcessChildren(IModelElement e) {
-		if( e instanceof IMethod ) {
+		if (e instanceof IMethod) {
 			return false;
 		}
 		return true;
-	}	
-	protected String getPreferencesId() {		
+	}
+
+	@Override
+	protected String getPreferencesId() {
 		return "NamespacesView_";
-	}	
+	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackageFilterAction.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackageFilterAction.java
index 5857618..1250f90 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackageFilterAction.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackageFilterAction.java
@@ -34,12 +34,12 @@
 import org.eclipse.dltk.ui.viewsupport.ScriptUILabelProvider;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Display;
@@ -61,6 +61,7 @@
 		public SimplePackagesContentProvider() {
 		}
 
+		@Override
 		public synchronized Object[] getChildren(Object parentElement) {
 			if (parentElement instanceof IWorkspaceRoot) {
 				return elements.keySet().toArray();
@@ -68,6 +69,7 @@
 			return NO_ELEMENT;
 		}
 
+		@Override
 		public Object getParent(Object element) {
 			if (element instanceof String) {
 				return ResourcesPlugin.getWorkspace().getRoot();
@@ -75,6 +77,7 @@
 			return NO_ELEMENT;
 		}
 
+		@Override
 		public boolean hasChildren(Object element) {
 			if (element instanceof IWorkspaceRoot) {
 				return true;
@@ -82,20 +85,22 @@
 			return false;
 		}
 
+		@Override
 		public Object[] getElements(Object inputElement) {
 			return getChildren(inputElement);
 		}
 
+		@Override
 		public void dispose() {
 		}
 
+		@Override
 		public void inputChanged(Viewer viewer, Object oldInput,
 				Object newInput) {
 		}
 	}
 
-	private class SimplePackageLabelProvider extends ScriptUILabelProvider
-			implements IBaseLabelProvider {
+	private class SimplePackageLabelProvider extends ScriptUILabelProvider {
 		@Override
 		public Image getImage(Object element) {
 			return DLTKPluginImages.get(DLTKPluginImages.IMG_OBJS_PACKAGE);
@@ -165,30 +170,30 @@
 	}
 
 	private IPackageDeclaration[] getPackageDeclaration(Object element) {
-		List modelElements = null;
+		List<IModelElement> modelElements = null;
 		if (element instanceof IModelElement) {
-			modelElements = new ArrayList();
-			modelElements.add(element);
+			modelElements = new ArrayList<>();
+			modelElements.add((IModelElement) element);
 		} else if (element instanceof IAdaptable) {
 			IAdaptable adaptable = (IAdaptable) element;
 			modelElements = adaptable.getAdapter(List.class);
 		}
-		List result = new ArrayList();
+		List<IPackageDeclaration> result = new ArrayList<>();
 		synchronized (modelElements) {
-			for (Iterator iter = modelElements.iterator(); iter.hasNext();) {
-				IModelElement e = (IModelElement) iter.next();
+			for (Iterator<IModelElement> iter = modelElements.iterator(); iter
+					.hasNext();) {
+				IModelElement e = iter.next();
 				IPackageDeclaration p = getPackageDeclaration(e);
 				if (p != null)
 					result.add(p);
 			}
 		}
 
-		return (IPackageDeclaration[]) result
-				.toArray(new IPackageDeclaration[result.size()]);
+		return result.toArray(new IPackageDeclaration[result.size()]);
 	}
 
 	private class PackageFilter extends ViewerFilter {
-		List elements = new ArrayList();
+		List<String> elements = new ArrayList<>();
 
 		@Override
 		public boolean select(Viewer viewer, Object parentElement,
@@ -200,8 +205,9 @@
 			for (int i = 0; i < decl.length; i++) {
 				String matchName = getElementName(viewer, decl[i]);
 				if (matchName != null) {
-					for (Iterator iter = elements.iterator(); iter.hasNext();) {
-						String str = (String) iter.next();
+					for (Iterator<String> iter = elements.iterator(); iter
+							.hasNext();) {
+						String str = iter.next();
 						if (str.equals(matchName)) {
 							good = true;
 							break;
@@ -272,23 +278,20 @@
 
 	@Override
 	public void run() {
-		BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
-			public void run() {
-				provider.elements.clear();
-				IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
-						.getProjects();
-				for (int i = 0; i < projects.length; ++i) {
-					try {
-						if (projects[i].hasNature(TclNature.NATURE_ID)) {
-							IScriptProject project = DLTKCore
-									.create(projects[i]);
-							if (project != null) {
-								addElements(project);
-							}
+		BusyIndicator.showWhile(Display.getCurrent(), () -> {
+			provider.elements.clear();
+			IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
+					.getProjects();
+			for (int i = 0; i < projects.length; ++i) {
+				try {
+					if (projects[i].hasNature(TclNature.NATURE_ID)) {
+						IScriptProject project = DLTKCore.create(projects[i]);
+						if (project != null) {
+							addElements(project);
 						}
-					} catch (CoreException e) {
-						e.printStackTrace();
 					}
+				} catch (CoreException e) {
+					e.printStackTrace();
 				}
 			}
 		});
@@ -297,7 +300,7 @@
 		dlg.setInput(ResourcesPlugin.getWorkspace().getRoot());
 		dlg.setTitle("Select packages");
 		dlg.setMessage("Select packages to be shown in view");
-		if (dlg.open() == CheckedTreeSelectionDialog.OK) {
+		if (dlg.open() == Window.OK) {
 			// save preference
 			Object res[] = dlg.getResult();
 			StringBuffer buf = new StringBuffer();
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackagesView.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackagesView.java
index 6e21085..d632cb2 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackagesView.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/PackagesView.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.navigation;
 
@@ -13,25 +12,31 @@
 import org.eclipse.dltk.core.IPackageDeclaration;
 
 public class PackagesView extends ElementsView {
-	public String getElementName(Object element) {		
-		if( element instanceof IPackageDeclaration ) {
-			return ((IPackageDeclaration)element).getElementName();
+	@Override
+	public String getElementName(Object element) {
+		if (element instanceof IPackageDeclaration) {
+			return ((IPackageDeclaration) element).getElementName();
 		}
 		return null;
 	}
 
+	@Override
 	public String getJobTitle() {
 		return "Packages view search...";
 	}
 
+	@Override
 	public boolean isElement(IModelElement e) {
 		return e instanceof IPackageDeclaration;
-	}	
-	
+	}
+
+	@Override
 	public boolean needProcessChildren(IModelElement e) {
 		return true;
 	}
-	protected String getPreferencesId() {		
+
+	@Override
+	protected String getPreferencesId() {
 		return "PackagesView_";
-	}	
+	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelCompareProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelCompareProvider.java
index 22db526..be24fec 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelCompareProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelCompareProvider.java
@@ -5,6 +5,7 @@
 import org.eclipse.dltk.ui.IModelCompareProvider;
 
 public class TclModelCompareProvider implements IModelCompareProvider {
+	@Override
 	public Integer category(Object parentElement) {
 		if (parentElement instanceof TclSourcesFragment) {
 			return IModelCompareCategories.CONTAINER;
@@ -12,6 +13,7 @@
 		return null;
 	}
 
+	@Override
 	public CompareResult compare(Object element1, Object element2, int cat1,
 			int cat2) {
 		if (cat1 == cat2 && cat1 == IModelCompareCategories.CONTAINER) {
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelContentProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelContentProvider.java
index 86f8add..b1fa3e1 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelContentProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelContentProvider.java
@@ -23,6 +23,7 @@
 	public TclModelContentProvider() {
 	}
 
+	@Override
 	public void provideModelChanges(Object parentElement, List children,
 			ITreeContentProvider iTreeContentProvider) {
 		// System.out.println("CONTAINER:" + parentElement);
@@ -69,6 +70,7 @@
 		}
 	}
 
+	@Override
 	public Object getParentElement(Object element,
 			ITreeContentProvider iTreeContentProvider) {
 		if (element instanceof TclPackageFragment
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelLabelProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelLabelProvider.java
index 0bcd07d..f7b488e 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelLabelProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/navigation/TclModelLabelProvider.java
@@ -20,6 +20,7 @@
 import org.eclipse.swt.graphics.Image;
 
 public class TclModelLabelProvider extends LabelProvider {
+	@Override
 	public String getText(Object element) {
 		if (element instanceof TclPackageFragment) {
 			return ((TclPackageFragment) element).getPackageName();
@@ -38,11 +39,11 @@
 					+ module.getStorage().getFullPath().toString() + ")";
 		} else if (element instanceof TclSourcesSourceModule) {
 			TclSourcesSourceModule module = (TclSourcesSourceModule) element;
-			IEnvironment environment = EnvironmentManager.getEnvironment(module
-					.getScriptProject());
+			IEnvironment environment = EnvironmentManager
+					.getEnvironment(module.getScriptProject());
 			String originalName = module.getOriginalName();
-			String convertedPath = environment.convertPathToString(module
-					.getFullPath());
+			String convertedPath = environment
+					.convertPathToString(module.getFullPath());
 			IFileHandle file = EnvironmentPathUtils.getFile(module);
 			boolean exists = file != null && file.exists();
 			String postFix = exists ? "" : " [Not available]";
@@ -86,6 +87,6 @@
 		return image;
 	}
 
-	private Map<ImageDescriptor, Image> registry = new HashMap<ImageDescriptor, Image>();
+	private Map<ImageDescriptor, Image> registry = new HashMap<>();
 
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/packages/FixAllDependenciesActionDelegate.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/packages/FixAllDependenciesActionDelegate.java
index f585aac..3bee34b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/packages/FixAllDependenciesActionDelegate.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/packages/FixAllDependenciesActionDelegate.java
@@ -9,7 +9,6 @@
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IncrementalProjectBuilder;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.dltk.core.DLTKCore;
@@ -20,7 +19,6 @@
 import org.eclipse.dltk.tcl.core.TclPackagesManager;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -29,16 +27,19 @@
 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
 import org.eclipse.ui.PlatformUI;
 
-public class FixAllDependenciesActionDelegate implements
-		IWorkbenchWindowActionDelegate {
+public class FixAllDependenciesActionDelegate
+		implements IWorkbenchWindowActionDelegate {
 	private ISelection selection;
 
+	@Override
 	public void dispose() {
 	}
 
+	@Override
 	public void init(IWorkbenchWindow window) {
 	}
 
+	@Override
 	public void run(IAction action) {
 		if (this.selection == null) {
 			return;
@@ -56,7 +57,7 @@
 	}
 
 	protected void processSelectionToElements(ISelection selection) {
-		final Set<IProject> projects = new HashSet<IProject>();
+		final Set<IProject> projects = new HashSet<>();
 		if (this.selection != null
 				&& this.selection instanceof IStructuredSelection) {
 			final IStructuredSelection sel = (IStructuredSelection) this.selection;
@@ -69,44 +70,36 @@
 			final ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(
 					PlatformUI.getWorkbench().getActiveWorkbenchWindow()
 							.getShell()) {
+				@Override
 				protected void configureShell(Shell shell) {
 					super.configureShell(shell);
 					shell.setText("Fix package dependencies...");
 				}
 			};
 			SafeRunner.run(new SafeRunnable() {
+				@Override
 				public void run() throws Exception {
-					progressDialog.run(true, true, new IRunnableWithProgress() {
-						public void run(IProgressMonitor monitor)
-								throws InvocationTargetException,
-								InterruptedException {
-							SubMonitor topMonitor = SubMonitor.convert(monitor,
-									"Fixing dependencies", projects.size());
-							final Set<IInterpreterInstall> installs = new HashSet<IInterpreterInstall>();
-							for (IProject project : projects) {
-								IScriptProject scriptProject = DLTKCore
-										.create(project);
-								try {
-									IInterpreterInstall install = ScriptRuntime
-											.getInterpreterInstall(scriptProject);
-									if (install != null
-											&& installs.add(install)) {
-										TclPackagesManager
-												.removeInterpreterInfo(install);
-									}
-									project
-											.build(
-													IncrementalProjectBuilder.FULL_BUILD,
-													SubMonitor
-															.convert(
-																	topMonitor,
-																	"Building "
-																			+ project
-																					.getName(),
-																	1));
-								} catch (CoreException e) {
-									throw new InvocationTargetException(e);
+					progressDialog.run(true, true, monitor -> {
+						SubMonitor topMonitor = SubMonitor.convert(monitor,
+								"Fixing dependencies", projects.size());
+						final Set<IInterpreterInstall> installs = new HashSet<>();
+						for (IProject project : projects) {
+							IScriptProject scriptProject = DLTKCore
+									.create(project);
+							try {
+								IInterpreterInstall install = ScriptRuntime
+										.getInterpreterInstall(scriptProject);
+								if (install != null && installs.add(install)) {
+									TclPackagesManager
+											.removeInterpreterInfo(install);
 								}
+								project.build(
+										IncrementalProjectBuilder.FULL_BUILD,
+										SubMonitor.convert(topMonitor,
+												"Building " + project.getName(),
+												1));
+							} catch (CoreException e) {
+								throw new InvocationTargetException(e);
 							}
 						}
 					});
@@ -115,6 +108,7 @@
 		}
 	}
 
+	@Override
 	public void selectionChanged(IAction action, ISelection selection) {
 		this.selection = selection;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/ManPagesPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/ManPagesPreferencePage.java
index d4f091d..3c6967a 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/ManPagesPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/ManPagesPreferencePage.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 
 package org.eclipse.dltk.tcl.internal.ui.preferences;
@@ -29,8 +28,8 @@
 /**
  * The page for setting the tcl documentation locations.
  */
-public final class ManPagesPreferencePage extends PreferencePage implements
-		IWorkbenchPreferencePage {
+public final class ManPagesPreferencePage extends PreferencePage
+		implements IWorkbenchPreferencePage {
 
 	protected final ManPagesLocationsBlock fBlock = new ManPagesLocationsBlock(
 			null, false);
@@ -77,6 +76,7 @@
 		}
 	}
 
+	@Override
 	public void init(IWorkbench workbench) {
 		// empty
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclBuildPathPropertyPage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclBuildPathPropertyPage.java
index ce57c60..677c44f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclBuildPathPropertyPage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclBuildPathPropertyPage.java
@@ -1,27 +1,25 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
 import org.eclipse.dltk.core.IDLTKLanguageToolkit;
 import org.eclipse.dltk.tcl.core.TclLanguageToolkit;
 import org.eclipse.dltk.ui.preferences.BuildPathsPropertyPage;
-import org.eclipse.ui.IWorkbenchPropertyPage;
 
-public class TclBuildPathPropertyPage extends BuildPathsPropertyPage implements
-		IWorkbenchPropertyPage {
+public class TclBuildPathPropertyPage extends BuildPathsPropertyPage {
 	public TclBuildPathPropertyPage() {
 	}
 
 	/**
 	 * @since 2.0
 	 */
+	@Override
 	public IDLTKLanguageToolkit getLanguageToolkit() {
 		return TclLanguageToolkit.getDefault();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCheckContentExcludeInputDialog.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCheckContentExcludeInputDialog.java
index c223d19..cfe2c3b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCheckContentExcludeInputDialog.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCheckContentExcludeInputDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -15,11 +15,11 @@
 
 import org.eclipse.dltk.compiler.task.TaskTagUtils;
 import org.eclipse.dltk.compiler.util.Util;
-import org.eclipse.dltk.ui.dialogs.StatusInfo;
 import org.eclipse.dltk.internal.ui.wizards.dialogfields.DialogField;
 import org.eclipse.dltk.internal.ui.wizards.dialogfields.IDialogFieldListener;
 import org.eclipse.dltk.internal.ui.wizards.dialogfields.LayoutUtil;
 import org.eclipse.dltk.internal.ui.wizards.dialogfields.StringDialogField;
+import org.eclipse.dltk.ui.dialogs.StatusInfo;
 import org.eclipse.jface.dialogs.StatusDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;
@@ -27,8 +27,8 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 
-public class TclCheckContentExcludeInputDialog extends StatusDialog implements
-		IDialogFieldListener {
+public class TclCheckContentExcludeInputDialog extends StatusDialog
+		implements IDialogFieldListener {
 
 	private StringDialogField fPatternDialogField;
 
@@ -39,13 +39,15 @@
 		super(parent);
 		fExistingNames = existingEntries;
 		if (input == null) {
-			setTitle(TclPreferencesMessages.TclCheckContentExcludeDialog_newTitle);
+			setTitle(
+					TclPreferencesMessages.TclCheckContentExcludeDialog_newTitle);
 		} else {
-			setTitle(TclPreferencesMessages.TclCheckContentExcludeDialog_editTitle);
+			setTitle(
+					TclPreferencesMessages.TclCheckContentExcludeDialog_editTitle);
 		}
 		fPatternDialogField = new StringDialogField();
-		fPatternDialogField
-				.setLabelText(TclPreferencesMessages.TclCheckContentExcludeDialog_pattern);
+		fPatternDialogField.setLabelText(
+				TclPreferencesMessages.TclCheckContentExcludeDialog_pattern);
 		fPatternDialogField.setDialogFieldListener(this);
 		fPatternDialogField.setText(input != null ? input : Util.EMPTY_STRING);
 	}
@@ -54,6 +56,7 @@
 		return fPatternDialogField.getText().trim();
 	}
 
+	@Override
 	protected Control createDialogArea(Composite parent) {
 		Composite composite = (Composite) super.createDialogArea(parent);
 		Composite inner = new Composite(composite, SWT.NONE);
@@ -63,8 +66,8 @@
 		layout.numColumns = 2;
 		inner.setLayout(layout);
 		fPatternDialogField.doFillIntoGrid(inner, 2);
-		LayoutUtil.setHorizontalGrabbing(fPatternDialogField
-				.getTextControl(null));
+		LayoutUtil.setHorizontalGrabbing(
+				fPatternDialogField.getTextControl(null));
 		LayoutUtil.setWidthHint(fPatternDialogField.getTextControl(null),
 				convertWidthInCharsToPixels(45));
 		fPatternDialogField.postSetFocusOnDialogField(parent.getDisplay());
@@ -76,27 +79,26 @@
 		StatusInfo status = new StatusInfo();
 		String newText = fPatternDialogField.getText();
 		if (newText.length() == 0) {
-			status
-					.setError(TclPreferencesMessages.TclCheckContentExcludeDialog_enterPatternError);
+			status.setError(
+					TclPreferencesMessages.TclCheckContentExcludeDialog_enterPatternError);
 		} else {
 			if (!TaskTagUtils.isValidName(newText)) {
-				status
-						.setError(TclPreferencesMessages.TclCheckContentExcludeDialog_invalidPatternError);
+				status.setError(
+						TclPreferencesMessages.TclCheckContentExcludeDialog_invalidPatternError);
 			} else if (fExistingNames.contains(newText)) {
-				status
-						.setError(TclPreferencesMessages.TclCheckContentExcludeDialog_duplicatePatternError);
+				status.setError(
+						TclPreferencesMessages.TclCheckContentExcludeDialog_duplicatePatternError);
 			}
 		}
 		updateStatus(status);
 	}
 
-	/*
-	 * @see org.eclipse.jface.window.Window#configureShell(Shell)
-	 */
+	@Override
 	protected void configureShell(Shell newShell) {
 		super.configureShell(newShell);
 	}
 
+	@Override
 	public void dialogFieldChanged(DialogField field) {
 		doValidation();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclContentAssistConfigurationBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclContentAssistConfigurationBlock.java
index e29aa22..799a899 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclContentAssistConfigurationBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclContentAssistConfigurationBlock.java
@@ -10,14 +10,16 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 
-public class TclContentAssistConfigurationBlock extends
-		CodeAssistConfigurationBlock {
-	public TclContentAssistConfigurationBlock(
-			PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
+public class TclContentAssistConfigurationBlock
+		extends CodeAssistConfigurationBlock {
+	public TclContentAssistConfigurationBlock(PreferencePage mainPreferencePage,
+			OverlayPreferenceStore store) {
 		super(mainPreferencePage, store);
 	}
 
-	protected void getOverlayKeys(ArrayList<OverlayPreferenceStore.OverlayKey> overlayKeys) {
+	@Override
+	protected void getOverlayKeys(
+			ArrayList<OverlayPreferenceStore.OverlayKey> overlayKeys) {
 		super.getOverlayKeys(overlayKeys);
 
 		overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
@@ -37,15 +39,14 @@
 	// false);
 	// }
 
+	@Override
 	public Control createControl(Composite parent) {
 		Composite control = (Composite) super.createControl(parent);
 
 		GridLayout layout = new GridLayout();
 		layout.numColumns = 2;
 
-		Composite composite = createSubsection(
-				control,
-				null,
+		Composite composite = createSubsection(control, null,
 				TclPreferencesMessages.TclContentAssistConfigurationBlock_filteringSection_title);
 		composite.setLayout(layout);
 		addSortingSection(composite);
@@ -53,8 +54,7 @@
 	}
 
 	protected void addSortingSection(Composite composite) {
-		addCheckBox(
-				composite,
+		addCheckBox(composite,
 				TclPreferencesMessages.TclContentAssistConfigurationBlock_filteringSection_filterInternalTclApi,
 				TclPreferenceConstants.CODEASSIST_FILTER_INTERNAL_API, 2);
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCorePreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCorePreferencePage.java
index 33991c3..624c92d 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCorePreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclCorePreferencePage.java
@@ -81,6 +81,7 @@
 				this.itemSeparator = listSeparator;
 			}
 
+			@Override
 			public void customButtonPressed(ListDialogField field, int index) {
 				String edited = null;
 				if (index != IDX_ADD) {
@@ -105,23 +106,26 @@
 								.containsAll(selectedElements));
 			}
 
+			@Override
 			public void doubleClicked(ListDialogField field) {
 				if (canEdit(field.getSelectedElements())) {
 					customButtonPressed(field, IDX_EDIT);
 				}
 			}
 
+			@Override
 			public void selectionChanged(ListDialogField field) {
 				List<?> selectedElements = field.getSelectedElements();
 				field.enableButton(IDX_EDIT, canEdit(selectedElements));
 			}
 
+			@Override
 			public void dialogFieldChanged(DialogField field) {
 				savePatterns((ListDialogField) field);
 			}
 
 			public void loadPatterns(ListDialogField field) {
-				final List<String> elements = new ArrayList<String>();
+				final List<String> elements = new ArrayList<>();
 				if (contributedElements != null) {
 					elements.addAll(contributedElements);
 				}
@@ -172,6 +176,7 @@
 				this.highlighted = highlighted;
 			}
 
+			@Override
 			public Font getFont(Object element) {
 				if (highlighted.contains(element)) {
 					return JFaceResources.getFontRegistry()
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorAssistancePreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorAssistancePreferencePage.java
index 8bb6071..ec96427 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorAssistancePreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorAssistancePreferencePage.java
@@ -1,13 +1,11 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
-
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
 import org.eclipse.dltk.tcl.internal.ui.TclUI;
@@ -22,45 +20,39 @@
  * <p>
  * Note: Must be public since it is referenced from plugin.xml
  * </p>
- * 
- * 
+ *
+ *
  */
-public class TclEditorAssistancePreferencePage extends
-		AbstractConfigurationBlockPreferencePage {
+public class TclEditorAssistancePreferencePage
+		extends AbstractConfigurationBlockPreferencePage {
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
-	 */
+	@Override
 	protected String getHelpId() {
 		// return ITclHelpContextIds.TCL_EDITOR_PREFERENCE_PAGE;
 
 		return null;
 	}
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
-	 */
+	@Override
 	protected void setDescription() {
 		String description = "&Code Assistance";
 		setDescription(description);
 	}
 
-	/*
-	 * @see org.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setPreferenceStore()
-	 */
+	@Override
 	protected void setPreferenceStore() {
 		setPreferenceStore(TclUI.getDefault().getPreferenceStore());
 	}
 
+	@Override
 	protected Label createDescriptionLabel(Composite parent) {
 		return null; // no description for new look.
 	}
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
-	 */
+	@Override
 	protected IPreferenceConfigurationBlock createConfigurationBlock(
 			OverlayPreferenceStore overlayPreferenceStore) {
-		return new TclContentAssistConfigurationBlock(this, overlayPreferenceStore);
+		return new TclContentAssistConfigurationBlock(this,
+				overlayPreferenceStore);
 	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java
index 06f2590..f273d03 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
@@ -19,7 +18,6 @@
 import org.eclipse.dltk.tcl.ui.TclPreferenceConstants;
 import org.eclipse.dltk.tcl.ui.text.TclPartitions;
 import org.eclipse.dltk.ui.preferences.AbstractScriptEditorColoringConfigurationBlock;
-import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
 import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
 import org.eclipse.dltk.ui.preferences.PreferencesMessages;
 import org.eclipse.dltk.ui.text.IColorManager;
@@ -33,9 +31,8 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.texteditor.ITextEditor;
 
-public class TclEditorColoringConfigurationBlock extends
-		AbstractScriptEditorColoringConfigurationBlock implements
-		IPreferenceConfigurationBlock {
+public class TclEditorColoringConfigurationBlock
+		extends AbstractScriptEditorColoringConfigurationBlock {
 
 	private static final String PREVIEW_FILE_NAME = "PreviewFile.txt"; //$NON-NLS-1$
 
@@ -44,11 +41,13 @@
 					TclPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR,
 					sCommentsCategory },
 			{ PreferencesMessages.DLTKEditorPreferencePage_CommentTaskTags,
-					TclPreferenceConstants.COMMENT_TASK_TAGS, sCommentsCategory },
+					TclPreferenceConstants.COMMENT_TASK_TAGS,
+					sCommentsCategory },
 			{ PreferencesMessages.DLTKEditorPreferencePage_others,
 					TclColorConstants.TCL_DEFAULT, sCoreCategory },
 			{ PreferencesMessages.DLTKEditorPreferencePage_keywords,
-					TclPreferenceConstants.EDITOR_KEYWORD_COLOR, sCoreCategory },
+					TclPreferenceConstants.EDITOR_KEYWORD_COLOR,
+					sCoreCategory },
 
 			{ PreferencesMessages.DLTKEditorPreferencePage_returnKeyword,
 					TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR,
@@ -60,7 +59,8 @@
 			{ PreferencesMessages.DLTKEditorPreferencePage_numbers,
 					TclPreferenceConstants.EDITOR_NUMBER_COLOR, sCoreCategory },
 			{ PreferencesMessages.DLTKEditorPreferencePage_variables,
-					TclPreferenceConstants.EDITOR_VARIABLE_COLOR, sCoreCategory } };
+					TclPreferenceConstants.EDITOR_VARIABLE_COLOR,
+					sCoreCategory } };
 
 	public TclEditorColoringConfigurationBlock(OverlayPreferenceStore store) {
 		super(store);
@@ -74,7 +74,8 @@
 	@Override
 	protected ProjectionViewer createPreviewViewer(Composite parent,
 			IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
-			boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
+			boolean showAnnotationsOverview, int styles,
+			IPreferenceStore store) {
 		return new ScriptSourceViewer(parent, verticalRuler, overviewRuler,
 				showAnnotationsOverview, styles, store);
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorSyntaxColoringPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorSyntaxColoringPreferencePage.java
index fe4dbb8..e1d993d 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorSyntaxColoringPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorSyntaxColoringPreferencePage.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
@@ -17,39 +16,31 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 
+public class TclEditorSyntaxColoringPreferencePage
+		extends AbstractConfigurationBlockPreferencePage {
 
-public class TclEditorSyntaxColoringPreferencePage extends
-		AbstractConfigurationBlockPreferencePage {
-
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
-	 */
+	@Override
 	protected String getHelpId() {
 		return "";
 	}
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
-	 */
+	@Override
 	protected void setDescription() {
 		String description = PreferencesMessages.DLTKEditorPreferencePage_colors;
 		setDescription(description);
 	}
 
+	@Override
 	protected Label createDescriptionLabel(Composite parent) {
 		return null;
 	}
 
-	/*
-	 * @see org.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setPreferenceStore()
-	 */
+	@Override
 	protected void setPreferenceStore() {
 		setPreferenceStore(TclUI.getDefault().getPreferenceStore());
 	}
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
-	 */
+	@Override
 	protected IPreferenceConfigurationBlock createConfigurationBlock(
 			OverlayPreferenceStore overlayPreferenceStore) {
 		return new TclEditorColoringConfigurationBlock(overlayPreferenceStore);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEnvironmentPropertyPage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEnvironmentPropertyPage.java
index 75af2db..ac2ce07 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEnvironmentPropertyPage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEnvironmentPropertyPage.java
@@ -33,11 +33,9 @@
 		private final IProject project;
 
 		public ProjectIndexJob(IProject project) {
-			super(
-					NLS
-							.bind(
-									TclPreferencesMessages.TclEnvironmentPropertyPage_IndexingJobName,
-									project.getName()));
+			super(NLS.bind(
+					TclPreferencesMessages.TclEnvironmentPropertyPage_IndexingJobName,
+					project.getName()));
 			this.project = project;
 		}
 
@@ -60,16 +58,15 @@
 		final Composite composite = new Composite(parent, SWT.NONE);
 		composite.setLayout(new GridLayout(2, false));
 		Label label = new Label(composite, SWT.NONE);
-		label
-				.setText(TclPreferencesMessages.TclEnvironmentPropertyPage_environmentLabel);
+		label.setText(
+				TclPreferencesMessages.TclEnvironmentPropertyPage_environmentLabel);
 		fEnvironments = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
-		fEnvironments.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,
-				false));
+		fEnvironments.setLayoutData(
+				new GridData(SWT.FILL, SWT.DEFAULT, true, false));
 		environments = EnvironmentManager.getEnvironments();
 		final String[] items = new String[environments.length + 1];
 		items[0] = TclPreferencesMessages.TclEnvironmentPropertyPage_detectAutomatically;
-		final IProject project = (IProject) getElement().getAdapter(
-				IProject.class);
+		final IProject project = getElement().getAdapter(IProject.class);
 		final String envId = getCurrentEnvironment(project);
 		int selection = 0;
 		for (int i = 0; i < environments.length; i++) {
@@ -88,35 +85,35 @@
 		final GridData indexerData = new GridData(GridData.FILL_HORIZONTAL);
 		indexerData.horizontalSpan = 2;
 		indexerEnabled.setLayoutData(indexerData);
-		indexerEnabled
-				.setText(TclPreferencesMessages.TclEnvironmentPropertyPage_IndexerEnabled);
-		indexerEnabled.setSelection(!DLTKCore.DISABLED.equals(scriptProject
-				.getOption(DLTKCore.INDEXER_ENABLED, false)));
+		indexerEnabled.setText(
+				TclPreferencesMessages.TclEnvironmentPropertyPage_IndexerEnabled);
+		indexerEnabled.setSelection(!DLTKCore.DISABLED.equals(
+				scriptProject.getOption(DLTKCore.INDEXER_ENABLED, false)));
 
 		builderEnabled = new Button(composite, SWT.CHECK);
 		final GridData builderData = new GridData(GridData.FILL_HORIZONTAL);
 		builderData.horizontalSpan = 2;
 		builderEnabled.setLayoutData(builderData);
-		builderEnabled
-				.setText(TclPreferencesMessages.TclEnvironmentPropertyPage_BuilderEnabled);
-		builderEnabled.setSelection(!DLTKCore.DISABLED.equals(scriptProject
-				.getOption(DLTKCore.BUILDER_ENABLED, false)));
+		builderEnabled.setText(
+				TclPreferencesMessages.TclEnvironmentPropertyPage_BuilderEnabled);
+		builderEnabled.setSelection(!DLTKCore.DISABLED.equals(
+				scriptProject.getOption(DLTKCore.BUILDER_ENABLED, false)));
 
 		localValidator = new Button(composite, SWT.CHECK);
 		final GridData localData = new GridData(GridData.FILL_HORIZONTAL);
 		localData.horizontalSpan = 2;
 		localValidator.setLayoutData(localData);
-		localValidator.setText(TclPreferencesMessages.TclEnvironmentPropertyPage_localTclChecker);
-		localValidator.setSelection(DLTKCore.ENABLED.equals(new ProjectScope(
-				project).getNode(TclPlugin.PLUGIN_ID).get(
-				TclPlugin.PREF_LOCAL_VALIDATOR, DLTKCore.DISABLED)));
+		localValidator.setText(
+				TclPreferencesMessages.TclEnvironmentPropertyPage_localTclChecker);
+		localValidator.setSelection(DLTKCore.ENABLED.equals(
+				new ProjectScope(project).getNode(TclPlugin.PLUGIN_ID).get(
+						TclPlugin.PREF_LOCAL_VALIDATOR, DLTKCore.DISABLED)));
 		return composite;
 	}
 
 	@Override
 	public boolean performOk() {
-		final IProject project = (IProject) getElement().getAdapter(
-				IProject.class);
+		final IProject project = getElement().getAdapter(IProject.class);
 		final int selection = fEnvironments.getSelectionIndex();
 		try {
 			if (selection <= 0) {
@@ -131,8 +128,8 @@
 		}
 		final IScriptProject scriptProject = DLTKCore.create(project);
 		final boolean newIndexer = indexerEnabled.getSelection();
-		final boolean wasIndexer = !DLTKCore.DISABLED.equals(scriptProject
-				.getOption(DLTKCore.INDEXER_ENABLED, false));
+		final boolean wasIndexer = !DLTKCore.DISABLED.equals(
+				scriptProject.getOption(DLTKCore.INDEXER_ENABLED, false));
 		if (wasIndexer != newIndexer) {
 			scriptProject.setOption(DLTKCore.INDEXER_ENABLED,
 					newIndexer ? DLTKCore.ENABLED : DLTKCore.DISABLED);
@@ -141,8 +138,8 @@
 			}
 		}
 		final boolean newBuilder = builderEnabled.getSelection();
-		final boolean wasBuilder = !DLTKCore.DISABLED.equals(scriptProject
-				.getOption(DLTKCore.BUILDER_ENABLED, false));
+		final boolean wasBuilder = !DLTKCore.DISABLED.equals(
+				scriptProject.getOption(DLTKCore.BUILDER_ENABLED, false));
 		if (wasBuilder != newBuilder) {
 			scriptProject.setOption(DLTKCore.BUILDER_ENABLED,
 					newBuilder ? DLTKCore.ENABLED : DLTKCore.DISABLED);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclFoldingPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclFoldingPreferencePage.java
index f630ea1..d7a489f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclFoldingPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclFoldingPreferencePage.java
@@ -1,16 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
-
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
-
 import org.eclipse.dltk.tcl.internal.ui.TclUI;
 import org.eclipse.dltk.tcl.internal.ui.text.folding.TclFoldingPreferenceBlock;
 import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
@@ -20,40 +17,34 @@
 import org.eclipse.dltk.ui.text.folding.IFoldingPreferenceBlock;
 import org.eclipse.jface.preference.PreferencePage;
 
-
 /**
  * The page for setting the editor options.
  */
-public final class TclFoldingPreferencePage extends AbstractConfigurationBlockPreferencePage {
-	
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId()
-	 */
+public final class TclFoldingPreferencePage
+		extends AbstractConfigurationBlockPreferencePage {
+
+	@Override
 	protected String getHelpId() {
-		//return IScriptHelpContextIds.TCL_EDITOR_PREFERENCE_PAGE;
+		// return IScriptHelpContextIds.TCL_EDITOR_PREFERENCE_PAGE;
 		return null;
 	}
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
-	 */
+	@Override
 	protected void setDescription() {
 		// setDescription(PreferencesMessages.EditorPreferencePage_folding_title);
 	}
-	
-	/*
-	 * @see org.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setPreferenceStore()
-	 */
+
+	@Override
 	protected void setPreferenceStore() {
 		setPreferenceStore(TclUI.getDefault().getPreferenceStore());
 	}
 
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
-	 */
-	protected IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore) {
+	@Override
+	protected IPreferenceConfigurationBlock createConfigurationBlock(
+			OverlayPreferenceStore overlayPreferenceStore) {
 		return new DefaultFoldingPreferenceConfigurationBlock(
 				overlayPreferenceStore, this) {
+			@Override
 			protected IFoldingPreferenceBlock createSourceCodeBlock(
 					OverlayPreferenceStore store, PreferencePage page) {
 				return new TclFoldingPreferenceBlock(store, page);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalConfigurationBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalConfigurationBlock.java
index 030e0f5..b4c537c 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalConfigurationBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalConfigurationBlock.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
@@ -25,6 +24,7 @@
 		// TODO Auto-generated constructor stub
 	}
 
+	@Override
 	public Control createControl(Composite parent) {
 		initializeDialogUnits(parent);
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalPreferencesPage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalPreferencesPage.java
index 4cfc85b..3a25618 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalPreferencesPage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalPreferencesPage.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
@@ -14,25 +13,29 @@
 import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
 import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
 
-public class TclGlobalPreferencesPage extends AbstractConfigurationBlockPreferencePage {
+public class TclGlobalPreferencesPage
+		extends AbstractConfigurationBlockPreferencePage {
 
-	protected IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore) {
-		// TODO Auto-generated method stub
+	@Override
+	protected IPreferenceConfigurationBlock createConfigurationBlock(
+			OverlayPreferenceStore overlayPreferenceStore) {
 		return new TclGlobalConfigurationBlock(overlayPreferenceStore, this);
 	}
 
+	@Override
 	protected String getHelpId() {
-		// TODO Auto-generated method stub
 		return null;
 	}
 
+	@Override
 	protected void setDescription() {
 		String description = TclPreferencesMessages.TCLGlobalPreferencePage_description;
 		setDescription(description);
 	}
 
+	@Override
 	protected void setPreferenceStore() {
-		setPreferenceStore(TclUI.getDefault().getPreferenceStore());		
+		setPreferenceStore(TclUI.getDefault().getPreferenceStore());
 	}
 
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalVariablesPropertyPage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalVariablesPropertyPage.java
index 02ad874..f707f1a 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalVariablesPropertyPage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclGlobalVariablesPropertyPage.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -33,14 +33,17 @@
 
 	private class StatusDialogAdapter implements IStatusDialog {
 
+		@Override
 		public Shell getShell() {
 			return TclGlobalVariablesPropertyPage.this.getShell();
 		}
 
+		@Override
 		public void setButtonLayoutData(Button button) {
 			TclGlobalVariablesPropertyPage.this.setButtonLayoutData(button);
 		}
 
+		@Override
 		public void updateStatusLine() {
 			// TODO Auto-generated method stub
 		}
@@ -59,17 +62,15 @@
 		composite.setLayout(new GridLayout(2, false));
 		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
 		variableBlock.createControlsIn(composite);
-		final IProject project = (IProject) getElement().getAdapter(
-				IProject.class);
-		variableBlock.setValues(TclPackagesManager.getVariablesEMap(project
-				.getName()));
+		final IProject project = getElement().getAdapter(IProject.class);
+		variableBlock.setValues(
+				TclPackagesManager.getVariablesEMap(project.getName()));
 		return composite;
 	}
 
 	@Override
 	public boolean performOk() {
-		final IProject project = (IProject) getElement().getAdapter(
-				IProject.class);
+		final IProject project = getElement().getAdapter(IProject.class);
 		final EMap<String, VariableValue> oldVars = TclPackagesManager
 				.getVariablesEMap(project.getName());
 		final EMap<String, VariableValue> newVars = variableBlock.getValues();
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclLibraryPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclLibraryPreferencePage.java
index 33fef0a..8e7b938 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclLibraryPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclLibraryPreferencePage.java
@@ -8,6 +8,7 @@
 	public TclLibraryPreferencePage() {
 	}
 
+	@Override
 	protected IDLTKLanguageToolkit getLanguageToolkit() {
 		return TclLanguageToolkit.getDefault();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclPropertyPage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclPropertyPage.java
index 87d81f1..39e39a3 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclPropertyPage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclPropertyPage.java
@@ -7,6 +7,7 @@
 
 public class TclPropertyPage extends PropertyPage {
 
+	@Override
 	protected Control createContents(Composite parent) {
 		return new Composite(parent, SWT.NONE);
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingConfigurationBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingConfigurationBlock.java
index ee593ae..054d38d 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingConfigurationBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingConfigurationBlock.java
@@ -1,13 +1,11 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
-
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
 import java.util.ArrayList;
@@ -17,6 +15,7 @@
 import org.eclipse.dltk.tcl.internal.ui.TclUI;
 import org.eclipse.dltk.tcl.ui.TclPreferenceConstants;
 import org.eclipse.dltk.ui.CodeFormatterConstants;
+import org.eclipse.dltk.ui.PreferenceConstants;
 import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlock;
 import org.eclipse.dltk.ui.preferences.OverlayPreferenceStore;
 import org.eclipse.dltk.ui.preferences.PreferencesMessages;
@@ -26,7 +25,6 @@
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
@@ -49,20 +47,20 @@
 
 	private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys() {
 
-		List<OverlayPreferenceStore.OverlayKey> keys = new ArrayList<OverlayPreferenceStore.OverlayKey>();
+		List<OverlayPreferenceStore.OverlayKey> keys = new ArrayList<>();
 
 		keys.add(new OverlayPreferenceStore.OverlayKey(
 				OverlayPreferenceStore.BOOLEAN,
-				TclPreferenceConstants.EDITOR_CLOSE_STRINGS));
+				PreferenceConstants.EDITOR_CLOSE_STRINGS));
 		keys.add(new OverlayPreferenceStore.OverlayKey(
 				OverlayPreferenceStore.BOOLEAN,
-				TclPreferenceConstants.EDITOR_CLOSE_BRACKETS));
+				PreferenceConstants.EDITOR_CLOSE_BRACKETS));
 		keys.add(new OverlayPreferenceStore.OverlayKey(
 				OverlayPreferenceStore.BOOLEAN,
-				TclPreferenceConstants.EDITOR_CLOSE_BRACES));
+				PreferenceConstants.EDITOR_CLOSE_BRACES));
 		keys.add(new OverlayPreferenceStore.OverlayKey(
 				OverlayPreferenceStore.BOOLEAN,
-				TclPreferenceConstants.EDITOR_SMART_TAB));
+				PreferenceConstants.EDITOR_SMART_TAB));
 		keys.add(new OverlayPreferenceStore.OverlayKey(
 				OverlayPreferenceStore.INT,
 				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE));
@@ -70,20 +68,17 @@
 		return keys.toArray(new OverlayPreferenceStore.OverlayKey[keys.size()]);
 	}
 
+	@Override
 	public Control createControl(Composite parent) {
 		Composite control = new Composite(parent, SWT.NONE);
 		GridLayout layout = new GridLayout();
 		control.setLayout(layout);
 
-		Composite composite = createSubsection(
-				control,
-				null,
+		Composite composite = createSubsection(control, null,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_autoclose_title);
 		addAutoclosingSection(composite);
 
-		composite = createSubsection(
-				control,
-				null,
+		composite = createSubsection(control, null,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_tabs_title);
 		addTabSection(composite);
 
@@ -98,14 +93,12 @@
 		GridLayout layout = new GridLayout();
 		composite.setLayout(layout);
 
-		addRadioButton(
-				composite,
+		addRadioButton(composite,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_smartPaste_simple,
 				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE,
 				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_SIMPLE);
 
-		addRadioButton(
-				composite,
+		addRadioButton(composite,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_smartPaste_full,
 				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE,
 				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_FULL);
@@ -116,10 +109,9 @@
 		GridLayout layout = new GridLayout();
 		composite.setLayout(layout);
 
-		addCheckBox(
-				composite,
+		addCheckBox(composite,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_typing_smartTab,
-				TclPreferenceConstants.EDITOR_SMART_TAB, 0);
+				PreferenceConstants.EDITOR_SMART_TAB, 0);
 
 		createMessage(composite);
 	}
@@ -129,20 +121,17 @@
 		layout.numColumns = 1;
 		composite.setLayout(layout);
 
-		addCheckBox(
-				composite,
+		addCheckBox(composite,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_closeStrings,
-				TclPreferenceConstants.EDITOR_CLOSE_STRINGS, 0);
+				PreferenceConstants.EDITOR_CLOSE_STRINGS, 0);
 
-		addCheckBox(
-				composite,
+		addCheckBox(composite,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_closeBrackets,
-				TclPreferenceConstants.EDITOR_CLOSE_BRACKETS, 0);
+				PreferenceConstants.EDITOR_CLOSE_BRACKETS, 0);
 
-		addCheckBox(
-				composite,
+		addCheckBox(composite,
 				TclPreferencesMessages.TCLSmartTypingConfigurationBlock_closeBraces,
-				TclPreferenceConstants.EDITOR_CLOSE_BRACES, 0);
+				PreferenceConstants.EDITOR_CLOSE_BRACES, 0);
 	}
 
 	private void createMessage(final Composite composite) {
@@ -151,18 +140,16 @@
 		// current profile automatically.
 		String linkTooltip = PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tooltip;
 		final String text;
-		String indentMode = TclUI.getDefault().getPreferenceStore().getString(
-				CodeFormatterConstants.FORMATTER_TAB_CHAR);
+		String indentMode = TclUI.getDefault().getPreferenceStore()
+				.getString(CodeFormatterConstants.FORMATTER_TAB_CHAR);
 		if (CodeFormatterConstants.TAB.equals(indentMode))
-			text = NLS
-					.bind(
-							PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tab_text,
-							getTabDisplaySize());
+			text = NLS.bind(
+					PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_tab_text,
+					getTabDisplaySize());
 		else
-			text = NLS
-					.bind(
-							PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_others_text,
-							getTabDisplaySize(), getIndentMode());
+			text = NLS.bind(
+					PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_others_text,
+					getTabDisplaySize(), getIndentMode());
 
 		final Link link = new Link(composite, SWT.NONE);
 		link.setText(text);
@@ -183,6 +170,7 @@
 		final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener() {
 			private boolean fHasRun = false;
 
+			@Override
 			public void propertyChange(PropertyChangeEvent event) {
 				if (fHasRun)
 					return;
@@ -202,17 +190,13 @@
 			}
 		};
 		combinedStore.addPropertyChangeListener(propertyChangeListener);
-		link.addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e) {
-				combinedStore
-						.removePropertyChangeListener(propertyChangeListener);
-			}
-		});
+		link.addDisposeListener(e -> combinedStore
+				.removePropertyChangeListener(propertyChangeListener));
 	}
 
 	private String getIndentMode() {
-		String indentMode = TclUI.getDefault().getPreferenceStore().getString(
-				CodeFormatterConstants.FORMATTER_TAB_CHAR);
+		String indentMode = TclUI.getDefault().getPreferenceStore()
+				.getString(CodeFormatterConstants.FORMATTER_TAB_CHAR);
 
 		if (CodeFormatterConstants.SPACE.equals(indentMode))
 			return PreferencesMessages.SmartTypingConfigurationBlock_tabs_message_spaces;
@@ -228,8 +212,8 @@
 	}
 
 	private int getTabDisplaySize() {
-		return TclUI.getDefault().getPreferenceStore().getInt(
-				CodeFormatterConstants.FORMATTER_TAB_SIZE);
+		return TclUI.getDefault().getPreferenceStore()
+				.getInt(CodeFormatterConstants.FORMATTER_TAB_SIZE);
 	}
 
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingPreferencePage.java
index f8bed3e..7ce9374 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclSmartTypingPreferencePage.java
@@ -1,16 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
-
 package org.eclipse.dltk.tcl.internal.ui.preferences;
 
-
 import org.eclipse.dltk.tcl.internal.ui.TclUI;
 import org.eclipse.dltk.ui.preferences.AbstractConfigurationBlockPreferencePage;
 import org.eclipse.dltk.ui.preferences.IPreferenceConfigurationBlock;
@@ -18,44 +15,38 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 
-
-
 /**
  * The page for setting the editor options.
  */
-public final class TclSmartTypingPreferencePage extends AbstractConfigurationBlockPreferencePage {
-	
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription()
-	 */
+public final class TclSmartTypingPreferencePage
+		extends AbstractConfigurationBlockPreferencePage {
+
+	@Override
 	protected void setDescription() {
-		String description= org.eclipse.dltk.tcl.internal.ui.preferences.TclPreferencesMessages.TCLSmartTypingConfigurationBlock_typing_tabTitle; 
+		String description = org.eclipse.dltk.tcl.internal.ui.preferences.TclPreferencesMessages.TCLSmartTypingConfigurationBlock_typing_tabTitle;
 		setDescription(description);
 	}
-	
-	/*
-	 * @see org.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setPreferenceStore()
-	 */
-	protected void setPreferenceStore() {		
+
+	@Override
+	protected void setPreferenceStore() {
 		setPreferenceStore(TclUI.getDefault().getPreferenceStore());
 	}
-	
-	
+
+	@Override
 	protected Label createDescriptionLabel(Composite parent) {
 		return null; // no description for new look.
 	}
-	
-	/*
-	 * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore)
-	 */
-	protected IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore) {
+
+	@Override
+	protected IPreferenceConfigurationBlock createConfigurationBlock(
+			OverlayPreferenceStore overlayPreferenceStore) {
 		return new TclSmartTypingConfigurationBlock(overlayPreferenceStore);
 	}
 
+	@Override
 	protected String getHelpId() {
 		// TODO Auto-generated method stub
 		return "";
 	}
 
-	
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclTodoTaskPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclTodoTaskPreferencePage.java
index 9fcfdc5..4e2ff0b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclTodoTaskPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclTodoTaskPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -20,17 +20,20 @@
 import org.eclipse.dltk.ui.util.IStatusChangeListener;
 import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
 
-public class TclTodoTaskPreferencePage extends
-		AbstractConfigurationBlockPropertyAndPreferencePage {
+public class TclTodoTaskPreferencePage
+		extends AbstractConfigurationBlockPropertyAndPreferencePage {
 
+	@Override
 	protected String getHelpId() {
 		return null;
 	}
 
+	@Override
 	protected void setDescription() {
 		setDescription(TclPreferencesMessages.TodoTaskDescription);
 	}
 
+	@Override
 	protected AbstractOptionsBlock createOptionsBlock(
 			IStatusChangeListener newStatusChangedListener, IProject project,
 			IWorkbenchPreferenceContainer container) {
@@ -38,22 +41,27 @@
 				container, TclPlugin.PLUGIN_ID);
 	}
 
+	@Override
 	protected String getNatureId() {
 		return TclNature.NATURE_ID;
 	}
 
+	@Override
 	protected String getProjectHelpId() {
 		return null;
 	}
 
+	@Override
 	protected void setPreferenceStore() {
 		// empty
 	}
 
+	@Override
 	protected String getPreferencePageId() {
 		return "org.eclipse.dltk.tcl.preferences.todo"; //$NON-NLS-1$
 	}
 
+	@Override
 	protected String getPropertyPageId() {
 		return "org.eclipse.dltk.tcl.propertyPage.todo"; //$NON-NLS-1$
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclCommentRule.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclCommentRule.java
index cf68923..55259ee 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclCommentRule.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclCommentRule.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.rules;
 
@@ -15,77 +14,80 @@
 import org.eclipse.jface.text.rules.Token;
 
 public class TclCommentRule implements IPredicateRule {
-	
+
 	IToken token;
-	
+
 	public TclCommentRule(IToken t) {
 		token = t;
 	}
-	
+
+	@Override
 	public IToken evaluate(ICharacterScanner scanner, boolean resume) {
 		return evaluate(scanner);
 	}
 
+	@Override
 	public IToken getSuccessToken() {
 		return token;
 	}
-	
-	private void runForward (ICharacterScanner scanner, int count) {
+
+	private void runForward(ICharacterScanner scanner, int count) {
 		for (int i = 0; i < count; i++)
-			scanner.read ();
+			scanner.read();
 	}
-	
-	private void runToLineEnd (ICharacterScanner scanner) {
+
+	private void runToLineEnd(ICharacterScanner scanner) {
 		boolean esc = false;
 		while (true) {
 			int c = scanner.read();
-			switch (c) {				
-				case '\\':
-					esc = true;
-					break;
-				case '\r':
-					break;
-				case '\n':
-				case ICharacterScanner.EOF:
-					if (!esc)
-						return;
-				default:
-					esc = false;
+			switch (c) {
+			case '\\':
+				esc = true;
+				break;
+			case '\r':
+				break;
+			case '\n':
+			case ICharacterScanner.EOF:
+				if (!esc)
+					return;
+			default:
+				esc = false;
 			}
 		}
 	}
 
+	@Override
 	public IToken evaluate(ICharacterScanner scanner) {
 		int ch = scanner.read();
 		scanner.unread();
-		if (ch != '#') { //even not a candidate to comment			
+		if (ch != '#') { // even not a candidate to comment
 			return Token.UNDEFINED;
 		}
-		//scan back for line start or semicolon
+		// scan back for line start or semicolon
 		int countBack = 0;
 		loop: while (true) {
 			if (scanner.getColumn() <= 0) {
 				runForward(scanner, countBack - 1);
-				runToLineEnd (scanner);
+				runToLineEnd(scanner);
 				return getSuccessToken();
 			}
 			scanner.unread();
 			countBack++;
 			int c = scanner.read();
 			switch (c) {
-				case ' ':
-				case '\t':
-					scanner.unread ();
-					break;
-				case '\n':
-				case ';':
-				case ICharacterScanner.EOF:
-					runForward(scanner, countBack - 1);
-					runToLineEnd (scanner);
-					return getSuccessToken();
-				default:
-					runForward(scanner, countBack - 1);
-					break loop;
+			case ' ':
+			case '\t':
+				scanner.unread();
+				break;
+			case '\n':
+			case ';':
+			case ICharacterScanner.EOF:
+				runForward(scanner, countBack - 1);
+				runToLineEnd(scanner);
+				return getSuccessToken();
+			default:
+				runForward(scanner, countBack - 1);
+				break loop;
 			}
 		}
 		return Token.UNDEFINED;
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclEscapedCharRule.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclEscapedCharRule.java
index 6a032d5..f654ddb 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclEscapedCharRule.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclEscapedCharRule.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.rules;
 
@@ -15,29 +14,32 @@
 import org.eclipse.jface.text.rules.Token;
 
 public class TclEscapedCharRule implements IPredicateRule {
-	
+
 	IToken token;
 	char esc;
-	
+
 	public TclEscapedCharRule(IToken token, char escape) {
 		this.token = token;
 		esc = escape;
 	}
 
+	@Override
 	public IToken evaluate(ICharacterScanner scanner) {
 		int c = scanner.read();
 		if (c == esc) {
 			scanner.read();
-			return getSuccessToken();			 
-		} else 
+			return getSuccessToken();
+		} else
 			scanner.unread();
 		return Token.UNDEFINED;
 	}
 
+	@Override
 	public IToken evaluate(ICharacterScanner scanner, boolean resume) {
 		return evaluate(scanner);
 	}
 
+	@Override
 	public IToken getSuccessToken() {
 		return token;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclFloatNumberRule.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclFloatNumberRule.java
index 0390e40..160ccfe 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclFloatNumberRule.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclFloatNumberRule.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.rules;
 
@@ -34,6 +33,7 @@
 		fColumn = column;
 	}
 
+	@Override
 	public IToken evaluate(ICharacterScanner scanner) {
 		int c = scanner.read();
 		int p = c;
@@ -45,7 +45,7 @@
 				} while (Character.isDigit((char) c));
 				if ((c != 'e' && c != 'E')) {
 					scanner.unread();
-				}				
+				}
 				if (p == '.') {
 					scanner.unread();
 					return Token.UNDEFINED;
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclParameterRule.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclParameterRule.java
index 485cd3e..51e07b3 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclParameterRule.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclParameterRule.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.rules;
 
@@ -14,28 +13,26 @@
 import org.eclipse.jface.text.rules.IToken;
 import org.eclipse.jface.text.rules.Token;
 
-public class TclParameterRule implements IRule
-{
+public class TclParameterRule implements IRule {
 	private IToken token;
 
-	public TclParameterRule( IToken token ) {
+	public TclParameterRule(IToken token) {
 		super();
 		this.token = token;
 	}
 
-	public IToken evaluate(ICharacterScanner scanner)
-	{
-		if( scanner.read() == '-' ) {
-			if( Character.isJavaIdentifierStart((char) scanner.read()) ) {
-				for( ;; ) {
+	@Override
+	public IToken evaluate(ICharacterScanner scanner) {
+		if (scanner.read() == '-') {
+			if (Character.isJavaIdentifierStart((char) scanner.read())) {
+				for (;;) {
 					int c = scanner.read();
-					if( !( Character.isJavaIdentifierPart((char) c) )  )
+					if (!(Character.isJavaIdentifierPart((char) c)))
 						break;
 				}
 				scanner.unread();
 				return token;
-			}
-			else
+			} else
 				scanner.unread();
 		}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclSpacedCommentRule.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclSpacedCommentRule.java
index 63f87bc..9691d4f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclSpacedCommentRule.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclSpacedCommentRule.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.rules;
 
@@ -15,31 +14,34 @@
 import org.eclipse.jface.text.rules.Token;
 
 public class TclSpacedCommentRule implements IPredicateRule {
-	
+
 	IToken token;
-	
+
 	public TclSpacedCommentRule(IToken t) {
 		token = t;
 	}
-	
+
+	@Override
 	public IToken evaluate(ICharacterScanner scanner, boolean resume) {
 		return evaluate(scanner);
 	}
 
+	@Override
 	public IToken getSuccessToken() {
 		return token;
 	}
 
+	@Override
 	public IToken evaluate(ICharacterScanner scanner) {
 		scanner.unread();
 		int c = scanner.read();
-		if (c != '\n') //not line start
+		if (c != '\n') // not line start
 			return Token.UNDEFINED;
-		//skip spaces
+		// skip spaces
 		int count = 0;
 		while (true) {
 			count++;
-			c = scanner.read ();
+			c = scanner.read();
 			if (c == ' ' || c == '\t')
 				continue;
 			if (c != '#') {
@@ -48,7 +50,7 @@
 				return Token.UNDEFINED;
 			} else
 				break;
-		} 
+		}
 		while (true) {
 			c = scanner.read();
 			if (c == '\n')
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclVariableRule.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclVariableRule.java
index 8b1b07b..d5a46a0 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclVariableRule.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/rules/TclVariableRule.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.rules;
 
@@ -18,12 +17,10 @@
 import org.eclipse.jface.text.rules.IToken;
 import org.eclipse.jface.text.rules.Token;
 
-
-public class TclVariableRule implements IRule
-{
+public class TclVariableRule implements IRule {
 	private IToken token;
 
-	public TclVariableRule( IToken token ) {
+	public TclVariableRule(IToken token) {
 		super();
 		this.token = token;
 	}
@@ -31,49 +28,53 @@
 	private class SkipCodeScanner extends CodeScanner {
 
 		ICharacterScanner scanner;
-		
-		public SkipCodeScanner (ICharacterScanner scanner) {
-			super (null);
+
+		public SkipCodeScanner(ICharacterScanner scanner) {
+			super(null);
 			this.scanner = scanner;
 		}
-		
-		public int read () {
+
+		@Override
+		public int read() {
 			return scanner.read();
 		}
-		
-		public boolean isEOF () {
+
+		@Override
+		public boolean isEOF() {
 			int res = scanner.read();
 			if (res == -1)
 				return true;
 			scanner.unread();
 			return false;
 		}
-		
-		public void unread () {
+
+		@Override
+		public void unread() {
 			scanner.unread();
 		}
-		
-		public int getPosition () {
+
+		@Override
+		public int getPosition() {
 			return scanner.getColumn();
 		}
-		
+
 	}
-	
-	public IToken evaluate(ICharacterScanner scanner)
-	{
+
+	@Override
+	public IToken evaluate(ICharacterScanner scanner) {
 		SkipCodeScanner scs = new SkipCodeScanner(scanner);
 		if (!VariableSubstitution.iAm(scs)) {
 			return Token.UNDEFINED;
 		}
-		
+
 		VariableSubstitution vs = new VariableSubstitution();
 		try {
 			vs.readMe(scs, new SimpleTclParser());
 		} catch (TclParseException e) {
-			//e.printStackTrace();
+			// e.printStackTrace();
 			return Token.UNDEFINED;
 		}
-		
+
 		return token;
 	}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/search/TclSearchPage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/search/TclSearchPage.java
index eb99be8..bfd089e 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/search/TclSearchPage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/search/TclSearchPage.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.search;
 
@@ -14,6 +13,7 @@
 import org.eclipse.dltk.ui.search.ScriptSearchPage;
 
 public class TclSearchPage extends ScriptSearchPage {
+	@Override
 	protected IDLTKLanguageToolkit getLanguageToolkit() {
 		return TclLanguageToolkit.getDefault();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateAccess.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateAccess.java
index d392cd5..0c32526 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateAccess.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateAccess.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
-
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.templates;
 
@@ -30,23 +29,17 @@
 		return instance;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getContextTypeId()
-	 */
+	@Override
 	protected String getContextTypeId() {
 		return TclUniversalTemplateContextType.CONTEXT_TYPE_ID;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getCustomTemplatesKey()
-	 */
+	@Override
 	protected String getCustomTemplatesKey() {
 		return CUSTOM_TEMPLATES_KEY;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateAccess#getPreferenceStore()
-	 */
+	@Override
 	protected IPreferenceStore getPreferenceStore() {
 		return TclUI.getDefault().getPreferenceStore();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateCompletionProcessor.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateCompletionProcessor.java
index 1b444df..eb117a1 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateCompletionProcessor.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateCompletionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,9 +14,9 @@
 /**
  * Tcl template completion processor
  */
-public class TclTemplateCompletionProcessor extends
-		ScriptTemplateCompletionProcessor {
-	
+public class TclTemplateCompletionProcessor
+		extends ScriptTemplateCompletionProcessor {
+
 	private static char[] IGNORE = new char[] { '.' };
 
 	public TclTemplateCompletionProcessor(
@@ -24,23 +24,17 @@
 		super(context);
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getContextTypeId()
-	 */
+	@Override
 	protected String getContextTypeId() {
 		return TclUniversalTemplateContextType.CONTEXT_TYPE_ID;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getIgnore()
-	 */
+	@Override
 	protected char[] getIgnore() {
 		return IGNORE;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateCompletionProcessor#getTemplateAccess()
-	 */
+	@Override
 	protected ScriptTemplateAccess getTemplateAccess() {
 		return TclTemplateAccess.getInstance();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateContext.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateContext.java
index 3960d22..ce61e30 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateContext.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplateContext.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.templates;
 
@@ -28,15 +27,14 @@
 		super(type, document, completionOffset, completionLength, sourceModule);
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplateContext#getIndenter()
-	 */
+	@Override
 	protected IScriptTemplateIndenter getIndenter() {
 		IPreferencesLookupDelegate prefs = getPreferences();
-		if (TabStyle.SPACES == TabStyle.forName(prefs.getString(
-				TclUI.PLUGIN_ID, CodeFormatterConstants.FORMATTER_TAB_CHAR))) {
-			return new TabExpandScriptTemplateIndenter(prefs.getInt(
-					TclUI.PLUGIN_ID, CodeFormatterConstants.FORMATTER_TAB_SIZE));
+		if (TabStyle.SPACES == TabStyle.forName(prefs.getString(TclUI.PLUGIN_ID,
+				CodeFormatterConstants.FORMATTER_TAB_CHAR))) {
+			return new TabExpandScriptTemplateIndenter(
+					prefs.getInt(TclUI.PLUGIN_ID,
+							CodeFormatterConstants.FORMATTER_TAB_SIZE));
 		}
 		return super.getIndenter();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplatesPreferencePage.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplatesPreferencePage.java
index 3869f06..41d49ce 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplatesPreferencePage.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclTemplatesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,36 +19,27 @@
 /**
  * Tcl code templates preference page
  */
-public class TclTemplatesPreferencePage extends
-		ScriptTemplatePreferencePage {
+public class TclTemplatesPreferencePage extends ScriptTemplatePreferencePage {
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#createSourceViewerConfiguration()
-	 */
+	@Override
 	protected ScriptSourceViewerConfiguration createSourceViewerConfiguration() {
-		return new SimpleTclSourceViewerConfiguration(getTextTools()
-				.getColorManager(), getPreferenceStore(), null,
+		return new SimpleTclSourceViewerConfiguration(
+				getTextTools().getColorManager(), getPreferenceStore(), null,
 				TclPartitions.TCL_PARTITIONING, false);
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#setDocumentParticioner(org.eclipse.jface.text.IDocument)
-	 */
+	@Override
 	protected void setDocumentPartitioner(IDocument document) {
 		getTextTools().setupDocumentPartitioner(document,
 				TclPartitions.TCL_PARTITIONING);
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#setPreferenceStore()
-	 */
+	@Override
 	protected void setPreferenceStore() {
 		setPreferenceStore(TclUI.getDefault().getPreferenceStore());
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.templates.ScriptTemplatePreferencePage#getTemplateAccess()
-	 */
+	@Override
 	protected ScriptTemplateAccess getTemplateAccess() {
 		return TclTemplateAccess.getInstance();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclUniversalTemplateContextType.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclUniversalTemplateContextType.java
index 8fa871e..0e2f659 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclUniversalTemplateContextType.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/templates/TclUniversalTemplateContextType.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
+
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.templates;
 
@@ -16,21 +16,23 @@
 
 public class TclUniversalTemplateContextType extends ScriptTemplateContextType {
 	public static final String CONTEXT_TYPE_ID = "tclUniversalTemplateContextType";
-		
+
 	public TclUniversalTemplateContextType() {
 		// empty constructor
 	}
-	
+
 	public TclUniversalTemplateContextType(String id) {
 		super(id);
 	}
-	
+
 	public TclUniversalTemplateContextType(String id, String name) {
 		super(id, name);
 	}
 
+	@Override
 	public ScriptTemplateContext createContext(IDocument document, int offset,
 			int length, ISourceModule sourceModule) {
-		return new TclTemplateContext(this, document, offset, length, sourceModule);
-	}		
+		return new TclTemplateContext(this, document, offset, length,
+				sourceModule);
+	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/CodeTemplateTclSourceViewerConfiguration.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/CodeTemplateTclSourceViewerConfiguration.java
index a404fb6..710a39a 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/CodeTemplateTclSourceViewerConfiguration.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/CodeTemplateTclSourceViewerConfiguration.java
@@ -21,15 +21,12 @@
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.text.DefaultInformationControl;
 import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IInformationControl;
-import org.eclipse.jface.text.IInformationControlCreator;
 import org.eclipse.jface.text.ITextHover;
 import org.eclipse.jface.text.contentassist.ContentAssistant;
 import org.eclipse.jface.text.contentassist.IContentAssistant;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.editors.text.EditorsUI;
 import org.eclipse.ui.texteditor.ITextEditor;
 
@@ -73,14 +70,9 @@
 				IContentAssistant.PROPOSAL_OVERLAY);
 		assistant.setContextInformationPopupOrientation(
 				IContentAssistant.CONTEXT_INFO_ABOVE);
-		assistant
-				.setInformationControlCreator(new IInformationControlCreator() {
-					public IInformationControl createInformationControl(
-							Shell parent) {
-						return new DefaultInformationControl(parent,
-								EditorsUI.getTooltipAffordanceString());
-					}
-				});
+		assistant.setInformationControlCreator(
+				parent -> new DefaultInformationControl(parent,
+						EditorsUI.getTooltipAffordanceString()));
 
 		Color background = getColor(store,
 				PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND, manager);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SimpleTclSourceViewerConfiguration.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SimpleTclSourceViewerConfiguration.java
index ba72156..2e7d082 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SimpleTclSourceViewerConfiguration.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SimpleTclSourceViewerConfiguration.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -21,82 +20,83 @@
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.ui.texteditor.ITextEditor;
 
-
-
 /**
- * A simple {@linkplain org.eclipse.dltk.ui.text.TclSourceViewerConfiguration Tcl source viewer configuration}.
+ * A simple {@linkplain org.eclipse.dltk.ui.text.TclSourceViewerConfiguration
+ * Tcl source viewer configuration}.
  * <p>
  * This simple source viewer configuration basically provides syntax coloring
- * and disables all other features like code assist, quick outlines, hyperlinking, etc.
+ * and disables all other features like code assist, quick outlines,
+ * hyperlinking, etc.
  * </p>
  * 
-	 *
+ *
  */
-public class SimpleTclSourceViewerConfiguration extends TclSourceViewerConfiguration {
-
+public class SimpleTclSourceViewerConfiguration
+		extends TclSourceViewerConfiguration {
 
 	private boolean fConfigureFormatter;
 
 	/**
-	 * Creates a new Tcl source viewer configuration for viewers in the given editor
-	 * using the given preference store, the color manager and the specified document partitioning.
+	 * Creates a new Tcl source viewer configuration for viewers in the given
+	 * editor using the given preference store, the color manager and the
+	 * specified document partitioning.
 	 *
-	 * @param colorManager the color manager
-	 * @param preferenceStore the preference store, can be read-only
-	 * @param editor the editor in which the configured viewer(s) will reside, or <code>null</code> if none
-	 * @param partitioning the document partitioning for this configuration, or <code>null</code> for the default partitioning
-	 * @param configureFormatter <code>true</code> if a content formatter should be configured
+	 * @param colorManager
+	 *            the color manager
+	 * @param preferenceStore
+	 *            the preference store, can be read-only
+	 * @param editor
+	 *            the editor in which the configured viewer(s) will reside, or
+	 *            <code>null</code> if none
+	 * @param partitioning
+	 *            the document partitioning for this configuration, or
+	 *            <code>null</code> for the default partitioning
+	 * @param configureFormatter
+	 *            <code>true</code> if a content formatter should be configured
 	 */
-	public SimpleTclSourceViewerConfiguration(IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor, String partitioning, boolean configureFormatter) {
+	public SimpleTclSourceViewerConfiguration(IColorManager colorManager,
+			IPreferenceStore preferenceStore, ITextEditor editor,
+			String partitioning, boolean configureFormatter) {
 		super(colorManager, preferenceStore, editor, partitioning);
-		fConfigureFormatter= configureFormatter;
+		fConfigureFormatter = configureFormatter;
 	}
-	
-	/*
-	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
-	 */
-	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
+
+	@Override
+	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer,
+			String contentType) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getAnnotationHover(ISourceViewer)
-	 */
+	@Override
 	public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getOverviewRulerAnnotationHover(ISourceViewer)
-	 */
-	public IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) {
+	@Override
+	public IAnnotationHover getOverviewRulerAnnotationHover(
+			ISourceViewer sourceViewer) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getConfiguredTextHoverStateMasks(ISourceViewer, String)
-	 */
-	public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) {
+	@Override
+	public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer,
+			String contentType) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getTextHover(ISourceViewer, String, int)
-	 */
-	public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
+	@Override
+	public ITextHover getTextHover(ISourceViewer sourceViewer,
+			String contentType, int stateMask) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getTextHover(ISourceViewer, String)
-	 */
-	public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+	@Override
+	public ITextHover getTextHover(ISourceViewer sourceViewer,
+			String contentType) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getContentFormatter(ISourceViewer)
-	 */
+	@Override
 	public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
 		if (fConfigureFormatter)
 			return super.getContentFormatter(sourceViewer);
@@ -104,38 +104,32 @@
 			return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getInformationControlCreator(ISourceViewer)
-	 */
-	public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) {
+	@Override
+	public IInformationControlCreator getInformationControlCreator(
+			ISourceViewer sourceViewer) {
 		return null;
 	}
 
-	/*
-	 * @see SourceViewerConfiguration#getInformationPresenter(ISourceViewer)
-	 */
-	public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
+	@Override
+	public IInformationPresenter getInformationPresenter(
+			ISourceViewer sourceViewer) {
 		return null;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.text.TclSourceViewerConfiguration#getOutlinePresenter(org.eclipse.jface.text.source.ISourceViewer, boolean)
-	 */
-	public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer, boolean doCodeResolve) {
+	@Override
+	public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer,
+			boolean doCodeResolve) {
 		return null;
 	}
 
-	/*
-	 * @see org.eclipse.dltk.ui.text.TclSourceViewerConfiguration#getHierarchyPresenter(org.eclipse.jface.text.source.ISourceViewer, boolean)
-	 */
-	public IInformationPresenter getHierarchyPresenter(ISourceViewer sourceViewer, boolean doCodeResolve) {
+	public IInformationPresenter getHierarchyPresenter(
+			ISourceViewer sourceViewer, boolean doCodeResolve) {
 		return null;
 	}
 
-	/*
-	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getHyperlinkDetectors(org.eclipse.jface.text.source.ISourceViewer)
-	 */
-	public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
+	@Override
+	public IHyperlinkDetector[] getHyperlinkDetectors(
+			ISourceViewer sourceViewer) {
 		return null;
 	}
 }
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SourcesSelectionDialog.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SourcesSelectionDialog.java
index 997e2a3..955662f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SourcesSelectionDialog.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/SourcesSelectionDialog.java
@@ -8,12 +8,10 @@
 import org.eclipse.dltk.core.environment.IEnvironment;
 import org.eclipse.dltk.ui.environment.IEnvironmentUI;
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.window.IShellProvider;
 import org.eclipse.swt.SWT;
@@ -40,20 +38,23 @@
 
 	private final class SourcesContentProvider
 			implements IStructuredContentProvider {
+		@Override
 		public void inputChanged(Viewer viewer, Object oldInput,
 				Object newInput) {
 		}
 
+		@Override
 		public void dispose() {
 		}
 
+		@Override
 		public Object[] getElements(Object inputElement) {
 			return sources.toArray();
 		}
 	}
 
 	private ListViewer sourcesViewer;
-	private Set<String> sources = new HashSet<String>();
+	private Set<String> sources = new HashSet<>();
 	private IEnvironmentUI environmentUI;
 	private Button remove;
 	private Button add;
@@ -114,12 +115,7 @@
 			}
 		});
 		updateEnablement();
-		sourcesViewer
-				.addSelectionChangedListener(new ISelectionChangedListener() {
-					public void selectionChanged(SelectionChangedEvent event) {
-						updateEnablement();
-					}
-				});
+		sourcesViewer.addSelectionChangedListener(event -> updateEnablement());
 		getShell().layout();
 		return contents;
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclAutoEditStrategy.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclAutoEditStrategy.java
index ea9a2be..9793cf9 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclAutoEditStrategy.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclAutoEditStrategy.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -66,7 +65,7 @@
 	/**
 	 * Calculates real length of string. So any char except \t has length 1, \t
 	 * has length getTabWidth.
-	 * 
+	 *
 	 * @param str
 	 *            string to process
 	 * @return length
@@ -98,13 +97,13 @@
 	}
 
 	private boolean isSmartPasteMode1() {
-		return preferenceStore
-				.getInt(TclPreferenceConstants.EDITOR_SMART_PASTE_MODE) == TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_SIMPLE;
+		return preferenceStore.getInt(
+				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE) == TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_SIMPLE;
 	}
 
 	private boolean isSmartPasteMode2() {
-		return preferenceStore
-				.getInt(TclPreferenceConstants.EDITOR_SMART_PASTE_MODE) == TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_FULL;
+		return preferenceStore.getInt(
+				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE) == TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_FULL;
 	}
 
 	public TclAutoEditStrategy(IPreferenceStore store, String part) {
@@ -121,7 +120,7 @@
 
 	/**
 	 * Returns the leading whitespaces.
-	 * 
+	 *
 	 * @param document
 	 *            - the document being parsed
 	 * @param line
@@ -143,7 +142,7 @@
 
 	/**
 	 * Returns the leading whitespaces and tabs.
-	 * 
+	 *
 	 * @param line
 	 *            - the line being searched
 	 * @return the leading whitespace
@@ -221,7 +220,7 @@
 
 	/**
 	 * Return pair to brace. Ex. '(' for ')', e.t.c.
-	 * 
+	 *
 	 * @param b
 	 *            input brace
 	 * @return peer brace
@@ -255,7 +254,7 @@
 	 * proc () {
 	 * </code> function will return new BraceBlockType. And for
 	 * <code>proc(){}</code> function will return null
-	 * 
+	 *
 	 * @param d
 	 *            document containing the line
 	 * @param line
@@ -348,7 +347,7 @@
 
 	/**
 	 * Find line with number <=line, that is Tcl code line (not comment)
-	 * 
+	 *
 	 * @param d
 	 *            the document to search in
 	 * @param line
@@ -439,8 +438,8 @@
 					dummyPeer = true;
 				}
 				// find closing peer, if exists
-				int peerOffset = scanner.findClosingPeer(pos,
-						block.openingPeer, block.closingPeer);
+				int peerOffset = scanner.findClosingPeer(pos, block.openingPeer,
+						block.closingPeer);
 				// if not fount peer, we need it
 				if (peerOffset == TclDocumentScanner.NOT_FOUND)
 					needPeer = true;
@@ -456,14 +455,14 @@
 			int contentStart = findEndOfWhiteSpace(d, c.offset, lineEnd);
 			c.length = Math.max(contentStart - c.offset, 0);
 
-			if (block instanceof BraceBlock
-					&& !preferenceStore
-							.getBoolean(TclPreferenceConstants.EDITOR_CLOSE_BRACES))
+			if (block instanceof BraceBlock && !preferenceStore
+					.getBoolean(PreferenceConstants.EDITOR_CLOSE_BRACES))
 				needPeer = false;
 
-			if ((block instanceof BracketBlock || block instanceof RoundBracketBlock)
-					&& !preferenceStore
-							.getBoolean(TclPreferenceConstants.EDITOR_CLOSE_BRACKETS))
+			if ((block instanceof BracketBlock
+					|| block instanceof RoundBracketBlock)
+					&& !preferenceStore.getBoolean(
+							PreferenceConstants.EDITOR_CLOSE_BRACKETS))
 				needPeer = false;
 
 			if (needPeer || dummyPeer) {
@@ -494,7 +493,8 @@
 
 	}
 
-	private void smartIndentAfterOpeningBracket(IDocument d, DocumentCommand c) {
+	private void smartIndentAfterOpeningBracket(IDocument d,
+			DocumentCommand c) {
 		if (c.offset == -1)
 			return;
 
@@ -556,7 +556,8 @@
 				if (peerOffset == TclDocumentScanner.NOT_FOUND)
 					needPeer = true;
 				// check partition
-				if (getRegionType(d, c.offset) != IDocument.DEFAULT_CONTENT_TYPE)
+				if (getRegionType(d,
+						c.offset) != IDocument.DEFAULT_CONTENT_TYPE)
 					return;
 
 				if (!needPeer)
@@ -580,7 +581,8 @@
 
 	}
 
-	private void smartIndentAfterClosingBracket(IDocument d, DocumentCommand c) {
+	private void smartIndentAfterClosingBracket(IDocument d,
+			DocumentCommand c) {
 		if (c.offset == -1 || d.getLength() == 0)
 			return;
 		try {
@@ -588,9 +590,11 @@
 			// if we already have bracket we should jump over it
 			if (c.offset != d.getLength()
 					&& bracket == d.get(c.offset, 1).charAt(0)
-					&& (getRegionType(d, c.offset) == IDocument.DEFAULT_CONTENT_TYPE)) {
+					&& (getRegionType(d,
+							c.offset) == IDocument.DEFAULT_CONTENT_TYPE)) {
 				if ((bracket == '}' && closeBraces())
-						|| ((bracket == ')' || bracket == ']') && closeBrackets())) {
+						|| ((bracket == ')' || bracket == ']')
+								&& closeBrackets())) {
 					c.text = "";
 					c.shiftsCaret = false;
 					c.caretOffset = c.offset + 1;
@@ -675,9 +679,8 @@
 				// if our line is inside brackets, get line with opening bracket
 				block = getLastOpenBlockType(d, d.getLineOffset(curLine));
 				if (block != null) {
-					int peer = scanner.findOpeningPeer(
-							d.getLineOffset(curLine), block.openingPeer,
-							block.closingPeer);
+					int peer = scanner.findOpeningPeer(d.getLineOffset(curLine),
+							block.openingPeer, block.closingPeer);
 					if (peer != TclDocumentScanner.NOT_FOUND) {
 						lastCodeLine = d.getLineOfOffset(peer);
 					}
@@ -715,7 +718,7 @@
 
 	/**
 	 * Installs a partitioner with <code>document</code>.
-	 * 
+	 *
 	 * @param document
 	 *            the document
 	 */
@@ -731,7 +734,7 @@
 
 	/**
 	 * Removes a partitioner with <code>document</code>.
-	 * 
+	 *
 	 * @param document
 	 *            the document
 	 */
@@ -741,7 +744,7 @@
 
 	/**
 	 * Reindents c.text when pasting(simply indents all to common level).
-	 * 
+	 *
 	 * @param d
 	 * @param c
 	 */
@@ -779,9 +782,8 @@
 						break myloop;
 					}
 				}
-				if (depth == 0
-						&& i != c.text.length()
-						&& getRegionType(temp, c.offset + i) != TclPartitions.TCL_STRING) {
+				if (depth == 0 && i != c.text.length() && getRegionType(temp,
+						c.offset + i) != TclPartitions.TCL_STRING) {
 					String first = getLineIndent(c.text.substring(0, i));
 					String second = getLineIndent(temp, line + 1);
 					temp.replace(start, c.offset - start + first.length(),
@@ -848,13 +850,14 @@
 			String content = d.get(0, cmd.offset) + cmd.text;
 			Document temp = new Document(content);
 			installStuff(temp);
-			List<TclBlock> blocks = new ArrayList<TclBlock>();
+			List<TclBlock> blocks = new ArrayList<>();
 			int figs = 0; // count of braces
 			int newOffset = cmd.offset;
 			int cmdLine = d.getLineOfOffset(cmd.offset);
 			int cmdLineStart = d.getLineOffset(cmdLine);
 			int startLine = d.getLineOfOffset(cmd.offset) + 1;
-			if (d.get(cmdLineStart, cmd.offset - cmdLineStart).trim().length() == 0) {
+			if (d.get(cmdLineStart, cmd.offset - cmdLineStart).trim()
+					.length() == 0) {
 				// we are inserting lines block
 				startLine--;
 				newOffset = cmdLineStart;
@@ -888,9 +891,8 @@
 				int line = temp.getLineOfOffset(offset);
 				String currentIndent = getLineIndent(temp, line);
 				// if may start reindenting
-				if (line >= startLine
-						&& offset == temp.getLineOffset(line)
-								+ currentIndent.length()) {
+				if (line >= startLine && offset == temp.getLineOffset(line)
+						+ currentIndent.length()) {
 					StringBuffer newIndentBuf = new StringBuffer();
 					for (TclBlock b : blocks) {
 						newIndentBuf.append(b.indent);
@@ -926,7 +928,7 @@
 
 	/**
 	 * get partition covering offset
-	 * 
+	 *
 	 * @param d
 	 * @param offset
 	 * @return
@@ -944,6 +946,7 @@
 	 * org.eclipse.jface.text.IAutoIndentStrategy#customizeDocumentCommand(org
 	 * .eclipse.jface.text.IDocument, org.eclipse.jface.text.DocumentCommand)
 	 */
+	@Override
 	public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
 		if (c.doit == false)
 			return;
@@ -971,7 +974,7 @@
 			case '\t':
 				boolean jumped = false;
 				if (preferenceStore
-						.getBoolean(TclPreferenceConstants.EDITOR_SMART_TAB)) {
+						.getBoolean(PreferenceConstants.EDITOR_SMART_TAB)) {
 					jumped = smartIndentJump(d, c);
 				}
 				if (!jumped) { // process tab key using format options
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java
index f4f1106..5e366aa 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -20,6 +19,7 @@
 import org.eclipse.dltk.ui.text.AbstractScriptScanner;
 import org.eclipse.dltk.ui.text.IColorManager;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.IRule;
 import org.eclipse.jface.text.rules.IToken;
 import org.eclipse.jface.text.rules.WhitespaceRule;
 import org.eclipse.jface.text.rules.WordRule;
@@ -28,10 +28,9 @@
 
 	private static final String fgTokenProperties[] = new String[] {
 			TclColorConstants.TCL_SINGLE_LINE_COMMENT,
-			TclColorConstants.TCL_DEFAULT, // 
-			TclColorConstants.TCL_KEYWORD,
-			TclColorConstants.TCL_KEYWORD_RETURN, // 
-			TclColorConstants.TCL_NUMBER, // 
+			TclColorConstants.TCL_DEFAULT, //
+			TclColorConstants.TCL_KEYWORD, TclColorConstants.TCL_KEYWORD_RETURN, //
+			TclColorConstants.TCL_NUMBER, //
 			TclColorConstants.TCL_VARIABLE, };
 
 	private static final String RETURN_KEYWORD = "return"; //$NON-NLS-1$
@@ -41,12 +40,14 @@
 		initialize();
 	}
 
+	@Override
 	protected String[] getTokenProperties() {
 		return fgTokenProperties;
 	}
 
-	protected List createRules() {
-		List/* <IRule> */rules = new ArrayList/* <IRule> */();
+	@Override
+	protected List<IRule> createRules() {
+		List<IRule> rules = new ArrayList<>();
 
 		IToken keyword = getToken(TclColorConstants.TCL_KEYWORD);
 		IToken comment = getToken(TclColorConstants.TCL_SINGLE_LINE_COMMENT);
@@ -69,7 +70,8 @@
 			wordRule.addWord(keywords[i], keyword);
 		}
 
-		IToken returnToken = getToken(TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR);
+		IToken returnToken = getToken(
+				TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR);
 		wordRule.addWord(RETURN_KEYWORD, returnToken);
 
 		rules.add(wordRule);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeTemplateAccess.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeTemplateAccess.java
index c256acf..834f0ce 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeTemplateAccess.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeTemplateAccess.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -31,10 +31,11 @@
 	private static final String CODE_TEMPLATES_KEY = "org.eclipse.dltk.tcl.text.custom_code_templates"; //$NON-NLS-1$
 
 	public TclCodeTemplateAccess() {
-		super(TclUI.PLUGIN_ID, CODE_TEMPLATES_KEY, TclUI.getDefault()
-				.getPreferenceStore());
+		super(TclUI.PLUGIN_ID, CODE_TEMPLATES_KEY,
+				TclUI.getDefault().getPreferenceStore());
 	}
 
+	@Override
 	protected ContextTypeRegistry createContextTypeRegistry() {
 		final ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
 		registry.addContextType("org.eclipse.dltk.tcl.text.template.type.tcl");
@@ -43,22 +44,25 @@
 
 	private ICodeTemplateCategory[] categories = null;
 
+	@Override
 	public ICodeTemplateCategory[] getCategories() {
 		if (categories == null) {
-			Iterator i = getContextTypeRegistry().contextTypes();
-			List contextTypes = new ArrayList();
+			Iterator<TemplateContextType> i = getContextTypeRegistry()
+					.contextTypes();
+			List<TemplateContextType> contextTypes = new ArrayList<>();
 			while (i.hasNext()) {
 				contextTypes.add(i.next());
 			}
 			categories = new ICodeTemplateCategory[] { new CodeTemplateCategory(
-					"Files", true, (TemplateContextType[]) contextTypes
-							.toArray(new TemplateContextType[contextTypes
-									.size()])) };
+					"Files", true, contextTypes.toArray(
+							new TemplateContextType[contextTypes.size()])) };
 		}
 		return categories;
 	}
 
-	public ICodeTemplateCategory getCategoryOfContextType(String contextTypeId) {
+	@Override
+	public ICodeTemplateCategory getCategoryOfContextType(
+			String contextTypeId) {
 		return getCategories()[0];
 	}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclDocumentScanner.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclDocumentScanner.java
index 03d5914..f01202b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclDocumentScanner.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclDocumentScanner.java
@@ -1,15 +1,11 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
-/**
- * 
- */
 package org.eclipse.dltk.tcl.internal.ui.text;
 
 import java.util.Arrays;
@@ -24,10 +20,8 @@
 import org.eclipse.jface.text.TextUtilities;
 import org.eclipse.jface.text.TypedRegion;
 
-
 public class TclDocumentScanner {
 
-
 	/**
 	 * Returned by all methods when the requested position could not be found,
 	 * or if a {@link BadLocationException} was thrown while scanning.
@@ -40,16 +34,15 @@
 	 */
 	public static final int UNBOUND = -2;
 
-
 	/**
-	 * Specifies the stop condition, upon which the <code>scanXXX</code>
-	 * methods will decide whether to keep scanning or not. This interface may
+	 * Specifies the stop condition, upon which the <code>scanXXX</code> methods
+	 * will decide whether to keep scanning or not. This interface may
 	 * implemented by clients.
 	 */
 	private static abstract class StopCondition {
 		/**
 		 * Instructs the scanner to return the current position.
-		 * 
+		 *
 		 * @param ch
 		 *            the char at the current position
 		 * @param position
@@ -63,7 +56,7 @@
 		/**
 		 * Asks the condition to return the next position to query. The default
 		 * is to return the next/previous position.
-		 * 
+		 *
 		 * @return the next position to scan
 		 */
 		public int nextPosition(int position, boolean forward) {
@@ -76,9 +69,7 @@
 	 * {@link Character#isWhitespace(char)}) character.
 	 */
 	private static class NonWhitespace extends StopCondition {
-		/*
-		 * @see org.eclipse.dltk.internal.ui.text.TclDocumentScanner.StopCondition#stop(char)
-		 */
+		@Override
 		public boolean stop(char ch, int position, boolean forward) {
 			return !Character.isWhitespace(ch);
 		}
@@ -86,22 +77,17 @@
 
 	/**
 	 * Stops upon a non-whitespace character in the default partition.
-	 * 
+	 *
 	 * @see NonWhitespace
 	 */
 	private final class NonWhitespaceDefaultPartition extends NonWhitespace {
-		/*
-		 * @see org.eclipse.dltk.internal.ui.text.TclDocumentScanner.StopCondition#stop(char)
-		 */
+		@Override
 		public boolean stop(char ch, int position, boolean forward) {
 			return super.stop(ch, position, true)
 					&& isDefaultPartition(position);
 		}
 
-		/*
-		 * @see org.eclipse.dltk.internal.ui.text.TclDocumentScanner.StopCondition#nextPosition(int,
-		 *      boolean)
-		 */
+		@Override
 		public int nextPosition(int position, boolean forward) {
 			ITypedRegion partition = getPartition(position);
 			if (fPartition.equals(partition.getType()))
@@ -129,7 +115,7 @@
 
 		/**
 		 * Creates a new instance.
-		 * 
+		 *
 		 * @param ch
 		 *            the single character to match
 		 */
@@ -139,7 +125,7 @@
 
 		/**
 		 * Creates a new instance.
-		 * 
+		 *
 		 * @param chars
 		 *            the chars to match.
 		 */
@@ -150,19 +136,13 @@
 			Arrays.sort(chars);
 		}
 
-		/*
-		 * @see org.eclipse.dltk.internal.ui.text.TclDocumentScanner.StopCondition#stop(char,
-		 *      int)
-		 */
+		@Override
 		public boolean stop(char ch, int position, boolean forward) {
 			return Arrays.binarySearch(fChars, ch) >= 0
 					&& isDefaultPartition(position);
 		}
 
-		/*
-		 * @see org.eclipse.dltk.internal.ui.text.TclDocumentScanner.StopCondition#nextPosition(int,
-		 *      boolean)
-		 */
+		@Override
 		public int nextPosition(int position, boolean forward) {
 			ITypedRegion partition = getPartition(position);
 			if (fPartition.equals(partition.getType()))
@@ -200,7 +180,7 @@
 
 	/**
 	 * The most recently used partition.
-	 * 
+	 *
 	 *
 	 */
 	private ITypedRegion fCachedPartition = new TypedRegion(-1, 0,
@@ -213,7 +193,7 @@
 
 	/**
 	 * Creates a new instance.
-	 * 
+	 *
 	 * @param document
 	 *            the document to scan
 	 * @param partitioning
@@ -234,7 +214,7 @@
 	/**
 	 * Calls
 	 * <code>this(document, IDocument, IDocument.DEFAULT_CONTENT_TYPE)</code>.
-	 * 
+	 *
 	 * @param document
 	 *            the document to scan.
 	 */
@@ -247,12 +227,12 @@
 	 * Returns the position of the closing peer character (forward search). Any
 	 * scopes introduced by opening peers are skipped. All peers accounted for
 	 * must reside in the default partition.
-	 * 
+	 *
 	 * <p>
 	 * Note that <code>start</code> must not point to the opening peer, but to
 	 * the first character being searched.
 	 * </p>
-	 * 
+	 *
 	 * @param start
 	 *            the start position
 	 * @param openingPeer
@@ -292,12 +272,12 @@
 	 * Returns the position of the opening peer character (backward search). Any
 	 * scopes introduced by closing peers are skipped. All peers accounted for
 	 * must reside in the default partition.
-	 * 
+	 *
 	 * <p>
 	 * Note that <code>start</code> must not point to the closing peer, but to
 	 * the first character being searched.
 	 * </p>
-	 * 
+	 *
 	 * @param start
 	 *            the start position
 	 * @param openingPeer
@@ -332,15 +312,12 @@
 		}
 	}
 
-	
-
 	/**
 	 * Finds the smallest position in <code>fDocument</code> such that the
-	 * position is &gt;= <code>position</code> and &lt; <code>bound</code>
-	 * and <code>Character.isWhitespace(fDocument.getChar(pos))</code>
-	 * evaluates to <code>false</code> and the position is in the default
-	 * partition.
-	 * 
+	 * position is &gt;= <code>position</code> and &lt; <code>bound</code> and
+	 * <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to
+	 * <code>false</code> and the position is in the default partition.
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -348,9 +325,9 @@
 	 *            the first position in <code>fDocument</code> to not consider
 	 *            any more, with <code>bound</code> &gt; <code>position</code>,
 	 *            or <code>UNBOUND</code>
-	 * @return the smallest position of a non-whitespace character in [<code>position</code>,
-	 *         <code>bound</code>) that resides in a Tcl partition, or
-	 *         <code>NOT_FOUND</code> if none can be found
+	 * @return the smallest position of a non-whitespace character in
+	 *         [<code>position</code>, <code>bound</code>) that resides in a Tcl
+	 *         partition, or <code>NOT_FOUND</code> if none can be found
 	 */
 	public int findNonWhitespaceForward(int position, int bound) {
 		return scanForward(position, bound, fNonWSDefaultPart);
@@ -358,10 +335,10 @@
 
 	/**
 	 * Finds the smallest position in <code>fDocument</code> such that the
-	 * position is &gt;= <code>position</code> and &lt; <code>bound</code>
-	 * and <code>Character.isWhitespace(fDocument.getChar(pos))</code>
-	 * evaluates to <code>false</code>.
-	 * 
+	 * position is &gt;= <code>position</code> and &lt; <code>bound</code> and
+	 * <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to
+	 * <code>false</code>.
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -369,9 +346,9 @@
 	 *            the first position in <code>fDocument</code> to not consider
 	 *            any more, with <code>bound</code> &gt; <code>position</code>,
 	 *            or <code>UNBOUND</code>
-	 * @return the smallest position of a non-whitespace character in [<code>position</code>,
-	 *         <code>bound</code>), or <code>NOT_FOUND</code> if none can
-	 *         be found
+	 * @return the smallest position of a non-whitespace character in
+	 *         [<code>position</code>, <code>bound</code>), or
+	 *         <code>NOT_FOUND</code> if none can be found
 	 */
 	public int findNonWhitespaceForwardInAnyPartition(int position, int bound) {
 		return scanForward(position, bound, fNonWS);
@@ -379,11 +356,10 @@
 
 	/**
 	 * Finds the highest position in <code>fDocument</code> such that the
-	 * position is &lt;= <code>position</code> and &gt; <code>bound</code>
-	 * and <code>Character.isWhitespace(fDocument.getChar(pos))</code>
-	 * evaluates to <code>false</code> and the position is in the default
-	 * partition.
-	 * 
+	 * position is &lt;= <code>position</code> and &gt; <code>bound</code> and
+	 * <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to
+	 * <code>false</code> and the position is in the default partition.
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -391,32 +367,32 @@
 	 *            the first position in <code>fDocument</code> to not consider
 	 *            any more, with <code>bound</code> &lt; <code>position</code>,
 	 *            or <code>UNBOUND</code>
-	 * @return the highest position of a non-whitespace character in (<code>bound</code>,
-	 *         <code>position</code>] that resides in a Tcl partition, or
-	 *         <code>NOT_FOUND</code> if none can be found
+	 * @return the highest position of a non-whitespace character in
+	 *         (<code>bound</code>, <code>position</code>] that resides in a Tcl
+	 *         partition, or <code>NOT_FOUND</code> if none can be found
 	 */
 	public int findNonWhitespaceBackward(int position, int bound) {
 		return scanBackward(position, bound, fNonWSDefaultPart);
 	}
 
 	/**
-	 * Finds the lowest position <code>p</code> in <code>fDocument</code>
-	 * such that <code>start</code> &lt;= p &lt; <code>bound</code> and
+	 * Finds the lowest position <code>p</code> in <code>fDocument</code> such
+	 * that <code>start</code> &lt;= p &lt; <code>bound</code> and
 	 * <code>condition.stop(fDocument.getChar(p), p)</code> evaluates to
 	 * <code>true</code>.
-	 * 
+	 *
 	 * @param start
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
 	 * @param bound
 	 *            the first position in <code>fDocument</code> to not consider
-	 *            any more, with <code>bound</code> &gt; <code>start</code>,
-	 *            or <code>UNBOUND</code>
+	 *            any more, with <code>bound</code> &gt; <code>start</code>, or
+	 *            <code>UNBOUND</code>
 	 * @param condition
 	 *            the <code>StopCondition</code> to check
-	 * @return the lowest position in [<code>start</code>,
-	 *         <code>bound</code>) for which <code>condition</code> holds,
-	 *         or <code>NOT_FOUND</code> if none can be found
+	 * @return the lowest position in [<code>start</code>, <code>bound</code>)
+	 *         for which <code>condition</code> holds, or <code>NOT_FOUND</code>
+	 *         if none can be found
 	 */
 	public int scanForward(int start, int bound, StopCondition condition) {
 		Assert.isLegal(start >= 0);
@@ -443,10 +419,10 @@
 
 	/**
 	 * Finds the lowest position in <code>fDocument</code> such that the
-	 * position is &gt;= <code>position</code> and &lt; <code>bound</code>
-	 * and <code>fDocument.getChar(position) == ch</code> evaluates to
+	 * position is &gt;= <code>position</code> and &lt; <code>bound</code> and
+	 * <code>fDocument.getChar(position) == ch</code> evaluates to
 	 * <code>true</code> and the position is in the default partition.
-	 * 
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -466,11 +442,11 @@
 
 	/**
 	 * Finds the lowest position in <code>fDocument</code> such that the
-	 * position is &gt;= <code>position</code> and &lt; <code>bound</code>
-	 * and <code>fDocument.getChar(position) == ch</code> evaluates to
+	 * position is &gt;= <code>position</code> and &lt; <code>bound</code> and
+	 * <code>fDocument.getChar(position) == ch</code> evaluates to
 	 * <code>true</code> for at least one ch in <code>chars</code> and the
 	 * position is in the default partition.
-	 * 
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -480,33 +456,32 @@
 	 *            or <code>UNBOUND</code>
 	 * @param chars
 	 *            an array of <code>char</code> to search for
-	 * @return the lowest position of a non-whitespace character in [<code>position</code>,
-	 *         <code>bound</code>) that resides in a Tcl partition, or
-	 *         <code>NOT_FOUND</code> if none can be found
+	 * @return the lowest position of a non-whitespace character in
+	 *         [<code>position</code>, <code>bound</code>) that resides in a Tcl
+	 *         partition, or <code>NOT_FOUND</code> if none can be found
 	 */
 	public int scanForward(int position, int bound, char[] chars) {
 		return scanForward(position, bound, new CharacterMatch(chars));
 	}
 
 	/**
-	 * Finds the highest position <code>p</code> in <code>fDocument</code>
-	 * such that <code>bound</code> &lt; <code>p</code> &lt;=
-	 * <code>start</code> and
+	 * Finds the highest position <code>p</code> in <code>fDocument</code> such
+	 * that <code>bound</code> &lt; <code>p</code> &lt;= <code>start</code> and
 	 * <code>condition.stop(fDocument.getChar(p), p)</code> evaluates to
 	 * <code>true</code>.
-	 * 
+	 *
 	 * @param start
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
 	 * @param bound
 	 *            the first position in <code>fDocument</code> to not consider
-	 *            any more, with <code>bound</code> &lt; <code>start</code>,
-	 *            or <code>UNBOUND</code>
+	 *            any more, with <code>bound</code> &lt; <code>start</code>, or
+	 *            <code>UNBOUND</code>
 	 * @param condition
 	 *            the <code>StopCondition</code> to check
-	 * @return the highest position in (<code>bound</code>,
-	 *         <code>start</code> for which <code>condition</code> holds, or
-	 *         <code>NOT_FOUND</code> if none can be found
+	 * @return the highest position in (<code>bound</code>, <code>start</code>
+	 *         for which <code>condition</code> holds, or <code>NOT_FOUND</code>
+	 *         if none can be found
 	 */
 	public int scanBackward(int start, int bound, StopCondition condition) {
 		if (bound == UNBOUND)
@@ -532,11 +507,11 @@
 
 	/**
 	 * Finds the highest position in <code>fDocument</code> such that the
-	 * position is &lt;= <code>position</code> and &gt; <code>bound</code>
-	 * and <code>fDocument.getChar(position) == ch</code> evaluates to
+	 * position is &lt;= <code>position</code> and &gt; <code>bound</code> and
+	 * <code>fDocument.getChar(position) == ch</code> evaluates to
 	 * <code>true</code> for at least one ch in <code>chars</code> and the
 	 * position is in the default partition.
-	 * 
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -546,9 +521,9 @@
 	 *            or <code>UNBOUND</code>
 	 * @param ch
 	 *            the <code>char</code> to search for
-	 * @return the highest position of one element in <code>chars</code> in (<code>bound</code>,
-	 *         <code>position</code>] that resides in a Tcl partition, or
-	 *         <code>NOT_FOUND</code> if none can be found
+	 * @return the highest position of one element in <code>chars</code> in
+	 *         (<code>bound</code>, <code>position</code>] that resides in a Tcl
+	 *         partition, or <code>NOT_FOUND</code> if none can be found
 	 */
 	public int scanBackward(int position, int bound, char ch) {
 		return scanBackward(position, bound, new CharacterMatch(ch));
@@ -556,11 +531,11 @@
 
 	/**
 	 * Finds the highest position in <code>fDocument</code> such that the
-	 * position is &lt;= <code>position</code> and &gt; <code>bound</code>
-	 * and <code>fDocument.getChar(position) == ch</code> evaluates to
+	 * position is &lt;= <code>position</code> and &gt; <code>bound</code> and
+	 * <code>fDocument.getChar(position) == ch</code> evaluates to
 	 * <code>true</code> for at least one ch in <code>chars</code> and the
 	 * position is in the default partition.
-	 * 
+	 *
 	 * @param position
 	 *            the first character position in <code>fDocument</code> to be
 	 *            considered
@@ -570,23 +545,22 @@
 	 *            or <code>UNBOUND</code>
 	 * @param chars
 	 *            an array of <code>char</code> to search for
-	 * @return the highest position of one element in <code>chars</code> in (<code>bound</code>,
-	 *         <code>position</code>] that resides in a Tcl partition, or
-	 *         <code>NOT_FOUND</code> if none can be found
+	 * @return the highest position of one element in <code>chars</code> in
+	 *         (<code>bound</code>, <code>position</code>] that resides in a Tcl
+	 *         partition, or <code>NOT_FOUND</code> if none can be found
 	 */
 	public int scanBackward(int position, int bound, char[] chars) {
 		return scanBackward(position, bound, new CharacterMatch(chars));
 	}
 
 	/**
-	 * Checks whether <code>position</code> resides in a default (Tcl)
-	 * partition of <code>fDocument</code>.
-	 * 
+	 * Checks whether <code>position</code> resides in a default (Tcl) partition
+	 * of <code>fDocument</code>.
+	 *
 	 * @param position
 	 *            the position to be checked
 	 * @return <code>true</code> if <code>position</code> is in the default
-	 *         partition of <code>fDocument</code>, <code>false</code>
-	 *         otherwise
+	 *         partition of <code>fDocument</code>, <code>false</code> otherwise
 	 */
 	public boolean isDefaultPartition(int position) {
 		return fPartition.equals(getPartition(position).getType());
@@ -594,7 +568,7 @@
 
 	/**
 	 * Returns the partition at <code>position</code>.
-	 * 
+	 *
 	 * @param position
 	 *            the position to get the partition for
 	 * @return the partition at <code>position</code> or a dummy zero-length
@@ -620,7 +594,7 @@
 	/**
 	 * Returns <code>true</code> if <code>region</code> contains
 	 * <code>position</code>.
-	 * 
+	 *
 	 * @param region
 	 *            a region
 	 * @param position
@@ -635,22 +609,25 @@
 	}
 
 	/**
-	 * Computes the surrounding block around <code>offset</code>. The search is started at the
-	 * beginning of <code>offset</code>, i.e. an opening brace at <code>offset</code> will not be
-	 * part of the surrounding block, but a closing brace will.
+	 * Computes the surrounding block around <code>offset</code>. The search is
+	 * started at the beginning of <code>offset</code>, i.e. an opening brace at
+	 * <code>offset</code> will not be part of the surrounding block, but a
+	 * closing brace will.
 	 *
-	 * @param offset the offset for which the surrounding block is computed
-	 * @return a region describing the surrounding block, or <code>null</code> if none can be found
+	 * @param offset
+	 *            the offset for which the surrounding block is computed
+	 * @return a region describing the surrounding block, or <code>null</code>
+	 *         if none can be found
 	 */
 	public IRegion findSurroundingBlock(int offset) {
 		if (offset < 1 || offset >= fDocument.getLength())
 			return null;
 
-		int begin= findOpeningPeer(offset - 1, '{', '}');
-		int end= findClosingPeer(offset, '{', '}');
+		int begin = findOpeningPeer(offset - 1, '{', '}');
+		int end = findClosingPeer(offset, '{', '}');
 		if (begin == NOT_FOUND || end == NOT_FOUND)
 			return null;
 		return new Region(begin, end + 1 - begin);
 	}
-	
+
 }
\ No newline at end of file
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclGlobalVariableSourceCorrectionMarkerResolution.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclGlobalVariableSourceCorrectionMarkerResolution.java
index cf93205..69e5481 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclGlobalVariableSourceCorrectionMarkerResolution.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclGlobalVariableSourceCorrectionMarkerResolution.java
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package org.eclipse.dltk.tcl.internal.ui.text;
 
 import java.util.Map;
@@ -18,8 +15,8 @@
 import org.eclipse.ui.IMarkerResolution;
 import org.eclipse.ui.PlatformUI;
 
-final class TclGlobalVariableSourceCorrectionMarkerResolution implements
-		IMarkerResolution, IAnnotationResolution {
+final class TclGlobalVariableSourceCorrectionMarkerResolution
+		implements IMarkerResolution, IAnnotationResolution {
 	private String sourceName;
 	private IScriptProject project;
 
@@ -29,14 +26,15 @@
 		this.project = scriptProject;
 	}
 
+	@Override
 	public String getLabel() {
 		return "Add variable '" + this.sourceName
 				+ "' to list of project global variables";
 	}
 
 	private boolean resolve() {
-		MultipleInputDialog dialog = new MultipleInputDialog(PlatformUI
-				.getWorkbench().getActiveWorkbenchWindow().getShell(),
+		MultipleInputDialog dialog = new MultipleInputDialog(
+				PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
 				TclInterpreterMessages.GlobalVariableBlock_AddTitle);
 		dialog.addLabelField("Name: " + sourceName);
 		dialog.addVariablesField("Value", null, true);
@@ -48,8 +46,8 @@
 		String value = dialog.getStringValue("Value");
 
 		if (value != null && value.length() > 0) {
-			Map<String, String> emap = TclPackagesManager.getVariables(project
-					.getElementName());
+			Map<String, String> emap = TclPackagesManager
+					.getVariables(project.getElementName());
 			if (!emap.containsKey(sourceName)) {
 				emap.put(sourceName, value);
 				TclPackagesManager.setVariables(project.getElementName(), emap);
@@ -60,10 +58,12 @@
 		return true;
 	}
 
+	@Override
 	public void run(final IMarker marker) {
 		resolve();
 	}
 
+	@Override
 	public void run(IScriptAnnotation annotation, IDocument document) {
 		resolve();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPairMatcher.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPairMatcher.java
index 484d8d5..0e55b90 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPairMatcher.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPairMatcher.java
@@ -129,7 +129,7 @@
 		if (md == null) {
 			return new PairBlock[0];
 		}
-		final List<PairBlock> result = new ArrayList<PairBlock>();
+		final List<PairBlock> result = new ArrayList<>();
 		try {
 			md.traverse(new ASTVisitor() {
 				@Override
@@ -252,6 +252,7 @@
 		return false;
 	}
 
+	@Override
 	public IRegion match(IDocument document, int offset) {
 		if (document == null || offset < 0) {
 			throw new IllegalArgumentException();
@@ -279,15 +280,18 @@
 	 *
 	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()
 	 */
+	@Override
 	public int getAnchor() {
 		return fAnchor;
 	}
 
+	@Override
 	public void dispose() {
 		clear();
 		fDocument = null;
 	}
 
+	@Override
 	public void clear() {
 	}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPartitionScanner.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPartitionScanner.java
index bacb5a8..7c89667 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPartitionScanner.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclPartitionScanner.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -33,7 +32,7 @@
 		IToken comment = new Token(TclPartitions.TCL_COMMENT);
 		IToken stuff = new Token("dummy"); //$NON-NLS-1$
 
-		List<IPredicateRule> rules = new ArrayList<IPredicateRule>();
+		List<IPredicateRule> rules = new ArrayList<>();
 
 		// rules.add(new EndOfLineRule("#", comment ));
 		rules.add(new TclCommentRule(comment));
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclQuickAssistLightBulbUpdater.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclQuickAssistLightBulbUpdater.java
index 0086797..820426b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclQuickAssistLightBulbUpdater.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclQuickAssistLightBulbUpdater.java
@@ -32,10 +32,8 @@
 import org.eclipse.jface.text.source.IAnnotationPresentation;
 import org.eclipse.jface.text.source.ImageUtilities;
 import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
@@ -72,6 +70,7 @@
 		public AssistAnnotation() {
 		}
 
+		@Override
 		public int getLayer() {
 			return LAYER;
 		}
@@ -84,6 +83,7 @@
 			return fImage;
 		}
 
+		@Override
 		public void paint(GC gc, Canvas canvas, Rectangle r) {
 			ImageUtilities.drawImage(getImage(), gc, canvas, r, SWT.CENTER,
 					SWT.TOP);
@@ -111,15 +111,12 @@
 	}
 
 	private void installSelectionListener() {
-		fListener = new ISelectionChangedListener() {
-
-			public void selectionChanged(SelectionChangedEvent event) {
-				ISelection selection = event.getSelection();
-				if (selection instanceof ITextSelection) {
-					ITextSelection textSelection = (ITextSelection) selection;
-					doSelectionChanged(textSelection.getOffset(),
-							textSelection.getLength());
-				}
+		fListener = event -> {
+			ISelection selection = event.getSelection();
+			if (selection instanceof ITextSelection) {
+				ITextSelection textSelection = (ITextSelection) selection;
+				doSelectionChanged(textSelection.getOffset(),
+						textSelection.getLength());
 			}
 		};
 		fEditor.getSelectionProvider().addSelectionChangedListener(fListener);
@@ -142,11 +139,8 @@
 			installSelectionListener();
 		}
 		if (fPropertyChangeListener == null) {
-			fPropertyChangeListener = new IPropertyChangeListener() {
-				public void propertyChange(PropertyChangeEvent event) {
-					doPropertyChanged(event.getProperty());
-				}
-			};
+			fPropertyChangeListener = event -> doPropertyChanged(
+					event.getProperty());
 			TclUI.getDefault().getPreferenceStore()
 					.addPropertyChangeListener(fPropertyChangeListener);
 		}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequireMarkerResolutionGenerator.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequireMarkerResolutionGenerator.java
index aa772a8..8d6721b 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequireMarkerResolutionGenerator.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequireMarkerResolutionGenerator.java
@@ -21,22 +21,27 @@
 import org.eclipse.ui.IMarkerResolution;
 import org.eclipse.ui.IMarkerResolutionGenerator;
 
-public class TclRequireMarkerResolutionGenerator implements
-		IMarkerResolutionGenerator {
+public class TclRequireMarkerResolutionGenerator
+		implements IMarkerResolutionGenerator {
 
+	@Override
 	public IMarkerResolution[] getResolutions(IMarker marker) {
 		if (TclSourcePackageCorrectionProcessor.isFixable(marker)) {
-			IProblemIdentifier idValue = DefaultProblemIdentifier.getProblemId(marker);
+			IProblemIdentifier idValue = DefaultProblemIdentifier
+					.getProblemId(marker);
 			if (idValue == TclProblems.UNKNOWN_REQUIRED_PACKAGE) {
-				String pkgName = CorrectionEngine.getProblemArguments(marker)[0];
+				String pkgName = CorrectionEngine
+						.getProblemArguments(marker)[0];
 				if (pkgName != null) {
 					IProject project = marker.getResource().getProject();
 					IScriptProject scriptProject = DLTKCore.create(project);
-					return new IMarkerResolution[] { new TclRequirePackageMarkerResolution(
-							pkgName, scriptProject) };
+					return new IMarkerResolution[] {
+							new TclRequirePackageMarkerResolution(pkgName,
+									scriptProject) };
 				}
 			} else if (idValue == TclProblems.UNKNOWN_SOURCE_CORRECTION) {
-				String pkgName = CorrectionEngine.getProblemArguments(marker)[0];
+				String pkgName = CorrectionEngine
+						.getProblemArguments(marker)[0];
 				if (pkgName != null) {
 					IProject project = marker.getResource().getProject();
 					IScriptProject scriptProject = DLTKCore.create(project);
@@ -44,21 +49,20 @@
 					if (resource.getType() == IResource.FILE) {
 						ISourceModule file = (ISourceModule) DLTKCore
 								.create(resource);
-						List<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
-						resolutions
-								.add(new TclSourceCorrectionMarkerResolution(
-										pkgName, scriptProject, file));
+						List<IMarkerResolution> resolutions = new ArrayList<>();
+						resolutions.add(new TclSourceCorrectionMarkerResolution(
+								pkgName, scriptProject, file));
 
 						addGlobalVariableCorrections(pkgName, project,
 								scriptProject, resolutions);
 
-						return resolutions
-								.toArray(new IMarkerResolution[resolutions
-										.size()]);
+						return resolutions.toArray(
+								new IMarkerResolution[resolutions.size()]);
 					}
 				}
 			} else if (idValue == TclProblems.UNKNOWN_REQUIRED_PACKAGE_CORRECTION) {
-				String pkgName = CorrectionEngine.getProblemArguments(marker)[0];
+				String pkgName = CorrectionEngine
+						.getProblemArguments(marker)[0];
 				if (pkgName != null) {
 					final IResource resource = marker.getResource();
 					if (resource.getType() == IResource.FILE) {
@@ -66,15 +70,14 @@
 								.create((IFile) resource);
 						IProject project = resource.getProject();
 						IScriptProject scriptProject = DLTKCore.create(project);
-						List<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
-						resolutions
-								.add(new TclRequirePackageCorrectionMarkerResolution(
+						List<IMarkerResolution> resolutions = new ArrayList<>();
+						resolutions.add(
+								new TclRequirePackageCorrectionMarkerResolution(
 										pkgName, scriptProject, module));
 						addGlobalVariableCorrections(pkgName, project,
 								scriptProject, resolutions);
-						return resolutions
-								.toArray(new IMarkerResolution[resolutions
-										.size()]);
+						return resolutions.toArray(
+								new IMarkerResolution[resolutions.size()]);
 					}
 				}
 			}
@@ -85,13 +88,13 @@
 	private void addGlobalVariableCorrections(String pkgName, IProject project,
 			IScriptProject scriptProject, List<IMarkerResolution> resolutions) {
 		String[] names = TclVariableResolver.extractVariableNames(pkgName);
-		Map<String, String> eMap = TclPackagesManager.getVariables(project
-				.getName());
+		Map<String, String> eMap = TclPackagesManager
+				.getVariables(project.getName());
 		if (names != null) {
 			for (String var : names) {
 				if (!eMap.containsKey(var)) {
-					resolutions
-							.add(new TclGlobalVariableSourceCorrectionMarkerResolution(
+					resolutions.add(
+							new TclGlobalVariableSourceCorrectionMarkerResolution(
 									var, scriptProject));
 				}
 			}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageCorrectionMarkerResolution.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageCorrectionMarkerResolution.java
index e596792..02092a2 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageCorrectionMarkerResolution.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageCorrectionMarkerResolution.java
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package org.eclipse.dltk.tcl.internal.ui.text;
 
 import java.util.ArrayList;
@@ -43,8 +40,8 @@
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.ListDialog;
 
-final class TclRequirePackageCorrectionMarkerResolution implements
-		IMarkerResolution, IAnnotationResolution {
+final class TclRequirePackageCorrectionMarkerResolution
+		implements IMarkerResolution, IAnnotationResolution {
 	private String pkgName;
 	private IScriptProject project;
 	private ISourceModule module;
@@ -56,6 +53,7 @@
 		this.module = module;
 	}
 
+	@Override
 	public String getLabel() {
 		return Messages.TclRequirePackageCorrectionMarkerResolution_SpecifyPackagesResolutionLabel;
 	}
@@ -105,14 +103,14 @@
 		try {
 			install = ScriptRuntime.getInterpreterInstall(project);
 			if (install != null) {
-				final Set<String> pnames = new HashSet<String>();
-				final Set<String> pAutoNames = new HashSet<String>();
+				final Set<String> pnames = new HashSet<>();
+				final Set<String> pAutoNames = new HashSet<>();
 				InterpreterContainerHelper.getInterpreterContainerDependencies(
 						project, pnames, pAutoNames);
 
 				Set<String> packages = TclPackagesManager
 						.getPackageInfosAsString(install);
-				final List<String> names = new ArrayList<String>();
+				final List<String> names = new ArrayList<>();
 				names.addAll(packages);
 				Collections.sort(names, String.CASE_INSENSITIVE_ORDER);
 
@@ -124,34 +122,37 @@
 								| SWT.BORDER;
 					}
 				};
-				dialog
-						.setTitle(Messages.TclRequirePackageCorrectionMarkerResolution_SpecifyPackagesTitle);
+				dialog.setTitle(
+						Messages.TclRequirePackageCorrectionMarkerResolution_SpecifyPackagesTitle);
 				dialog.setContentProvider(new IStructuredContentProvider() {
+					@Override
 					public Object[] getElements(Object inputElement) {
 						return names.toArray();
 					}
 
+					@Override
 					public void dispose() {
 					}
 
+					@Override
 					public void inputChanged(Viewer viewer, Object oldInput,
 							Object newInput) {
 					}
 				});
 				dialog.setLabelProvider(new PackagesLabelProvider(install));
 				dialog.setInput(names);
-				Set<String> pkgs = new HashSet<String>();
+				Set<String> pkgs = new HashSet<>();
 				if (dialog.open() == ListDialog.OK) {
 					TclProjectInfo info = TclPackagesManager
 							.getTclProject(this.project.getElementName());
-					TclModuleInfo moduleInfo = info.findModule(module
-							.getHandleIdentifier());
+					TclModuleInfo moduleInfo = info
+							.findModule(module.getHandleIdentifier());
 					if (moduleInfo == null) {
 						moduleInfo = TclPackagesFactory.eINSTANCE
 								.createTclModuleInfo();
 						moduleInfo.setHandle(module.getHandleIdentifier());
-						moduleInfo
-								.setExternal(module instanceof IExternalSourceModule);
+						moduleInfo.setExternal(
+								module instanceof IExternalSourceModule);
 						info.getModules().add(moduleInfo);
 					}
 					Object[] result = dialog.getResult();
@@ -186,10 +187,12 @@
 		return false;
 	}
 
+	@Override
 	public void run(final IMarker marker) {
 		resolve();
 	}
 
+	@Override
 	public void run(IScriptAnnotation annotation, IDocument document) {
 		if (resolve()) {
 			ISourceModule module = annotation.getSourceModule();
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageMarkerResolution.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageMarkerResolution.java
index 3ca2bc6..7c19cd8 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageMarkerResolution.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclRequirePackageMarkerResolution.java
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package org.eclipse.dltk.tcl.internal.ui.text;
 
 import java.util.HashSet;
@@ -19,8 +16,8 @@
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IMarkerResolution;
 
-final class TclRequirePackageMarkerResolution implements IMarkerResolution,
-		IAnnotationResolution {
+final class TclRequirePackageMarkerResolution
+		implements IMarkerResolution, IAnnotationResolution {
 	private String pkgName;
 	private IScriptProject project;
 
@@ -30,6 +27,7 @@
 		this.project = scriptProject;
 	}
 
+	@Override
 	public String getLabel() {
 		final String msg = Messages.TclRequirePackageMarkerResolution_addPackageToBuildpath;
 		return NLS.bind(msg, pkgName);
@@ -40,14 +38,14 @@
 		try {
 			install = ScriptRuntime.getInterpreterInstall(project);
 			if (install != null) {
-				final Set names = new HashSet();
-				final Set autoNames = new HashSet();
+				final Set<String> names = new HashSet<>();
+				final Set<String> autoNames = new HashSet<>();
 				InterpreterContainerHelper.getInterpreterContainerDependencies(
 						project, names, autoNames);
 				if (names.add(pkgName)) {
 					InterpreterContainerHelper
-							.setInterpreterContainerDependencies(project,
-									names, autoNames);
+							.setInterpreterContainerDependencies(project, names,
+									autoNames);
 					return true;
 				}
 			}
@@ -57,10 +55,12 @@
 		return false;
 	}
 
+	@Override
 	public void run(final IMarker marker) {
 		resolve();
 	}
 
+	@Override
 	public void run(IScriptAnnotation annotation, IDocument document) {
 		resolve();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceCorrectionMarkerResolution.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceCorrectionMarkerResolution.java
index 1089d25..0ced1e0 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceCorrectionMarkerResolution.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceCorrectionMarkerResolution.java
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package org.eclipse.dltk.tcl.internal.ui.text;
 
 import org.eclipse.core.resources.IMarker;
@@ -28,8 +25,8 @@
 import org.eclipse.ui.IMarkerResolution;
 import org.eclipse.ui.PlatformUI;
 
-final class TclSourceCorrectionMarkerResolution implements IMarkerResolution,
-		IAnnotationResolution {
+final class TclSourceCorrectionMarkerResolution
+		implements IMarkerResolution, IAnnotationResolution {
 	private String sourceName;
 	private IScriptProject project;
 	private ISourceModule module;
@@ -41,6 +38,7 @@
 		this.module = module;
 	}
 
+	@Override
 	public String getLabel() {
 		return Messages.TclSourceCorrectionMarkerResolution_specifyFiles;
 	}
@@ -61,7 +59,8 @@
 
 				SourcesSelectionDialog dialog = new SourcesSelectionDialog(
 						PlatformUI.getWorkbench().getActiveWorkbenchWindow()
-								.getActivePage().getWorkbenchWindow(), env);
+								.getActivePage().getWorkbenchWindow(),
+						env);
 				final TclProjectInfo tclProject = TclPackagesManager
 						.getTclProject(project.getElementName());
 				UserCorrection correction = findUserCorrection(tclProject,
@@ -123,10 +122,12 @@
 		}
 	}
 
+	@Override
 	public void run(final IMarker marker) {
 		resolve();
 	}
 
+	@Override
 	public void run(IScriptAnnotation annotation, IDocument document) {
 		resolve();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceMarkerResolution.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceMarkerResolution.java
index 7d1126c..9e422a1 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceMarkerResolution.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceMarkerResolution.java
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package org.eclipse.dltk.tcl.internal.ui.text;
 
 import java.net.URI;
@@ -32,8 +29,8 @@
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.ui.IMarkerResolution;
 
-final class TclSourceMarkerResolution implements IMarkerResolution,
-		IAnnotationResolution {
+final class TclSourceMarkerResolution
+		implements IMarkerResolution, IAnnotationResolution {
 	private String sourceName;
 	private IScriptProject project;
 	private ISourceModule module;
@@ -45,6 +42,7 @@
 		this.module = module;
 	}
 
+	@Override
 	public String getLabel() {
 		return "Add user specified source file location to buildpath";
 	}
@@ -124,8 +122,8 @@
 						}
 					}
 				}
-				IPath sourcePath = resolveSourceValue(modulePath
-						.removeLastSegments(1), this.sourceName, env);
+				IPath sourcePath = resolveSourceValue(
+						modulePath.removeLastSegments(1), this.sourceName, env);
 				if (sourcePath == null) {
 					return false;
 				}
@@ -138,8 +136,8 @@
 					// This is almost impossibly situation.
 					info = TclPackagesFactory.eINSTANCE.createTclModuleInfo();
 					info.setHandle(handle);
-					info
-							.setExternal(this.module instanceof IExternalSourceModule);
+					info.setExternal(
+							this.module instanceof IExternalSourceModule);
 					TclSourceEntry sourceEntry = TclPackagesFactory.eINSTANCE
 							.createTclSourceEntry();
 					sourceEntry.setStart(-1);
@@ -165,10 +163,12 @@
 		return false;
 	}
 
+	@Override
 	public void run(final IMarker marker) {
 		resolve();
 	}
 
+	@Override
 	public void run(IScriptAnnotation annotation, IDocument document) {
 		resolve();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourcePackageCorrectionProcessor.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourcePackageCorrectionProcessor.java
index 4b46630..dbf7c30 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourcePackageCorrectionProcessor.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourcePackageCorrectionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -40,9 +40,10 @@
 import org.eclipse.dltk.ui.text.IScriptCorrectionProcessor;
 import org.eclipse.dltk.ui.text.MarkerResolutionProposal;
 
-public class TclSourcePackageCorrectionProcessor implements
-		IScriptCorrectionProcessor {
+public class TclSourcePackageCorrectionProcessor
+		implements IScriptCorrectionProcessor {
 
+	@Override
 	public boolean canFix(IScriptAnnotation annotation) {
 		return isFixable(annotation);
 	}
@@ -61,9 +62,11 @@
 					}
 				}
 			}
-		} else if (annotation.getId() == TclProblems.UNKNOWN_REQUIRED_PACKAGE_CORRECTION) {
+		} else if (annotation
+				.getId() == TclProblems.UNKNOWN_REQUIRED_PACKAGE_CORRECTION) {
 			return true;
-		} else if (annotation.getId() == TclProblems.UNKNOWN_SOURCE_CORRECTION) {
+		} else if (annotation
+				.getId() == TclProblems.UNKNOWN_SOURCE_CORRECTION) {
 			return true;
 		} else if (annotation.getId() == TclProblems.UNKNOWN_SOURCE) {
 			final String[] args = annotation.getArguments();
@@ -83,32 +86,38 @@
 		return false;
 	}
 
+	@Override
 	public void computeQuickAssistProposals(IScriptAnnotation annotation,
 			IScriptCorrectionContext context) {
 		if (annotation.getId() == TclProblems.UNKNOWN_REQUIRED_PACKAGE) {
 			if (isFixable(annotation)) {
 				final String pkgName = annotation.getArguments()[0];
 				if (addPackageName(context, pkgName)) {
-					context.addProposal(new AnnotationResolutionProposal(
-							new TclRequirePackageMarkerResolution(pkgName,
-									context.getProject()), annotation));
+					context.addProposal(
+							new AnnotationResolutionProposal(
+									new TclRequirePackageMarkerResolution(
+											pkgName, context.getProject()),
+									annotation));
 				}
 			}
-		} else if (annotation.getId() == TclProblems.UNKNOWN_REQUIRED_PACKAGE_CORRECTION) {
+		} else if (annotation
+				.getId() == TclProblems.UNKNOWN_REQUIRED_PACKAGE_CORRECTION) {
 			final String pkgName = annotation.getArguments()[0];
 			if (addPackageName(context, pkgName)) {
 				context.addProposal(new AnnotationResolutionProposal(
-						new TclRequirePackageCorrectionMarkerResolution(
-								pkgName, context.getProject(), context
-										.getModule()), annotation));
+						new TclRequirePackageCorrectionMarkerResolution(pkgName,
+								context.getProject(), context.getModule()),
+						annotation));
 				addGlobalVariableProposals(annotation, context, pkgName);
 			}
-		} else if (annotation.getId() == TclProblems.UNKNOWN_SOURCE_CORRECTION) {
+		} else if (annotation
+				.getId() == TclProblems.UNKNOWN_SOURCE_CORRECTION) {
 			final String fName = annotation.getArguments()[0];
 			if (addSourceFile(context, fName)) {
 				context.addProposal(new AnnotationResolutionProposal(
-						new TclSourceCorrectionMarkerResolution(fName, context
-								.getProject(), context.getModule()), annotation));
+						new TclSourceCorrectionMarkerResolution(fName,
+								context.getProject(), context.getModule()),
+						annotation));
 				addGlobalVariableProposals(annotation, context, fName);
 			}
 		} else if (annotation.getId() == TclProblems.UNKNOWN_SOURCE) {
@@ -117,8 +126,8 @@
 				if (TclSourceMarkerResolution.fixAvailable(context.getModule(),
 						fName)) {
 					context.addProposal(new AnnotationResolutionProposal(
-							new TclSourceMarkerResolution(fName, context
-									.getProject(), context.getModule()),
+							new TclSourceMarkerResolution(fName,
+									context.getProject(), context.getModule()),
 							annotation));
 				}
 			}
@@ -128,14 +137,15 @@
 	private void addGlobalVariableProposals(IScriptAnnotation annotation,
 			IScriptCorrectionContext context, final String fName) {
 		String[] names = TclVariableResolver.extractVariableNames(fName);
-		Map<String, String> eMap = TclPackagesManager.getVariables(context
-				.getProject().getElementName());
+		Map<String, String> eMap = TclPackagesManager
+				.getVariables(context.getProject().getElementName());
 		if (names != null) {
 			for (String var : names) {
 				if (!eMap.containsKey(var)) {
 					context.addProposal(new AnnotationResolutionProposal(
 							new TclGlobalVariableSourceCorrectionMarkerResolution(
-									var, context.getProject()), annotation));
+									var, context.getProject()),
+							annotation));
 				}
 			}
 		}
@@ -163,19 +173,21 @@
 		if (values != null) {
 			return values.add(value);
 		} else {
-			values = new HashSet<String>();
+			values = new HashSet<>();
 			values.add(value);
 			context.setAttribute(attribute, values);
 			return true;
 		}
 	}
 
+	@Override
 	public boolean canFix(IMarker marker) {
 		return isFixable(marker);
 	}
 
 	public static boolean isFixable(IMarker marker) {
-		IProblemIdentifier idValue = DefaultProblemIdentifier.getProblemId(marker);
+		IProblemIdentifier idValue = DefaultProblemIdentifier
+				.getProblemId(marker);
 		if (idValue == TclProblems.UNKNOWN_REQUIRED_PACKAGE) {
 			final String[] args = CorrectionEngine.getProblemArguments(marker);
 			if (args != null && args.length != 0 && args[0] != null) {
@@ -203,42 +215,51 @@
 		return false;
 	}
 
+	@Override
 	public void computeQuickAssistProposals(IMarker marker,
 			IScriptCorrectionContext context) {
-		IProblemIdentifier idValue = DefaultProblemIdentifier.getProblemId(marker);
+		IProblemIdentifier idValue = DefaultProblemIdentifier
+				.getProblemId(marker);
 		if (idValue == TclProblems.UNKNOWN_REQUIRED_PACKAGE) {
 			if (isFixable(marker)) {
 				final String pkgName = CorrectionEngine
 						.getProblemArguments(marker)[0];
 				if (addPackageName(context, pkgName)) {
-					context.addProposal(new MarkerResolutionProposal(
-							new TclRequirePackageMarkerResolution(pkgName,
-									context.getProject()), marker));
+					context.addProposal(
+							new MarkerResolutionProposal(
+									new TclRequirePackageMarkerResolution(
+											pkgName, context.getProject()),
+									marker));
 				}
 			}
 		} else if (idValue == TclProblems.UNKNOWN_REQUIRED_PACKAGE_CORRECTION) {
-			final String pkgName = CorrectionEngine.getProblemArguments(marker)[0];
+			final String pkgName = CorrectionEngine
+					.getProblemArguments(marker)[0];
 			if (addPackageName(context, pkgName)) {
 				context.addProposal(new MarkerResolutionProposal(
-						new TclRequirePackageCorrectionMarkerResolution(
-								pkgName, context.getProject(), context
-										.getModule()), marker));
+						new TclRequirePackageCorrectionMarkerResolution(pkgName,
+								context.getProject(), context.getModule()),
+						marker));
 				addGlobalVariablesProposals(marker, context, pkgName);
 			}
 			addGlobalVariablesProposals(marker, context, pkgName);
 		} else if (idValue == TclProblems.UNKNOWN_SOURCE_CORRECTION) {
-			final String fName = CorrectionEngine.getProblemArguments(marker)[0];
+			final String fName = CorrectionEngine
+					.getProblemArguments(marker)[0];
 			context.addProposal(new MarkerResolutionProposal(
-					new TclSourceCorrectionMarkerResolution(fName, context
-							.getProject(), context.getModule()), marker));
+					new TclSourceCorrectionMarkerResolution(fName,
+							context.getProject(), context.getModule()),
+					marker));
 
 		} else if (idValue == TclProblems.UNKNOWN_SOURCE) {
-			final String fName = CorrectionEngine.getProblemArguments(marker)[0];
+			final String fName = CorrectionEngine
+					.getProblemArguments(marker)[0];
 			if (TclSourceMarkerResolution.fixAvailable(context.getModule(),
 					fName)) {
 				context.addProposal(new MarkerResolutionProposal(
-						new TclSourceMarkerResolution(fName, context
-								.getProject(), context.getModule()), marker));
+						new TclSourceMarkerResolution(fName,
+								context.getProject(), context.getModule()),
+						marker));
 			}
 		}
 	}
@@ -246,20 +267,22 @@
 	private void addGlobalVariablesProposals(IMarker marker,
 			IScriptCorrectionContext context, final String pkgName) {
 		String[] names = TclVariableResolver.extractVariableNames(pkgName);
-		Map<String, String> eMap = TclPackagesManager.getVariables(context
-				.getProject().getElementName());
+		Map<String, String> eMap = TclPackagesManager
+				.getVariables(context.getProject().getElementName());
 		if (names != null) {
 			for (String var : names) {
 				if (!eMap.containsKey(var)) {
 					context.addProposal(new MarkerResolutionProposal(
 							new TclGlobalVariableSourceCorrectionMarkerResolution(
-									var, context.getProject()), marker));
+									var, context.getProject()),
+							marker));
 				}
 			}
 		}
 	}
 
-	public static boolean isFixable(String pkgName, IScriptProject scriptProject) {
+	public static boolean isFixable(String pkgName,
+			IScriptProject scriptProject) {
 		IDLTKLanguageToolkit toolkit = null;
 		toolkit = DLTKLanguageManager.getLanguageToolkit(scriptProject);
 		if (toolkit != null
@@ -273,8 +296,8 @@
 				}
 			}
 			if (install != null) {
-				TclPackageInfo info = TclPackagesManager.getPackageInfo(
-						install, pkgName, true);
+				TclPackageInfo info = TclPackagesManager.getPackageInfo(install,
+						pkgName, true);
 				if (info == null || !info.isFetched()) {
 					return false;
 				}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceViewerConfiguration.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceViewerConfiguration.java
index 84b34df..dc56264 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceViewerConfiguration.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclSourceViewerConfiguration.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -27,7 +26,6 @@
 import org.eclipse.jface.text.AbstractInformationControlManager;
 import org.eclipse.jface.text.IAutoEditStrategy;
 import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IInformationControl;
 import org.eclipse.jface.text.IInformationControlCreator;
 import org.eclipse.jface.text.contentassist.ContentAssistant;
 import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
@@ -41,11 +39,10 @@
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.texteditor.ITextEditor;
 
-public class TclSourceViewerConfiguration extends
-		ScriptSourceViewerConfiguration {
+public class TclSourceViewerConfiguration
+		extends ScriptSourceViewerConfiguration {
 
 	private TclTextTools fTextTools;
 
@@ -66,13 +63,11 @@
 
 	private IInformationControlCreator getHierarchyPresenterControlCreator(
 			ISourceViewer sourceViewer) {
-		return new IInformationControlCreator() {
-			public IInformationControl createInformationControl(Shell parent) {
-				int shellStyle = SWT.RESIZE;
-				int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
-				return new TclHierarchyInformationControl(parent, shellStyle,
-						treeStyle);
-			}
+		return parent -> {
+			int shellStyle = SWT.RESIZE;
+			int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
+			return new TclHierarchyInformationControl(parent, shellStyle,
+					treeStyle);
 		};
 	}
 
@@ -80,15 +75,15 @@
 	public IInformationPresenter getHierarchyPresenter(
 			ScriptSourceViewer sourceViewer, boolean doCodeResolve) {
 		// Do not create hierarchy presenter if there's no CU.
-		if (getEditor() != null
-				&& getEditor().getEditorInput() != null
-				&& EditorUtility.getEditorInputModelElement(getEditor(), true) == null)
+		if (getEditor() != null && getEditor().getEditorInput() != null
+				&& EditorUtility.getEditorInputModelElement(getEditor(),
+						true) == null)
 			return null;
 
 		InformationPresenter presenter = new InformationPresenter(
 				getHierarchyPresenterControlCreator(sourceViewer));
-		presenter
-				.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+		presenter.setDocumentPartitioning(
+				getConfiguredDocumentPartitioning(sourceViewer));
 		presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
 		IInformationProvider provider = new ScriptElementProvider(getEditor(),
 				doCodeResolve);
@@ -133,8 +128,8 @@
 	public IPresentationReconciler getPresentationReconciler(
 			ISourceViewer sourceViewer) {
 		PresentationReconciler reconciler = new ScriptPresentationReconciler();
-		reconciler
-				.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+		reconciler.setDocumentPartitioning(
+				getConfiguredDocumentPartitioning(sourceViewer));
 
 		DefaultDamagerRepairer dr = new DefaultDamagerRepairer(
 				this.fCodeScanner);
@@ -159,7 +154,7 @@
 	 * Clients are not allowed to call this method if the old setup with text
 	 * tools is in use.
 	 * </p>
-	 * 
+	 *
 	 * @param event
 	 *            the event to which to adapt
 	 * @see TclSourceViewerConfiguration#TclSourceViewerConfiguration(IColorManager,
@@ -185,11 +180,11 @@
 	/**
 	 * Determines whether the preference change encoded by the given event
 	 * changes the behavior of one of its contained components.
-	 * 
+	 *
 	 * @param event
 	 *            the event to be investigated
 	 * @return <code>true</code> if event causes a behavioral change
-	 * 
+	 *
 	 */
 	@Override
 	public boolean affectsTextPresentation(PropertyChangeEvent event) {
@@ -199,12 +194,12 @@
 	}
 
 	@Override
-	public IAutoEditStrategy[] getAutoEditStrategies(
-			ISourceViewer sourceViewer, String contentType) {
+	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer,
+			String contentType) {
 		// return super.getAutoEditStrategies(sourceViewer, contentType);
 		String partitioning = getConfiguredDocumentPartitioning(sourceViewer);
-		return new IAutoEditStrategy[] { new TclAutoEditStrategy(
-				fPreferenceStore, partitioning) };
+		return new IAutoEditStrategy[] {
+				new TclAutoEditStrategy(fPreferenceStore, partitioning) };
 	}
 
 	@Override
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclStringScanner.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclStringScanner.java
index 2bbedf4..2b8b874 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclStringScanner.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclStringScanner.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -38,7 +37,7 @@
 
 	@Override
 	protected List<IRule> createRules() {
-		List<IRule> rules = new ArrayList<IRule>();
+		List<IRule> rules = new ArrayList<>();
 		// IToken number = getToken(ITclColorConstants.TCL_NUMBER);
 		IToken variable = getToken(TclColorConstants.TCL_VARIABLE);
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclTextTools.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclTextTools.java
index 80339ab..d42eb50 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclTextTools.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclTextTools.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -37,6 +36,7 @@
 				autoDisposeOnDisplayDispose);
 	}
 
+	@Override
 	public ScriptSourceViewerConfiguration createSourceViewerConfiguraton(
 			IPreferenceStore preferenceStore, ITextEditor editor,
 			String partitioning) {
@@ -44,6 +44,7 @@
 				preferenceStore, editor, partitioning);
 	}
 
+	@Override
 	public ScriptSourceViewerConfiguration createSourceViewerConfiguraton(
 			IPreferenceStore preferenceStore, ITextEditor editor,
 			TemplateVariableProcessor variableProcessor) {
@@ -51,6 +52,7 @@
 				preferenceStore, null, variableProcessor);
 	}
 
+	@Override
 	public IPartitionTokenScanner getPartitionScanner() {
 		return new TclPartitionScanner();
 	}
@@ -65,11 +67,13 @@
 		return exts;
 	}
 
+	@Override
 	public SemanticHighlighting[] getSemanticHighlightings() {
 		return getSemanticPositionUpdater(TclNature.NATURE_ID)
 				.getSemanticHighlightings();
 	}
 
+	@Override
 	public ISemanticHighlightingUpdater getSemanticPositionUpdater(
 			String natureId) {
 		return new TclSemanticPositionUpdater(getExtensions());
@@ -87,18 +91,22 @@
 			this.description = desc;
 		}
 
+		@Override
 		public boolean isSemanticOnly() {
 			return description != null;
 		}
 
+		@Override
 		public String getPreferenceKey() {
 			return preferenceKey;
 		}
 
+		@Override
 		public String getBackgroundPreferenceKey() {
 			return bgColor;
 		}
 
+		@Override
 		public int hashCode() {
 			final int prime = 31;
 			int result = 1;
@@ -107,6 +115,7 @@
 			return result;
 		}
 
+		@Override
 		public boolean equals(Object obj) {
 			if (this == obj)
 				return true;
@@ -123,6 +132,7 @@
 			return true;
 		}
 
+		@Override
 		public String getDisplayName() {
 			return description;
 		}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWhitespaceDetector.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWhitespaceDetector.java
index 0537a66..aa3c01f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWhitespaceDetector.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWhitespaceDetector.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -16,9 +15,7 @@
  */
 public class TclWhitespaceDetector implements IWhitespaceDetector {
 
-	/* (non-Javadoc)
-	 * Method declared on IWhitespaceDetector
-	 */
+	@Override
 	public boolean isWhitespace(char character) {
 		return Character.isWhitespace(character);
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWordDetector.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWordDetector.java
index 78b5b3a..c4d325f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWordDetector.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclWordDetector.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text;
 
@@ -16,17 +15,13 @@
  */
 public class TclWordDetector implements IWordDetector {
 
-	/*
-	 * Method declared on IWordDetector.
-	 */
+	@Override
 	public boolean isWordPart(char character) {
 		return Character.isJavaIdentifierPart(character) || character == ':'
 				|| character == '-';
 	}
 
-	/*
-	 * Method declared on IWordDetector.
-	 */
+	@Override
 	public boolean isWordStart(char character) {
 		return Character.isJavaIdentifierPart(character) || character == '.'
 				|| character == '-' || character == '(' || character == ')';
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/LazyTclTypeCompletionProposal.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/LazyTclTypeCompletionProposal.java
index d73ce67..9ef8862 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/LazyTclTypeCompletionProposal.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/LazyTclTypeCompletionProposal.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
@@ -18,8 +17,8 @@
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 
-public class LazyTclTypeCompletionProposal extends
-		LazyScriptTypeCompletionProposal {
+public class LazyTclTypeCompletionProposal
+		extends LazyScriptTypeCompletionProposal {
 	protected static final char[] TYPE_TRIGGERS = new char[] { '.', '\t', '[',
 			'(', ' ' };
 	protected static final char[] DOC_TYPE_TRIGGERS = new char[] { '#', '}',
@@ -30,19 +29,23 @@
 		super(proposal, context);
 	}
 
+	@Override
 	protected char[] getDocTriggers() {
 		return DOC_TYPE_TRIGGERS;
 	}
 
+	@Override
 	protected char[] getTypeTriggers() {
 		return TYPE_TRIGGERS;
 	}
 
+	@Override
 	protected void handleSmartTrigger(IDocument document, char trigger,
 			int referenceOffset) throws BadLocationException {
 		// TODO Auto-generated method stub
 	}
 
+	@Override
 	protected boolean isSmartTrigger(char trigger) {
 		if (trigger == '$') {
 			return true;
@@ -50,6 +53,8 @@
 
 		return false;
 	}
+
+	@Override
 	protected boolean insertCompletion() {
 		IPreferenceStore preference = TclUI.getDefault().getPreferenceStore();
 		return preference
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalCollector.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalCollector.java
index 51d2412..8e56f33 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalCollector.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalCollector.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
@@ -18,12 +17,13 @@
 import org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector;
 import org.eclipse.swt.graphics.Image;
 
-public class TclCompletionProposalCollector extends
-		ScriptCompletionProposalCollector {
+public class TclCompletionProposalCollector
+		extends ScriptCompletionProposalCollector {
 
 	protected final static char[] VAR_TRIGGER = new char[] { '\t', ' ', '=',
 			';', '.' };
 
+	@Override
 	protected char[] getVarTrigger() {
 		return VAR_TRIGGER;
 	}
@@ -32,6 +32,7 @@
 		super(module);
 	}
 
+	@Override
 	protected boolean isFiltered(CompletionProposal proposal) {
 		if (isIgnored(proposal.getKind())) {
 			return true;
@@ -48,8 +49,8 @@
 			proposal.getCompletion();
 			if (name.equals(pName)) {
 				if (proposal.getModelElement() != null
-						&& proposal.getModelElement().equals(
-								proposals[i].getModelElement())) {
+						&& proposal.getModelElement()
+								.equals(proposals[i].getModelElement())) {
 
 				}
 			}
@@ -66,6 +67,7 @@
 	}
 
 	// Specific proposals creation. May be use factory?
+	@Override
 	protected ScriptCompletionProposal createScriptCompletionProposal(
 			String completion, int replaceStart, int length, Image image,
 			String displayString, int i) {
@@ -73,6 +75,7 @@
 				length, image, displayString, i);
 	}
 
+	@Override
 	protected ScriptCompletionProposal createScriptCompletionProposal(
 			String completion, int replaceStart, int length, Image image,
 			String displayString, int i, boolean isInDoc) {
@@ -80,35 +83,37 @@
 				length, image, displayString, i, isInDoc);
 	}
 
+	@Override
 	protected ScriptCompletionProposal createOverrideCompletionProposal(
 			IScriptProject scriptProject, ISourceModule compilationUnit,
 			String name, String[] paramTypes, int start, int length,
 			String displayName, String completionProposal) {
-		return new TclOverrideCompletionProposal(scriptProject,
-				compilationUnit, name, paramTypes, start, length, displayName,
+		return new TclOverrideCompletionProposal(scriptProject, compilationUnit,
+				name, paramTypes, start, length, displayName,
 				completionProposal);
 	}
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector
 	 * #createKeywordProposal(org.eclipse.dltk.core.CompletionProposal)
 	 */
+	@Override
 	protected IScriptCompletionProposal createKeywordProposal(
 			CompletionProposal proposal) {
-		final ScriptCompletionProposal completionProposal = (ScriptCompletionProposal) super
-				.createKeywordProposal(proposal);
+		final ScriptCompletionProposal completionProposal = (ScriptCompletionProposal) super.createKeywordProposal(
+				proposal);
 		final String prefix;
 		if (proposal.getExtraInfo() instanceof String) {
 			prefix = (String) proposal.getExtraInfo();
 		} else {
 			prefix = completionProposal.getReplacementString();
 		}
-		completionProposal
-				.setContextInformation(new TclKeywordLazyContextInformation(
-						completionProposal, prefix, getSourceModule()));
+		completionProposal.setContextInformation(
+				new TclKeywordLazyContextInformation(completionProposal, prefix,
+						getSourceModule()));
 		return completionProposal;
 	}
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalLabelProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalLabelProvider.java
index 2d847cf..faa0bc9 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalLabelProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclCompletionProposalLabelProvider.java
@@ -1,22 +1,23 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
 import org.eclipse.dltk.core.CompletionProposal;
 import org.eclipse.dltk.ui.text.completion.CompletionProposalLabelProvider;
 
-public class TclCompletionProposalLabelProvider extends
-		CompletionProposalLabelProvider {
-	protected String createMethodProposalLabel(CompletionProposal methodProposal) {
+public class TclCompletionProposalLabelProvider
+		extends CompletionProposalLabelProvider {
+	@Override
+	protected String createMethodProposalLabel(
+			CompletionProposal methodProposal) {
 		StringBuffer nameBuffer = new StringBuffer();
-				
+
 		// method name
 		nameBuffer.append(methodProposal.getName());
 
@@ -28,6 +29,7 @@
 		return nameBuffer.toString();
 	}
 
+	@Override
 	protected String createOverrideMethodProposalLabel(
 			CompletionProposal methodProposal) {
 		StringBuffer nameBuffer = new StringBuffer();
@@ -38,7 +40,7 @@
 		// parameters
 		nameBuffer.append('(');
 		appendParameterList(nameBuffer, methodProposal);
-		nameBuffer.append(')'); //$NON-NLS-1$
+		nameBuffer.append(')'); // $NON-NLS-1$
 
 		return nameBuffer.toString();
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclContentAssistPreference.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclContentAssistPreference.java
index f5da242..8d90870 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclContentAssistPreference.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclContentAssistPreference.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
@@ -15,12 +14,14 @@
 
 public class TclContentAssistPreference extends ContentAssistPreference {
 	static TclContentAssistPreference sDefault;
+
+	@Override
 	protected ScriptTextTools getTextTools() {
 		return TclUI.getDefault().getTextTools();
 	}
 
 	public static ContentAssistPreference getDefault() {
-		if( sDefault == null ) {
+		if (sDefault == null) {
 			sDefault = new TclContentAssistPreference();
 		}
 		return sDefault;
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclKeywordLazyContextInformation.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclKeywordLazyContextInformation.java
index fa02759..af06f02 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclKeywordLazyContextInformation.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclKeywordLazyContextInformation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 xored software, Inc.
+ * Copyright (c) 2008, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -27,8 +27,8 @@
 import org.eclipse.jface.text.contentassist.IContextInformationExtension;
 import org.eclipse.swt.graphics.Image;
 
-public class TclKeywordLazyContextInformation implements IContextInformation,
-		IContextInformationExtension {
+public class TclKeywordLazyContextInformation
+		implements IContextInformation, IContextInformationExtension {
 
 	private final ICompletionProposal proposal;
 	private final String target;
@@ -62,29 +62,32 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @seeorg.eclipse.jface.text.contentassist.IContextInformation#
 	 * getContextDisplayString()
 	 */
+	@Override
 	public String getContextDisplayString() {
 		return proposal.getDisplayString();
 	}
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jface.text.contentassist.IContextInformation#getImage()
 	 */
+	@Override
 	public Image getImage() {
 		return null;
 	}
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @seeorg.eclipse.jface.text.contentassist.IContextInformation#
 	 * getInformationDisplayString()
 	 */
+	@Override
 	public String getInformationDisplayString() {
 		if (!informationComputed) {
 			informationComputed = true;
@@ -95,7 +98,7 @@
 
 	/**
 	 * Returns all the documentation for this keyword
-	 * 
+	 *
 	 * @return
 	 */
 	private String getInfo() {
@@ -128,7 +131,8 @@
 					start = matcher.end();
 				}
 			} else {
-				return formatSynopsis(content.substring(start, matcher.start()));
+				return formatSynopsis(
+						content.substring(start, matcher.start()));
 			}
 		}
 		return proposal.getDisplayString();
@@ -166,6 +170,7 @@
 		return sb.toString();
 	}
 
+	@Override
 	public boolean equals(Object obj) {
 		if (obj instanceof TclKeywordLazyContextInformation) {
 			final TclKeywordLazyContextInformation other = (TclKeywordLazyContextInformation) obj;
@@ -188,6 +193,7 @@
 	/*
 	 * @see IContextInformationExtension#getContextInformationPosition()
 	 */
+	@Override
 	public int getContextInformationPosition() {
 		if (proposal instanceof ICompletionProposalExtension) {
 			return ((ICompletionProposalExtension) proposal)
@@ -200,8 +206,8 @@
 
 	private static final Pattern EOL = Pattern.compile("[\r\n]+"); //$NON-NLS-1$
 
-	private static final Pattern HEADER = Pattern.compile(
-			"<h\\d>(.*?)</h\\d>", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+	private static final Pattern HEADER = Pattern.compile("<h\\d>(.*?)</h\\d>", //$NON-NLS-1$
+			Pattern.CASE_INSENSITIVE);
 
 	private static final String SYNOPSIS = "SYNOPSIS"; //$NON-NLS-1$
 
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclOverrideCompletionProposal.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclOverrideCompletionProposal.java
index 89df404..1bdf3cf 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclOverrideCompletionProposal.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclOverrideCompletionProposal.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
@@ -30,8 +29,8 @@
 	private String methodName;
 
 	public TclOverrideCompletionProposal(IScriptProject project,
-			ISourceModule cu, String methodName, String[] paramTypes,
-			int start, int length, String displayName, String completionProposal) {
+			ISourceModule cu, String methodName, String[] paramTypes, int start,
+			int length, String displayName, String completionProposal) {
 		super(completionProposal, cu, start, length, null, displayName, 0);
 		Assert.isNotNull(project);
 		Assert.isNotNull(methodName);
@@ -43,11 +42,13 @@
 		setReplacementString(completionProposal);
 	}
 
+	@Override
 	public CharSequence getPrefixCompletionText(IDocument document,
 			int completionOffset) {
 		return methodName;
 	}
 
+	@Override
 	protected boolean updateReplacementString(IDocument document, char trigger,
 			int offset) throws CoreException, BadLocationException {
 		final IDocument buffer = new Document(document.get());
@@ -60,14 +61,17 @@
 		return true;
 	}
 
+	@Override
 	public boolean isAutoInsertable() {
 		return false;
 	}
 
+	@Override
 	public IContextInformation getContextInformation() {
 		return new ContextInformation(getDisplayString(), getDisplayString());
 	}
 
+	@Override
 	protected boolean insertCompletion() {
 		IPreferenceStore preference = TclUI.getDefault().getPreferenceStore();
 		return preference
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclScriptCompletionProposal.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclScriptCompletionProposal.java
index 164e6a1..0fe3023 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclScriptCompletionProposal.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclScriptCompletionProposal.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
@@ -15,25 +14,31 @@
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.swt.graphics.Image;
 
-
 public class TclScriptCompletionProposal extends ScriptCompletionProposal {
 
-	public TclScriptCompletionProposal(String replacementString, int replacementOffset, int replacementLength, Image image, String displayString, int relevance) {
+	public TclScriptCompletionProposal(String replacementString,
+			int replacementOffset, int replacementLength, Image image,
+			String displayString, int relevance) {
 		super(replacementString, replacementOffset, replacementLength, image,
-				displayString, relevance);		
+				displayString, relevance);
 	}
 
-	public TclScriptCompletionProposal(String replacementString, int replacementOffset, int replacementLength, Image image, String displayString, int relevance, boolean isInDoc) {
+	public TclScriptCompletionProposal(String replacementString,
+			int replacementOffset, int replacementLength, Image image,
+			String displayString, int relevance, boolean isInDoc) {
 		super(replacementString, replacementOffset, replacementLength, image,
 				displayString, relevance, isInDoc);
 	}
 
+	@Override
 	protected boolean isSmartTrigger(char trigger) {
-		if( trigger == '$') {
+		if (trigger == '$') {
 			return true;
 		}
 		return false;
 	}
+
+	@Override
 	protected boolean insertCompletion() {
 		IPreferenceStore preference = TclUI.getDefault().getPreferenceStore();
 		return preference
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclTypeCompletionProposalComputer.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclTypeCompletionProposalComputer.java
index d51ca94..fd4b5a4 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclTypeCompletionProposalComputer.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/completion/TclTypeCompletionProposalComputer.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.completion;
 
@@ -20,9 +19,10 @@
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
 
-public class TclTypeCompletionProposalComputer extends
-		ScriptCompletionProposalComputer {
+public class TclTypeCompletionProposalComputer
+		extends ScriptCompletionProposalComputer {
 
+	@Override
 	protected ScriptCompletionProposalCollector createCollector(
 			ScriptContentAssistInvocationContext context) {
 		ScriptCompletionProposalCollector collector = new TclCompletionProposalCollector(
@@ -44,15 +44,14 @@
 
 		IPreferenceStore preferenceStore = TclUI.getDefault()
 				.getPreferenceStore();
-		collector
-				.setIgnored(
-						ITclCompletionProposalTypes.FILTER_INTERNAL_API,
-						preferenceStore
-								.getBoolean(TclPreferenceConstants.CODEASSIST_FILTER_INTERNAL_API));
+		collector.setIgnored(ITclCompletionProposalTypes.FILTER_INTERNAL_API,
+				preferenceStore.getBoolean(
+						TclPreferenceConstants.CODEASSIST_FILTER_INTERNAL_API));
 
 		return collector;
 	}
 
+	@Override
 	protected TemplateCompletionProcessor createTemplateProposalComputer(
 			ScriptContentAssistInvocationContext context) {
 		return new TclTemplateCompletionProcessor(context);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingPreferenceBlock.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingPreferenceBlock.java
index 2b2c822..c9ec4c3 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingPreferenceBlock.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingPreferenceBlock.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.folding;
 
@@ -27,6 +26,7 @@
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -41,7 +41,8 @@
 /**
  * Tcl source code folding preferences.
  */
-public class TclFoldingPreferenceBlock extends SourceCodeFoldingPreferenceBlock {
+public class TclFoldingPreferenceBlock
+		extends SourceCodeFoldingPreferenceBlock {
 
 	private Button fFoldOtherEnabled;
 	private Button fInitFoldOtherBlocks;
@@ -54,6 +55,7 @@
 		super(store, page);
 	}
 
+	@Override
 	public Control createControl(Composite parent) {
 		Control control = super.createControl(parent);
 
@@ -64,6 +66,7 @@
 		return control;
 	}
 
+	@Override
 	protected void addInitiallyFoldOptions(Group group) {
 		super.addInitiallyFoldOptions(group);
 
@@ -93,6 +96,7 @@
 				TclPreferenceConstants.EDITOR_FOLDING_INIT_OTHER));
 	}
 
+	@Override
 	protected void createOptionsControl(Composite composite) {
 		Group group = SWTFactory.createGroup(composite,
 				TclFoldingMessages.TclFoldingPreferenceBlock_10, 1, 1,
@@ -100,8 +104,8 @@
 
 		fFoldOtherEnabled = createRadioButton(group,
 				TclFoldingMessages.TclFoldingPreferenceBlock_11,
-				TclPreferenceConstants.EDITOR_FOLDING_BLOCKS, new Integer(
-						TclPreferenceConstants.EDITOR_FOLDING_BLOCKS_OFF));
+				TclPreferenceConstants.EDITOR_FOLDING_BLOCKS,
+				new Integer(TclPreferenceConstants.EDITOR_FOLDING_BLOCKS_OFF));
 
 		createRadioButton(group,
 				TclFoldingMessages.TclFoldingPreferenceBlock_12,
@@ -120,18 +124,22 @@
 				TclPreferenceConstants.EDITOR_FOLDING_INCLUDE_LIST);
 	}
 
+	@Override
 	protected String getInitiallyFoldClassesKey() {
 		return TclPreferenceConstants.EDITOR_FOLDING_INIT_NAMESPACES;
 	}
 
+	@Override
 	protected String getInitiallyFoldMethodsKey() {
 		return TclPreferenceConstants.EDITOR_FOLDING_INIT_BLOCKS;
 	}
 
+	@Override
 	protected String getInitiallyFoldClassesText() {
 		return TclFoldingMessages.DefaultFoldingPreferenceBlock_innerTypes;
 	}
 
+	@Override
 	protected String getInitiallyFoldMethodsText() {
 		return TclFoldingMessages.DefaultFoldingPreferenceBlock_methods;
 	}
@@ -173,23 +181,23 @@
 			fAddButton = createPushButton(pathButtonComp,
 					TclFoldingMessages.TclFoldingPreferenceBlock_0);
 			fAddButton.addSelectionListener(new SelectionListener() {
+				@Override
 				public void widgetDefaultSelected(SelectionEvent e) {
 				}
 
+				@Override
 				public void widgetSelected(SelectionEvent e) {
-					IInputValidator validator = new IInputValidator() {
-						public String isValid(String newText) {
-							if (newText.trim().length() > 0
-									&& newText.matches("[_a-zA-Z]*")) //$NON-NLS-1$
-								return null;
-							return TclFoldingMessages.TclFoldingPreferenceBlock_2;
-						}
+					IInputValidator validator = newText -> {
+						if (newText.trim().length() > 0
+								&& newText.matches("[_a-zA-Z]*")) //$NON-NLS-1$
+							return null;
+						return TclFoldingMessages.TclFoldingPreferenceBlock_2;
 					};
 					InputDialog dlg = new InputDialog(null,
 							TclFoldingMessages.TclFoldingPreferenceBlock_3,
 							TclFoldingMessages.TclFoldingPreferenceBlock_4,
 							Util.EMPTY_STRING, validator);
-					if (dlg.open() == InputDialog.OK) {
+					if (dlg.open() == Window.OK) {
 						fList.add(dlg.getValue());
 						save();
 					}
@@ -198,9 +206,11 @@
 			fRemoveButton = createPushButton(pathButtonComp,
 					TclFoldingMessages.TclFoldingPreferenceBlock_6);
 			fRemoveButton.addSelectionListener(new SelectionListener() {
+				@Override
 				public void widgetDefaultSelected(SelectionEvent e) {
 				}
 
+				@Override
 				public void widgetSelected(SelectionEvent e) {
 					ISelection s = fList.getSelection();
 					if (s instanceof IStructuredSelection) {
@@ -232,10 +242,10 @@
 		public int getButtonWidthHint(Button button) {
 			button.setFont(JFaceResources.getDialogFont());
 			PixelConverter converter = new PixelConverter(button);
-			int widthHint = converter
-					.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
-			return Math.max(widthHint, button.computeSize(SWT.DEFAULT,
-					SWT.DEFAULT, true).x);
+			int widthHint = converter.convertHorizontalDLUsToPixels(
+					IDialogConstants.BUTTON_WIDTH);
+			return Math.max(widthHint,
+					button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
 		}
 
 		private String[] getEntries() {
@@ -279,12 +289,14 @@
 		}
 	}
 
+	@Override
 	public void initialize() {
 		super.initialize();
 		fExcludePatterns.initialize();
 		fIncludePatterns.initialize();
 	}
 
+	@Override
 	public void performDefaults() {
 		super.performDefaults();
 		fExcludePatterns.performDefault();
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingStructureProvider.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingStructureProvider.java
index 02a7474..b49f21c 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingStructureProvider.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/folding/TclFoldingStructureProvider.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.text.folding;
 
@@ -50,8 +49,8 @@
 
 /**
  */
-public class TclFoldingStructureProvider extends
-		AbstractASTFoldingStructureProvider {
+public class TclFoldingStructureProvider
+		extends AbstractASTFoldingStructureProvider {
 
 	/* preferences */
 	private int fBlockFolding = 0;
@@ -79,21 +78,21 @@
 			return new CodeBlock[0];
 		}
 
-		List result = new ArrayList();
+		List<CodeBlock> result = new ArrayList<>();
 		traverse(result, statements, offset, code);
 
-		return (CodeBlock[]) result.toArray(new CodeBlock[result.size()]);
+		return result.toArray(new CodeBlock[result.size()]);
 	}
 
-	private void checkStatement(String code, int offset, List result,
+	private void checkStatement(String code, int offset, List<CodeBlock> result,
 			Statement sst) {
 		if (sst instanceof TclStatement) {
 			TclStatement statement = (TclStatement) sst;
-			result.add(new CodeBlock(statement, new Region(offset
-					+ statement.sourceStart(), statement.sourceEnd()
-					- statement.sourceStart())));
+			result.add(new CodeBlock(statement,
+					new Region(offset + statement.sourceStart(),
+							statement.sourceEnd() - statement.sourceStart())));
 
-			Iterator si = statement.getExpressions().iterator();
+			Iterator<ASTNode> si = statement.getExpressions().iterator();
 			while (si.hasNext()) {
 				Expression ex = (Expression) si.next();
 				if (ex instanceof TclBlockExpression) {
@@ -101,8 +100,8 @@
 					try {
 						String newContents = code.substring(
 								be.sourceStart() + 1, be.sourceEnd() - 1);
-						CodeBlock[] cb = getCodeBlocks(newContents, offset
-								+ be.sourceStart() + 1);
+						CodeBlock[] cb = getCodeBlocks(newContents,
+								offset + be.sourceStart() + 1);
 						for (int j = 0; j < cb.length; j++) {
 							result.add(cb[j]);
 						}
@@ -120,16 +119,18 @@
 		}
 	}
 
-	private void traverse(List result, List statements, int offset, String code) {
+	private void traverse(List<CodeBlock> result, List<ASTNode> statements,
+			int offset, String code) {
 
-		for (Iterator iterator = statements.iterator(); iterator.hasNext();) {
-			ASTNode node = (ASTNode) iterator.next();
+		for (Iterator<ASTNode> iterator = statements.iterator(); iterator
+				.hasNext();) {
+			ASTNode node = iterator.next();
 			if (node instanceof TclStatement) {
 				checkStatement(code, offset, result, (Statement) node);
 				continue;
 			}
 			boolean fold = false;
-			List children = null;
+			List<ASTNode> children = null;
 			if (node instanceof TypeDeclaration) {
 				TypeDeclaration statement = (TypeDeclaration) node;
 				children = statement.getStatements();
@@ -140,7 +141,7 @@
 				fold = true;
 			} else if (node instanceof IfStatement) {
 				fold = true;
-				children = new ArrayList();
+				children = new ArrayList<>();
 				IfStatement statement = (IfStatement) node;
 				Statement thenNode = statement.getThen();
 				if (thenNode instanceof Block) {
@@ -159,15 +160,16 @@
 				TclSwitchStatement statement = (TclSwitchStatement) node;
 				Block alts = statement.getAlternatives();
 				if (alts != null) {
-					List childs = alts.getStatements();
-					children = new ArrayList();
+					List<ASTNode> childs = alts.getStatements();
+					children = new ArrayList<>();
 					for (int i = 0; i < childs.size(); i++) {
-						ASTNode child = (ASTNode) childs.get(i);
+						ASTNode child = childs.get(i);
 						if (child instanceof Block) {
-							result.add(new CodeBlock(new TclFoldBlock(
-									(Block) child), new Region(offset
-									+ child.sourceStart(), child.sourceEnd()
-									- child.sourceStart())));
+							result.add(new CodeBlock(
+									new TclFoldBlock((Block) child),
+									new Region(offset + child.sourceStart(),
+											child.sourceEnd()
+													- child.sourceStart())));
 							children.addAll(((Block) child).getStatements());
 						}
 					}
@@ -195,9 +197,9 @@
 				}
 			}
 			if (fold) {
-				result.add(new CodeBlock(node, new Region(offset
-						+ node.sourceStart(), node.sourceEnd()
-						- node.sourceStart())));
+				result.add(new CodeBlock(node,
+						new Region(offset + node.sourceStart(),
+								node.sourceEnd() - node.sourceStart())));
 			}
 			if (children != null && children.size() > 0) {
 				traverse(result, children, offset, code);
@@ -353,8 +355,8 @@
 						line.getOffset() + line.getLength());
 				int headerOffset = line.getOffset() + d.getLineLength(i);
 				final CommentRegion header = new CommentRegion(
-						CommentType.HEADER, headerOffset, region.getLength()
-								- headerOffset);
+						CommentType.HEADER, headerOffset,
+						region.getLength() - headerOffset);
 				regions.set(0, shebang);
 				if (isMultilineRegion(d, header)) {
 					regions.add(1, header);
@@ -470,7 +472,7 @@
 		String t = store.getString(key);
 		String[] items = t.split(","); //$NON-NLS-1$
 
-		List<String> list = new ArrayList<String>(items.length);
+		List<String> list = new ArrayList<>(items.length);
 		for (int i = 0; i < items.length; i++) {
 			if (items[i].trim().length() > 0) {
 				list.add(items[i]);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclPackageCreationWizard.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclPackageCreationWizard.java
index 26d69e0..fd455cf 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclPackageCreationWizard.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclPackageCreationWizard.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.wizards;
 
@@ -23,11 +22,13 @@
 
 public class TclPackageCreationWizard extends NewPackageCreationWizard {
 	public static final String ID_WIZARD = "org.eclipse.dltk.tcl.ui.wizards.NewPackageCreationWizard";
-	
+
 	private static final String INDEX_PACKAGE_NAME = "pkgIndex.tcl";
 
+	@Override
 	protected NewPackageWizardPage createNewPackageWizardPage() {
 		return new NewPackageWizardPage() {
+			@Override
 			public void createPackage(IProgressMonitor monitor)
 					throws CoreException, InterruptedException {
 				super.createPackage(monitor);
@@ -40,6 +41,7 @@
 				}
 			}
 
+			@Override
 			protected String getRequiredNature() {
 				return TclNature.NATURE_ID;
 			}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectCreationWizard.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectCreationWizard.java
index 21b19b8..78eec16 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectCreationWizard.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectCreationWizard.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.internal.ui.wizards;
 
@@ -35,7 +34,7 @@
 		setWindowTitle(TclWizardMessages.ProjectCreationWizard_title);
 	}
 
-	private final List<TclProjectTemplateEntry> fOptions = new ArrayList<TclProjectTemplateEntry>();
+	private final List<TclProjectTemplateEntry> fOptions = new ArrayList<>();
 
 	private boolean optionsLoaded = false;
 
@@ -79,7 +78,7 @@
 		addPage(fSecondPage);
 	}
 
-	private final Map<IWizardPage, TclProjectTemplateEntry> optional = new IdentityHashMap<IWizardPage, TclProjectTemplateEntry>();
+	private final Map<IWizardPage, TclProjectTemplateEntry> optional = new IdentityHashMap<>();
 
 	/**
 	 * @since 2.0
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectTemplateEntry.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectTemplateEntry.java
index d817d9d..762f596 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectTemplateEntry.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/wizards/TclProjectTemplateEntry.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPerspective.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPerspective.java
index dfbe93d..a089ea7 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPerspective.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPerspective.java
@@ -1,14 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.ui;
 
+import static org.eclipse.dltk.ui.DLTKUIPlugin.ID_SCRIPT_EXPLORER;
+
 import org.eclipse.dltk.tcl.internal.ui.TclUI;
 import org.eclipse.dltk.tcl.internal.ui.wizards.TclFileCreationWizard;
 import org.eclipse.dltk.tcl.internal.ui.wizards.TclPackageCreationWizard;
@@ -19,8 +20,6 @@
 import org.eclipse.ui.console.IConsoleConstants;
 import org.eclipse.ui.progress.IProgressConstants;
 
-import static org.eclipse.dltk.ui.DLTKUIPlugin.ID_SCRIPT_EXPLORER;
-
 public class TclPerspective implements IPerspectiveFactory {
 	/**
 	 * @since 2.0
@@ -29,7 +28,7 @@
 
 	// TODO: move to general class like ScriptPerspective
 
-	public static final String NEW_FOLDER_WIZARD = "org.eclipse.ui.wizards.new.folder"; //$NON-NLS-1$ 
+	public static final String NEW_FOLDER_WIZARD = "org.eclipse.ui.wizards.new.folder"; //$NON-NLS-1$
 
 	public static final String NEW_FILE_WIZARD = "org.eclipse.ui.wizards.new.file"; //$NON-NLS-1$
 
@@ -81,16 +80,16 @@
 		final String editorArea = layout.getEditorArea();
 
 		// Folder
-		IFolderLayout folder = layout.createFolder(
-				"left", IPageLayout.LEFT, (float) 0.2, editorArea); //$NON-NLS-1$		
+		IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, //$NON-NLS-1$
+				(float) 0.2, editorArea);
 
 		folder.addView(ID_SCRIPT_EXPLORER);
 		folder.addView("org.eclipse.dltk.ui.TypeHierarchy"); //$NON-NLS-1$
 		folder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
 
 		// Output folder
-		IFolderLayout outputFolder = layout.createFolder(
-				"bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
+		IFolderLayout outputFolder = layout.createFolder("bottom", //$NON-NLS-1$
+				IPageLayout.BOTTOM, (float) 0.75, editorArea);
 
 		outputFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
 		outputFolder.addView(IPageLayout.ID_TASK_LIST);
@@ -106,6 +105,7 @@
 		layout.addPerspectiveShortcut("org.eclipse.debug.ui.DebugPerspective"); //$NON-NLS-1$
 	}
 
+	@Override
 	public void createInitialLayout(IPageLayout layout) {
 		createFolders(layout);
 		addViews(layout);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java
index 305d740..9d21e02 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java
@@ -1,11 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
- 
  *******************************************************************************/
 package org.eclipse.dltk.tcl.ui;
 
@@ -25,7 +24,7 @@
 	 * Value is of type <code>String</code>. A RGB color value encoded as a
 	 * string using class <code>PreferenceConverter</code>
 	 * </p>
-	 * 
+	 *
 	 * @see org.eclipse.jface.resource.StringConverter
 	 * @see org.eclipse.jface.preference.PreferenceConverter
 	 */
@@ -73,8 +72,8 @@
 	 * comments are rendered in underline. If <code>false</code> the are
 	 * rendered using no italic font style attribute.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 	public final static String EDITOR_KEYWORD_RETURN_UNDERLINE = TclColorConstants.TCL_KEYWORD_RETURN
 			+ EDITOR_UNDERLINE_SUFFIX;
@@ -86,7 +85,7 @@
 	 * Value is of type <code>String</code>. A RGB color value encoded as a
 	 * string using class <code>PreferenceConverter</code>
 	 * </p>
-	 * 
+	 *
 	 * @see org.eclipse.jface.resource.StringConverter
 	 * @see org.eclipse.jface.preference.PreferenceConverter
 	 */
@@ -136,8 +135,8 @@
 	 * comments are rendered in underline. If <code>false</code> the are
 	 * rendered using no italic font style attribute.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 	public final static String EDITOR_SINGLE_LINE_COMMENT_UNDERLINE = TclColorConstants.TCL_SINGLE_LINE_COMMENT
 			+ EDITOR_UNDERLINE_SUFFIX;
@@ -151,7 +150,7 @@
 	 * Value is of type <code>String</code>. A RGB color value encoded as a
 	 * string using class <code>PreferenceConverter</code>
 	 * </p>
-	 * 
+	 *
 	 * @see org.eclipse.jface.resource.StringConverter
 	 * @see org.eclipse.jface.preference.PreferenceConverter
 	 */
@@ -199,8 +198,8 @@
 	 * comments are rendered in underline. If <code>false</code> the are
 	 * rendered using no italic font style attribute.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 	public final static String EDITOR_KEYWORD_UNDERLINE = TclColorConstants.TCL_KEYWORD
 			+ EDITOR_UNDERLINE_SUFFIX;
@@ -214,7 +213,7 @@
 	 * Value is of type <code>String</code>. A RGB color value encoded as a
 	 * string using class <code>PreferenceConverter</code>
 	 * </p>
-	 * 
+	 *
 	 * @see org.eclipse.jface.resource.StringConverter
 	 * @see org.eclipse.jface.preference.PreferenceConverter
 	 */
@@ -262,8 +261,8 @@
 	 * comments are rendered in underline. If <code>false</code> the are
 	 * rendered using no italic font style attribute.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 
 	public final static String EDITOR_NUMBER_UNDERLINE = TclColorConstants.TCL_NUMBER
@@ -278,7 +277,7 @@
 	 * Value is of type <code>String</code>. A RGB color value encoded as a
 	 * string using class <code>PreferenceConverter</code>
 	 * </p>
-	 * 
+	 *
 	 * @see org.eclipse.jface.resource.StringConverter
 	 * @see org.eclipse.jface.preference.PreferenceConverter
 	 */
@@ -326,8 +325,8 @@
 	 * comments are rendered in underline. If <code>false</code> the are
 	 * rendered using no italic font style attribute.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 
 	public final static String EDITOR_VARIABLE_UNDERLINE = TclColorConstants.TCL_VARIABLE
@@ -342,7 +341,7 @@
 	 * Value is of type <code>String</code>. A RGB color value encoded as a
 	 * string using class <code>PreferenceConverter</code>
 	 * </p>
-	 * 
+	 *
 	 * @see org.eclipse.jface.resource.StringConverter
 	 * @see org.eclipse.jface.preference.PreferenceConverter
 	 */
@@ -390,8 +389,8 @@
 	 * comments are rendered in underline. If <code>false</code> the are
 	 * rendered using no italic font style attribute.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 	public final static String EDITOR_STRING_UNDERLINE = TclColorConstants.TCL_STRING
 			+ EDITOR_UNDERLINE_SUFFIX;
@@ -403,7 +402,7 @@
 	 * <p>
 	 * Value is of type <code>Boolean</code>.
 	 * </p>
-	 * 
+	 *
 	 */
 	public final static String EDITOR_SMART_PASTE_MODE = "smartPasteMode"; //$NON-NLS-1$
 	public final static int EDITOR_SMART_PASTE_MODE_SIMPLE = 1;
@@ -415,8 +414,8 @@
 	 * <p>
 	 * Value is of type <code>Boolean</code>.
 	 * </p>
-	 * 
-	 * 
+	 *
+	 *
 	 */
 	public static final String EDITOR_FOLDING_IMPORTS = "editor_folding_default_imports"; //$NON-NLS-1$
 
@@ -465,31 +464,30 @@
 		PreferenceConverter.setDefault(store,
 				TclPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR,
 				new RGB(63, 127, 95));
-		PreferenceConverter.setDefault(store, COMMENT_TASK_TAGS, new RGB(127,
-				159, 191));
+		PreferenceConverter.setDefault(store, COMMENT_TASK_TAGS,
+				new RGB(127, 159, 191));
 		PreferenceConverter.setDefault(store,
 				TclPreferenceConstants.EDITOR_KEYWORD_COLOR,
 				new RGB(127, 0, 85));
 		PreferenceConverter.setDefault(store,
-				TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR, new RGB(
-						127, 0, 85));
+				TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR,
+				new RGB(127, 0, 85));
 
-		PreferenceConverter
-				.setDefault(store, TclPreferenceConstants.EDITOR_STRING_COLOR,
-						new RGB(42, 0, 255));
+		PreferenceConverter.setDefault(store,
+				TclPreferenceConstants.EDITOR_STRING_COLOR,
+				new RGB(42, 0, 255));
 		PreferenceConverter.setDefault(store,
 				TclPreferenceConstants.EDITOR_NUMBER_COLOR, new RGB(0, 0, 0));
 		PreferenceConverter.setDefault(store,
 				TclPreferenceConstants.EDITOR_VARIABLE_COLOR,
 				new RGB(200, 0, 0));
 
-		store.setDefault(
-				TclPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD, false);
+		store.setDefault(TclPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD,
+				false);
 		store.setDefault(COMMENT_TASK_TAGS_BOLD, true);
-		store
-				.setDefault(
-						TclPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC,
-						false);
+		store.setDefault(
+				TclPreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC,
+				false);
 
 		store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_BOLD, true);
 		store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_ITALIC, false);
@@ -498,10 +496,10 @@
 		store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_RETURN_ITALIC,
 				false);
 
-		store.setDefault(TclPreferenceConstants.EDITOR_CLOSE_STRINGS, true);
-		store.setDefault(TclPreferenceConstants.EDITOR_CLOSE_BRACKETS, true);
-		store.setDefault(TclPreferenceConstants.EDITOR_CLOSE_BRACES, true);
-		store.setDefault(TclPreferenceConstants.EDITOR_SMART_TAB, true);
+		store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS, true);
+		store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACKETS, true);
+		store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACES, true);
+		store.setDefault(PreferenceConstants.EDITOR_SMART_TAB, true);
 		store.setDefault(TclPreferenceConstants.EDITOR_SMART_PASTE_MODE,
 				TclPreferenceConstants.EDITOR_SMART_PASTE_MODE_SIMPLE);
 
@@ -509,8 +507,8 @@
 		store.setDefault(PreferenceConstants.EDITOR_TAB_WIDTH, 4);
 		store.setDefault(PreferenceConstants.EDITOR_SMART_HOME_END, true);
 		store.setDefault(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, true);
-		store.setDefault(
-				PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, true);
+		store.setDefault(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE,
+				true);
 
 		// folding
 		store.setDefault(PreferenceConstants.EDITOR_FOLDING_ENABLED, true);
@@ -526,16 +524,14 @@
 		// TclPreferenceConstants.EDITOR_FOLDING_COMMENTS_WITH_NEWLINES,
 		// true);
 		store.setDefault(
-				TclPreferenceConstants.EDITOR_FOLDING_INIT_HEADER_COMMENTS,
-				true);
+				PreferenceConstants.EDITOR_FOLDING_INIT_HEADER_COMMENTS, true);
 		store.setDefault(PreferenceConstants.EDITOR_FOLDING_LINES_LIMIT, 5);
 
 		store.setDefault(CodeFormatterConstants.FORMATTER_TAB_CHAR,
 				CodeFormatterConstants.MIXED);
 		store.setDefault(CodeFormatterConstants.FORMATTER_TAB_SIZE, "8");
-		store
-				.setDefault(CodeFormatterConstants.FORMATTER_INDENTATION_SIZE,
-						"4");
+		store.setDefault(CodeFormatterConstants.FORMATTER_INDENTATION_SIZE,
+				"4");
 
 		// do more complicated stuff
 		NewScriptProjectPreferencePage.initDefaults(store);
@@ -552,14 +548,15 @@
 
 		store.setDefault(PreferenceConstants.SHOW_SOURCE_MODULE_CHILDREN, true);
 
-		store.setDefault(
-				PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS, ":$"); //$NON-NLS-1$
+		store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS,
+				":$"); //$NON-NLS-1$
 
 		store.setDefault(CODEASSIST_FILTER_INTERNAL_API, true);
 	}
 
 	/**
 	 * A preference that controls the selected formatter.
+	 *
 	 * @since 2.0
 	 */
 	public static final String FORMATTER_ID = "formatterId"; //$NON-NLS-1$
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/ManPageFinder.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/ManPageFinder.java
index 30dd86b..16383d5 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/ManPageFinder.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/ManPageFinder.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -38,12 +38,9 @@
 			return;
 		if (SKIP_DIRS.contains(dir.getName()))
 			return;
-		final File[] children = dir.listFiles(new FileFilter() {
-			public boolean accept(File file) {
-				return file.isDirectory()
-						|| file.getName().startsWith(CONTENTS_HTM);
-			}
-		});
+		final File[] children = dir
+				.listFiles((FileFilter) file -> file.isDirectory()
+						|| file.getName().startsWith(CONTENTS_HTM));
 		for (File child : children) {
 			if (child.isDirectory()) {
 				find(documentation, child);
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/dialogs/ManPagesConfigurationDialog.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/dialogs/ManPagesConfigurationDialog.java
index 518d1fd..19c8d52 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/dialogs/ManPagesConfigurationDialog.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/dialogs/ManPagesConfigurationDialog.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -21,7 +21,6 @@
 import org.eclipse.dltk.ui.util.IStatusChangeListener;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.window.IShellProvider;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -32,8 +31,8 @@
 /**
  * @since 2.0
  */
-public class ManPagesConfigurationDialog extends StatusDialog implements
-		IStatusChangeListener, IShellProvider {
+public class ManPagesConfigurationDialog extends StatusDialog
+		implements IStatusChangeListener {
 
 	private ManPagesLocationsBlock fBlock;
 
@@ -62,9 +61,10 @@
 		try {
 			fBlock.save();
 		} catch (IOException e) {
-			ErrorDialog.openError(getShell(), ManPagesMessages.ManPagesConfigurationDialog_TitleSaveError, e
-					.getMessage(), new Status(IStatus.ERROR, TclUI.PLUGIN_ID, e
-					.getMessage(), e));
+			ErrorDialog.openError(getShell(),
+					ManPagesMessages.ManPagesConfigurationDialog_TitleSaveError,
+					e.getMessage(), new Status(IStatus.ERROR, TclUI.PLUGIN_ID,
+							e.getMessage(), e));
 			return;
 		}
 		super.okPressed();
@@ -75,6 +75,7 @@
 		return super.getShell();
 	}
 
+	@Override
 	public void statusChanged(IStatus status) {
 		updateStatus(status);
 	}
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/DocumentationImpl.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/DocumentationImpl.java
index 5a17979..883e07c 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/DocumentationImpl.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/DocumentationImpl.java
@@ -11,30 +11,30 @@
 import org.eclipse.dltk.tcl.ui.manpages.Documentation;
 import org.eclipse.dltk.tcl.ui.manpages.ManPageFolder;
 import org.eclipse.dltk.tcl.ui.manpages.ManpagesPackage;
-
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
-
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
-
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 
 /**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Documentation</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object
+ * '<em><b>Documentation</b></em>'. <!-- end-user-doc -->
  * <p>
  * The following features are implemented:
  * <ul>
- *   <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#getName <em>Name</em>}</li>
- *   <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#getFolders <em>Folders</em>}</li>
- *   <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#isDefault <em>Default</em>}</li>
- *   <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#getName
+ * <em>Name</em>}</li>
+ * <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#getFolders
+ * <em>Folders</em>}</li>
+ * <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#isDefault
+ * <em>Default</em>}</li>
+ * <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.DocumentationImpl#getId
+ * <em>Id</em>}</li>
  * </ul>
  * </p>
  *
@@ -43,8 +43,8 @@
 public class DocumentationImpl extends EObjectImpl implements Documentation {
 	/**
 	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getName()
 	 * @generated
 	 * @ordered
@@ -53,8 +53,8 @@
 
 	/**
 	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getName()
 	 * @generated
 	 * @ordered
@@ -62,9 +62,9 @@
 	protected String name = NAME_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getFolders() <em>Folders</em>}' containment reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * The cached value of the '{@link #getFolders() <em>Folders</em>}'
+	 * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getFolders()
 	 * @generated
 	 * @ordered
@@ -72,9 +72,9 @@
 	protected EList<ManPageFolder> folders;
 
 	/**
-	 * The default value of the '{@link #isDefault() <em>Default</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * The default value of the '{@link #isDefault() <em>Default</em>}'
+	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #isDefault()
 	 * @generated
 	 * @ordered
@@ -82,9 +82,9 @@
 	protected static final boolean DEFAULT_EDEFAULT = false;
 
 	/**
-	 * The cached value of the '{@link #isDefault() <em>Default</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * The cached value of the '{@link #isDefault() <em>Default</em>}'
+	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #isDefault()
 	 * @generated
 	 * @ordered
@@ -92,9 +92,9 @@
 	protected boolean default_ = DEFAULT_EDEFAULT;
 
 	/**
-	 * The default value of the '{@link #getId() <em>Id</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getId()
 	 * @generated
 	 * @ordered
@@ -102,9 +102,9 @@
 	protected static final String ID_EDEFAULT = null;
 
 	/**
-	 * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
+	 * begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getId()
 	 * @generated
 	 * @ordered
@@ -112,8 +112,8 @@
 	protected String id = ID_EDEFAULT;
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	protected DocumentationImpl() {
@@ -121,8 +121,8 @@
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
@@ -131,85 +131,99 @@
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public String getName() {
 		return name;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public void setName(String newName) {
 		String oldName = name;
 		name = newName;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ManpagesPackage.DOCUMENTATION__NAME, oldName, name));
+			eNotify(new ENotificationImpl(this, Notification.SET,
+					ManpagesPackage.DOCUMENTATION__NAME, oldName, name));
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public EList<ManPageFolder> getFolders() {
 		if (folders == null) {
-			folders = new EObjectContainmentEList<ManPageFolder>(ManPageFolder.class, this, ManpagesPackage.DOCUMENTATION__FOLDERS);
+			folders = new EObjectContainmentEList<>(
+					ManPageFolder.class, this,
+					ManpagesPackage.DOCUMENTATION__FOLDERS);
 		}
 		return folders;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public boolean isDefault() {
 		return default_;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public void setDefault(boolean newDefault) {
 		boolean oldDefault = default_;
 		default_ = newDefault;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ManpagesPackage.DOCUMENTATION__DEFAULT, oldDefault, default_));
+			eNotify(new ENotificationImpl(this, Notification.SET,
+					ManpagesPackage.DOCUMENTATION__DEFAULT, oldDefault,
+					default_));
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public String getId() {
 		return id;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public void setId(String newId) {
 		String oldId = id;
 		id = newId;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ManpagesPackage.DOCUMENTATION__ID, oldId, id));
+			eNotify(new ENotificationImpl(this, Notification.SET,
+					ManpagesPackage.DOCUMENTATION__ID, oldId, id));
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated NOT
 	 */
+	@Override
 	public ManPageFolder findFolder(String path) {
 		if (path != null) {
 			for (ManPageFolder folder : getFolders()) {
@@ -222,117 +236,121 @@
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+	public NotificationChain eInverseRemove(InternalEObject otherEnd,
+			int featureID, NotificationChain msgs) {
 		switch (featureID) {
-			case ManpagesPackage.DOCUMENTATION__FOLDERS:
-				return ((InternalEList<?>)getFolders()).basicRemove(otherEnd, msgs);
+		case ManpagesPackage.DOCUMENTATION__FOLDERS:
+			return ((InternalEList<?>) getFolders()).basicRemove(otherEnd,
+					msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-			case ManpagesPackage.DOCUMENTATION__NAME:
-				return getName();
-			case ManpagesPackage.DOCUMENTATION__FOLDERS:
-				return getFolders();
-			case ManpagesPackage.DOCUMENTATION__DEFAULT:
-				return isDefault();
-			case ManpagesPackage.DOCUMENTATION__ID:
-				return getId();
+		case ManpagesPackage.DOCUMENTATION__NAME:
+			return getName();
+		case ManpagesPackage.DOCUMENTATION__FOLDERS:
+			return getFolders();
+		case ManpagesPackage.DOCUMENTATION__DEFAULT:
+			return isDefault();
+		case ManpagesPackage.DOCUMENTATION__ID:
+			return getId();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@SuppressWarnings("unchecked")
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-			case ManpagesPackage.DOCUMENTATION__NAME:
-				setName((String)newValue);
-				return;
-			case ManpagesPackage.DOCUMENTATION__FOLDERS:
-				getFolders().clear();
-				getFolders().addAll((Collection<? extends ManPageFolder>)newValue);
-				return;
-			case ManpagesPackage.DOCUMENTATION__DEFAULT:
-				setDefault((Boolean)newValue);
-				return;
-			case ManpagesPackage.DOCUMENTATION__ID:
-				setId((String)newValue);
-				return;
+		case ManpagesPackage.DOCUMENTATION__NAME:
+			setName((String) newValue);
+			return;
+		case ManpagesPackage.DOCUMENTATION__FOLDERS:
+			getFolders().clear();
+			getFolders().addAll((Collection<? extends ManPageFolder>) newValue);
+			return;
+		case ManpagesPackage.DOCUMENTATION__DEFAULT:
+			setDefault((Boolean) newValue);
+			return;
+		case ManpagesPackage.DOCUMENTATION__ID:
+			setId((String) newValue);
+			return;
 		}
 		super.eSet(featureID, newValue);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case ManpagesPackage.DOCUMENTATION__NAME:
-				setName(NAME_EDEFAULT);
-				return;
-			case ManpagesPackage.DOCUMENTATION__FOLDERS:
-				getFolders().clear();
-				return;
-			case ManpagesPackage.DOCUMENTATION__DEFAULT:
-				setDefault(DEFAULT_EDEFAULT);
-				return;
-			case ManpagesPackage.DOCUMENTATION__ID:
-				setId(ID_EDEFAULT);
-				return;
+		case ManpagesPackage.DOCUMENTATION__NAME:
+			setName(NAME_EDEFAULT);
+			return;
+		case ManpagesPackage.DOCUMENTATION__FOLDERS:
+			getFolders().clear();
+			return;
+		case ManpagesPackage.DOCUMENTATION__DEFAULT:
+			setDefault(DEFAULT_EDEFAULT);
+			return;
+		case ManpagesPackage.DOCUMENTATION__ID:
+			setId(ID_EDEFAULT);
+			return;
 		}
 		super.eUnset(featureID);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-			case ManpagesPackage.DOCUMENTATION__NAME:
-				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
-			case ManpagesPackage.DOCUMENTATION__FOLDERS:
-				return folders != null && !folders.isEmpty();
-			case ManpagesPackage.DOCUMENTATION__DEFAULT:
-				return default_ != DEFAULT_EDEFAULT;
-			case ManpagesPackage.DOCUMENTATION__ID:
-				return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+		case ManpagesPackage.DOCUMENTATION__NAME:
+			return NAME_EDEFAULT == null ? name != null
+					: !NAME_EDEFAULT.equals(name);
+		case ManpagesPackage.DOCUMENTATION__FOLDERS:
+			return folders != null && !folders.isEmpty();
+		case ManpagesPackage.DOCUMENTATION__DEFAULT:
+			return default_ != DEFAULT_EDEFAULT;
+		case ManpagesPackage.DOCUMENTATION__ID:
+			return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
 		}
 		return super.eIsSet(featureID);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public String toString() {
-		if (eIsProxy()) return super.toString();
+		if (eIsProxy())
+			return super.toString();
 
 		StringBuffer result = new StringBuffer(super.toString());
 		result.append(" (name: "); //$NON-NLS-1$
@@ -345,4 +363,4 @@
 		return result.toString();
 	}
 
-} //DocumentationImpl
+} // DocumentationImpl
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageFolderImpl.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageFolderImpl.java
index cc884f9..a90db8f 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageFolderImpl.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageFolderImpl.java
@@ -22,14 +22,15 @@
 import org.eclipse.emf.ecore.util.InternalEList;
 
 /**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Man Page Folder</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Man
+ * Page Folder</b></em>'. <!-- end-user-doc -->
  * <p>
  * The following features are implemented:
  * <ul>
- *   <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.ManPageFolderImpl#getPath <em>Path</em>}</li>
- *   <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.ManPageFolderImpl#getKeywords <em>Keywords</em>}</li>
+ * <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.ManPageFolderImpl#getPath
+ * <em>Path</em>}</li>
+ * <li>{@link org.eclipse.dltk.tcl.ui.manpages.impl.ManPageFolderImpl#getKeywords
+ * <em>Keywords</em>}</li>
  * </ul>
  * </p>
  *
@@ -38,8 +39,8 @@
 public class ManPageFolderImpl extends EObjectImpl implements ManPageFolder {
 	/**
 	 * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getPath()
 	 * @generated
 	 * @ordered
@@ -48,8 +49,8 @@
 
 	/**
 	 * The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getPath()
 	 * @generated
 	 * @ordered
@@ -58,8 +59,8 @@
 
 	/**
 	 * The cached value of the '{@link #getKeywords() <em>Keywords</em>}' map.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @see #getKeywords()
 	 * @generated
 	 * @ordered
@@ -67,8 +68,8 @@
 	protected EMap<String, String> keywords;
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	protected ManPageFolderImpl() {
@@ -76,8 +77,8 @@
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
@@ -86,52 +87,61 @@
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public String getPath() {
 		return path;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public void setPath(String newPath) {
 		String oldPath = path;
 		path = newPath;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, ManpagesPackage.MAN_PAGE_FOLDER__PATH, oldPath, path));
+			eNotify(new ENotificationImpl(this, Notification.SET,
+					ManpagesPackage.MAN_PAGE_FOLDER__PATH, oldPath, path));
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
+	@Override
 	public EMap<String, String> getKeywords() {
 		if (keywords == null) {
-			keywords = new EcoreEMap<String,String>(ManpagesPackage.Literals.STRING_TO_STRING_ENTRY, StringToStringEntryImpl.class, this, ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS);
+			keywords = new EcoreEMap<>(
+					ManpagesPackage.Literals.STRING_TO_STRING_ENTRY,
+					StringToStringEntryImpl.class, this,
+					ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS);
 		}
 		return keywords;
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated NOT
 	 */
+	@Override
 	public void addPage(String keyword, String file) {
 		getKeywords().put(keyword, file);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated NOT
 	 */
+	@Override
 	public boolean verify() {
 		if (path == null || path.length() == 0)
 			return false;
@@ -140,96 +150,102 @@
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+	public NotificationChain eInverseRemove(InternalEObject otherEnd,
+			int featureID, NotificationChain msgs) {
 		switch (featureID) {
-			case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
-				return ((InternalEList<?>)getKeywords()).basicRemove(otherEnd, msgs);
+		case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
+			return ((InternalEList<?>) getKeywords()).basicRemove(otherEnd,
+					msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-			case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
-				return getPath();
-			case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
-				if (coreType) return getKeywords();
-				else return getKeywords().map();
+		case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
+			return getPath();
+		case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
+			if (coreType)
+				return getKeywords();
+			else
+				return getKeywords().map();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-			case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
-				setPath((String)newValue);
-				return;
-			case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
-				((EStructuralFeature.Setting)getKeywords()).set(newValue);
-				return;
+		case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
+			setPath((String) newValue);
+			return;
+		case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
+			((EStructuralFeature.Setting) getKeywords()).set(newValue);
+			return;
 		}
 		super.eSet(featureID, newValue);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
-				setPath(PATH_EDEFAULT);
-				return;
-			case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
-				getKeywords().clear();
-				return;
+		case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
+			setPath(PATH_EDEFAULT);
+			return;
+		case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
+			getKeywords().clear();
+			return;
 		}
 		super.eUnset(featureID);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-			case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
-				return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
-			case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
-				return keywords != null && !keywords.isEmpty();
+		case ManpagesPackage.MAN_PAGE_FOLDER__PATH:
+			return PATH_EDEFAULT == null ? path != null
+					: !PATH_EDEFAULT.equals(path);
+		case ManpagesPackage.MAN_PAGE_FOLDER__KEYWORDS:
+			return keywords != null && !keywords.isEmpty();
 		}
 		return super.eIsSet(featureID);
 	}
 
 	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * 
 	 * @generated
 	 */
 	@Override
 	public String toString() {
-		if (eIsProxy()) return super.toString();
+		if (eIsProxy())
+			return super.toString();
 
 		StringBuffer result = new StringBuffer(super.toString());
 		result.append(" (path: "); //$NON-NLS-1$
@@ -238,4 +254,4 @@
 		return result.toString();
 	}
 
-} //ManPageFolderImpl
+} // ManPageFolderImpl
diff --git a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageResourceImpl.java b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageResourceImpl.java
index feaf9e9..8d22c68 100644
--- a/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageResourceImpl.java
+++ b/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/manpages/impl/ManPageResourceImpl.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.  
+ * Copyright (c) 2009, 2017 xored software, Inc. and others.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html  
+ * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     xored software, Inc. - initial API and Implementation (Alex Panchenko)
@@ -32,8 +32,8 @@
 /**
  * @since 2.0
  */
-public class ManPageResourceImpl extends XMIResourceImpl implements
-		ManPageResource {
+public class ManPageResourceImpl extends XMIResourceImpl
+		implements ManPageResource {
 
 	private class ContentList<E extends EObject> extends AbstractList<E> {
 
@@ -82,9 +82,10 @@
 	public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
 
 	public <T extends EObject> List<T> select(Class<T> clazz) {
-		return new ContentList<T>(clazz);
+		return new ContentList<>(clazz);
 	}
 
+	@Override
 	public Documentation findDefault() {
 		for (Documentation documentation : getDocumentations()) {
 			if (documentation.isDefault()) {
@@ -94,6 +95,7 @@
 		return null;
 	}
 
+	@Override
 	public Documentation findByName(String name) {
 		if (name != null) {
 			for (Documentation documentation : getDocumentations()) {
@@ -105,6 +107,7 @@
 		return null;
 	}
 
+	@Override
 	public Documentation findById(String id) {
 		if (id != null) {
 			for (Documentation documentation : getDocumentations()) {
@@ -116,6 +119,7 @@
 		return null;
 	}
 
+	@Override
 	public boolean isEmpty() {
 		return getContents().isEmpty();
 	}
@@ -130,13 +134,15 @@
 		checkDefault();
 	}
 
+	@Override
 	public List<Documentation> getDocumentations() {
 		return select(Documentation.class);
 	}
 
+	@Override
 	public void checkDefault() {
 		final List<Documentation> documentations = getDocumentations();
-		final List<Documentation> defaults = new ArrayList<Documentation>();
+		final List<Documentation> defaults = new ArrayList<>();
 		for (Documentation doc : documentations) {
 			if (doc.isDefault()) {
 				defaults.add(doc);
@@ -160,7 +166,7 @@
 	@Override
 	public void save(Map<?, ?> options) throws IOException {
 		final StringWriter writer = new StringWriter();
-		final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+		final Map<Object, Object> saveOptions = new HashMap<>();
 		if (options != null) {
 			saveOptions.putAll(options);
 		}