Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Barbero2016-12-14 11:13:56 -0500
committerMikaƫl Barbero2017-01-11 04:45:37 -0500
commitbaa04768e2b5e885a64ee9cd75fa63599ff74f14 (patch)
tree5468aab7e8a75778a9ce2e798d6cb3427ba8c216
parentc49e1155e09e7d358470d592f366eadf3598fe43 (diff)
downloadrt.equinox.bundles-baa04768e2b5e885a64ee9cd75fa63599ff74f14.tar.gz
rt.equinox.bundles-baa04768e2b5e885a64ee9cd75fa63599ff74f14.tar.xz
rt.equinox.bundles-baa04768e2b5e885a64ee9cd75fa63599ff74f14.zip
support Change-Id: Id0fa443eca4e9fd2c73ece6c0b5846715a38f043 Signed-off-by: Mikael Barbero <mikael@eclipse.org>
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.java39
-rw-r--r--bundles/org.eclipse.equinox.preferences/.classpath2
-rw-r--r--bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.equinox.preferences/build.properties2
-rw-r--r--bundles/org.eclipse.equinox.preferences/pom.xml2
6 files changed, 45 insertions, 10 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.java
index 5444f0a5..5cb99425 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/ListenerList.java
@@ -7,11 +7,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Mikael Barbero (Eclipse Foundation) - Bug 509234
*******************************************************************************/
package org.eclipse.core.runtime;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
+import java.util.*;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
/**
* This class is a thread safe list that is designed for storing lists of listeners.
@@ -247,4 +249,37 @@ public class ListenerList<E> implements Iterable<E> {
public synchronized void clear() {
listeners = EmptyArray;
}
+
+ /**
+ * Returns a Spliterator covering the registered listeners.
+ * <p>
+ * The spliterator reports Spliterator.SIZED, Spliterator.SUBSIZED, Spliterator.ORDERED, and Spliterator.IMMUTABLE
+ *
+ * @return a spliterator for listeners
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Spliterator<E> spliterator() {
+ return (Spliterator<E>) Arrays.spliterator(listeners);
+ }
+
+ /**
+ * Returns a sequential {@code Stream} over the registered listeners.
+ *
+ * @return a sequential {@code Stream} over the registered listeners.
+ * @since org.eclipse.equinox.common 3.9
+ */
+ public Stream<E> stream() {
+ return StreamSupport.stream(spliterator(), false);
+ }
+
+ /**
+ * Returns a parallel {@code Stream} over the registered listeners.
+ *
+ * @return a parallel {@code Stream} over the registered listeners.
+ * @since org.eclipse.equinox.common 3.9
+ */
+ public Stream<E> parallelStream() {
+ return StreamSupport.stream(spliterator(), true);
+ }
}
diff --git a/bundles/org.eclipse.equinox.preferences/.classpath b/bundles/org.eclipse.equinox.preferences/.classpath
index 3bc24751..22f30643 100644
--- a/bundles/org.eclipse.equinox.preferences/.classpath
+++ b/bundles/org.eclipse.equinox.preferences/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs
index f8dadf72..5861d3cb 100644
--- a/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs
@@ -14,9 +14,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -116,7 +116,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF
index 648026ae..8226bd4d 100644
--- a/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.preferences; singleton:=true
-Bundle-Version: 3.6.100.qualifier
+Bundle-Version: 3.7.0.qualifier
Bundle-Activator: org.eclipse.core.internal.preferences.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -24,4 +24,4 @@ Import-Package: org.eclipse.osgi.framework.log,
org.osgi.service.packageadmin,
org.osgi.util.tracker,
org.osgi.service.prefs;version="[1.1.1,1.2)"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/bundles/org.eclipse.equinox.preferences/build.properties b/bundles/org.eclipse.equinox.preferences/build.properties
index 1dee6e65..d3c9f489 100644
--- a/bundles/org.eclipse.equinox.preferences/build.properties
+++ b/bundles/org.eclipse.equinox.preferences/build.properties
@@ -20,4 +20,4 @@ bin.includes = META-INF/,\
src.includes = about.html,\
schema/,\
about_files/
-jre.compilation.profile = JavaSE-1.7
+jre.compilation.profile = JavaSE-1.8
diff --git a/bundles/org.eclipse.equinox.preferences/pom.xml b/bundles/org.eclipse.equinox.preferences/pom.xml
index 41042d18..bf298d8c 100644
--- a/bundles/org.eclipse.equinox.preferences/pom.xml
+++ b/bundles/org.eclipse.equinox.preferences/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
- <version>3.6.100-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

Back to the top