Preference pages for props and yaml ls editor
Allows configuring problem severities. The ui works but is not yet wired to transmit these setting to the language server.
This commit is contained in:
@@ -36,6 +36,16 @@ public class BadWordReconcileEngine implements IReconcileEngine {
|
||||
public String getCode() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "It is bad";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return "Bad label";
|
||||
}
|
||||
}
|
||||
|
||||
private final String[] BADWORDS = {
|
||||
|
||||
@@ -26,4 +26,6 @@ public interface ProblemType {
|
||||
ProblemSeverity getDefaultSeverity();
|
||||
String toString();
|
||||
String getCode();
|
||||
String getLabel();
|
||||
String getDescription();
|
||||
}
|
||||
|
||||
@@ -10,18 +10,24 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.languageserver.reconcile;
|
||||
|
||||
public class ProblemTypes {
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.springframework.ide.vscode.commons.util.Assert;
|
||||
|
||||
public class ProblemTypes {
|
||||
|
||||
/**
|
||||
* Creates a new problem type. The newly created problem type is not 'equals' to any other
|
||||
* problem type.
|
||||
*
|
||||
* This method is deprecated. Look at ApplicationYamlProblemType for an example of how to define
|
||||
* problem types to facilitate integration with preferences ui.
|
||||
*
|
||||
* @param defaultSeverity
|
||||
* @param typeName A unique name for this problem type. Note that it is the caller's responsibility that the typeName is unique.
|
||||
* If this method is called more than once with identical typeName's it makes no attempts to veify that
|
||||
* the name is uniquer, or to return the same object for the same typeName.
|
||||
* @return A newly create problem type.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ProblemType create(String typeName, ProblemSeverity defaultSeverity) {
|
||||
return new ProblemType() {
|
||||
@Override
|
||||
@@ -36,6 +42,14 @@ public class ProblemTypes {
|
||||
public String getCode() {
|
||||
return typeName;
|
||||
}
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return typeName;
|
||||
}
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return typeName;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user