diff --git a/concourse/tasks/build-vsix.sh b/concourse/tasks/build-vsix.sh
index d120033aa..c5c8e2a7a 100755
--- a/concourse/tasks/build-vsix.sh
+++ b/concourse/tasks/build-vsix.sh
@@ -12,12 +12,12 @@ else
echo "!!!This may slow down the build!!!"
fi
-cd ${sources}/../commons-vscode
-npm install
+#cd ${sources}/../commons-vscode
+#npm install
cd "$sources"
-npm install ../commons-vscode
+#npm install ../commons-vscode
timestamp=`date -u +%Y%m%d%H%M`
diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e47/org.springframework.boot.ide.product b/eclipse-distribution/org.springframework.boot.ide.product.e47/org.springframework.boot.ide.product
index dd641ce3f..a487d9e34 100644
--- a/eclipse-distribution/org.springframework.boot.ide.product.e47/org.springframework.boot.ide.product
+++ b/eclipse-distribution/org.springframework.boot.ide.product.e47/org.springframework.boot.ide.product
@@ -82,8 +82,7 @@ openFile
-
-
+
diff --git a/eclipse-distribution/org.springframework.boot.ide.product.e48/org.springframework.boot.ide.product b/eclipse-distribution/org.springframework.boot.ide.product.e48/org.springframework.boot.ide.product
index dd641ce3f..a487d9e34 100644
--- a/eclipse-distribution/org.springframework.boot.ide.product.e48/org.springframework.boot.ide.product
+++ b/eclipse-distribution/org.springframework.boot.ide.product.e48/org.springframework.boot.ide.product
@@ -82,8 +82,7 @@ openFile
-
-
+
diff --git a/eclipse-distribution/org.springframework.boot.ide.repository.e47/category.xml b/eclipse-distribution/org.springframework.boot.ide.repository.e47/category.xml
index a49977db3..6cc4f5f16 100644
--- a/eclipse-distribution/org.springframework.boot.ide.repository.e47/category.xml
+++ b/eclipse-distribution/org.springframework.boot.ide.repository.e47/category.xml
@@ -74,12 +74,7 @@
-
-
-
-
+ id="org.springframework.tooling.boot.ls.feature" version="0.0.0">
diff --git a/eclipse-distribution/org.springframework.boot.ide.repository.e48/category.xml b/eclipse-distribution/org.springframework.boot.ide.repository.e48/category.xml
index a49977db3..6cc4f5f16 100644
--- a/eclipse-distribution/org.springframework.boot.ide.repository.e48/category.xml
+++ b/eclipse-distribution/org.springframework.boot.ide.repository.e48/category.xml
@@ -74,12 +74,7 @@
-
-
-
-
+ id="org.springframework.tooling.boot.ls.feature" version="0.0.0">
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/build.properties b/eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/build.properties
deleted file mode 100644
index 64f93a9f0..000000000
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/build.properties b/eclipse-language-servers/org.springframework.tooling.boot.java.ls/build.properties
deleted file mode 100644
index 3b7db0f69..000000000
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- servers/
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/plugin.xml b/eclipse-language-servers/org.springframework.tooling.boot.java.ls/plugin.xml
deleted file mode 100644
index c4e184d7c..000000000
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/.project b/eclipse-language-servers/org.springframework.tooling.boot.ls.feature/.project
similarity index 100%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/.project
rename to eclipse-language-servers/org.springframework.tooling.boot.ls.feature/.project
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.ls.feature/build.properties b/eclipse-language-servers/org.springframework.tooling.boot.ls.feature/build.properties
new file mode 100644
index 000000000..4e40d30ef
--- /dev/null
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes=feature.xml,\
+ p2.inf
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/feature.xml b/eclipse-language-servers/org.springframework.tooling.boot.ls.feature/feature.xml
similarity index 72%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/feature.xml
rename to eclipse-language-servers/org.springframework.tooling.boot.ls.feature/feature.xml
index e344c175a..60f1ec524 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls.feature/feature.xml
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls.feature/feature.xml
@@ -1,7 +1,7 @@
@@ -12,7 +12,7 @@
../pom.xml
- org.springframework.tooling.boot.java.ls.feature
+ org.springframework.tooling.boot.ls.feature
eclipse-feature
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/.classpath b/eclipse-language-servers/org.springframework.tooling.boot.ls/.classpath
similarity index 100%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/.classpath
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/.classpath
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.ls/.project b/eclipse-language-servers/org.springframework.tooling.boot.ls/.project
new file mode 100644
index 000000000..c2d628371
--- /dev/null
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/.project
@@ -0,0 +1,28 @@
+
+
+ org.springframework.tooling.boot.ls
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/.settings/org.eclipse.jdt.core.prefs b/eclipse-language-servers/org.springframework.tooling.boot.ls/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/.settings/org.eclipse.jdt.core.prefs
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/META-INF/MANIFEST.MF b/eclipse-language-servers/org.springframework.tooling.boot.ls/META-INF/MANIFEST.MF
similarity index 75%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/META-INF/MANIFEST.MF
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/META-INF/MANIFEST.MF
index 8f5c4b72c..fd966763d 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/META-INF/MANIFEST.MF
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Spring Boot Java Language Server
+Bundle-Name: Spring Boot Language Server
Bundle-Vendor: Pivotal, Inc.
-Bundle-SymbolicName: org.springframework.tooling.boot.java.ls;singleton:=true
+Bundle-SymbolicName: org.springframework.tooling.boot.ls;singleton:=true
Bundle-Version: 0.1.4.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.0",
@@ -10,6 +10,8 @@ Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.0",
org.eclipse.ui.genericeditor;bundle-version="1.0.0",
org.eclipse.jface.text;bundle-version="3.11.100",
org.eclipse.jdt.ui;bundle-version="3.13.0",
+ org.eclipse.tm4e.core;bundle-version="0.1.0",
+ org.eclipse.tm4e.ui;bundle-version="0.1.0",
org.eclipse.lsp4e;bundle-version="0.5.0",
org.eclipse.lsp4j;bundle-version="0.4.0",
org.eclipse.lsp4j.jsonrpc;bundle-version="0.4.0",
@@ -22,5 +24,5 @@ Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.0",
Import-Package: com.google.gson;version="2.7.0",
org.eclipse.jface.preference,
org.osgi.framework
-Bundle-Activator: org.springframework.tooling.boot.java.ls.BootJavaLanguageServerPlugin
+Bundle-Activator: org.springframework.tooling.boot.ls.BootLanguageServerPlugin
Bundle-ActivationPolicy: lazy
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/build.properties b/eclipse-language-servers/org.springframework.tooling.boot.ls/build.properties
similarity index 100%
rename from eclipse-language-servers/org.springframework.tooling.properties.ls/build.properties
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/build.properties
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/plugin.xml b/eclipse-language-servers/org.springframework.tooling.boot.ls/plugin.xml
similarity index 56%
rename from eclipse-language-servers/org.springframework.tooling.properties.ls/plugin.xml
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/plugin.xml
index 17e3f3e9f..ddfa01d79 100644
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/plugin.xml
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/plugin.xml
@@ -2,6 +2,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -73,23 +143,6 @@
scopeName="source.yaml">
-
-
-
-
-
-
-
-
-
+
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/pom.xml b/eclipse-language-servers/org.springframework.tooling.boot.ls/pom.xml
similarity index 89%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/pom.xml
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/pom.xml
index 43078faee..62e9183dc 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/pom.xml
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/pom.xml
@@ -11,14 +11,14 @@
../pom.xml
- org.springframework.tooling.boot.java.ls
+ org.springframework.tooling.boot.ls
0.1.4-SNAPSHOT
eclipse-plugin
org.springframework.ide.vscode
- boot-java-language-server
+ spring-boot-language-server
0.1.4-SNAPSHOT
@@ -40,7 +40,7 @@
org.springframework.ide.vscode
- boot-java-language-server
+ spring-boot-language-server
true
${project.build.directory}/../servers
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/BootJavaLanguageServerPlugin.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/BootLanguageServerPlugin.java
similarity index 88%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/BootJavaLanguageServerPlugin.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/BootLanguageServerPlugin.java
index 3425e8079..c46afd755 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/BootJavaLanguageServerPlugin.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/BootLanguageServerPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import java.io.IOException;
import java.util.ArrayList;
@@ -26,16 +26,16 @@ import org.osgi.framework.BundleContext;
* @author Alex Boyko
*
*/
-public class BootJavaLanguageServerPlugin extends AbstractUIPlugin {
+public class BootLanguageServerPlugin extends AbstractUIPlugin {
public static final String ID = "org.springframework.tooling.boot.java.ls";
private static final Object LSP4E_COMMAND_SYMBOL_IN_WORKSPACE = "org.eclipse.lsp4e.symbolinworkspace";
// The shared instance
- private static BootJavaLanguageServerPlugin plugin;
+ private static BootLanguageServerPlugin plugin;
- public BootJavaLanguageServerPlugin() {
+ public BootLanguageServerPlugin() {
// Empty
}
@@ -53,7 +53,7 @@ public class BootJavaLanguageServerPlugin extends AbstractUIPlugin {
plugin = null;
}
- public static BootJavaLanguageServerPlugin getDefault() {
+ public static BootLanguageServerPlugin getDefault() {
return plugin;
}
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/BootJavaPreferencesPage.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/BootLanguageServerPreferencesPage.java
similarity index 76%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/BootJavaPreferencesPage.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/BootLanguageServerPreferencesPage.java
index 0cf63db32..bea662ed7 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/BootJavaPreferencesPage.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/BootLanguageServerPreferencesPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
@@ -21,15 +21,15 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
* @author Alex Boyko
*
*/
-public class BootJavaPreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+public class BootLanguageServerPreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public BootJavaPreferencesPage() {
+ public BootLanguageServerPreferencesPage() {
}
@Override
public void init(IWorkbench workbench) {
setDescription("Settings for Boot-Java language server extension");
- setPreferenceStore(BootJavaLanguageServerPlugin.getDefault().getPreferenceStore());
+ setPreferenceStore(BootLanguageServerPlugin.getDefault().getPreferenceStore());
}
@Override
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/Constants.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/Constants.java
similarity index 87%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/Constants.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/Constants.java
index 29fd33b90..37d086527 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/Constants.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/Constants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,14 +8,14 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
/**
* @author Martin Lippert
*/
public class Constants {
- public static final String PLUGIN_ID = "org.springframework.tooling.boot.java.ls";
+ public static final String PLUGIN_ID = "org.springframework.tooling.boot.ls";
public static final String LANGUAGE_SERVER_VERSION = "0.1.4-SNAPSHOT.jar";
public static final String PREF_BOOT_HINTS = "boot-java.boot-hints.on";
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/DelegatingStreamConnectionProvider.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/DelegatingStreamConnectionProvider.java
similarity index 88%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/DelegatingStreamConnectionProvider.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/DelegatingStreamConnectionProvider.java
index 077b17a1d..b4821084f 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/DelegatingStreamConnectionProvider.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/DelegatingStreamConnectionProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import java.io.IOException;
import java.io.InputStream;
@@ -56,10 +56,10 @@ public class DelegatingStreamConnectionProvider implements StreamConnectionProvi
public DelegatingStreamConnectionProvider() {
String port = System.getProperty("boot-java-ls-port");
if (port != null) {
- this.provider = new SpringBootJavaLanguageServerViaSocket(Integer.parseInt(port));
+ this.provider = new SpringBootLanguageServerViaSocket(Integer.parseInt(port));
}
else {
- this.provider = new SpringBootJavaLanguageServer();
+ this.provider = new SpringBootLanguageServer();
}
}
@@ -95,7 +95,7 @@ public class DelegatingStreamConnectionProvider implements StreamConnectionProvi
ResourcesPlugin.getWorkspace().removeResourceChangeListener(fResourceListener);
fResourceListener = null;
}
- BootJavaLanguageServerPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(configListener);
+ BootLanguageServerPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(configListener);
}
@Override
@@ -108,7 +108,7 @@ public class DelegatingStreamConnectionProvider implements StreamConnectionProvi
sendConfiguration();
// Add config listener
- BootJavaLanguageServerPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(configListener);
+ BootLanguageServerPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(configListener);
// Add resource listener
ResourcesPlugin.getWorkspace().addResourceChangeListener(fResourceListener = new ResourceListener(languageServer, Arrays.asList(
@@ -124,7 +124,7 @@ public class DelegatingStreamConnectionProvider implements StreamConnectionProvi
Map settings = new HashMap<>();
Map bootJavaObj = new HashMap<>();
Map bootHint = new HashMap<>();
- bootHint.put("on", BootJavaLanguageServerPlugin.getDefault().getPreferenceStore().getBoolean(Constants.PREF_BOOT_HINTS));
+ bootHint.put("on", BootLanguageServerPlugin.getDefault().getPreferenceStore().getBoolean(Constants.PREF_BOOT_HINTS));
bootJavaObj.put("boot-hints", bootHint);
settings.put("boot-java", bootJavaObj);
this.languageServer.getWorkspaceService().didChangeConfiguration(new DidChangeConfigurationParams(settings));
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/MissingJdkWarning.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/MissingJdkWarning.java
similarity index 97%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/MissingJdkWarning.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/MissingJdkWarning.java
index 945d97921..c0b45dcb8 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/MissingJdkWarning.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/MissingJdkWarning.java
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import java.io.File;
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/PrefsInitializer.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java
similarity index 80%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/PrefsInitializer.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java
index 50115f785..0c4f485fe 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/PrefsInitializer.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
@@ -25,7 +25,7 @@ public class PrefsInitializer extends AbstractPreferenceInitializer {
@Override
public void initializeDefaultPreferences() {
- BootJavaLanguageServerPlugin.getDefault().getPreferenceStore().setDefault(Constants.PREF_BOOT_HINTS, true);
+ BootLanguageServerPlugin.getDefault().getPreferenceStore().setDefault(Constants.PREF_BOOT_HINTS, true);
}
}
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/ResourceListener.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/ResourceListener.java
similarity index 97%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/ResourceListener.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/ResourceListener.java
index 15649055c..b577284e2 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/ResourceListener.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/ResourceListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import java.net.URI;
import java.nio.file.PathMatcher;
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/SpringBootJavaLanguageServer.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServer.java
similarity index 86%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/SpringBootJavaLanguageServer.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServer.java
index 6c1ae5c3b..b2dd7f0d9 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/SpringBootJavaLanguageServer.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,9 +8,9 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
-import static org.springframework.tooling.ls.eclipse.commons.console.preferences.LanguageServerConsolePreferenceConstants.BOOT_JAVA_SERVER;
+import static org.springframework.tooling.ls.eclipse.commons.console.preferences.LanguageServerConsolePreferenceConstants.SPRING_BOOT_SERVER;
import java.io.File;
import java.io.InputStream;
@@ -30,10 +30,10 @@ import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessS
/**
* @author Martin Lippert
*/
-public class SpringBootJavaLanguageServer extends STS4LanguageServerProcessStreamConnector {
+public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamConnector {
- public SpringBootJavaLanguageServer() {
- super(BOOT_JAVA_SERVER);
+ public SpringBootLanguageServer() {
+ super(SPRING_BOOT_SERVER);
List commands = new ArrayList<>();
JRE jre = getJRE();
commands.add(jre.getJavaExecutable());
@@ -68,7 +68,7 @@ public class SpringBootJavaLanguageServer extends STS4LanguageServerProcessStrea
}
protected String getLanguageServerJARLocation() {
- String languageServer = "boot-java-language-server-" + Constants.LANGUAGE_SERVER_VERSION;
+ String languageServer = "spring-boot-language-server-" + Constants.LANGUAGE_SERVER_VERSION;
Bundle bundle = Platform.getBundle(Constants.PLUGIN_ID);
String bundleVersion = bundle.getVersion().toString();
@@ -89,7 +89,7 @@ public class SpringBootJavaLanguageServer extends STS4LanguageServerProcessStrea
File userHome = new File(System.getProperty("user.home"));
File locallyBuiltJar = new File(
userHome,
- "git/sts4/headless-services/boot-java-language-server/target/boot-java-language-server-"+Constants.LANGUAGE_SERVER_VERSION
+ "git/sts4/headless-services/spring-boot-language-server/target/spring-boot-language-server-"+Constants.LANGUAGE_SERVER_VERSION
);
if (locallyBuiltJar.exists()) {
return locallyBuiltJar.getAbsolutePath();
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/SpringBootJavaLanguageServerViaSocket.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServerViaSocket.java
similarity index 88%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/SpringBootJavaLanguageServerViaSocket.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServerViaSocket.java
index be0b69cef..fce9e66d7 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/SpringBootJavaLanguageServerViaSocket.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServerViaSocket.java
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls;
+package org.springframework.tooling.boot.ls;
import java.io.IOException;
import java.io.InputStream;
@@ -17,14 +17,14 @@ import java.net.Socket;
import org.eclipse.lsp4e.server.StreamConnectionProvider;
-public class SpringBootJavaLanguageServerViaSocket implements StreamConnectionProvider {
+public class SpringBootLanguageServerViaSocket implements StreamConnectionProvider {
private OutputStream outputStream;
private InputStream inputStream;
private Socket socket;
private int port;
- public SpringBootJavaLanguageServerViaSocket(int port) {
+ public SpringBootLanguageServerViaSocket(int port) {
this.port = port;
}
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/SpringPropertiesPresentationReconciler.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringPropertiesPresentationReconciler.java
similarity index 96%
rename from eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/SpringPropertiesPresentationReconciler.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringPropertiesPresentationReconciler.java
index db53c505f..4cbe61603 100644
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/SpringPropertiesPresentationReconciler.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringPropertiesPresentationReconciler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016 Pivotal, Inc.
+ * Copyright (c) 2016, 2018 Pivotal, Inc.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.properties.ls;
+package org.springframework.tooling.boot.ls;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions;
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/jdt/SpringBootJavaCompletionProposalComputer.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/jdt/SpringBootJavaCompletionProposalComputer.java
similarity index 98%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/jdt/SpringBootJavaCompletionProposalComputer.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/jdt/SpringBootJavaCompletionProposalComputer.java
index adac58e61..f6755b230 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/jdt/SpringBootJavaCompletionProposalComputer.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/jdt/SpringBootJavaCompletionProposalComputer.java
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls.jdt;
+package org.springframework.tooling.boot.ls.jdt;
import java.util.Arrays;
import java.util.Collections;
diff --git a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/jdt/SpringBootJavaHoverProvider.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/jdt/SpringBootJavaHoverProvider.java
similarity index 94%
rename from eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/jdt/SpringBootJavaHoverProvider.java
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/jdt/SpringBootJavaHoverProvider.java
index 8c0ac05b6..4da525cd6 100644
--- a/eclipse-language-servers/org.springframework.tooling.boot.java.ls/src/org/springframework/tooling/boot/java/ls/jdt/SpringBootJavaHoverProvider.java
+++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/jdt/SpringBootJavaHoverProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
-package org.springframework.tooling.boot.java.ls.jdt;
+package org.springframework.tooling.boot.ls.jdt;
import org.eclipse.jdt.ui.text.java.hover.IJavaEditorTextHover;
import org.eclipse.jface.text.IInformationControlCreator;
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/syntaxes/YAML.tmLanguage b/eclipse-language-servers/org.springframework.tooling.boot.ls/syntaxes/YAML.tmLanguage
similarity index 100%
rename from eclipse-language-servers/org.springframework.tooling.properties.ls/syntaxes/YAML.tmLanguage
rename to eclipse-language-servers/org.springframework.tooling.boot.ls/syntaxes/YAML.tmLanguage
diff --git a/eclipse-language-servers/org.springframework.tooling.ls.eclipse.commons/src/org/springframework/tooling/ls/eclipse/commons/console/preferences/LanguageServerConsolePreferenceConstants.java b/eclipse-language-servers/org.springframework.tooling.ls.eclipse.commons/src/org/springframework/tooling/ls/eclipse/commons/console/preferences/LanguageServerConsolePreferenceConstants.java
index 117228539..4b411e9bc 100644
--- a/eclipse-language-servers/org.springframework.tooling.ls.eclipse.commons/src/org/springframework/tooling/ls/eclipse/commons/console/preferences/LanguageServerConsolePreferenceConstants.java
+++ b/eclipse-language-servers/org.springframework.tooling.ls.eclipse.commons/src/org/springframework/tooling/ls/eclipse/commons/console/preferences/LanguageServerConsolePreferenceConstants.java
@@ -15,20 +15,17 @@ public class LanguageServerConsolePreferenceConstants {
public static final boolean ENABLE_BY_DEFAULT = true;
public static final String PREF_BOOT_JAVA_CONSOLE_ENABLED = "boot-java.console.enabled";
- public static final String PREF_BOOT_PROPS_CONSOLE_ENABLED = "boot-properties.console.enabled";
public static final String PREF_CONCOURSE_CONSOLE_ENABLED = "concourse.console.enabled";
public static final String PREF_CLOUDFOUNDRY_CONSOLE_ENABLED = "cloudfoundry.console.enabled";
public static final String PREF_BOSH_CONSOLE_ENABLED = "bosh.console.enabled";
- public static final ServerInfo BOOT_JAVA_SERVER = new ServerInfo(PREF_BOOT_JAVA_CONSOLE_ENABLED, "Boot Java");
- public static final ServerInfo BOOT_PROPS_SERVER = new ServerInfo(PREF_BOOT_PROPS_CONSOLE_ENABLED, "Boot Properties");
+ public static final ServerInfo SPRING_BOOT_SERVER = new ServerInfo(PREF_BOOT_JAVA_CONSOLE_ENABLED, "Spring Boot");
public static final ServerInfo CLOUDFOUNDRY_SERVER = new ServerInfo(PREF_CLOUDFOUNDRY_CONSOLE_ENABLED, "Cloudfoundry");
public static final ServerInfo CONCOURSE_SERVER = new ServerInfo(PREF_CONCOURSE_CONSOLE_ENABLED, "Concourse");
public static final ServerInfo BOSH_SERVER = new ServerInfo(PREF_BOSH_CONSOLE_ENABLED, "Bosh");
public static final ServerInfo[] ALL_SERVERS = {
- BOOT_JAVA_SERVER,
- BOOT_PROPS_SERVER,
+ SPRING_BOOT_SERVER,
CLOUDFOUNDRY_SERVER,
CONCOURSE_SERVER,
BOSH_SERVER
diff --git a/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/category.xml b/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/category.xml
index d52148fa4..8bf9ca993 100644
--- a/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/category.xml
+++ b/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/category.xml
@@ -2,11 +2,7 @@
-
-
-
-
-
+
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/.project b/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/.project
deleted file mode 100644
index 07664547c..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- org.springframework.tooling.properties.ls.feature
-
-
-
-
-
- org.eclipse.m2e.core.maven2Builder
-
-
-
-
-
- org.eclipse.m2e.core.maven2Nature
-
-
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/build.properties b/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/build.properties
deleted file mode 100644
index 64f93a9f0..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/feature.xml b/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/feature.xml
deleted file mode 100644
index 568524d00..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/feature.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/pom.xml b/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/pom.xml
deleted file mode 100644
index 792def247..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls.feature/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- 4.0.0
-
- org.springframework.boot.ide
- org.springframework.boot.ide.servers
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
- org.springframework.tooling.properties.ls.feature
- eclipse-feature
-
-
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/.classpath b/eclipse-language-servers/org.springframework.tooling.properties.ls/.classpath
deleted file mode 100644
index eca7bdba8..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/.settings/org.eclipse.jdt.core.prefs b/eclipse-language-servers/org.springframework.tooling.properties.ls/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61dc..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/META-INF/MANIFEST.MF b/eclipse-language-servers/org.springframework.tooling.properties.ls/META-INF/MANIFEST.MF
deleted file mode 100644
index 38859cb81..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Spring Boot Properties Language Server
-Bundle-Vendor: Pivotal, Inc.
-Bundle-SymbolicName: org.springframework.tooling.properties.ls;singleton:=true
-Bundle-Version: 0.1.4.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.0",
- org.eclipse.core.runtime;bundle-version="3.12.0",
- org.eclipse.ui.genericeditor;bundle-version="1.0.0",
- org.eclipse.jface.text;bundle-version="3.11.100",
- org.eclipse.jdt.ui;bundle-version="3.13.0",
- org.eclipse.tm4e.core;bundle-version="0.1.0",
- org.eclipse.tm4e.ui;bundle-version="0.1.0",
- org.eclipse.lsp4e;bundle-version="0.5.0",
- org.eclipse.lsp4j;bundle-version="0.4.0",
- org.eclipse.ui.workbench,
- org.eclipse.jface,
- org.springframework.tooling.ls.eclipse.commons;bundle-version="4.0.0"
-Import-Package: com.google.gson;version="2.7.0",
- org.eclipse.jface.preference,
- org.osgi.framework
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/pom.xml b/eclipse-language-servers/org.springframework.tooling.properties.ls/pom.xml
deleted file mode 100644
index 842d37f3a..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- 4.0.0
-
-
- org.springframework.boot.ide
- org.springframework.boot.ide.servers
- 4.0.0-SNAPSHOT
- ../pom.xml
-
-
- org.springframework.tooling.properties.ls
- 0.1.4-SNAPSHOT
- eclipse-plugin
-
-
-
- org.springframework.ide.vscode
- boot-properties-language-server
- 0.1.4-SNAPSHOT
-
-
- org.springframework.ide.eclipse
- org.json
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.10
-
-
- copy
- prepare-package
-
- copy
-
-
-
-
- org.springframework.ide.vscode
- boot-properties-language-server
- true
- ${project.build.directory}/../servers
-
-
- true
- true
-
-
-
-
-
-
-
-
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/Constants.java b/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/Constants.java
deleted file mode 100644
index 4501abaaa..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/Constants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016, 2017 Pivotal, Inc.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Pivotal, Inc. - initial API and implementation
- *******************************************************************************/
-package org.springframework.tooling.properties.ls;
-
-/**
- * @author Martin Lippert
- */
-public class Constants {
-
- public static final String PLUGIN_ID = "org.springframework.tooling.properties.ls";
- public static final String LANGUAGE_SERVER_VERSION = "0.1.4-SNAPSHOT";
-
-}
diff --git a/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/SpringBootPropertiesLanguageServer.java b/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/SpringBootPropertiesLanguageServer.java
deleted file mode 100644
index a4c47766e..000000000
--- a/eclipse-language-servers/org.springframework.tooling.properties.ls/src/org/springframework/tooling/properties/ls/SpringBootPropertiesLanguageServer.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016, 2017 Pivotal, Inc.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Pivotal, Inc. - initial API and implementation
- *******************************************************************************/
-package org.springframework.tooling.properties.ls;
-
-import java.io.File;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.osgi.framework.Bundle;
-import org.springframework.tooling.ls.eclipse.commons.JRE;
-import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessStreamConnector;
-
-import static org.springframework.tooling.ls.eclipse.commons.console.preferences.LanguageServerConsolePreferenceConstants.*;
-
-/**
- * @author Martin Lippert
- */
-public class SpringBootPropertiesLanguageServer extends STS4LanguageServerProcessStreamConnector {
-
- public SpringBootPropertiesLanguageServer() {
- super(BOOT_PROPS_SERVER);
- List commands = new ArrayList<>();
- commands.add(JRE.currentJRE().getJavaExecutable());
-
-// commands.add("-Xdebug");
-// commands.add("-agentlib:jdwp=transport=dt_socket,address=8899,server=y,suspend=n");
-
- commands.add("-Dlsp.lazy.completions.disable=true");
- commands.add("-Dlsp.completions.indentation.enable=true");
-
- commands.add("-jar");
- commands.add(getLanguageServerJARLocation());
-
- String workingDir = getWorkingDirLocation();
-
- setCommands(commands);
- setWorkingDirectory(workingDir);
- }
-
- protected String getLanguageServerJARLocation() {
- String languageServer = "boot-properties-language-server-" + Constants.LANGUAGE_SERVER_VERSION + ".jar";
-
- Bundle bundle = Platform.getBundle(Constants.PLUGIN_ID);
- File dataFile = bundle.getDataFile(languageServer);
- Exception error = null;
- try {
- copyLanguageServerJAR(languageServer);
- }
- catch (Exception e) {
- error = e;
- }
- if (!dataFile.exists()) {
- File userHome = new File(System.getProperty("user.home"));
- File locallyBuiltJar = new File(
- userHome,
- "git/sts4/headless-services/boot-properties-language-server/target/boot-properties-language-server-"+Constants.LANGUAGE_SERVER_VERSION + ".jar"
- );
- if (locallyBuiltJar.exists()) {
- return locallyBuiltJar.getAbsolutePath();
- }
- if (error!=null) {
- error.printStackTrace();
- }
- }
-
- return dataFile.getAbsolutePath();
- }
-
- protected void copyLanguageServerJAR(String languageServerJarName) throws Exception {
- Bundle bundle = Platform.getBundle(Constants.PLUGIN_ID);
- InputStream stream = FileLocator.openStream( bundle, new Path("servers/" + languageServerJarName), false );
-
- File dataFile = bundle.getDataFile(languageServerJarName);
- Files.copy(stream, dataFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
- }
-
-}
diff --git a/eclipse-language-servers/pom.xml b/eclipse-language-servers/pom.xml
index 353cbe148..c1dfeb008 100644
--- a/eclipse-language-servers/pom.xml
+++ b/eclipse-language-servers/pom.xml
@@ -36,12 +36,9 @@
org.springframework.tooling.cloudfoundry.manifest.ls.integration
org.springframework.tooling.cloudfoundry.manifest.ls.integration.feature
- org.springframework.tooling.properties.ls
- org.springframework.tooling.properties.ls.feature
-
org.springframework.tooling.ls.eclipse.gotosymbol
- org.springframework.tooling.boot.java.ls
- org.springframework.tooling.boot.java.ls.feature
+ org.springframework.tooling.boot.ls
+ org.springframework.tooling.boot.ls.feature
org.springframework.tooling.bosh.ls
org.springframework.tooling.bosh.ls.feature
diff --git a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java
index c0ab45c45..bc79cde3a 100644
--- a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java
+++ b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/LiveConditionalParser.java
@@ -44,12 +44,12 @@ public class LiveConditionalParser {
public Optional> parse() {
try {
List allConditionals = new ArrayList<>();
- JSONObject autoConfigReport = new JSONObject(autoConfigRecord);
- if (autoConfigReport.has("contexts")) {
- //more recently the report is nested inside the 'application' context.
- autoConfigReport = autoConfigReport.getJSONObject("contexts").getJSONObject("application");
- }
if (StringUtil.hasText(autoConfigRecord)) {
+ JSONObject autoConfigReport = new JSONObject(autoConfigRecord);
+ if (autoConfigReport.has("contexts")) {
+ //more recently the report is nested inside the 'application' context.
+ autoConfigReport = autoConfigReport.getJSONObject("contexts").getJSONObject("application");
+ }
for (LiveConditional c : getConditionalsFromPositiveMatches(autoConfigReport)) {
allConditionals.add(c);
}
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/common/CommonLanguageTools.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/common/CommonLanguageTools.java
index e4fb52e18..fb37add51 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/common/CommonLanguageTools.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/common/CommonLanguageTools.java
@@ -27,10 +27,10 @@ import org.springframework.ide.vscode.boot.metadata.types.TypeParser;
import org.springframework.ide.vscode.boot.metadata.types.TypeUtil;
import org.springframework.ide.vscode.boot.metadata.types.TypeUtil.EnumCaseMode;
import org.springframework.ide.vscode.boot.properties.reconcile.PropertyNavigator;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.util.CollectionUtil;
import org.springframework.ide.vscode.commons.util.FuzzyMap;
import org.springframework.ide.vscode.commons.util.Log;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.LanguageId;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
@@ -69,7 +69,7 @@ public class CommonLanguageTools {
public static Collection getValueHints(FuzzyMap index, TypeUtil typeUtil, String query, String propertyName, EnumCaseMode caseMode) {
Type type = getValueType(index, typeUtil, propertyName);
- if (TypeUtil.isArray(type) || TypeUtil.isList(type)) {
+ if (TypeUtil.isSequencable(type)) {
//It is useful to provide content assist for the values in the list when entering a list
type = TypeUtil.getDomainType(type);
}
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/Annotations.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/Annotations.java
index 145feba88..a2d03f07a 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/Annotations.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/Annotations.java
@@ -18,7 +18,11 @@ package org.springframework.ide.vscode.boot.java;
public class Annotations {
public static final String BEAN = "org.springframework.context.annotation.Bean";
public static final String PROFILE = "org.springframework.context.annotation.Profile";
+ public static final String CONDITIONAL = "org.springframework.context.annotation.Conditional";
+
public static final String COMPONENT = "org.springframework.stereotype.Component";
+ public static final String REPOSITORY = "org.springframework.stereotype.Repository";
+
public static final String AUTOWIRED = "org.springframework.beans.factory.annotation.Autowired";
public static final String SPRING_REQUEST_MAPPING = "org.springframework.web.bind.annotation.RequestMapping";
@@ -28,7 +32,6 @@ public class Annotations {
public static final String SPRING_DELETE_MAPPING = "org.springframework.web.bind.annotation.DeleteMapping";
public static final String SPRING_PATCH_MAPPING = "org.springframework.web.bind.annotation.PatchMapping";
- public static final String CONDITIONAL = "org.springframework.context.annotation.Conditional";
public static final String CONDITIONAL_ON_BEAN = "org.springframework.boot.autoconfigure.condition.ConditionalOnBean";
public static final String CONDITIONAL_ON_MISSING_BEAN = "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean";
public static final String CONDITIONAL_ON_PROPERTY = "org.springframework.boot.autoconfigure.condition.ConditionalOnProperty";
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java
index 99c950aa6..a4253d57c 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/BootJavaLanguageServerComponents.java
@@ -10,25 +10,19 @@
*******************************************************************************/
package org.springframework.ide.vscode.boot.java;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import java.util.Optional;
import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.CompletableFuture;
import org.eclipse.lsp4j.CompletionItemKind;
import org.eclipse.lsp4j.InitializeParams;
-import org.eclipse.lsp4j.InitializeResult;
-import org.eclipse.lsp4j.Registration;
-import org.eclipse.lsp4j.RegistrationParams;
import org.springframework.ide.vscode.boot.BootLanguageServerParams;
import org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup;
import org.springframework.ide.vscode.boot.java.autowired.AutowiredHoverProvider;
import org.springframework.ide.vscode.boot.java.beans.BeansSymbolProvider;
import org.springframework.ide.vscode.boot.java.beans.ComponentSymbolProvider;
import org.springframework.ide.vscode.boot.java.conditionals.ConditionalsLiveHoverProvider;
+import org.springframework.ide.vscode.boot.java.data.DataRepositorySymbolProvider;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaCodeLensEngine;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaCompletionEngine;
import org.springframework.ide.vscode.boot.java.handlers.BootJavaDocumentSymbolHandler;
@@ -61,12 +55,10 @@ import org.springframework.ide.vscode.commons.languageserver.completion.IComplet
import org.springframework.ide.vscode.commons.languageserver.composable.LanguageServerComponents;
import org.springframework.ide.vscode.commons.languageserver.java.JavaProjectFinder;
import org.springframework.ide.vscode.commons.languageserver.java.ProjectObserver;
-import org.springframework.ide.vscode.commons.languageserver.reconcile.IReconcileEngine;
import org.springframework.ide.vscode.commons.languageserver.util.HoverHandler;
import org.springframework.ide.vscode.commons.languageserver.util.LSFactory;
import org.springframework.ide.vscode.commons.languageserver.util.ReferencesHandler;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
-import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServerWrapper;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleWorkspaceService;
import org.springframework.ide.vscode.commons.util.text.LanguageId;
@@ -287,6 +279,8 @@ public class BootJavaLanguageServerComponents implements LanguageServerComponent
providers.put(Annotations.BEAN, new BeansSymbolProvider());
providers.put(Annotations.COMPONENT, new ComponentSymbolProvider());
+
+ providers.put(Annotations.REPOSITORY, new DataRepositorySymbolProvider());
return new SpringIndexer(server, params, providers);
}
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java
index 7de211d63..e08738be7 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/annotations/AnnotationHierarchies.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Pivotal, Inc.
+ * Copyright (c) 2017, 2018 Pivotal, Inc.
* 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
@@ -14,6 +14,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
+import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.jdt.core.dom.Annotation;
@@ -60,7 +61,7 @@ public abstract class AnnotationHierarchies {
public static Set getTransitiveSuperAnnotations(ITypeBinding typeBinding) {
Set seen = new HashSet<>();
- findTransitiveSupers(typeBinding, seen);
+ findTransitiveSupers(typeBinding, seen).collect(Collectors.toList());
return seen;
}
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/beans/BeansSymbolProvider.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/beans/BeansSymbolProvider.java
index 60823e48b..3878448ad 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/beans/BeansSymbolProvider.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/beans/BeansSymbolProvider.java
@@ -26,9 +26,9 @@ import org.eclipse.lsp4j.SymbolKind;
import org.springframework.ide.vscode.boot.java.handlers.SymbolProvider;
import org.springframework.ide.vscode.boot.java.utils.ASTUtils;
import org.springframework.ide.vscode.boot.java.utils.FunctionUtils;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.util.BadLocationException;
import org.springframework.ide.vscode.commons.util.Log;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
import com.google.common.collect.ImmutableList;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/data/DataRepositorySymbolProvider.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/data/DataRepositorySymbolProvider.java
new file mode 100644
index 000000000..b50524866
--- /dev/null
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/data/DataRepositorySymbolProvider.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Pivotal, Inc.
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Pivotal, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.springframework.ide.vscode.boot.java.data;
+
+import java.util.Collection;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.lsp4j.Location;
+import org.eclipse.lsp4j.SymbolInformation;
+import org.eclipse.lsp4j.SymbolKind;
+import org.springframework.ide.vscode.boot.java.handlers.SymbolProvider;
+import org.springframework.ide.vscode.boot.java.utils.ASTUtils;
+import org.springframework.ide.vscode.commons.util.BadLocationException;
+import org.springframework.ide.vscode.commons.util.Log;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
+import org.springframework.ide.vscode.commons.util.text.TextDocument;
+
+import com.google.common.collect.ImmutableList;
+
+import reactor.util.function.Tuple4;
+import reactor.util.function.Tuples;
+
+/**
+ * @author Martin Lippert
+ */
+public class DataRepositorySymbolProvider implements SymbolProvider {
+
+ private static final String REPOSITORY_TYPE = "org.springframework.data.repository.Repository";
+
+
+ @Override
+ public Collection getSymbols(Annotation node, ITypeBinding annotationType, Collection metaAnnotations, TextDocument doc) {
+ return null;
+ }
+
+ @Override
+ public Collection getSymbols(TypeDeclaration typeDeclaration, TextDocument doc) {
+ // this checks spring data repository beans that are defined as extensions of the repository interface
+ Tuple4 repositoryBean = getRepositoryBean(typeDeclaration, doc);
+ if (repositoryBean != null) {
+ try {
+ SymbolInformation symbol = new SymbolInformation(
+ beanLabel(true, repositoryBean.getT1(), repositoryBean.getT2(), repositoryBean.getT3()),
+ SymbolKind.Interface,
+ new Location(doc.getUri(), doc.toRange(repositoryBean.getT4())));
+ return ImmutableList.of(symbol);
+ } catch (BadLocationException e) {
+ Log.log(e);
+ }
+ }
+ return ImmutableList.of();
+ }
+
+ protected String beanLabel(boolean isFunctionBean, String beanName, String beanType, String markerString) {
+ StringBuilder symbolLabel = new StringBuilder();
+ symbolLabel.append("@+");
+ symbolLabel.append(' ');
+ symbolLabel.append('\'');
+ symbolLabel.append(beanName);
+ symbolLabel.append('\'');
+
+ markerString = markerString != null && markerString.length() > 0 ? " (" + markerString + ") " : " ";
+ symbolLabel.append(markerString);
+
+ symbolLabel.append(beanType);
+ return symbolLabel.toString();
+ }
+
+ private static Tuple4 getRepositoryBean(TypeDeclaration typeDeclaration, TextDocument doc) {
+ ITypeBinding resolvedType = typeDeclaration.resolveBinding();
+
+ if (resolvedType != null) {
+ return getRepositoryBean(typeDeclaration, doc, resolvedType);
+ }
+ else {
+ return null;
+ }
+ }
+
+ private static Tuple4 getRepositoryBean(TypeDeclaration typeDeclaration, TextDocument doc,
+ ITypeBinding resolvedType) {
+
+ ITypeBinding[] interfaces = resolvedType.getInterfaces();
+ for (ITypeBinding resolvedInterface : interfaces) {
+ String simplifiedType = null;
+ if (resolvedInterface.isParameterizedType()) {
+ simplifiedType = resolvedInterface.getBinaryName();
+ }
+ else {
+ simplifiedType = resolvedType.getQualifiedName();
+ }
+
+ if (REPOSITORY_TYPE.equals(simplifiedType)) {
+ String beanName = getBeanName(typeDeclaration);
+ String beanType = resolvedInterface.getName();
+
+ String domainType = null;
+ if (resolvedInterface.isParameterizedType()) {
+ ITypeBinding[] typeParameters = resolvedInterface.getTypeArguments();
+ if (typeParameters != null && typeParameters.length > 0) {
+ domainType = typeParameters[0].getName();
+ }
+ }
+ DocumentRegion region = ASTUtils.nodeRegion(doc, typeDeclaration.getName());
+
+ return Tuples.of(beanName, beanType, domainType, region);
+ }
+ else {
+ Tuple4 result = getRepositoryBean(typeDeclaration, doc, resolvedInterface);
+ if (result != null) {
+ return result;
+ }
+ }
+ }
+
+ ITypeBinding superclass = resolvedType.getSuperclass();
+ if (superclass != null) {
+ return getRepositoryBean(typeDeclaration, doc, superclass);
+ }
+ else {
+ return null;
+ }
+ }
+
+ private static String getBeanName(TypeDeclaration typeDeclaration) {
+ String beanName = typeDeclaration.getName().toString();
+ if (beanName.length() > 0 && Character.isUpperCase(beanName.charAt(0))) {
+ beanName = Character.toLowerCase(beanName.charAt(0)) + beanName.substring(1);
+ }
+ return beanName;
+ }
+}
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/handlers/BootJavaHoverProvider.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/handlers/BootJavaHoverProvider.java
index 6512b57e4..dcd1fef7d 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/handlers/BootJavaHoverProvider.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/handlers/BootJavaHoverProvider.java
@@ -37,10 +37,10 @@ import org.springframework.ide.vscode.commons.boot.app.cli.SpringBootApp;
import org.springframework.ide.vscode.commons.java.IClasspath;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.languageserver.java.JavaProjectFinder;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.languageserver.util.HoverHandler;
import org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService;
import org.springframework.ide.vscode.commons.util.Log;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.IDocument;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/livehover/ComponentInjectionsHoverProvider.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/livehover/ComponentInjectionsHoverProvider.java
index 53052c42c..6dab248b3 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/livehover/ComponentInjectionsHoverProvider.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/livehover/ComponentInjectionsHoverProvider.java
@@ -13,6 +13,7 @@ package org.springframework.ide.vscode.boot.java.livehover;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
+import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -27,21 +28,18 @@ import org.eclipse.lsp4j.Range;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
import org.springframework.ide.vscode.boot.java.Annotations;
import org.springframework.ide.vscode.boot.java.BootJavaLanguageServerComponents;
+import org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies;
import org.springframework.ide.vscode.boot.java.utils.ASTUtils;
-import org.springframework.ide.vscode.boot.java.utils.FunctionUtils;
import org.springframework.ide.vscode.commons.boot.app.cli.SpringBootApp;
import org.springframework.ide.vscode.commons.boot.app.cli.livebean.LiveBean;
import org.springframework.ide.vscode.commons.boot.app.cli.livebean.LiveBeansModel;
import org.springframework.ide.vscode.commons.java.IJavaProject;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.util.Log;
import org.springframework.ide.vscode.commons.util.StringUtil;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
import com.google.common.collect.ImmutableList;
-import reactor.util.function.Tuple3;
-
public class ComponentInjectionsHoverProvider extends AbstractInjectedIntoHoverProvider {
public ComponentInjectionsHoverProvider(BootJavaLanguageServerComponents server) {
@@ -135,8 +133,7 @@ public class ComponentInjectionsHoverProvider extends AbstractInjectedIntoHoverP
@Override
public Collection getLiveHoverHints(TypeDeclaration typeDeclaration, TextDocument doc,
SpringBootApp[] runningApps) {
- Tuple3 functionBean = FunctionUtils.getFunctionBean(typeDeclaration, doc);
- if (functionBean != null && runningApps.length > 0) {
+ if (runningApps.length > 0 && !isComponentAnnotatedType(typeDeclaration)) {
try {
LiveBean definedBean = getDefinedBeanForType(typeDeclaration, null);
if (definedBean != null) {
@@ -157,8 +154,8 @@ public class ComponentInjectionsHoverProvider extends AbstractInjectedIntoHoverP
@Override
public Hover provideHover(ASTNode node, TypeDeclaration typeDeclaration, ITypeBinding type, int offset,
TextDocument doc, IJavaProject project, SpringBootApp[] runningApps) {
- Tuple3 functionBean = FunctionUtils.getFunctionBean(typeDeclaration, doc);
- if (functionBean != null && runningApps.length > 0) {
+
+ if (runningApps.length > 0 && !isComponentAnnotatedType(typeDeclaration)) {
LiveBean definedBean = getDefinedBeanForType(typeDeclaration, null);
if (definedBean != null) {
@@ -191,4 +188,26 @@ public class ComponentInjectionsHoverProvider extends AbstractInjectedIntoHoverP
return null;
}
+ private boolean isComponentAnnotatedType(TypeDeclaration typeDeclaration) {
+ List> modifiers = typeDeclaration.modifiers();
+ for (Object modifier : modifiers) {
+ if (modifier instanceof Annotation) {
+ ITypeBinding typeBinding = ((Annotation) modifier).resolveTypeBinding();
+ return isComponentAnnotation(typeBinding);
+ }
+ }
+ return false;
+ }
+
+ private boolean isComponentAnnotation(ITypeBinding type) {
+ Set transitiveSuperAnnotations = AnnotationHierarchies.getTransitiveSuperAnnotations(type);
+ for (String annotationType : transitiveSuperAnnotations) {
+ if (Annotations.COMPONENT.equals(annotationType)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
}
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippet.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippet.java
index 0e3fa7755..0e2d5c584 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippet.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippet.java
@@ -17,8 +17,8 @@ import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.lsp4j.CompletionItemKind;
import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionProposal;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.languageserver.util.SnippetBuilder;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import com.google.common.base.Supplier;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetBuilder.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetBuilder.java
index 7f2c9ec7b..2280851a0 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetBuilder.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetBuilder.java
@@ -15,8 +15,8 @@ import java.util.regex.Pattern;
import org.springframework.ide.vscode.commons.languageserver.completion.DocumentEdits;
import org.springframework.ide.vscode.commons.languageserver.completion.IndentUtil;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.languageserver.util.SnippetBuilder;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.IDocument;
import com.google.common.base.Supplier;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetCompletion.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetCompletion.java
index bf3eb74c2..f7214a88c 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetCompletion.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetCompletion.java
@@ -17,10 +17,10 @@ import org.eclipse.lsp4j.CompletionItemKind;
import org.springframework.ide.vscode.boot.java.jdt.imports.ImportRewrite;
import org.springframework.ide.vscode.commons.languageserver.completion.DocumentEdits;
import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionProposal;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.languageserver.util.SnippetBuilder;
import org.springframework.ide.vscode.commons.util.Renderable;
import org.springframework.ide.vscode.commons.util.Renderables;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import com.google.common.base.Supplier;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetManager.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetManager.java
index ed6f7fdc8..bbfd6d5bc 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetManager.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/snippets/JavaSnippetManager.java
@@ -17,10 +17,10 @@ import java.util.List;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionProposal;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.languageserver.util.PrefixFinder;
import org.springframework.ide.vscode.commons.languageserver.util.SnippetBuilder;
import org.springframework.ide.vscode.commons.util.FuzzyMatcher;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.IDocument;
import com.google.common.base.Supplier;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/ASTUtils.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/ASTUtils.java
index 96f9172e5..c7394b8e2 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/ASTUtils.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/ASTUtils.java
@@ -31,9 +31,9 @@ import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.lsp4j.Range;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
import org.springframework.ide.vscode.commons.util.CollectorUtil;
import org.springframework.ide.vscode.commons.util.Log;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
import com.google.common.collect.ImmutableList;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/FunctionUtils.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/FunctionUtils.java
index 223eed5e9..6314795ad 100644
--- a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/FunctionUtils.java
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/java/utils/FunctionUtils.java
@@ -18,7 +18,7 @@ import java.util.function.Supplier;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.springframework.ide.vscode.commons.languageserver.util.DocumentRegion;
+import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
import reactor.util.function.Tuple3;
diff --git a/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/metadata/types/DelimitedStringParser.java b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/metadata/types/DelimitedStringParser.java
new file mode 100644
index 000000000..0dc8a4405
--- /dev/null
+++ b/headless-services/commons/commons-boot/src/main/java/org/springframework/ide/vscode/boot/metadata/types/DelimitedStringParser.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Pivotal, Inc.
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Pivotal, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.springframework.ide.vscode.boot.metadata.types;
+
+import java.util.ArrayList;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.springframework.ide.vscode.commons.util.ExceptionUtil;
+import org.springframework.ide.vscode.commons.util.StringUtil;
+import org.springframework.ide.vscode.commons.util.ValueParseException;
+import org.springframework.ide.vscode.commons.util.ValueParser;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * Parser that is capable of parsing comma-separated lists. The parser
+ * is constructed from another parser which is used to parse the elements.
+ */
+public class DelimitedStringParser implements ValueParser {
+
+ private static final Pattern COMMA = Pattern.compile("(\\s)*\\,(\\s)*");;
+ private Pattern SEPARATOR = COMMA;
+
+ private ValueParser elementParser;
+
+ public DelimitedStringParser(ValueParser elementParser) {
+ super();
+ this.elementParser = elementParser;
+ }
+
+ @Override
+ public Object parse(String str) throws Exception {
+ if (!StringUtil.hasText(str)) {
+ return ImmutableList.of();
+ }
+ int offset = 0;
+ Matcher matcher = SEPARATOR.matcher(str);
+ ArrayList