Remove some deprecated classes and deprecated api usages
This commit is contained in:
@@ -12,8 +12,9 @@ package org.springframework.ide.vscode.bosh;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.Settings;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -25,6 +26,8 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
public class BoshCliConfig {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BoshCliConfig.class);
|
||||
|
||||
/**
|
||||
* The settings object. This is obtained from 'didChangeConfiguration' events.
|
||||
@@ -43,7 +46,7 @@ public class BoshCliConfig {
|
||||
}
|
||||
|
||||
public void handleConfigurationChange(Settings newConfig) {
|
||||
Log.info("Settings received: "+newConfig);
|
||||
log.info("Settings received: " + newConfig);
|
||||
this.settings = newConfig;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,14 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.cloudfoundry.operations.routes.Route;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.util.StringUtil;
|
||||
|
||||
public class CFRouteBuilder {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CFRouteBuilder.class);
|
||||
|
||||
private String domain;
|
||||
private String host;
|
||||
private String path;
|
||||
@@ -129,7 +133,7 @@ public class CFRouteBuilder {
|
||||
this.port = Integer.parseInt(portSegments[1]);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
|
||||
this.domain = findDomain(hostAndDomain, domains);
|
||||
|
||||
@@ -22,9 +22,9 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.cloudfoundry.client.v2.CancelationTokens.CancelationToken;
|
||||
import org.springframework.ide.vscode.commons.util.ExceptionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -36,6 +36,8 @@ import reactor.util.function.Tuples;
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public class ReactorUtils {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ReactorUtils.class);
|
||||
|
||||
private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(45); // reflects default timeout of Mono.block in reactor 2.x.
|
||||
public static boolean DUMP_STACK_ON_TIMEOUT = false;
|
||||
@@ -87,7 +89,7 @@ public class ReactorUtils {
|
||||
// .otherwise(errorFilter(cancelationToken))
|
||||
.block(timeout);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
package org.springframework.ide.vscode.commons.gradle;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.gradle.tooling.GradleConnectionException;
|
||||
@@ -20,8 +19,9 @@ import org.gradle.tooling.ProjectConnection;
|
||||
import org.gradle.tooling.internal.consumer.DefaultGradleConnector;
|
||||
import org.gradle.tooling.model.build.BuildEnvironment;
|
||||
import org.gradle.tooling.model.eclipse.EclipseProject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.util.Assert;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
|
||||
/**
|
||||
* Gradle API tooling utility
|
||||
@@ -31,6 +31,8 @@ import org.springframework.ide.vscode.commons.util.Log;
|
||||
*/
|
||||
public class GradleCore {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(GradleCore.class);
|
||||
|
||||
@FunctionalInterface
|
||||
public interface GradleConfiguration {
|
||||
void configure(GradleConnector connector);
|
||||
@@ -81,7 +83,7 @@ public class GradleCore {
|
||||
connection = gradleConnector.connect();
|
||||
return connection.getModel(modelType);
|
||||
} catch (GradleConnectionException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
throw new GradleException(e);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016-2017 Pivotal, Inc.
|
||||
* Copyright (c) 2016-2024 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
|
||||
@@ -35,7 +35,7 @@ final class ArrayTypeWrapper extends TypeWrapper<ArrayType> implements IArrayTyp
|
||||
|
||||
@Override
|
||||
public IJavaType component() {
|
||||
return wrap(getType().component());
|
||||
return wrap(getType().elementType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,8 +19,9 @@ import java.net.URL;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.javadoc.internal.JavadocContents;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
@@ -28,6 +29,8 @@ import com.google.common.cache.CacheBuilder;
|
||||
|
||||
public interface HtmlJavadocIndex {
|
||||
|
||||
static final Logger log = LoggerFactory.getLogger(HtmlJavadocIndex.class);
|
||||
|
||||
static JavadocContents NO_HTML_CONTENT = new JavadocContents(null);
|
||||
|
||||
public static final HtmlJavadocIndex DEFAULT = new HtmlJavadocIndex() {
|
||||
@@ -45,7 +48,7 @@ public interface HtmlJavadocIndex {
|
||||
BufferedReader buffer = new BufferedReader(new InputStreamReader(stream));
|
||||
return new JavadocContents(buffer.lines().collect(Collectors.joining("\n")));
|
||||
} catch (IOException e) {
|
||||
Log.log("Cannot load javadoc content from " + url, e);
|
||||
log.error("Cannot load javadoc content from " + url, e);
|
||||
return NO_HTML_CONTENT;
|
||||
} finally {
|
||||
if (stream != null) {
|
||||
@@ -55,7 +58,7 @@ public interface HtmlJavadocIndex {
|
||||
});
|
||||
return content == NO_HTML_CONTENT ? null : content;
|
||||
} catch (ExecutionException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,16 +13,19 @@ package org.springframework.ide.vscode.commons.javadoc;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.java.IAnnotation;
|
||||
import org.springframework.ide.vscode.commons.java.IField;
|
||||
import org.springframework.ide.vscode.commons.java.IJavadocProvider;
|
||||
import org.springframework.ide.vscode.commons.java.IMethod;
|
||||
import org.springframework.ide.vscode.commons.java.IType;
|
||||
import org.springframework.ide.vscode.commons.javadoc.internal.JavadocContents;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
|
||||
public class HtmlJavadocProvider implements IJavadocProvider {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(HtmlJavadocProvider.class);
|
||||
|
||||
private SourceUrlProvider htmlUrlProvider;
|
||||
|
||||
public HtmlJavadocProvider(SourceUrlProvider htmlUrlProvider) {
|
||||
@@ -36,7 +39,7 @@ public class HtmlJavadocProvider implements IJavadocProvider {
|
||||
String html = javadocContents == null ? null : javadocContents.getTypeDoc(type);
|
||||
return html == null ? null : new HtmlJavadoc(html);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +52,7 @@ public class HtmlJavadocProvider implements IJavadocProvider {
|
||||
String html = javadocContents == null ? null : javadocContents.getFieldDoc(field);
|
||||
return html == null ? null : new HtmlJavadoc(html);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -62,7 +65,7 @@ public class HtmlJavadocProvider implements IJavadocProvider {
|
||||
String html = javadocContents == null ? null : javadocContents.getMethodDoc(method);
|
||||
return html == null ? null : new HtmlJavadoc(html);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,9 @@ import java.net.URLDecoder;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.eclipse.lsp4j.TextDocumentIdentifier;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.java.IJavaProject;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.StringUtil;
|
||||
|
||||
/**
|
||||
@@ -32,6 +33,8 @@ import org.springframework.ide.vscode.commons.util.StringUtil;
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public abstract class FileBasedJavaProjectFinder implements JavaProjectFinder {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(FileBasedJavaProjectFinder.class);
|
||||
|
||||
@Override
|
||||
public final Optional<IJavaProject> find(TextDocumentIdentifier doc) {
|
||||
@@ -53,14 +56,14 @@ public abstract class FileBasedJavaProjectFinder implements JavaProjectFinder {
|
||||
String projectName = getProjectName(decoded);
|
||||
return findProjectByName(projectName);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.util.function.Consumer;
|
||||
import org.eclipse.lsp4j.ApplyWorkspaceEditParams;
|
||||
import org.eclipse.lsp4j.Command;
|
||||
import org.eclipse.lsp4j.CompletionItem;
|
||||
import org.eclipse.lsp4j.CompletionItemTag;
|
||||
import org.eclipse.lsp4j.CompletionList;
|
||||
import org.eclipse.lsp4j.InsertTextFormat;
|
||||
import org.eclipse.lsp4j.InsertTextMode;
|
||||
@@ -277,7 +278,7 @@ public class VscodeCompletionEngineAdapter implements VscodeCompletionEngine {
|
||||
item.setFilterText(completion.getFilterText());
|
||||
item.setInsertTextMode(InsertTextMode.AsIs);
|
||||
if (completion.isDeprecated()) {
|
||||
item.setDeprecated(completion.isDeprecated());
|
||||
item.setTags(List.of(CompletionItemTag.Deprecated));
|
||||
}
|
||||
|
||||
resolveMainEdit(doc, completion, item);
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* 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
|
||||
* https://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.languageserver.config;
|
||||
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
|
||||
|
||||
/**
|
||||
* Callback to apply configuration to a {@link SimpleLanguageServer}. THis callback is
|
||||
* called meant to be called on a newly instantiated SimpleLanguageServer, right after it
|
||||
* was created (and prior to actually starting the language server).
|
||||
*
|
||||
* Deprecated. Uses of this should just be converted on a 'InializingBean' which will make
|
||||
* spring framework call them after server bean has been created and all its dependencies
|
||||
* injected. This is simpler and gives more flexibility to deal with dependency cycles.
|
||||
* For an example See BootLanguageServerIitializer.
|
||||
*
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
@Deprecated
|
||||
public interface LanguageServerInitializer {
|
||||
void initialize(SimpleLanguageServer server) throws Exception;
|
||||
}
|
||||
@@ -373,7 +373,6 @@ class MavenBridge {
|
||||
configuration.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL);
|
||||
configuration.setRepositorySession(createRepositorySession(request));
|
||||
configuration.setResolveDependencies(true);
|
||||
configuration.setResolveVersionRanges(true);
|
||||
request.setGoals(Arrays.asList(new String[] { "compile", "javadoc:javadoc" }));
|
||||
Properties userProperties = (Properties) request.getUserProperties().clone();
|
||||
userProperties.put("show", "private");
|
||||
|
||||
@@ -13,12 +13,17 @@ package org.springframework.ide.vscode.commons.util;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Helper class to make it a little easier to create simple html page.
|
||||
*
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public class HtmlBuffer {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(HtmlBuffer.class);
|
||||
|
||||
private StringBuilder buffer = new StringBuilder();
|
||||
|
||||
@@ -44,7 +49,7 @@ public class HtmlBuffer {
|
||||
try {
|
||||
raw(URLEncoder.encode(string, "utf8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,58 +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
|
||||
* https://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.springframework.ide.vscode.commons.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* This class is here to make porting old STS code easier. Deprecated: Instead of using this,
|
||||
* consider using {@link org.slf4j.Logger} directly. This allows for more fine-grained
|
||||
* tuning of logging levels per class.
|
||||
*/
|
||||
@Deprecated
|
||||
public class Log {
|
||||
|
||||
final static Logger logger = LoggerFactory.getLogger(Log.class);
|
||||
|
||||
public static void log(Throwable e) {
|
||||
logger.error("Error", e);
|
||||
}
|
||||
|
||||
public static void log(String message, Throwable t) {
|
||||
logger.error(message, t);
|
||||
}
|
||||
|
||||
public static void log(String message) {
|
||||
logger.error(message);
|
||||
}
|
||||
|
||||
public static void info(String info) {
|
||||
logger.info(info);
|
||||
}
|
||||
|
||||
public static void warn(String string) {
|
||||
logger.warn(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: to enable debug output set this in launchconfig: -Dorg.slf4j.simpleLogger.log.org.springframework.ide.vscode.commons.util.Log=debug
|
||||
*/
|
||||
public static void debug(String string) {
|
||||
logger.debug(string);
|
||||
}
|
||||
|
||||
public static void warn(String msg, Throwable e) {
|
||||
logger.warn(msg, e);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,9 +14,14 @@ import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.common.net.MediaType;
|
||||
|
||||
public class MimeTypes {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MimeTypes.class);
|
||||
|
||||
public static String[] getKnownMimeTypes() {
|
||||
try {
|
||||
@@ -30,7 +35,7 @@ public class MimeTypes {
|
||||
}
|
||||
return mediaTypes.toArray(new String[mediaTypes.size()]);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -14,13 +14,19 @@ import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class UriUtil {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(UriUtil.class);
|
||||
|
||||
|
||||
public static URI toUri(File file) {
|
||||
try {
|
||||
return new URI("file", "", file.getAbsoluteFile().toURI().getPath(), null);
|
||||
} catch (URISyntaxException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
return file.getAbsoluteFile().toURI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,14 +18,17 @@ import org.eclipse.lsp4j.Position;
|
||||
import org.eclipse.lsp4j.Range;
|
||||
import org.eclipse.lsp4j.TextDocumentContentChangeEvent;
|
||||
import org.eclipse.lsp4j.TextDocumentIdentifier;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.util.BadLocationException;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.text.linetracker.DefaultLineTracker;
|
||||
import org.springframework.ide.vscode.commons.util.text.linetracker.ILineTracker;
|
||||
|
||||
import javolution.text.Text;
|
||||
|
||||
public class TextDocument implements IDocument {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(TextDocument.class);
|
||||
|
||||
ILineTracker lineTracker = new DefaultLineTracker();
|
||||
private static final Pattern NEWLINE = Pattern.compile("\\n|\\r\\n");
|
||||
@@ -93,7 +96,7 @@ public class TextDocument implements IDocument {
|
||||
}
|
||||
this.version = newVersion;
|
||||
} else {
|
||||
Log.warn("Change event with bad version ignored");
|
||||
log.warn("Change event with bad version ignored");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.springframework.ide.vscode.commons.languageserver.util.PlaceHolderStr
|
||||
import org.springframework.ide.vscode.commons.util.CollectionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.ExceptionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.FuzzyMatcher;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.PartialCollection;
|
||||
import org.springframework.ide.vscode.commons.util.Renderable;
|
||||
import org.springframework.ide.vscode.commons.util.ValueParseException;
|
||||
@@ -405,7 +404,7 @@ public class YTypeAssistContext extends AbstractYamlAssistContext {
|
||||
YamlPath fullContextPath = contextPath.prepend(YamlPathSegment.valueAt(documentSelector));
|
||||
return new SNodeDynamicSchemaContext(contextNode, fullContextPath);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
return DynamicSchemaContext.NULL;
|
||||
}
|
||||
}
|
||||
@@ -436,7 +435,7 @@ public class YTypeAssistContext extends AbstractYamlAssistContext {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -448,7 +447,7 @@ public class YTypeAssistContext extends AbstractYamlAssistContext {
|
||||
return relaxed.getCompletions(doc, current, offset);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
}
|
||||
return ImmutableList.of();
|
||||
}
|
||||
@@ -490,7 +489,7 @@ public class YTypeAssistContext extends AbstractYamlAssistContext {
|
||||
return !"".equals(doc.getLineTextBefore(insertAt).trim());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.ide.vscode.commons.languageserver.completion.IComplet
|
||||
import org.springframework.ide.vscode.commons.languageserver.completion.ScoreableProposal;
|
||||
import org.springframework.ide.vscode.commons.languageserver.completion.TransformedCompletion;
|
||||
import org.springframework.ide.vscode.commons.util.Assert;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.Unicodes;
|
||||
import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
|
||||
import org.springframework.ide.vscode.commons.util.text.IDocument;
|
||||
@@ -116,7 +115,7 @@ public class YamlCompletionEngine implements ICompletionEngine {
|
||||
return fixIndentations(getBaseCompletions(offset, doc, current, contextNode),
|
||||
current, contextNode, baseIndent, deempasizeBy, doc);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
}
|
||||
return ImmutableList.of();
|
||||
}
|
||||
@@ -272,7 +271,7 @@ public class YamlCompletionEngine implements ICompletionEngine {
|
||||
return "-".equals(value.trim());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -285,7 +284,7 @@ public class YamlCompletionEngine implements ICompletionEngine {
|
||||
return value.trim().isEmpty();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
logger.error("", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ package org.springframework.ide.vscode.commons.yaml.path;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SNode;
|
||||
|
||||
/**
|
||||
@@ -25,6 +26,9 @@ import org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser
|
||||
*/
|
||||
public interface YamlNavigable<T> {
|
||||
|
||||
static final Logger log = LoggerFactory.getLogger(YamlNavigable.class);
|
||||
|
||||
|
||||
/**
|
||||
* Traversal which silently ignores ambiguity by picking the first valid target
|
||||
* returned by traverseAmbiguously.
|
||||
@@ -45,7 +49,7 @@ public interface YamlNavigable<T> {
|
||||
T it = traverse(s);
|
||||
return it == null ? Stream.empty() : Stream.of(it);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
return Stream.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import java.util.TreeSet;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.languageserver.quickfix.Quickfix.QuickfixData;
|
||||
import org.springframework.ide.vscode.commons.languageserver.reconcile.IProblemCollector;
|
||||
import org.springframework.ide.vscode.commons.languageserver.reconcile.ProblemType;
|
||||
@@ -34,13 +36,11 @@ import org.springframework.ide.vscode.commons.languageserver.util.SnippetBuilder
|
||||
import org.springframework.ide.vscode.commons.util.CollectorUtil;
|
||||
import org.springframework.ide.vscode.commons.util.ExceptionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.IntegerRange;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
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 org.springframework.ide.vscode.commons.util.text.DocumentRegion;
|
||||
import org.springframework.ide.vscode.commons.util.text.IDocument;
|
||||
import org.springframework.ide.vscode.commons.yaml.ast.AstDumper;
|
||||
import org.springframework.ide.vscode.commons.yaml.ast.NodeMergeSupport;
|
||||
import org.springframework.ide.vscode.commons.yaml.ast.NodeUtil;
|
||||
import org.springframework.ide.vscode.commons.yaml.ast.YamlFileAST;
|
||||
@@ -66,6 +66,8 @@ import org.yaml.snakeyaml.nodes.ScalarNode;
|
||||
import org.yaml.snakeyaml.nodes.SequenceNode;
|
||||
|
||||
public class SchemaBasedYamlASTReconciler implements YamlASTReconciler {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SchemaBasedYamlASTReconciler.class);
|
||||
|
||||
private final IProblemCollector problems;
|
||||
private final YamlSchema schema;
|
||||
@@ -136,7 +138,7 @@ public class SchemaBasedYamlASTReconciler implements YamlASTReconciler {
|
||||
return dashes;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
//something unexpected... we couldn't find the '---'. So just mark the entire node.
|
||||
return allOf(ast, node);
|
||||
@@ -443,7 +445,7 @@ public class SchemaBasedYamlASTReconciler implements YamlASTReconciler {
|
||||
)
|
||||
);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
problems.accept(problem);
|
||||
|
||||
@@ -22,9 +22,10 @@ import java.util.function.Predicate;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.util.Assert;
|
||||
import org.springframework.ide.vscode.commons.util.CollectionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.Streams;
|
||||
import org.springframework.ide.vscode.commons.util.StringUtil;
|
||||
import org.springframework.ide.vscode.commons.util.text.IDocument;
|
||||
@@ -71,6 +72,8 @@ import com.google.common.collect.MultimapBuilder;
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public class YamlStructureParser {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(YamlStructureParser.class);
|
||||
|
||||
/**
|
||||
* Pattern that matches a line starting with a 'simple key'
|
||||
@@ -359,7 +362,7 @@ public class YamlStructureParser {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -574,7 +577,7 @@ public class YamlStructureParser {
|
||||
index.put(key, seqNode);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
keyMap = index;
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.ide.vscode.commons.languageserver.completion.VscodeCompletionEngineAdapter.CompletionFilter;
|
||||
import org.springframework.ide.vscode.commons.languageserver.config.LanguageServerInitializer;
|
||||
import org.springframework.ide.vscode.commons.languageserver.config.LanguageServerProperties;
|
||||
import org.springframework.ide.vscode.commons.languageserver.reconcile.DiagnosticSeverityProvider;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.CompletionServerCapabilityRegistration;
|
||||
@@ -54,14 +53,6 @@ public class LanguageServerAutoConf {
|
||||
return server;
|
||||
}
|
||||
|
||||
@ConditionalOnBean({LanguageServerInitializer.class, SimpleLanguageServer.class})
|
||||
@Bean
|
||||
InitializingBean initializer(SimpleLanguageServer server, LanguageServerInitializer serverInit) {
|
||||
return () -> {
|
||||
serverInit.initialize(server);
|
||||
};
|
||||
}
|
||||
|
||||
@Bean CompletionServerCapabilityRegistration completionCapabilities(SimpleLanguageServer server, LanguageServerProperties props) {
|
||||
return new CompletionServerCapabilityRegistration(server, props);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import javax.swing.text.BadLocationException;
|
||||
|
||||
import org.eclipse.lsp4j.CodeLens;
|
||||
import org.eclipse.lsp4j.CompletionItem;
|
||||
import org.eclipse.lsp4j.CompletionItemTag;
|
||||
import org.eclipse.lsp4j.CompletionList;
|
||||
import org.eclipse.lsp4j.DefinitionParams;
|
||||
import org.eclipse.lsp4j.Diagnostic;
|
||||
@@ -755,7 +756,7 @@ public class Editor {
|
||||
return it;
|
||||
}
|
||||
|
||||
public CompletionItem assertCompletionDetailsWithDeprecation(String expectLabel, String expectDetail, String expectDocSnippet, Boolean deprecated) throws Exception {
|
||||
public CompletionItem assertCompletionDetailsWithDeprecation(String expectLabel, String expectDetail, String expectDocSnippet, boolean deprecated) throws Exception {
|
||||
CompletionItem it = harness.resolveCompletionItem(assertCompletionWithLabel(expectLabel));
|
||||
if (expectDetail!=null) {
|
||||
assertEquals(expectDetail, it.getDetail());
|
||||
@@ -763,7 +764,9 @@ public class Editor {
|
||||
if (expectDocSnippet!=null) {
|
||||
assertContains(expectDocSnippet, getDocString(it));
|
||||
}
|
||||
assertEquals(deprecated, it.getDeprecated());
|
||||
@SuppressWarnings("deprecation")
|
||||
boolean actualDeprecated = Boolean.TRUE.equals(it.getDeprecated()) || (it.getTags() != null && it.getTags().stream().anyMatch(t -> t.equals(CompletionItemTag.Deprecated)));
|
||||
assertEquals(deprecated, actualDeprecated);
|
||||
return it;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ import org.eclipse.lsp4j.WorkDoneProgressCreateParams;
|
||||
import org.eclipse.lsp4j.WorkspaceClientCapabilities;
|
||||
import org.eclipse.lsp4j.WorkspaceEdit;
|
||||
import org.eclipse.lsp4j.WorkspaceEditCapabilities;
|
||||
import org.eclipse.lsp4j.WorkspaceFolder;
|
||||
import org.eclipse.lsp4j.WorkspaceSymbol;
|
||||
import org.eclipse.lsp4j.WorkspaceSymbolParams;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
@@ -277,9 +278,10 @@ public class LanguageServerHarness {
|
||||
public InitializeResult intialize(File workspaceRoot) throws Exception {
|
||||
int parentPid = random.nextInt(40000)+1000;
|
||||
InitializeParams initParams = new InitializeParams();
|
||||
if (workspaceRoot!=null) {
|
||||
initParams.setRootPath(workspaceRoot.toString());
|
||||
initParams.setRootUri(UriUtil.toUri(workspaceRoot).toASCIIString());
|
||||
if (workspaceRoot != null) {
|
||||
initParams.setWorkspaceFolders(List.of(
|
||||
new WorkspaceFolder(UriUtil.toUri(workspaceRoot).toASCIIString(), workspaceRoot.getName())
|
||||
));
|
||||
}
|
||||
initParams.setProcessId(parentPid);
|
||||
ClientCapabilities clientCap = new ClientCapabilities();
|
||||
|
||||
@@ -26,12 +26,13 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.languageserver.reconcile.IProblemCollector;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SnippetBuilder;
|
||||
import org.springframework.ide.vscode.commons.util.Assert;
|
||||
import org.springframework.ide.vscode.commons.util.CollectorUtil;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.SimpleGlob;
|
||||
import org.springframework.ide.vscode.commons.util.SimpleGlob.Match;
|
||||
import org.springframework.ide.vscode.commons.util.Streams;
|
||||
@@ -72,6 +73,8 @@ import com.google.common.collect.Multiset;
|
||||
* and completion engine).
|
||||
*/
|
||||
public class ConcourseModel {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ConcourseModel.class);
|
||||
|
||||
/**
|
||||
* Verification of a 'isUsed' contraint. Basically this consults the ast-type cache, (which should be
|
||||
@@ -455,7 +458,7 @@ public class ConcourseModel {
|
||||
} catch (YAMLException e) {
|
||||
// ignore: found garbage in the doc. Can't compute stuff and that's to be expected.
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -20,18 +20,18 @@ import org.kohsuke.github.GHFileNotFoundException;
|
||||
import org.kohsuke.github.GHPerson;
|
||||
import org.kohsuke.github.GHRepository;
|
||||
import org.kohsuke.github.GitHub;
|
||||
import org.springframework.ide.vscode.commons.util.CollectorUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.util.ExceptionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
public class DefaultGithubInfoProvider implements GithubInfoProvider {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DefaultGithubInfoProvider.class);
|
||||
|
||||
//TODO: we only try to connect to github once and cache the connection.
|
||||
//This means that, if creating the connection fails we won't try again.
|
||||
@@ -140,7 +140,7 @@ public class DefaultGithubInfoProvider implements GithubInfoProvider {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (!isMissingOwnerException(e)) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -17,10 +17,11 @@ import java.util.concurrent.Callable;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.languageserver.completion.DocumentEdits;
|
||||
import org.springframework.ide.vscode.commons.languageserver.completion.ICompletionProposal;
|
||||
import org.springframework.ide.vscode.commons.util.FuzzyMatcher;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.text.DocumentRegion;
|
||||
import org.springframework.ide.vscode.commons.yaml.completion.CompletionFactory;
|
||||
import org.springframework.ide.vscode.commons.yaml.schema.ISubCompletionEngine;
|
||||
@@ -34,6 +35,8 @@ import com.google.common.collect.ImmutableList;
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public class RouteContentAssistant implements ISubCompletionEngine {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RouteContentAssistant.class);
|
||||
|
||||
private static final Pattern STOP_AP = Pattern.compile("[#:/]");
|
||||
|
||||
@@ -72,7 +75,7 @@ public class RouteContentAssistant implements ISubCompletionEngine {
|
||||
return proposals;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
//Ignore. This is somewhat expected. Stuff can go wrong resolving the domains
|
||||
// and CA engine just doesn't provide CA in that case.
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.boot.metadata.PropertyInfo;
|
||||
import org.springframework.ide.vscode.boot.metadata.hints.HintProvider;
|
||||
import org.springframework.ide.vscode.boot.metadata.hints.HintProviders;
|
||||
@@ -29,13 +31,15 @@ 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.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;
|
||||
import org.springframework.ide.vscode.commons.yaml.path.YamlPathSegment;
|
||||
|
||||
public class CommonLanguageTools {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CommonLanguageTools.class);
|
||||
|
||||
|
||||
public static final Pattern SPACES = Pattern.compile(
|
||||
"(\\s|\\\\\\s)*"
|
||||
@@ -63,7 +67,7 @@ public class CommonLanguageTools {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -91,7 +95,7 @@ public class CommonLanguageTools {
|
||||
try {
|
||||
hintProvider = hintProvider.traverse(YamlPathSegment.valueAt(0));
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
if (!HintProviders.isNull(hintProvider)) {
|
||||
|
||||
@@ -14,9 +14,10 @@ import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.eclipse.lsp4j.Range;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
|
||||
import org.springframework.ide.vscode.commons.util.BadLocationException;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.text.TextDocument;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@@ -29,6 +30,8 @@ import com.google.common.collect.ImmutableList;
|
||||
* @author Kris De Volder
|
||||
*/
|
||||
public class WordHighlighter implements Function<TextDocument, List<Range>> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WordHighlighter.class);
|
||||
|
||||
private final String word;
|
||||
|
||||
@@ -46,7 +49,7 @@ public class WordHighlighter implements Function<TextDocument, List<Range>> {
|
||||
try {
|
||||
highlights.add(doc.toRange(wordStart, word.length()));
|
||||
} catch (BadLocationException e) {
|
||||
Log.log(e);
|
||||
log.error("", e);
|
||||
}
|
||||
wordStart = text.indexOf(word, wordStart+word.length());
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.springframework.ide.vscode.boot.java.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -381,7 +382,7 @@ public final class CompilationUnitCache implements DocumentContentProvider {
|
||||
return document.get();
|
||||
}
|
||||
}
|
||||
return IOUtils.toString(uri);
|
||||
return IOUtils.toString(uri, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public abstract class AbstractPropsEditorTest {
|
||||
editor.assertCompletionDetails(expectLabel, expectDetail, expectDocumenation);
|
||||
}
|
||||
|
||||
public void assertCompletionDetailsWithDeprecation(String editorText, String expectLabel, String expectDetail, String expectDocumenation, Boolean deprecated) throws Exception {
|
||||
public void assertCompletionDetailsWithDeprecation(String editorText, String expectLabel, String expectDetail, String expectDocumenation, boolean deprecated) throws Exception {
|
||||
Editor editor = newEditor(editorText);
|
||||
editor.assertCompletionDetailsWithDeprecation(expectLabel, expectDetail, expectDocumenation, deprecated);
|
||||
}
|
||||
|
||||
@@ -1307,14 +1307,14 @@ public class ApplicationPropertiesEditorTest extends AbstractPropsEditorTest {
|
||||
"error.path : String"
|
||||
);
|
||||
//TODO: could we check that 'deprecated' completions are formatted with 'strikethrough font?
|
||||
assertCompletionDetailsWithDeprecation("error.pa<*>", "server.error.path", "String", null, null);
|
||||
assertCompletionDetailsWithDeprecation("error.pa<*>", "server.error.path", "String", null, false);
|
||||
assertCompletionDetailsWithDeprecation("error.pa<*>", "error.path", "String",
|
||||
"~~error.path~~ \u2192 server.error.path \n" +
|
||||
"\n" +
|
||||
"Path of the error controller.\n" +
|
||||
"\n" +
|
||||
"**Deprecated:** This is old",
|
||||
Boolean.TRUE);
|
||||
true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -1395,9 +1395,9 @@ public class ApplicationPropertiesEditorTest extends AbstractPropsEditorTest {
|
||||
useProject(p);
|
||||
data("foo", "demo.Deprecater", null, "A Bean with deprecated properties");
|
||||
|
||||
assertCompletionDetailsWithDeprecation("foo.nam<*>", "new-name", "String", null, null);
|
||||
assertCompletionDetailsWithDeprecation("foo.nam<*>", "name", "String", null, Boolean.TRUE);
|
||||
assertCompletionDetailsWithDeprecation("foo.nam<*>", "alt-name", "String", null, Boolean.TRUE);
|
||||
assertCompletionDetailsWithDeprecation("foo.nam<*>", "new-name", "String", null, false);
|
||||
assertCompletionDetailsWithDeprecation("foo.nam<*>", "name", "String", null, true);
|
||||
assertCompletionDetailsWithDeprecation("foo.nam<*>", "alt-name", "String", null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -3413,14 +3413,14 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
|
||||
"server.error.path : String", // should be first because it is not deprecated, even though it is not as good a pattern match
|
||||
"error.path : String"
|
||||
);
|
||||
assertCompletionDetailsWithDeprecation("error.pa<*>", "server.error.path", "String", null, null);
|
||||
assertCompletionDetailsWithDeprecation("error.pa<*>", "server.error.path", "String", null, false);
|
||||
assertCompletionDetailsWithDeprecation("error.pa<*>", "error.path", "String",
|
||||
"~~error.path~~ \u2192 server.error.path \n" +
|
||||
"\n" +
|
||||
"Path of the error controller.\n" +
|
||||
"\n" +
|
||||
"**Deprecated:** This is old",
|
||||
Boolean.TRUE);
|
||||
true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -3501,9 +3501,9 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
|
||||
useProject(jp);
|
||||
data("foo", "demo.Deprecater", null, "A Bean with deprecated properties");
|
||||
|
||||
assertCompletionDetailsWithDeprecation("foo:\n nam<*>", "new-name", "String", null, null);
|
||||
assertCompletionDetailsWithDeprecation("foo:\n nam<*>", "name", "String", null, Boolean.TRUE);
|
||||
assertCompletionDetailsWithDeprecation("foo:\n nam<*>", "alt-name", "String", null, Boolean.TRUE);
|
||||
assertCompletionDetailsWithDeprecation("foo:\n nam<*>", "new-name", "String", null, false);
|
||||
assertCompletionDetailsWithDeprecation("foo:\n nam<*>", "name", "String", null, true);
|
||||
assertCompletionDetailsWithDeprecation("foo:\n nam<*>", "alt-name", "String", null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user