Bug 460048 - Move platform runtime plugins to Java 1.7 BREE -
org.eclipse.core.runtime

Changed manifest, classpath, compiler settings and build properties in
org.eclipse.core.runtime.

Fixed all new compiler warnings (generics/override).

Change-Id: I79959fc5f1994ca7c3efb2975cce7cad40b8b2fc
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>

diff --git a/bundles/org.eclipse.core.runtime/.classpath b/bundles/org.eclipse.core.runtime/.classpath
index 2d1a430..b1dabee 100644
--- a/bundles/org.eclipse.core.runtime/.classpath
+++ b/bundles/org.eclipse.core.runtime/.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/J2SE-1.5"/>

+	<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/bundles/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
index da301c3..cc45849 100644
--- a/bundles/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,10 @@
 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.5
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+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
@@ -65,7 +66,7 @@
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=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
@@ -96,7 +97,7 @@
 org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+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=warning
@@ -108,6 +109,7 @@
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=error
@@ -120,7 +122,7 @@
 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.5
+org.eclipse.jdt.core.compiler.source=1.7
 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
diff --git a/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF
index 0c971c2..03d8ea6 100644
--- a/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF
@@ -19,5 +19,5 @@
  org.eclipse.core.contenttype;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
  org.eclipse.equinox.app;bundle-version="1.0.0";visibility:=reexport
 Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 DynamicImport-Package: org.eclipse.core.internal.runtime.auth
diff --git a/bundles/org.eclipse.core.runtime/build.properties b/bundles/org.eclipse.core.runtime/build.properties
index 8521e17..3f7d8e3 100644
--- a/bundles/org.eclipse.core.runtime/build.properties
+++ b/bundles/org.eclipse.core.runtime/build.properties
@@ -1,10 +1,10 @@
 ###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
+# Copyright (c) 2003, 2015 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
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
@@ -17,4 +17,4 @@
 source.. = src/
 src.includes = about.html,\
                schema/
-
+jre.compilation.profile = JavaSE-1.7
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/InitLegacyPreferences.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/InitLegacyPreferences.java
index 3c17165..69d1221 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/InitLegacyPreferences.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/InitLegacyPreferences.java
@@ -33,6 +33,7 @@
 	 * @deprecated Marked deprecated to suppress warnings. This class is added to support
 	 * backward compatibility only and should not be used in any new code.
 	 */
+	@Override
 	@Deprecated
 	public Object init(Object object, String name) {
 		Plugin plugin = null;
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/PreferenceForwarder.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/PreferenceForwarder.java
index 33aa1f6..44f36d2 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/PreferenceForwarder.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/PreferenceForwarder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2014 IBM Corporation and others.
+ *  Copyright (c) 2004, 2015 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
@@ -58,6 +58,7 @@
 	/*
 	 * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener#added(org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent)
 	 */
+	@Override
 	public synchronized void added(IEclipsePreferences.NodeChangeEvent event) {
 		if (listeners.size() > 0 && pluginID.equals(event.getChild().name())) {
 			try {
@@ -72,6 +73,7 @@
 	/*
 	 * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener#removed(org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent)
 	 */
+	@Override
 	public synchronized void removed(IEclipsePreferences.NodeChangeEvent event) {
 		// Do nothing. We can't remove ourselves from the node's list of preference change
 		// listeners because the node has already been removed.
@@ -99,6 +101,7 @@
 	/*
 	 * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
 	 */
+	@Override
 	public void preferenceChange(IEclipsePreferences.PreferenceChangeEvent event) {
 		// if we are the ones making this change, then don't broadcast
 		if (!notify)
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/ProductPreferencesService.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/ProductPreferencesService.java
index b274a6c..ae9ec44 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/ProductPreferencesService.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/preferences/legacy/ProductPreferencesService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2015 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
@@ -65,6 +65,7 @@
 		}
 	}
 
+	@Override
 	public Properties getProductCustomization() {
 		initValues();
 		URL url = null;
@@ -86,6 +87,7 @@
 		return loadProperties(url);
 	}
 
+	@Override
 	public Properties getProductTranslation() {
 		initValues();
 		URL transURL = null;
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java
index 482b8eb..ce3067f 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -38,6 +38,7 @@
 	 *
 	 * @see Platform#addLogListener(ILogListener)
 	 */
+	@Override
 	public void addLogListener(ILogListener listener) {
 		synchronized (logListeners) {
 			logListeners.add(listener);
@@ -47,6 +48,7 @@
 	/**
 	 * Returns the plug-in with which this log is associated.
 	 */
+	@Override
 	public Bundle getBundle() {
 		return bundle;
 	}
@@ -57,6 +59,7 @@
 	 *
 	 * @see Plugin#getLog()
 	 */
+	@Override
 	public void log(final IStatus status) {
 		// Log to the logger
 		logger.log(PlatformLogWriter.getLog(status), PlatformLogWriter.getLevel(status), status.getMessage(), status.getException());
@@ -68,12 +71,14 @@
 	 *
 	 * @see Platform#removeLogListener(ILogListener)
 	 */
+	@Override
 	public void removeLogListener(ILogListener listener) {
 		synchronized (logListeners) {
 			logListeners.remove(listener);
 		}
 	}
 
+	@Override
 	public void logged(LogEntry entry) {
 		logToListeners(PlatformLogWriter.convertToStatus(entry));
 	}
@@ -87,10 +92,12 @@
 		for (int i = 0; i < listeners.length; i++) {
 			final ILogListener listener = listeners[i];
 			ISafeRunnable code = new ISafeRunnable() {
+				@Override
 				public void run() throws Exception {
 					listener.logging(status, bundle.getSymbolicName());
 				}
 
+				@Override
 				public void handleException(Throwable e) {
 					//Ignore
 				}
@@ -99,6 +106,7 @@
 		}
 	}
 
+	@Override
 	public boolean isLoggable(Bundle loggingBundle, String loggerName, int logLevel) {
 		return PlatformLogWriter.EQUINOX_LOGGER_NAME.equals(loggerName) && bundle.getBundleId() == loggingBundle.getBundleId();
 	}
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Product.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Product.java
index 2737c36..b0d12bd 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Product.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Product.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -20,26 +20,32 @@
 		this.branding = branding;
 	}
 
+	@Override
 	public String getApplication() {
 		return branding.getApplication();
 	}
 
+	@Override
 	public Bundle getDefiningBundle() {
 		return branding.getDefiningBundle();
 	}
 
+	@Override
 	public String getDescription() {
 		return branding.getDescription();
 	}
 
+	@Override
 	public String getId() {
 		return branding.getId();
 	}
 
+	@Override
 	public String getName() {
 		return branding.getName();
 	}
 
+	@Override
 	public String getProperty(String key) {
 		return branding.getProperty(key);
 	}
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
index e83a0d7..3fddae6 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
@@ -373,6 +373,7 @@
 		// activation).
 		final Preferences[] preferencesCopy = new Preferences[1];
 		Runnable innerCall = new Runnable() {
+			@Override
 			public void run() {
 				preferencesCopy[0] = new org.eclipse.core.internal.preferences.legacy.PreferenceForwarder(this, bundleCopy.getSymbolicName());
 			}
@@ -412,6 +413,7 @@
 		// as the Plugin class is loaded.
 		final Preferences preferencesCopy = preferences;
 		Runnable innerCall = new Runnable() {
+			@Override
 			public void run() {
 				try {
 					((org.eclipse.core.internal.preferences.legacy.PreferenceForwarder) preferencesCopy).flush();
@@ -763,6 +765,7 @@
 	 * @exception Exception if this plug-in did not start up properly
 	 * @since 3.0
 	 */
+	@Override
 	public void start(BundleContext context) throws Exception {
 		bundle = context.getBundle();
 		initializeDescriptor(bundle.getSymbolicName());
@@ -826,6 +829,7 @@
 	 * @exception Exception if this method fails to shut down this plug-in
 	 * @since 3.0
 	 */
+	@Override
 	public void stop(BundleContext context) throws Exception {
 
 		if (this.debugTracker != null) {
@@ -849,4 +853,4 @@
 			return ((BundleReference) cl).getBundle();
 		return null;
 	}
-}
\ No newline at end of file
+}
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Preferences.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Preferences.java
index 7e22bbe..7981d6f 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Preferences.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Preferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 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
@@ -502,10 +502,12 @@
 		for (int i = 0; i < changeListeners.length; ++i) {
 			final IPropertyChangeListener l = (IPropertyChangeListener) changeListeners[i];
 			ISafeRunnable job = new ISafeRunnable() {
+				@Override
 				public void handleException(Throwable exception) {
 					// already being logged in SafeRunner#run()
 				}
 
+				@Override
 				public void run() throws Exception {
 					l.propertyChange(pe);
 				}