Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2015-04-05 07:05:35 +0000
committerLars Vogel2015-04-07 08:39:37 +0000
commit03679fe6f9e1efc1c6837b4a9ffa9dd3eb9e51ab (patch)
tree26dbc528f3cbc407167b11c83f94d3c08490ce8d
parent96ab90fcc2742e9aa7e7bc8fa2c23a19a37894a6 (diff)
downloadeclipse.platform.ui.tools-03679fe6f9e1efc1c6837b4a9ffa9dd3eb9e51ab.tar.gz
eclipse.platform.ui.tools-03679fe6f9e1efc1c6837b4a9ffa9dd3eb9e51ab.tar.xz
eclipse.platform.ui.tools-03679fe6f9e1efc1c6837b4a9ffa9dd3eb9e51ab.zip
Bug 418661 - [Metadata] Get rid of compile warnings in platform projects
in official build - part 2 Cleaned up and updated to Java 7 org.eclipse.e4.tools.emf.ui Change-Id: I4a9445cefbbc0aae222345b4e5332ee48cceb511 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.classpath2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/build.properties1
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java3
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java29
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java21
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionDataFile.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ModelResourceContentProvider.java5
9 files changed, 25 insertions, 49 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.classpath b/bundles/org.eclipse.e4.tools.emf.ui/.classpath
index 64449070..738c284c 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/.classpath
+++ b/bundles/org.eclipse.e4.tools.emf.ui/.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">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/e4/**"/>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs
index c9482977..1aa4f104 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.e4.tools.emf.ui/.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
@@ -130,7 +131,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.emf.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF
index b0216f1c..1782b374 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.9.0",
org.eclipse.core.databinding;bundle-version="1.3.0",
org.eclipse.core.databinding.property;bundle-version="1.2.100",
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/build.properties b/bundles/org.eclipse.e4.tools.emf.ui/build.properties
index 11fb1086..d6a67431 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/build.properties
+++ b/bundles/org.eclipse.e4.tools.emf.ui/build.properties
@@ -11,3 +11,4 @@ bin.includes = .,\
output.. = bin/
jars.compile.order = .
source.. = src/
+jre.compilation.profile = JavaSE-1.7
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java
index 939337a2..755a77d8 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.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
@@ -153,6 +153,7 @@ public class Util {
int index, EStructuralFeature feature) {
if (liveModel) {
final EObject container = ((EObject) element).eContainer();
+ @SuppressWarnings("unchecked")
final List<Object> l = (List<Object>) container.eGet(feature);
l.remove(element);
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java
index a0907770..e10de6e4 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 TwelveTone LLC and others.
+ * Copyright (c) 2014, 2015 TwelveTone LLC 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
@@ -11,10 +11,7 @@
package org.eclipse.e4.tools.emf.ui.internal.common;
-import java.util.Collection;
import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
import org.eclipse.e4.tools.emf.ui.internal.Messages;
@@ -66,7 +63,6 @@ public abstract class AbstractPickList extends Composite {
private final Button tiDown;
private final Button tiAdd;
// private final AutoCompleteField autoCompleteField;
- private Map<String, Object> proposals;
public AbstractPickList(Composite parent, int style, List<PickListFeatures> listFeatures, Messages messages,
AbstractComponentEditor componentEditor) {
@@ -220,29 +216,6 @@ public abstract class AbstractPickList extends Composite {
getPicker().setSelection(selection);
}
- private Map<String, Object> toProposals(Object inputElement) {
-
- final Map<String, Object> props = new TreeMap<String, Object>();
-
- if (inputElement instanceof Object[]) {
- for (final Object value : (Object[]) inputElement) {
- props.put(getTextualValue(value), value);
- }
- }
- if (inputElement instanceof Collection) {
- for (final Object value : (Collection<Object>) inputElement) {
- props.put(getTextualValue(value), value);
- }
-
- }
-
- return props;
- }
-
- private String getTextualValue(Object value) {
- return ((ILabelProvider) getPicker().getLabelProvider()).getText(value);
- }
-
public void setContentProvider(IContentProvider contentProvider) {
getPicker().setContentProvider(contentProvider);
}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java
index 5299094b..a8661b35 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 - 2014 fhv.at and others.
+ * Copyright (c) 2013 - 2015 fhv.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,7 +45,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
public abstract class AbstractIdDialog<ContributionClass, ElementClass extends MApplicationElement> extends
-SaveDialogBoundsSettingsDialog {
+ SaveDialogBoundsSettingsDialog {
protected EModelService modelService;
@@ -89,19 +89,19 @@ SaveDialogBoundsSettingsDialog {
@Override
public void update(ViewerCell cell) {
+ @SuppressWarnings("unchecked")
final ElementClass el = (ElementClass) cell.getElement();
final String elementId = el.getElementId() != null && el.getElementId().trim().length() > 0 ? el
.getElementId() : "(Id missing)"; //$NON-NLS-1$
- final StyledString str = new StyledString(elementId);
+ final StyledString str = new StyledString(elementId);
- final String infoString = getListItemInformation(el);
- if (infoString != null && infoString.trim().length() > 0)
- {
- str.append(" - " + getListItemInformation(el), StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
- }
+ final String infoString = getListItemInformation(el);
+ if (infoString != null && infoString.trim().length() > 0) {
+ str.append(" - " + getListItemInformation(el), StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
+ }
- cell.setText(str.getString());
- cell.setStyleRanges(str.getStyleRanges());
+ cell.setText(str.getString());
+ cell.setStyleRanges(str.getStyleRanges());
}
};
}
@@ -152,6 +152,7 @@ SaveDialogBoundsSettingsDialog {
@Override
protected void okPressed() {
if (!viewer.getSelection().isEmpty()) {
+ @SuppressWarnings("unchecked")
final ElementClass el = (ElementClass) ((IStructuredSelection) viewer.getSelection()).getFirstElement();
final Command cmd = SetCommand.create(domain, contribution, getFeatureLiteral(), el.getElementId());
if (cmd.canExecute()) {
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionDataFile.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionDataFile.java
index 82461709..0602d92d 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionDataFile.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionDataFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 TwelveTone LLC and others.
+ * Copyright (c) 2014, 2015 TwelveTone LLC 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
@@ -487,7 +487,7 @@ public class ContributionDataFile implements IFile {
}
@Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
// TODO Auto-generated method stub
return null;
}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ModelResourceContentProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ModelResourceContentProvider.java
index d0ccfa9c..2b40d470 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ModelResourceContentProvider.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/tabs/ModelResourceContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 TwelveTone LLC and others.
+ * Copyright (c) 2014, 2015 TwelveTone LLC 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
@@ -12,6 +12,7 @@
package org.eclipse.e4.tools.emf.ui.internal.common.component.tabs;
import java.util.ArrayList;
+
import org.eclipse.e4.tools.emf.ui.common.IModelResource;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EAttribute;
@@ -23,7 +24,6 @@ import org.eclipse.jface.viewers.Viewer;
public class ModelResourceContentProvider implements IStructuredContentProvider {
private Object[] items = new Object[0];
- private Viewer viewer;
public ModelResourceContentProvider() {
// adapter = new EContentAdapter() {
@@ -73,7 +73,6 @@ public class ModelResourceContentProvider implements IStructuredContentProvider
@Override
public void inputChanged(final Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = viewer;
ArrayList<EObject> list = new ArrayList<EObject>();
IModelResource modelProvider = (IModelResource) newInput;
if (newInput != oldInput && newInput != null) {

Back to the top