Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-08-01 13:04:04 -0400
committerAlexander Kurtakov2016-08-01 13:04:04 -0400
commitee625867fc4910139ab6b95c69a4081cdde5d432 (patch)
treeb347b66191d73f90c6db0d4ac681a10c536f9c05
parent50a27b51876e59aae65189b907ec4c4e903aba16 (diff)
downloadorg.eclipse.dltk.sh-ee625867fc4910139ab6b95c69a4081cdde5d432.tar.gz
org.eclipse.dltk.sh-ee625867fc4910139ab6b95c69a4081cdde5d432.tar.xz
org.eclipse.dltk.sh-ee625867fc4910139ab6b95c69a4081cdde5d432.zip
sh: Move to Java 8.
Bump BREE and convert to lambdas where feasible. Change-Id: I6f7124732b7fbccffbc679b5a0a9d1150eaa3642 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--plugins/org.eclipse.dltk.sh.core/.classpath2
-rw-r--r--plugins/org.eclipse.dltk.sh.core/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.dltk.sh.ui/.classpath2
-rw-r--r--plugins/org.eclipse.dltk.sh.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/completion/ShellCompletionEngine.java14
-rw-r--r--plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/editor/ShellSourceViewerConfiguration.java15
-rw-r--r--plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/selection/ShelledSelectionEngine.java14
-rw-r--r--tests/org.eclipse.dltk.sh.core.tests/.classpath2
-rw-r--r--tests/org.eclipse.dltk.sh.core.tests/META-INF/MANIFEST.MF2
-rw-r--r--tests/org.eclipse.dltk.sh.ui.tests/.classpath2
-rw-r--r--tests/org.eclipse.dltk.sh.ui.tests/META-INF/MANIFEST.MF2
11 files changed, 23 insertions, 36 deletions
diff --git a/plugins/org.eclipse.dltk.sh.core/.classpath b/plugins/org.eclipse.dltk.sh.core/.classpath
index b9a5b1e..43b9862 100644
--- a/plugins/org.eclipse.dltk.sh.core/.classpath
+++ b/plugins/org.eclipse.dltk.sh.core/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.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="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.dltk.sh.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.dltk.sh.core/META-INF/MANIFEST.MF
index 24b8ff6..58d99df 100644
--- a/plugins/org.eclipse.dltk.sh.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.dltk.sh.core/META-INF/MANIFEST.MF
@@ -7,6 +7,6 @@ Bundle-Vendor: Eclipse DLTK
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.dltk.core;bundle-version="[4.0.0,6.0.0)"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.dltk.sh.core
diff --git a/plugins/org.eclipse.dltk.sh.ui/.classpath b/plugins/org.eclipse.dltk.sh.ui/.classpath
index b9a5b1e..43b9862 100644
--- a/plugins/org.eclipse.dltk.sh.ui/.classpath
+++ b/plugins/org.eclipse.dltk.sh.ui/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.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="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/plugins/org.eclipse.dltk.sh.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.dltk.sh.ui/META-INF/MANIFEST.MF
index 28bdb6a..5a58a6a 100644
--- a/plugins/org.eclipse.dltk.sh.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.dltk.sh.ui/META-INF/MANIFEST.MF
@@ -18,5 +18,5 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.linuxtools.man.core,
org.eclipse.core.expressions
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: Eclipse DLTK
diff --git a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/completion/ShellCompletionEngine.java b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/completion/ShellCompletionEngine.java
index d0db3e6..4164edc 100644
--- a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/completion/ShellCompletionEngine.java
+++ b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/completion/ShellCompletionEngine.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat Inc. and others.
+ * Copyright (c) 2009, 2016 Red Hat Inc. 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
@@ -15,7 +15,6 @@ import org.eclipse.dltk.compiler.env.IModuleSource;
import org.eclipse.dltk.core.CompletionProposal;
import org.eclipse.dltk.core.DLTKCore;
import org.eclipse.dltk.core.IModelElement;
-import org.eclipse.dltk.core.IModelElementVisitor;
import org.eclipse.dltk.core.ModelException;
import org.eclipse.dltk.sh.internal.ui.text.ShellCodeScanner;
@@ -46,14 +45,11 @@ public class ShellCompletionEngine extends ScriptCompletionEngine {
// Completion for model elements.
try {
- module.getModelElement().accept(new IModelElementVisitor() {
- @Override
- public boolean visit(IModelElement element) {
- if (element.getElementType() > IModelElement.SOURCE_MODULE) {
- createProposal(element.getElementName(), element);
- }
- return true;
+ module.getModelElement().accept(element -> {
+ if (element.getElementType() > IModelElement.SOURCE_MODULE) {
+ createProposal(element.getElementName(), element);
}
+ return true;
});
} catch (ModelException e) {
if (DLTKCore.DEBUG) {
diff --git a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/editor/ShellSourceViewerConfiguration.java b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/editor/ShellSourceViewerConfiguration.java
index 552abce..9a36002 100644
--- a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/editor/ShellSourceViewerConfiguration.java
+++ b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/editor/ShellSourceViewerConfiguration.java
@@ -33,7 +33,6 @@ import org.eclipse.dltk.ui.text.completion.ContentAssistPreference;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IAutoEditStrategy;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
@@ -49,7 +48,6 @@ import org.eclipse.jface.text.rules.WordRule;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.texteditor.ITextEditor;
public class ShellSourceViewerConfiguration extends ScriptSourceViewerConfiguration {
@@ -114,14 +112,11 @@ public class ShellSourceViewerConfiguration extends ScriptSourceViewerConfigurat
@Override
protected IInformationControlCreator getOutlinePresenterControlCreator(ISourceViewer sourceViewer,
final String commandId) {
- return new IInformationControlCreator() {
- @Override
- public IInformationControl createInformationControl(Shell parent) {
- int shellStyle = SWT.RESIZE;
- int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
- return new ScriptOutlineInformationControl(parent, shellStyle, treeStyle, commandId,
- Activator.getDefault().getPreferenceStore());
- }
+ return parent -> {
+ int shellStyle = SWT.RESIZE;
+ int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
+ return new ScriptOutlineInformationControl(parent, shellStyle, treeStyle, commandId,
+ Activator.getDefault().getPreferenceStore());
};
}
diff --git a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/selection/ShelledSelectionEngine.java b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/selection/ShelledSelectionEngine.java
index ef60996..2911e0d 100644
--- a/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/selection/ShelledSelectionEngine.java
+++ b/plugins/org.eclipse.dltk.sh.ui/src/org/eclipse/dltk/sh/internal/ui/selection/ShelledSelectionEngine.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat Inc. and others.
+ * Copyright (c) 2009, 2016 Red Hat Inc. 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,7 +23,6 @@ import org.eclipse.dltk.codeassist.ScriptSelectionEngine;
import org.eclipse.dltk.compiler.env.IModuleSource;
import org.eclipse.dltk.core.DLTKCore;
import org.eclipse.dltk.core.IModelElement;
-import org.eclipse.dltk.core.IModelElementVisitor;
import org.eclipse.dltk.core.ISourceModule;
import org.eclipse.dltk.core.ModelException;
import org.eclipse.dltk.core.SourceParserUtil;
@@ -70,14 +69,11 @@ public class ShelledSelectionEngine extends ScriptSelectionEngine {
private void findDeclaration(final String name, final List<IModelElement> results) {
try {
- this.sourceModule.accept(new IModelElementVisitor() {
- @Override
- public boolean visit(IModelElement element) {
- if (element.getElementName().equals(name)) {
- results.add(element);
- }
- return true;
+ this.sourceModule.accept(element -> {
+ if (element.getElementName().equals(name)) {
+ results.add(element);
}
+ return true;
});
} catch (ModelException e) {
if (DLTKCore.DEBUG) {
diff --git a/tests/org.eclipse.dltk.sh.core.tests/.classpath b/tests/org.eclipse.dltk.sh.core.tests/.classpath
index 098194c..eca7bdb 100644
--- a/tests/org.eclipse.dltk.sh.core.tests/.classpath
+++ b/tests/org.eclipse.dltk.sh.core.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.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="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/tests/org.eclipse.dltk.sh.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.dltk.sh.core.tests/META-INF/MANIFEST.MF
index 29bab48..d0388f8 100644
--- a/tests/org.eclipse.dltk.sh.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.dltk.sh.core.tests/META-INF/MANIFEST.MF
@@ -6,5 +6,5 @@ Bundle-Version: 5.6.0.qualifier
Bundle-Vendor: Eclipse DLTK
Require-Bundle: org.junit;bundle-version="4.10.0"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Fragment-Host: org.eclipse.dltk.sh.core
diff --git a/tests/org.eclipse.dltk.sh.ui.tests/.classpath b/tests/org.eclipse.dltk.sh.ui.tests/.classpath
index 098194c..eca7bdb 100644
--- a/tests/org.eclipse.dltk.sh.ui.tests/.classpath
+++ b/tests/org.eclipse.dltk.sh.ui.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.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="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/tests/org.eclipse.dltk.sh.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.dltk.sh.ui.tests/META-INF/MANIFEST.MF
index 8db6f10..45d7502 100644
--- a/tests/org.eclipse.dltk.sh.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.dltk.sh.ui.tests/META-INF/MANIFEST.MF
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.eclipse.dltk.sh.ui.tests
Bundle-Version: 5.6.0.qualifier
Require-Bundle: org.junit;bundle-version="4.10.0"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Fragment-Host: org.eclipse.dltk.sh.ui
Bundle-Vendor: Eclipse DLTK

Back to the top