Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Sternberg2015-06-05 06:58:54 -0400
committerRalf Sternberg2015-06-05 06:58:54 -0400
commit49e4936a3656ce34454e6e217cc7222e3ec59df6 (patch)
tree19eabdad8434aa7da5f3048618306f50cc89d9d3
parent338b77153ea58f817555f1d5aa8f6dd29a3a0493 (diff)
downloadorg.eclipse.rap.incubator.dropdown-49e4936a3656ce34454e6e217cc7222e3ec59df6.tar.gz
org.eclipse.rap.incubator.dropdown-49e4936a3656ce34454e6e217cc7222e3ec59df6.tar.xz
org.eclipse.rap.incubator.dropdown-49e4936a3656ce34454e6e217cc7222e3ec59df6.zip
Update to Java 7, fix compiler warnings
Switch all projects to Java 7, adjust JDT settings from template. Adjust code to remove compiler warnings.
-rw-r--r--bundles/org.eclipse.rap.addons.autosuggest/.classpath2
-rw-r--r--bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.core.prefs9
-rw-r--r--bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.ui.prefs2
-rw-r--r--bundles/org.eclipse.rap.addons.autosuggest/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider.java12
-rw-r--r--bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/AutoSuggest.java5
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/.classpath2
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.ui.prefs8
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/Activator.java5
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/CountryInfo.java6
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExampleContribution.java5
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExamplePage.java43
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/.classpath2
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.core.prefs10
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.ui.prefs8
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestDemo.java30
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestSnippet.java20
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/ComboVsDropDown.java5
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/DropDownDemo.java7
-rw-r--r--examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/internal/DropDownApplication.java5
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/.classpath2
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.core.prefs10
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.ui.prefs2
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/META-INF/MANIFEST.MF2
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider_Test.java8
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/AutoSuggest_Test.java9
-rw-r--r--tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/DataSource_Test.java15
-rw-r--r--tests/org.eclipse.rap.jstestrunner/.classpath2
-rw-r--r--tests/org.eclipse.rap.jstestrunner/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--tests/org.eclipse.rap.jstestrunner/META-INF/MANIFEST.MF2
-rw-r--r--tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineJUnitReporter.java8
-rw-r--r--tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineSysoutReporter.java8
-rw-r--r--tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SpecImpl.java6
-rw-r--r--tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SuiteImpl.java4
37 files changed, 171 insertions, 116 deletions
diff --git a/bundles/org.eclipse.rap.addons.autosuggest/.classpath b/bundles/org.eclipse.rap.addons.autosuggest/.classpath
index 7db29ef..8697d2b 100644
--- a/bundles/org.eclipse.rap.addons.autosuggest/.classpath
+++ b/bundles/org.eclipse.rap.addons.autosuggest/.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="src" path="js"/>
diff --git a/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.core.prefs
index 224f860..809819e 100644
--- a/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
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.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
@@ -79,7 +79,7 @@ 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=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
@@ -102,6 +102,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
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
@@ -114,7 +115,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
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=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.ui.prefs
index e34feed..78561b7 100644
--- a/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.rap.addons.autosuggest/.settings/org.eclipse.jdt.ui.prefs
@@ -7,7 +7,7 @@ org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} EclipseSource and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * EclipseSource - initial API and implementation\r\n ******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} EclipseSource and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * EclipseSource - initial API and implementation\n ******************************************************************************/\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
diff --git a/bundles/org.eclipse.rap.addons.autosuggest/META-INF/MANIFEST.MF b/bundles/org.eclipse.rap.addons.autosuggest/META-INF/MANIFEST.MF
index 8ee7fa7..37baee7 100644
--- a/bundles/org.eclipse.rap.addons.autosuggest/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.rap.addons.autosuggest/META-INF/MANIFEST.MF
@@ -4,6 +4,6 @@ Bundle-Name: Auto Suggest component
Bundle-SymbolicName: org.eclipse.rap.addons.autosuggest
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: Eclipse.org - RAP Incubator
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.eclipse.rap.addons.autosuggest;version="0.3.0"
Require-Bundle: org.eclipse.rap.rwt;bundle-version="[3.0.0,4.0.0)"
diff --git a/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider.java b/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider.java
index 913a12e..8f5ea1c 100644
--- a/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider.java
+++ b/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -18,7 +18,7 @@ import java.util.List;
* This class provides a simple implementation of the default {@link DataProvider} interface
* based on a String array.
*/
-public class ArrayDataProvider implements DataProvider {
+public class ArrayDataProvider implements DataProvider<String> {
private final List<String> elements;
@@ -32,12 +32,14 @@ public class ArrayDataProvider implements DataProvider {
this.elements = Arrays.asList( elements );
}
- public Iterable<?> getSuggestions() {
+ @Override
+ public Iterable<String> getSuggestions() {
return elements;
}
- public String getValue( Object element ) {
- return ( String )element;
+ @Override
+ public String getValue( String suggestion ) {
+ return suggestion;
}
}
diff --git a/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/AutoSuggest.java b/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/AutoSuggest.java
index 703ee96..b57ade0 100644
--- a/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/AutoSuggest.java
+++ b/bundles/org.eclipse.rap.addons.autosuggest/src/org/eclipse/rap/addons/autosuggest/AutoSuggest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -109,10 +109,11 @@ public class AutoSuggest {
}
}
} );
- selectionListeners = new ArrayList<SuggestionSelectedListener>( 1 );
+ selectionListeners = new ArrayList<>( 1 );
connectClientObjects();
attachClientListeners();
text.addListener( SWT.Dispose, new Listener() {
+ @Override
public void handleEvent( Event event ) {
dispose();
}
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/.classpath b/examples/org.eclipse.rap.addons.dropdown.demo.examples/.classpath
index 5e4c1fe..098194c 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/.classpath
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/.classpath
@@ -1,7 +1,7 @@
<?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.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.core.prefs
index 224f860..3e707f7 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
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
@@ -79,7 +80,7 @@ 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=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
@@ -102,6 +103,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
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
@@ -114,7 +116,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
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=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -198,7 +200,6 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.ui.prefs
index 39838fa..78561b7 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.ui.prefs
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/.settings/org.eclipse.jdt.ui.prefs
@@ -7,7 +7,7 @@ org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} EclipseSource and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * EclipseSource - initial API and implementation\r\n ******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} EclipseSource and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * EclipseSource - initial API and implementation\n ******************************************************************************/\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
@@ -26,10 +26,10 @@ sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/META-INF/MANIFEST.MF b/examples/org.eclipse.rap.addons.dropdown.demo.examples/META-INF/MANIFEST.MF
index c5f7a77..6aecca2 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.rap.addons.dropdown.demo.examples
Bundle-Version: 1.0.0.qualifier
Import-Package: org.eclipse.rap.addons.autosuggest;version="0.3.0",
org.osgi.framework;version="1.3.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Vendor: Eclipse.org - RAP
Require-Bundle: org.eclipse.rap.rwt;bundle-version="2.2.0",
org.eclipse.rap.examples;bundle-version="2.2.0"
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/Activator.java b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/Activator.java
index 0cedc91..bcc8571 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/Activator.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -22,12 +22,15 @@ public class Activator implements BundleActivator {
private ServiceRegistration<?> registration;
+ @Override
public void start( BundleContext context ) throws Exception {
DropDownExampleContribution contribution = new DropDownExampleContribution();
registration = context.registerService( EXAMPLE_CONTRIB, contribution, null );
}
+ @Override
public void stop( BundleContext context ) throws Exception {
registration.unregister();
}
+
}
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/CountryInfo.java b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/CountryInfo.java
index 41c19f9..465c47c 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/CountryInfo.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/CountryInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -57,7 +57,7 @@ public class CountryInfo {
File file = new File( getGeoDataDirectory(), "countries.txt" );
InputStream stream = new FileInputStream( file );
BufferedReader reader = new BufferedReader( new InputStreamReader( stream, CHARSET ) );
- List<Country> countries = new ArrayList<Country>( 252 );
+ List<Country> countries = new ArrayList<>( 252 );
try {
String line = reader.readLine();
while( line != null ) {
@@ -76,7 +76,7 @@ public class CountryInfo {
File file = new File( getGeoDataDirectory(), "cities/" + country.iso + ".txt" );
InputStream stream = new FileInputStream( file );
BufferedReader reader = new BufferedReader( new InputStreamReader( stream, CHARSET ) );
- List<City> cities = new ArrayList<City>( 250 );
+ List<City> cities = new ArrayList<>( 250 );
try {
String line = reader.readLine();
while( line != null ) {
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExampleContribution.java b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExampleContribution.java
index 1cadfe4..4a46524 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExampleContribution.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExampleContribution.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -16,14 +16,17 @@ import org.eclipse.rap.examples.IExamplePage;
public class DropDownExampleContribution implements IExampleContribution {
+ @Override
public String getId() {
return "drop-down";
}
+ @Override
public String getTitle() {
return "Auto Suggest";
}
+ @Override
public IExamplePage createPage() {
return new DropDownExamplePage();
}
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExamplePage.java b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExamplePage.java
index 1128c50..a4e7fc9 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExamplePage.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo.examples/src/org/eclipse/rap/addons/dropdown/demo/examples/DropDownExamplePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -39,6 +39,7 @@ public class DropDownExamplePage implements IExamplePage {
private AutoSuggest cityAutoSuggest;
private Country currentCountry = null;
+ @Override
public void createControl( Composite parent ) {
parent.setLayout( ExampleUtil.createMainLayout( 2 ) );
createCitySelection( parent );
@@ -77,6 +78,7 @@ public class DropDownExamplePage implements IExamplePage {
countryAutoSuggest.setAutoComplete( true );
countryAutoSuggest.setDataSource( createCountriesDataSource() );
countryAutoSuggest.addSelectionListener( new SuggestionSelectedListener() {
+ @Override
public void suggestionSelected() {
setCurrentCountry( countryText.getText() );
}
@@ -94,6 +96,7 @@ public class DropDownExamplePage implements IExamplePage {
cityAutoSuggest = new AutoSuggest( cityText );
cityAutoSuggest.setAutoComplete( true );
cityAutoSuggest.addSelectionListener( new SuggestionSelectedListener() {
+ @Override
public void suggestionSelected() {
String name = cityText.getText();
City city = currentCountry.findCity( name );
@@ -114,30 +117,34 @@ public class DropDownExamplePage implements IExamplePage {
// TODO [tb] : re-use data sources
private static DataSource createCountriesDataSource() {
DataSource countriesDataSource = new DataSource();
- countriesDataSource.setDataProvider( new DataProvider() {
- public Iterable<?> getSuggestions() {
+ countriesDataSource.setDataProvider( new DataProvider<Country>() {
+ @Override
+ public Iterable<Country> getSuggestions() {
return Arrays.asList( CountryInfo.getInstance().getCountries() );
}
- public String getValue( Object element ) {
- return ( ( Country )element ).name;
+ @Override
+ public String getValue( Country country ) {
+ return country.name;
}
} );
return countriesDataSource;
}
- // TODO [tb] : re-use data sources
- private static DataSource createDataSource( Country country ) {
- DataSource dataSource = new DataSource();
- final City[] cities = country.getCities();
- dataSource.setDataProvider( new DataProvider() {
- public Iterable< ? > getSuggestions() {
- return Arrays.asList( cities );
- }
- public String getValue( Object element ) {
- return element.toString();
- }
+ // TODO [tb] : re-use data sources
+ private static DataSource createDataSource( Country country ) {
+ DataSource dataSource = new DataSource();
+ final City[] cities = country.getCities();
+ dataSource.setDataProvider( new DataProvider<City>() {
+ @Override
+ public Iterable<City> getSuggestions() {
+ return Arrays.asList( cities );
+ }
+ @Override
+ public String getValue( City city ) {
+ return city.toString();
+ }
} );
- return dataSource;
- }
+ return dataSource;
+ }
}
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/.classpath b/examples/org.eclipse.rap.addons.dropdown.demo/.classpath
index 64c5e31..098194c 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/.classpath
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/.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/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.core.prefs
index 224f860..08fa822 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
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.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
@@ -79,7 +79,7 @@ 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=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
@@ -102,6 +102,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
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
@@ -114,7 +115,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
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=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -198,7 +199,6 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.ui.prefs
index 39838fa..78561b7 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.ui.prefs
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/.settings/org.eclipse.jdt.ui.prefs
@@ -7,7 +7,7 @@ org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} EclipseSource and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * EclipseSource - initial API and implementation\r\n ******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} EclipseSource and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * EclipseSource - initial API and implementation\n ******************************************************************************/\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
@@ -26,10 +26,10 @@ sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/META-INF/MANIFEST.MF b/examples/org.eclipse.rap.addons.dropdown.demo/META-INF/MANIFEST.MF
index 0ca532c..75a5948 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: DropDown Demo
Bundle-SymbolicName: org.eclipse.rap.addons.dropdown.demo
Bundle-Version: 0.3.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.rap.rwt;bundle-version="2.2.0"
Service-Component: OSGI-INF/*.xml
Bundle-Vendor: Eclipse.org - RAP Incubator
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestDemo.java b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestDemo.java
index daea0d0..ade5eb2 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestDemo.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestDemo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -64,23 +64,25 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
private void createDataSources() {
de = new DataSource();
- de.setDataProvider( new DataProvider() {
- public Iterable< ? > getSuggestions() {
+ de.setDataProvider( new DataProvider<String[]>() {
+ @Override
+ public Iterable<String[]> getSuggestions() {
return Arrays.asList( KFZ.DE );
}
- public String getValue( Object element ) {
- String[] array = (String[])element;
- return array[ 2 ] + " (" + array[ 0 ] + ")";
+ @Override
+ public String getValue( String[] suggestion ) {
+ return suggestion[ 2 ] + " (" + suggestion[ 0 ] + ")";
}
} );
at = new DataSource();
- at.setDataProvider( new DataProvider() {
- public Iterable< ? > getSuggestions() {
+ at.setDataProvider( new DataProvider<String[]>() {
+ @Override
+ public Iterable<String[]> getSuggestions() {
return Arrays.asList( KFZ.AT );
}
- public String getValue( Object element ) {
- String[] array = (String[])element;
- return array[ 1 ] + " (" + array[ 0 ] + ")";
+ @Override
+ public String getValue( String[] suggestion ) {
+ return suggestion[ 1 ] + " (" + suggestion[ 0 ] + ")";
}
} );
currentDataSource = de;
@@ -118,6 +120,7 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
germany.setText( "Germany" );
germany.setSelection( true );
germany.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
if( germany.getSelection() ) {
currentDataSource = de;
@@ -128,6 +131,7 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
final Button austria = new Button( location, SWT.RADIO );
austria.setText( "Austria" );
austria.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
if( austria.getSelection() ) {
currentDataSource = at;
@@ -147,6 +151,7 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
final Button autoComplete = new Button( location, SWT.CHECK );
autoComplete.setText( "AutoComplete" );
autoComplete.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
useAutoComplete = autoComplete.getSelection();
autoSuggest.setAutoComplete( useAutoComplete );
@@ -155,6 +160,7 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
final Button customScripts = new Button( location, SWT.CHECK );
customScripts.setText( "Custom Scripts" );
customScripts.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
autoSuggest.dispose();
useCustomScripts = customScripts.getSelection();
@@ -177,6 +183,7 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
private void createLogger() {
autoSuggest.addSelectionListener( new SuggestionSelectedListener() {
+ @Override
public void suggestionSelected() {
TableItem item = new TableItem( table, SWT.NONE );
item.setText( text.getText() );
@@ -189,6 +196,7 @@ public class AutoSuggestDemo extends AbstractEntryPoint {
Button button = new Button( parent, SWT.PUSH );
button.setText( "Dispose!" );
button.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
autoSuggest.setDataSource( at );
text.dispose();
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestSnippet.java b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestSnippet.java
index d67891a..e38c8ee 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestSnippet.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/AutoSuggestSnippet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -46,6 +46,7 @@ public class AutoSuggestSnippet extends AbstractEntryPoint {
autoSuggest1.setAutoComplete( true );
autoSuggest1.setDataSource( simpleDataSource );
autoSuggest1.addSelectionListener( new SuggestionSelectedListener() {
+ @Override
public void suggestionSelected() {
System.out.println( "selected: " + text1.getText() );
}
@@ -62,17 +63,18 @@ public class AutoSuggestSnippet extends AbstractEntryPoint {
simpleDataSource.setDataProvider( new ArrayDataProvider( Movies.VALUES ) );
columnDataSource = new DataSource();
columnDataSource.setTemplate( new ColumnTemplate( 50, 150, 150 ) );
- columnDataSource.setDataProvider( new ColumnDataProvider() {
- public Iterable<?> getSuggestions() {
+ columnDataSource.setDataProvider( new ColumnDataProvider<String[]>() {
+ @Override
+ public Iterable<String[]> getSuggestions() {
return Arrays.asList( KFZ.DE );
}
- public String getValue( Object element ) {
- String[] value = ( String[] )element;
- return value[ 0 ];
+ @Override
+ public String getValue( String[] suggestion ) {
+ return suggestion[ 0 ];
}
- public String[] getTexts( Object element ) {
- String[] value = ( String[] )element;
- return new String[] { value[ 0 ], value[ 2 ], value[ 3 ] };
+ @Override
+ public String[] getTexts( String[] suggestion ) {
+ return new String[] { suggestion[ 0 ], suggestion[ 2 ], suggestion[ 3 ] };
}
} );
}
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/ComboVsDropDown.java b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/ComboVsDropDown.java
index a80eac0..596d189 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/ComboVsDropDown.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/ComboVsDropDown.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -35,6 +35,7 @@ public class ComboVsDropDown extends AbstractEntryPoint {
final DropDown dropDown = new DropDown( text );
dropDown.setItems( getItems() );
dropDown.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
text.setText( event.text );
text.setText( event.text );
@@ -42,6 +43,7 @@ public class ComboVsDropDown extends AbstractEntryPoint {
}
} );
text.addListener( SWT.MouseDown, new Listener() {
+ @Override
public void handleEvent( Event event ) {
dropDown.setVisible( true );
}
@@ -61,4 +63,5 @@ public class ComboVsDropDown extends AbstractEntryPoint {
}
return result;
}
+
}
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/DropDownDemo.java b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/DropDownDemo.java
index 6bc1277..3f4a457 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/DropDownDemo.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/DropDownDemo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource.
+ * Copyright (c) 2013, 2015 EclipseSource.
* 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
@@ -48,6 +48,7 @@ public class DropDownDemo extends AbstractEntryPoint {
public void addModifyListener( final Text text, final DropDown dropdown ) {
text.addListener( SWT.Modify, new Listener() {
+ @Override
public void handleEvent( Event event ) {
if( text.getData( "selecting" ) != Boolean.TRUE ) {
userText = text.getText();
@@ -71,6 +72,7 @@ public class DropDownDemo extends AbstractEntryPoint {
public void addSelectionListener( final Text text, final DropDown dropdown ) {
dropdown.addListener( SWT.Selection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
if( event.index != -1 ) {
text.setData( "selecting", Boolean.TRUE );
@@ -88,6 +90,7 @@ public class DropDownDemo extends AbstractEntryPoint {
public void addDefaultSelectionListener( final Text text, final DropDown dropdown ) {
dropdown.addListener( SWT.DefaultSelection, new Listener() {
+ @Override
public void handleEvent( Event event ) {
if( event.index != -1 ) {
text.setText( currentTexts[ event.index ] );
@@ -99,7 +102,7 @@ public class DropDownDemo extends AbstractEntryPoint {
}
private static String[] filter( String[] values, String text, int limit ) {
- List<String> result = new ArrayList<String>( limit );
+ List<String> result = new ArrayList<>( limit );
for( int i = 0; result.size() < limit && i < values.length; i++ ) {
String item = values[ i ];
if( item.toLowerCase().startsWith( text ) ) {
diff --git a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/internal/DropDownApplication.java b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/internal/DropDownApplication.java
index bcd3f77..dddbca6 100644
--- a/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/internal/DropDownApplication.java
+++ b/examples/org.eclipse.rap.addons.dropdown.demo/src/org/eclipse/rap/addons/dropdown/demo/internal/DropDownApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -24,8 +24,9 @@ import org.eclipse.rap.rwt.widgets.DropDown;
public class DropDownApplication implements ApplicationConfiguration {
+ @Override
public void configure( Application application ) {
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put( WebClient.PAGE_TITLE, "DropDown Demo" );
application.addEntryPoint( "/dropdown", DropDownDemo.class, properties );
application.addEntryPoint( "/autosuggest", AutoSuggestDemo.class, properties );
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/.classpath b/tests/org.eclipse.rap.addons.autosuggest.test/.classpath
index 521c450..f0587ab 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/.classpath
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/.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="src" path="jasmine"/>
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.core.prefs
index 224f860..08fa822 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
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.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
@@ -79,7 +79,7 @@ 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=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
@@ -102,6 +102,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
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
@@ -114,7 +115,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
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=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -198,7 +199,6 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.ui.prefs
index e34feed..78561b7 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.ui.prefs
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/.settings/org.eclipse.jdt.ui.prefs
@@ -7,7 +7,7 @@ org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} EclipseSource and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * EclipseSource - initial API and implementation\r\n ******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} EclipseSource and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * EclipseSource - initial API and implementation\n ******************************************************************************/\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/META-INF/MANIFEST.MF b/tests/org.eclipse.rap.addons.autosuggest.test/META-INF/MANIFEST.MF
index 35d5378..e329e46 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.rap.addons.autosuggest.test
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: Eclipse.org - RAP Incubator
Fragment-Host: org.eclipse.rap.addons.autosuggest;bundle-version="0.3.0.qualifier"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.junit;bundle-version="4.11.0",
org.mockito.mockito-all;bundle-version="1.9.5",
org.eclipse.rap.jstestrunner;bundle-version="0.2.0"
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider_Test.java b/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider_Test.java
index 8278ecc..76bc837 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider_Test.java
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/ArrayDataProvider_Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -29,7 +29,7 @@ public class ArrayDataProvider_Test {
@Test
public void testGetSuggestions_returnsElements() {
- DataProvider dataProvider = new ArrayDataProvider( new String[]{ "foo", "bar" } );
+ DataProvider<?> dataProvider = new ArrayDataProvider( new String[]{ "foo", "bar" } );
Iterable<?> suggestions = dataProvider.getSuggestions();
@@ -38,7 +38,7 @@ public class ArrayDataProvider_Test {
@Test( expected = UnsupportedOperationException.class )
public void testGetSuggestions_returnsUnmodifiableIterator() {
- DataProvider dataProvider = new ArrayDataProvider( new String[]{ "foo", "bar" } );
+ DataProvider<?> dataProvider = new ArrayDataProvider( new String[]{ "foo", "bar" } );
Iterable<?> suggestions = dataProvider.getSuggestions();
@@ -48,7 +48,7 @@ public class ArrayDataProvider_Test {
}
private static List<Object> getElements( Iterable<?> suggestions ) {
- List<Object> elements = new ArrayList<Object>();
+ List<Object> elements = new ArrayList<>();
for( Object object : suggestions ) {
elements.add( object );
}
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/AutoSuggest_Test.java b/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/AutoSuggest_Test.java
index d135cc6..c4b9d9c 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/AutoSuggest_Test.java
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/AutoSuggest_Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -50,9 +50,7 @@ import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-@SuppressWarnings( {
- "restriction", "deprecation"
-} )
+@SuppressWarnings({ "restriction", "deprecation" })
public class AutoSuggest_Test {
private static final String REMOTE_SELECTION_EVENT = "suggestionSelected";
@@ -493,8 +491,9 @@ public class AutoSuggest_Test {
}
private AtomicReference<OperationHandler> captureOperationHandler() {
- final AtomicReference<OperationHandler> captor = new AtomicReference<OperationHandler>();
+ final AtomicReference<OperationHandler> captor = new AtomicReference<>();
doAnswer( new Answer<Object>() {
+ @Override
public Object answer( InvocationOnMock invocation ) throws Throwable {
captor.set( ( OperationHandler )invocation.getArguments()[ 0 ] );
return null;
diff --git a/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/DataSource_Test.java b/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/DataSource_Test.java
index 4f92057..1fd512c 100644
--- a/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/DataSource_Test.java
+++ b/tests/org.eclipse.rap.addons.autosuggest.test/src/org/eclipse/rap/addons/autosuggest/DataSource_Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -88,14 +88,17 @@ public class DataSource_Test {
@Test
public void testSetDataProvider_setsDataOnRemoteObject_forColumnDataProvider() {
- dataSource.setDataProvider( new ColumnDataProvider() {
- public Iterable<?> getSuggestions() {
+ dataSource.setDataProvider( new ColumnDataProvider<String>() {
+ @Override
+ public Iterable<String> getSuggestions() {
return Arrays.asList( "foo", "bar" );
}
- public String getValue( Object element ) {
- return ( String )element;
+ @Override
+ public String getValue( String element ) {
+ return element;
}
- public String[] getTexts( Object element ) {
+ @Override
+ public String[] getTexts( String element ) {
return new String[] { element + "-1", element + "-2" };
}
} );
diff --git a/tests/org.eclipse.rap.jstestrunner/.classpath b/tests/org.eclipse.rap.jstestrunner/.classpath
index 64c5e31..098194c 100644
--- a/tests/org.eclipse.rap.jstestrunner/.classpath
+++ b/tests/org.eclipse.rap.jstestrunner/.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/tests/org.eclipse.rap.jstestrunner/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.rap.jstestrunner/.settings/org.eclipse.jdt.core.prefs
index af0f20f..f42de36 100644
--- a/tests/org.eclipse.rap.jstestrunner/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/org.eclipse.rap.jstestrunner/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/tests/org.eclipse.rap.jstestrunner/META-INF/MANIFEST.MF b/tests/org.eclipse.rap.jstestrunner/META-INF/MANIFEST.MF
index d257d7d..f5488ed 100644
--- a/tests/org.eclipse.rap.jstestrunner/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.rap.jstestrunner/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: RAP JavaScript Testrunner
Bundle-SymbolicName: org.eclipse.rap.jstestrunner
Bundle-Version: 0.3.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.junit;bundle-version="4.8.2",
org.mozilla.javascript;bundle-version="1.7.4"
Export-Package: org.eclipse.rap.jstestrunner.jasmine;version="0.3.0"
diff --git a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineJUnitReporter.java b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineJUnitReporter.java
index 02f1f1f..d91fc79 100644
--- a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineJUnitReporter.java
+++ b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineJUnitReporter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -23,15 +23,19 @@ public final class JasmineJUnitReporter implements JasmineReporter {
private Suite currentSuite;
private String indent = "";
+ @Override
public void reportRunnerStarting() {
}
+ @Override
public void reportRunnerResults() {
}
+ @Override
public void reportSuiteResults( Suite suite ) {
}
+ @Override
public void reportSpecStarting( Spec spec ) {
if( !spec.getSuite().equals( currentSuite ) ) {
indent = "";
@@ -50,6 +54,7 @@ public final class JasmineJUnitReporter implements JasmineReporter {
}
}
+ @Override
public void reportSpecResults( Spec spec ) {
executedSpecs++;
log.append( indent );
@@ -66,6 +71,7 @@ public final class JasmineJUnitReporter implements JasmineReporter {
}
}
+ @Override
public void log( String message ) {
log.append( message );
log.append( '\n' );
diff --git a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineSysoutReporter.java b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineSysoutReporter.java
index e9b266a..59c09db 100644
--- a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineSysoutReporter.java
+++ b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/JasmineSysoutReporter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -16,22 +16,27 @@ public final class JasmineSysoutReporter implements JasmineReporter {
private int passedSpecs;
private int executedSpecs;
+ @Override
public void reportRunnerStarting() {
System.out.println( "Test runner started." );
}
+ @Override
public void reportRunnerResults() {
System.out.println( "Test runner finished." );
System.out.println( passedSpecs + " of " + executedSpecs + " specs passed" );
}
+ @Override
public void reportSuiteResults( Suite suite ) {
}
+ @Override
public void reportSpecStarting( Spec spec ) {
System.out.print( spec.getSuite().getDescription() + " : " + spec.getDescription() + " ... " );
}
+ @Override
public void reportSpecResults( Spec spec ) {
executedSpecs++;
if( spec.hasPassed() ) {
@@ -43,6 +48,7 @@ public final class JasmineSysoutReporter implements JasmineReporter {
}
}
+ @Override
public void log( String str ) {
System.out.println( "Jasmine log: " + str );
}
diff --git a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SpecImpl.java b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SpecImpl.java
index 587c77b..624235f 100644
--- a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SpecImpl.java
+++ b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SpecImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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,18 +34,22 @@ class SpecImpl implements Spec {
this.error = error;
}
+ @Override
public Suite getSuite() {
return parent;
}
+ @Override
public String getDescription() {
return description;
}
+ @Override
public boolean hasPassed() {
return passed;
}
+ @Override
public String getError() {
return error;
}
diff --git a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SuiteImpl.java b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SuiteImpl.java
index 7dd767b..4bd70bf 100644
--- a/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SuiteImpl.java
+++ b/tests/org.eclipse.rap.jstestrunner/src/org/eclipse/rap/jstestrunner/jasmine/SuiteImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 EclipseSource and others.
+ * Copyright (c) 2013, 2015 EclipseSource 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
@@ -26,10 +26,12 @@ class SuiteImpl implements Suite {
this.description = description;
}
+ @Override
public Suite getParent() {
return parent;
}
+ @Override
public String getDescription() {
return description;
}

Back to the top