Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-07-31 11:44:30 -0400
committerAlexander Kurtakov2015-07-31 11:44:30 -0400
commitf5cbd382382160f6fc3a985bfa01f15f4283be91 (patch)
treef83fb9d6c1b310993fdf5e0f0d678a1421ae3a25
parentb7a20520e8a44365939c3ea67e7c866d1a1154c0 (diff)
downloadeclipse.platform.swt-f5cbd382382160f6fc3a985bfa01f15f4283be91.tar.gz
eclipse.platform.swt-f5cbd382382160f6fc3a985bfa01f15f4283be91.tar.xz
eclipse.platform.swt-f5cbd382382160f6fc3a985bfa01f15f4283be91.zip
Bug 474049 - Move examples to Java 1.7
Bump BREE, change compiler settings, remove redundant type parameters. Change-Id: I80e4b39465d8b3833b8d10219e4b4b75f7688488 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/.classpath2
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/.settings/org.eclipse.jdt.core.prefs95
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.swt.examples.launcher/.classpath2
-rw-r--r--examples/org.eclipse.swt.examples.launcher/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java31
-rw-r--r--examples/org.eclipse.swt.examples.views/.classpath2
-rw-r--r--examples/org.eclipse.swt.examples.views/.settings/org.eclipse.jdt.core.prefs95
-rw-r--r--examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.swt.examples.watchdog/.classpath2
-rw-r--r--examples/org.eclipse.swt.examples.watchdog/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--examples/org.eclipse.swt.examples.watchdog/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.swt.examples/.classpath2
-rw-r--r--examples/org.eclipse.swt.examples/.settings/org.eclipse.jdt.core.prefs95
-rw-r--r--examples/org.eclipse.swt.examples/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/BarChart.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java6
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java18
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java4
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java4
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java8
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java14
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java10
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java2
29 files changed, 353 insertions, 71 deletions
diff --git a/examples/org.eclipse.swt.examples.browser.demos/.classpath b/examples/org.eclipse.swt.examples.browser.demos/.classpath
index ad32c83a78..098194ca4b 100644
--- a/examples/org.eclipse.swt.examples.browser.demos/.classpath
+++ b/examples/org.eclipse.swt.examples.browser.demos/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/examples/org.eclipse.swt.examples.browser.demos/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.swt.examples.browser.demos/.settings/org.eclipse.jdt.core.prefs
index 8000cd6ca6..6f508e03ca 100644
--- a/examples/org.eclipse.swt.examples.browser.demos/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.swt.examples.browser.demos/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,100 @@
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.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
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.6
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.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.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.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=ignore
+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=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.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.7
diff --git a/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
index 886292931c..6e5f43d5a5 100644
--- a/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
@@ -11,4 +11,4 @@ Export-Package: org.eclipse.swt.examples.browser.demos,
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/examples/org.eclipse.swt.examples.launcher/.classpath b/examples/org.eclipse.swt.examples.launcher/.classpath
index ad32c83a78..098194ca4b 100644
--- a/examples/org.eclipse.swt.examples.launcher/.classpath
+++ b/examples/org.eclipse.swt.examples.launcher/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/examples/org.eclipse.swt.examples.launcher/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.swt.examples.launcher/.settings/org.eclipse.jdt.core.prefs
index 8000cd6ca6..7341ab1683 100644
--- a/examples/org.eclipse.swt.examples.launcher/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.swt.examples.launcher/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
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.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
index 6aacc1210a..aa38882856 100644
--- a/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
@@ -9,4 +9,4 @@ Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
index 6a54470f58..ab55a7e2c6 100644
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
+++ b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
@@ -11,15 +11,26 @@
package org.eclipse.swt.examples.launcher;
-import java.io.*;
-import java.net.*;
-import java.text.*;
-import java.util.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.Set;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.*;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
@@ -179,7 +190,7 @@ public class LauncherPlugin extends AbstractUIPlugin {
}
/* Collect all launch categories -- coalesce those with same ID */
- HashMap<String, ItemTreeNode> idMap = new HashMap<String, ItemTreeNode>();
+ HashMap<String, ItemTreeNode> idMap = new HashMap<>();
for (IConfigurationElement ce: configurationElements) {
final String ceName = ce.getName();
final String attribId = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_ID, null);
@@ -194,7 +205,7 @@ public class LauncherPlugin extends AbstractUIPlugin {
}
/* Generate launch category hierarchy */
- Set<String> tempIdSet = new HashSet<String>(); // used to prevent duplicates from being entered into the tree
+ Set<String> tempIdSet = new HashSet<>(); // used to prevent duplicates from being entered into the tree
for (IConfigurationElement ce : configurationElements) {
final String ceName = ce.getName();
final String attribId = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_ID, null);
diff --git a/examples/org.eclipse.swt.examples.views/.classpath b/examples/org.eclipse.swt.examples.views/.classpath
index ad32c83a78..098194ca4b 100644
--- a/examples/org.eclipse.swt.examples.views/.classpath
+++ b/examples/org.eclipse.swt.examples.views/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/examples/org.eclipse.swt.examples.views/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.swt.examples.views/.settings/org.eclipse.jdt.core.prefs
index 8000cd6ca6..6f508e03ca 100644
--- a/examples/org.eclipse.swt.examples.views/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.swt.examples.views/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,100 @@
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.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
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.6
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.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.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.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=ignore
+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=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.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.7
diff --git a/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF
index 208eeaa3f7..a0adcf96c9 100644
--- a/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF
@@ -9,4 +9,4 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
org.eclipse.swt.examples
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/examples/org.eclipse.swt.examples.watchdog/.classpath b/examples/org.eclipse.swt.examples.watchdog/.classpath
index ad32c83a78..098194ca4b 100644
--- a/examples/org.eclipse.swt.examples.watchdog/.classpath
+++ b/examples/org.eclipse.swt.examples.watchdog/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/examples/org.eclipse.swt.examples.watchdog/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.swt.examples.watchdog/.settings/org.eclipse.jdt.core.prefs
index 2173570faa..076a7785fe 100644
--- a/examples/org.eclipse.swt.examples.watchdog/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.swt.examples.watchdog/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -96,4 +96,4 @@ 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.6
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/org.eclipse.swt.examples.watchdog/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.watchdog/META-INF/MANIFEST.MF
index 38854a629a..af81adf4c6 100644
--- a/examples/org.eclipse.swt.examples.watchdog/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.watchdog/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.swt.examples.watchdog;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.swt.examples.watchdog.WatchdogPlugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swt,
diff --git a/examples/org.eclipse.swt.examples/.classpath b/examples/org.eclipse.swt.examples/.classpath
index ad32c83a78..098194ca4b 100644
--- a/examples/org.eclipse.swt.examples/.classpath
+++ b/examples/org.eclipse.swt.examples/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/examples/org.eclipse.swt.examples/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.swt.examples/.settings/org.eclipse.jdt.core.prefs
index ef8a789ca0..055603b91e 100644
--- a/examples/org.eclipse.swt.examples/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.swt.examples/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,101 @@
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.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
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.6
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.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.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.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=ignore
+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=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.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.7
diff --git a/examples/org.eclipse.swt.examples/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples/META-INF/MANIFEST.MF
index ab5bfc54f2..11d5c32742 100644
--- a/examples/org.eclipse.swt.examples/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.swt.examples; singleton:=true
Bundle-Version: 3.104.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.eclipse.swt.examples.accessibility,
org.eclipse.swt.examples.addressbook,
org.eclipse.swt.examples.browserexample,
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/BarChart.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/BarChart.java
index 1328789c57..54182f970c 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/BarChart.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/BarChart.java
@@ -44,7 +44,7 @@ import org.eclipse.swt.widgets.Display;
*/
public class BarChart extends Canvas {
static ResourceBundle bundle = ResourceBundle.getBundle("examples_accessibility");
- List<Object[]> data = new ArrayList<Object[]>();
+ List<Object[]> data = new ArrayList<>();
String title;
int color = SWT.COLOR_RED;
int selectedItem = -1;
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
index dceb5f88b6..deb20f199d 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
@@ -928,7 +928,7 @@ public class FileViewer {
* If not already expanded, recursively expands the parents of the specified
* directory until it is visible.
*/
- List <File> path = new ArrayList<File>();
+ List <File> path = new ArrayList<>();
// Build a stack of paths from the root of the tree
while (dir != null) {
path.add(dir);
@@ -1174,7 +1174,7 @@ public class FileViewer {
progressDialog.open();
// Copy each file
- List<File> processedFiles = new ArrayList<File>();
+ List<File> processedFiles = new ArrayList<>();
for (int i = 0; (i < sourceNames.length) && (! progressDialog.isCancelled()); i++){
final File source = new File(sourceNames[i]);
final File dest = new File(targetFile, source.getName());
@@ -1295,7 +1295,7 @@ public class FileViewer {
* -- PORTABILITY ISSUES HERE --
*/
if (System.getProperty ("os.name").indexOf ("Windows") != -1) {
- List<File> list = new ArrayList<File>();
+ List<File> list = new ArrayList<>();
list.add(new File(DRIVE_A));
list.add(new File(DRIVE_B));
for (char i = 'c'; i <= 'z'; ++i) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java
index f2a049e7e8..96cb5c1ee3 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java
@@ -10,13 +10,17 @@
*******************************************************************************/
package org.eclipse.swt.examples.fileviewer;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.program.*;
-import org.eclipse.swt.widgets.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
-import java.io.*;
-import java.util.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Display;
/**
* Manages icons for the application.
@@ -95,7 +99,7 @@ class IconCache {
display.getSystemCursor(SWT.CURSOR_WAIT)
};
}
- iconCache = new Hashtable<Program, Image>();
+ iconCache = new Hashtable<>();
}
/**
* Frees the resources
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java
index e4daad9396..a48d544cea 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java
@@ -48,8 +48,8 @@ public class BallTab extends AnimatedGraphicsTab {
this.incY = incY;
this.ball_size = ball_size;
this.capacity = capacity;
- prevx = new LinkedList<Float>();
- prevy = new LinkedList<Float>();
+ prevx = new LinkedList<>();
+ prevy = new LinkedList<>();
this.colors = colors;
}
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java
index 1f4968eeaa..70a7568a2f 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java
@@ -273,7 +273,7 @@ public class ColorMenu {
public MenuItemListener(Control parent){
this.parent = parent;
- resources = new ArrayList<Resource>();
+ resources = new ArrayList<>();
}
/**
* Method used to set the ColorListener
@@ -298,7 +298,7 @@ public class ColorMenu {
for (int i = 0; i < resources.size(); i++) {
resources.get(i).dispose();
}
- resources = new ArrayList<Resource>();
+ resources = new ArrayList<>();
break;
case SWT.Selection:
Display display = event.display;
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java
index be628cb1d4..7fa47a2b1c 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java
@@ -55,7 +55,7 @@ public CustomFontTab(GraphicsExample example) {
// create list of fonts for this platform
FontData [] fontData = Display.getCurrent().getFontList(null, true);
- fontNames = new ArrayList<String>();
+ fontNames = new ArrayList<>();
for (int i=0; i < fontData.length; i++) {
// remove duplicates and sort
String nextName = fontData[i].getName();
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
index 290d5c0cbc..e1ced08eaa 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
@@ -62,7 +62,7 @@ public class GradientDialog extends Dialog {
super(parent, style);
rgb1 = rgb2 = null;
returnVal = SWT.CANCEL;
- resources = new ArrayList<Image>();
+ resources = new ArrayList<>();
}
/**
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java
index a9364fa399..7eb3242048 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java
@@ -15,8 +15,8 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
-import java.util.List;
import java.util.HashSet;
+import java.util.List;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -91,7 +91,7 @@ public GraphicsExample() {
public GraphicsExample(final Composite parent) {
this.parent = parent;
- resources = new ArrayList<Image>();
+ resources = new ArrayList<>();
createControls(parent);
setTab(tab);
startAnimationTimer();
@@ -416,7 +416,7 @@ void createTabList(Composite parent) {
return tab0.getText().compareTo(tab1.getText());
}
});
- HashSet<String> set = new HashSet<String>();
+ HashSet<String> set = new HashSet<>();
for (GraphicsTab tab : tabs) {
set.add(tab.getCategory());
}
@@ -427,7 +427,7 @@ void createTabList(Composite parent) {
TreeItem item = new TreeItem(tabList, SWT.NONE);
item.setText(text);
}
- tabs_in_order = new ArrayList<GraphicsTab>();
+ tabs_in_order = new ArrayList<>();
TreeItem[] items = tabList.getItems();
for (TreeItem item : items) {
for (GraphicsTab tab : tabs) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java
index 0b500bd299..c6e8fed311 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java
@@ -43,7 +43,7 @@ public MazeTab(GraphicsExample example) {
super(example);
// correct path
- nextCoord = new ArrayList<Integer>();
+ nextCoord = new ArrayList<>();
nextCoord.addAll(moveDown(20, -50, 20, 110, 10));
nextCoord.addAll(moveRight(30, 110, 130, 110, 10));
nextCoord.addAll(moveUp(135, 100, 135, 15, 10));
@@ -67,7 +67,7 @@ public MazeTab(GraphicsExample example) {
ycoord = nextCoord.get(nextIndex+1).intValue();
// wrong path 1
- nextCoord2 = new ArrayList<Integer>();
+ nextCoord2 = new ArrayList<>();
nextCoord2.addAll(moveDown(20, -25, 20, 110, 10));
nextCoord2.addAll(moveRight(30, 110, 130, 110, 10));
nextCoord2.addAll(moveUp(135, 100, 135, 15, 10));
@@ -80,7 +80,7 @@ public MazeTab(GraphicsExample example) {
ycoord2 = nextCoord2.get(nextIndex2+1).intValue();
// wrong path 2
- nextCoord3 = new ArrayList<Integer>();
+ nextCoord3 = new ArrayList<>();
nextCoord3.addAll(moveDown(20, 0, 20, 110, 10));
nextCoord3.addAll(moveRight(30, 110, 130, 110, 10));
nextCoord3.addAll(moveUp(135, 100, 135, 15, 10));
@@ -240,7 +240,7 @@ public void paint(GC gc, int width, int height) {
* The number of pixels that separate each coordinate
*/
private List<Integer> moveLeft(int x1, int y1, int x2, int y2, int stepsize) {
- List<Integer> coords = new ArrayList<Integer>();
+ List<Integer> coords = new ArrayList<>();
coords.add(new Integer(x1));
coords.add(new Integer(y1));
while(x1 - stepsize > x2) {
@@ -269,7 +269,7 @@ private List<Integer> moveLeft(int x1, int y1, int x2, int y2, int stepsize) {
* The number of pixels that separate each coordinate
*/
private List<Integer> moveRight(int x1, int y1, int x2, int y2, int stepsize) {
- List<Integer> coords = new ArrayList<Integer>();
+ List<Integer> coords = new ArrayList<>();
coords.add(new Integer(x1));
coords.add(new Integer(y1));
while(x1 + stepsize < x2) {
@@ -298,7 +298,7 @@ private List<Integer> moveRight(int x1, int y1, int x2, int y2, int stepsize) {
* The number of pixels that separate each coordinate
*/
private List<Integer> moveUp(int x1, int y1, int x2, int y2, int stepsize) {
- List<Integer> coords = new ArrayList<Integer>();
+ List<Integer> coords = new ArrayList<>();
coords.add(new Integer(x1));
coords.add(new Integer(y1));
while(y1 - stepsize > y2) {
@@ -327,7 +327,7 @@ private List<Integer> moveUp(int x1, int y1, int x2, int y2, int stepsize) {
* The number of pixels that separate each coordinate
*/
private List<Integer> moveDown(int x1, int y1, int x2, int y2, int stepsize) {
- List<Integer> coords = new ArrayList<Integer>();
+ List<Integer> coords = new ArrayList<>();
coords.add(new Integer(x1));
coords.add(new Integer(y1));
while(y1 + stepsize < y2) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
index ee5f7fd3fa..376000b472 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
@@ -1121,7 +1121,7 @@ public class ImageAnalyzer {
* as they are loaded.
*/
void incrementalThreadStart() {
- incrementalEvents = new ArrayList<ImageLoaderEvent>();
+ incrementalEvents = new ArrayList<>();
incrementalThread = new Thread("Incremental") {
@Override
public void run() {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
index 1ff30a6537..11e10f6a14 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
@@ -14,8 +14,8 @@ package org.eclipse.swt.examples.javaviewer;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
-import java.util.List;
import java.util.Hashtable;
+import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.LineStyleEvent;
@@ -30,7 +30,7 @@ class JavaLineStyler implements LineStyleListener {
JavaScanner scanner = new JavaScanner();
int[] tokenColors;
Color[] colors;
- List<int[]> blockComments = new ArrayList<int[]>();
+ List<int[]> blockComments = new ArrayList<>();
public static final int EOF= -1;
public static final int EOL= 10;
@@ -101,7 +101,7 @@ void disposeColors() {
*/
@Override
public void lineGetStyle(LineStyleEvent event) {
- List<StyleRange> styles = new ArrayList<StyleRange>();
+ List<StyleRange> styles = new ArrayList<>();
int token;
StyleRange lastStyle;
// If the line is part of a block comment, create one style for the entire line.
@@ -155,7 +155,7 @@ public void lineGetStyle(LineStyleEvent event) {
event.styles = styles.toArray(new StyleRange[styles.size()]);
}
public void parseBlockComments(String text) {
- blockComments = new ArrayList<int[]>();
+ blockComments = new ArrayList<>();
StringReader buffer = new StringReader(text);
int ch;
boolean blkComment = false;
@@ -257,7 +257,7 @@ public class JavaScanner {
* Initialize the lookup table.
*/
void initialize() {
- fgKeys= new Hashtable<String, Integer>();
+ fgKeys= new Hashtable<>();
Integer k= new Integer(KEY);
for (String word : fgKeywords)
fgKeys.put(word, k);
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
index 433a1bd56c..31e67cd74c 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
@@ -96,7 +96,7 @@ abstract class Tab {
"Group", "Label", "Link", "List", "ProgressBar", "Scale", "Slider", "StyledText",
"Table", "Text", "ToolBar", "Tree"};
TableItem newItem, lastSelected;
- List<String[]> data = new ArrayList<String[]> ();
+ List<String[]> data = new ArrayList<> ();
/* Controlling instance */
final LayoutExample instance;
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
index d7b7197fbe..b6e53a4375 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
@@ -25,7 +25,7 @@ public abstract class SegmentedPaintSession extends BasicPaintSession {
/**
* The set of control points making up the segmented selection
*/
- private List<Point> controlPoints = new ArrayList<Point>();
+ private List<Point> controlPoints = new ArrayList<>();
/**
* The previous figure (so that we can abort with right-button)

Back to the top