Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2015-04-04 22:26:51 +0000
committerAndrey Loskutov2015-04-05 16:16:07 +0000
commit96ab90fcc2742e9aa7e7bc8fa2c23a19a37894a6 (patch)
tree99afc3f3c4a8849b99eab013b3a2800c59e1ac18
parent8486a63c839e08969c0e996e6a910bc79e8b0905 (diff)
downloadeclipse.platform.ui.tools-96ab90fcc2742e9aa7e7bc8fa2c23a19a37894a6.tar.gz
eclipse.platform.ui.tools-96ab90fcc2742e9aa7e7bc8fa2c23a19a37894a6.tar.xz
eclipse.platform.ui.tools-96ab90fcc2742e9aa7e7bc8fa2c23a19a37894a6.zip
Bug 418661 - [Metadata] Get rid of compile warnings in platform projects
in official build - part 1 Cleaned up and updated to Java 7 org.eclipse.e4.tools.compat Change-Id: I5a5e58bab68558df29eaf325977e75ec3dbb074c Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.e4.tools.compat/.classpath2
-rw-r--r--bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs10
-rw-r--r--bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.e4.tools.compat/build.properties1
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java8
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java4
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java12
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIHandler.java10
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java7
9 files changed, 26 insertions, 30 deletions
diff --git a/bundles/org.eclipse.e4.tools.compat/.classpath b/bundles/org.eclipse.e4.tools.compat/.classpath
index ad32c83a..098194ca 100644
--- a/bundles/org.eclipse.e4.tools.compat/.classpath
+++ b/bundles/org.eclipse.e4.tools.compat/.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/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs
index c9482977..b2d28cdb 100644
--- a/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs
@@ -25,9 +25,10 @@ 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.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.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
@@ -106,7 +107,7 @@ 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.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
@@ -118,6 +119,7 @@ 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
@@ -130,7 +132,7 @@ 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
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW,NORMAL
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED,APITODO
diff --git a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
index c44e8412..051a06ca 100644
--- a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.e4.tools.compat;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
org.eclipse.e4.core.contexts;bundle-version="0.9.0",
diff --git a/bundles/org.eclipse.e4.tools.compat/build.properties b/bundles/org.eclipse.e4.tools.compat/build.properties
index aac269a4..6c23df33 100644
--- a/bundles/org.eclipse.e4.tools.compat/build.properties
+++ b/bundles/org.eclipse.e4.tools.compat/build.properties
@@ -5,3 +5,4 @@ bin.includes = META-INF/,\
about.html,\
OSGI-INF/
source.. = src/
+jre.compilation.profile = JavaSE-1.7
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
index bb54e563..a721ada3 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2014 BestSolution.at and others.
+ * Copyright (c) 2010, 2015 BestSolution.at 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
@@ -45,17 +45,17 @@ import org.w3c.dom.css.CSSStyleDeclaration;
public class ContextServiceFactory extends AbstractServiceFactory {
@Override
- public Object create(@SuppressWarnings("rawtypes") Class serviceInterface, IServiceLocator parentLocator,
+ public Object create(Class serviceInterface, IServiceLocator parentLocator,
IServiceLocator locator) {
if (!IEclipseContext.class.equals(serviceInterface)) {
return null;
}
- final IWorkbenchLocationService wls = (IWorkbenchLocationService) locator
- .getService(IWorkbenchLocationService.class);
+ final IWorkbenchLocationService wls = locator.getService(IWorkbenchLocationService.class);
final IWorkbenchWindow window = wls.getWorkbenchWindow();
final IWorkbenchPartSite site = wls.getPartSite();
+ @SuppressWarnings("unchecked")
final Object o = parentLocator.getService(serviceInterface);
// This happens when we run in plain 3.x
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
index 996cbad8..785056a9 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at and others.
+ * Copyright (c) 2010, 2015 BestSolution.at 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
@@ -34,7 +34,7 @@ public class PartHelper {
public static IEclipseContext createPartContext(WorkbenchPart part) throws PartInitException {
final IWorkbenchPartSite site = part.getSite();
- final IEclipseContext parentContext = (IEclipseContext) site.getService(IEclipseContext.class);
+ final IEclipseContext parentContext = site.getService(IEclipseContext.class);
// Check if running in 4.x
if (parentContext.get(ORG_ECLIPSE_E4_UI_WORKBENCH_I_PRESENTATION_ENGINE) != null) {
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
index f247c89e..d5a86d04 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2014 BestSolution.at and others.
+ * Copyright (c) 2010, 2015 BestSolution.at 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
@@ -43,8 +43,7 @@ import org.eclipse.ui.part.EditorPart;
*
* @param <C>
*/
-public abstract class DIEditorPart<C> extends EditorPart implements
- IDirtyProviderService {
+public abstract class DIEditorPart<C> extends EditorPart implements IDirtyProviderService {
private IEclipseContext context;
private C component;
private Class<C> clazz;
@@ -83,8 +82,7 @@ public abstract class DIEditorPart<C> extends EditorPart implements
}
@Override
- public void init(IEditorSite site, IEditorInput input)
- throws PartInitException {
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
setSite(site);
setInput(input);
@@ -157,10 +155,8 @@ public abstract class DIEditorPart<C> extends EditorPart implements
@Override
public void dispose() {
- PartHelper.disposeContextIfE3((IEclipseContext) getSite().getService(
- IEclipseContext.class), context);
+ PartHelper.disposeContextIfE3(getSite().getService(IEclipseContext.class), context);
super.dispose();
}
-
}
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIHandler.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIHandler.java
index ede67b2d..e1bfa9db 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIHandler.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 EclipseSource München GmbH and others.
+ * Copyright (c) 2012, 2015 EclipseSource München GmbH 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
@@ -21,7 +21,7 @@ import org.eclipse.ui.PlatformUI;
/**
* This is a preliminary implementation of a Handler wrapper. It does not support @CanExecute yet
- *
+ *
* @author Jonas
*
* @param <C>
@@ -41,14 +41,12 @@ public class DIHandler<C> extends AbstractHandler {
}
private static IEclipseContext getParentContext() {
- return (IEclipseContext) PlatformUI.getWorkbench().getService(
- IEclipseContext.class);
+ return PlatformUI.getWorkbench().getService(IEclipseContext.class);
}
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- return ContextInjectionFactory.invoke(component, Execute.class,
- getActiveContext());
+ return ContextInjectionFactory.invoke(component, Execute.class, getActiveContext());
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
index edabb810..4519e346 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at and others.
+ * Copyright (c) 2010, 2015 BestSolution.at 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
@@ -56,11 +56,10 @@ public abstract class DIViewPart<C> extends ViewPart {
public void setFocus() {
ContextInjectionFactory.invoke(component, Focus.class, context);
}
-
+
@Override
public void dispose() {
- PartHelper.disposeContextIfE3((IEclipseContext) getSite().getService(
- IEclipseContext.class), context);
+ PartHelper.disposeContextIfE3(getSite().getService(IEclipseContext.class), context);
super.dispose();
}
} \ No newline at end of file

Back to the top