diff --git a/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/plugin.xml b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/plugin.xml
index dee77f961..c094e925a 100644
--- a/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/plugin.xml
+++ b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/plugin.xml
@@ -44,6 +44,13 @@
+
+
+
+
+
+
+
diff --git a/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/core/PropertiesCollector.java b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/core/PropertiesCollector.java
index 27b02c808..1cb2657ec 100644
--- a/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/core/PropertiesCollector.java
+++ b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/core/PropertiesCollector.java
@@ -99,12 +99,11 @@ public ItemHint getItemHint(String hint) {
@Override
public void merge(ConfigurationMetadata metadata, MergingStrategy mergingStrategy) {
List properties = metadata.getProperties();
- if (properties == null) {
- return;
- }
- for (ItemMetadata property: properties) {
- merge(property, mergingStrategy);
- }
+ if (properties != null) {
+ for (ItemMetadata property: properties) {
+ merge(property, mergingStrategy);
+ }
+ }
List hints = metadata.getHints();
if (hints != null) {
for (ItemHint itemHint : hints) {
diff --git a/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/jul/properties/JULPropertyProvider.java b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/jul/properties/JULPropertyProvider.java
new file mode 100644
index 000000000..83a632a01
--- /dev/null
+++ b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/jul/properties/JULPropertyProvider.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+* Copyright (c) 2019 Red Hat Inc. and others.
+*
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v. 2.0 which is available at
+* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
+* which is available at https://www.apache.org/licenses/LICENSE-2.0.
+*
+* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
+*
+* Contributors:
+* Red Hat Inc. - initial API and implementation
+*******************************************************************************/
+package org.eclipse.lsp4mp.jdt.internal.jul.properties;
+
+import java.util.logging.Level;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.lsp4mp.jdt.core.AbstractStaticPropertiesProvider;
+import org.eclipse.lsp4mp.jdt.core.MicroProfileCorePlugin;
+import org.eclipse.lsp4mp.jdt.core.SearchContext;
+
+/**
+ * Java Util Logging properties provider for {@link Level}.
+ *
+ * @author Angelo ZERR
+ *
+ */
+public class JULPropertyProvider extends AbstractStaticPropertiesProvider {
+
+ public JULPropertyProvider() {
+ super(MicroProfileCorePlugin.PLUGIN_ID, "/static-properties/jul-metadata.json");
+ }
+
+ @Override
+ protected boolean isAdaptedFor(SearchContext context, IProgressMonitor monitor) {
+ return true;
+ }
+}
diff --git a/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/static-properties/jul-metadata.json b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/static-properties/jul-metadata.json
new file mode 100644
index 000000000..2519e7680
--- /dev/null
+++ b/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/static-properties/jul-metadata.json
@@ -0,0 +1,46 @@
+{
+ "hints": [
+ {
+ "name": "java.util.logging.Level",
+ "sourceType": "java.util.logging.Level",
+ "values": [
+ {
+ "value": "OFF",
+ "description": "`OFF` is a special level that can be used to turn off logging.\nThis level is initialized to `Integer.MAX_VALUE`."
+ },
+ {
+ "value": "SEVERE",
+ "description": "`SEVERE` is a message level indicating a serious failure.\n\nIn general SEVERE messages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators. This level is initialized to `1000`."
+ },
+ {
+ "value": "WARNING",
+ "description": "`WARNING` is a message level indicating a potential problem.\n\nIn general WARNING messages should describe events that will be of interest to end users or system managers, or which indicate potential problems. This level is initialized to `900`."
+ },
+ {
+ "value": "INFO",
+ "description": "`INFO` is a message level for informational messages.\n\nTypically INFO messages will be written to the console or its equivalent. So the INFO level should only be used for reasonably significant messages that will make sense to end users and system administrators. This level is initialized to `800`."
+ },
+ {
+ "value": "CONFIG",
+ "description": "`CONFIG` is a message level for static configuration messages.\n\nCONFIG messages are intended to provide a variety of static configuration information, to assist in debugging problems that may be associated with particular configurations. For example, CONFIG message might include the CPU type, the graphics depth, the GUI look-and-feel, etc. This level is initialized to `700`."
+ },
+ {
+ "value": "FINE",
+ "description": "`FINE` is a message level providing tracing information.\n\nAll of FINE, FINER, and FINEST are intended for relatively detailed tracing. The exact meaning of the three levels will vary between subsystems, but in general, FINEST should be used for the most voluminous detailed output, FINER for somewhat less detailed output, and FINE for the lowest volume (and most important) messages.\n\nIn general the FINE level should be used for information that will be broadly interesting to developers who do not have a specialized interest in the specific subsystem.\n\nFINE messages might include things like minor (recoverable) failures. Issues indicating potential performance problems are also worth logging as FINE. This level is initialized to `500`."
+ },
+ {
+ "value": "FINER",
+ "description": "`FINER` indicates a fairly detailed tracing message. By default logging calls for entering, returning, or throwing an exception are traced at this level. This level is initialized to `400`."
+ },
+ {
+ "value": "FINEST",
+ "description": "`FINEST` indicates a highly detailed tracing message. This level is initialized to `300`."
+ },
+ {
+ "value": "ALL",
+ "description": "`ALL` indicates that all messages should be logged. This level is initialized to `Integer.MIN_VALUE`."
+ }
+ ]
+ }
+ ]
+}
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/model/values/ValuesRulesDescriptor.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/model/values/ValuesRulesDescriptor.java
deleted file mode 100644
index 0d1a4bb1d..000000000
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/model/values/ValuesRulesDescriptor.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2019 Red Hat Inc. and others.
-*
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v. 2.0 which is available at
-* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
-* which is available at https://www.apache.org/licenses/LICENSE-2.0.
-*
-* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
-*
-* Contributors:
-* Red Hat Inc. - initial API and implementation
-*******************************************************************************/
-package org.eclipse.lsp4mp.model.values;
-
-import java.util.List;
-
-/**
- * Descriptor which declares list of values rules {@link ValuesRule}.
- *
- * @author Angelo ZERR
- *
- */
-public class ValuesRulesDescriptor {
-
- private List definitions;
-
- private List rules;
-
- public List getDefinitions() {
- return definitions;
- }
-
- public void setDefinitions(List definitions) {
- this.definitions = definitions;
- }
-
- /**
- * Returns the values rules list.
- *
- * @return the values rules list.
- */
- public List getRules() {
- return rules;
- }
-
- /**
- * Set the values rules list.
- *
- * @param rules the values rules list.
- */
- public void setRules(List rules) {
- this.rules = rules;
- }
-
-}
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/model/values/ValuesRulesManager.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/model/values/ValuesRulesManager.java
deleted file mode 100644
index 8b5ac7bbd..000000000
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/model/values/ValuesRulesManager.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2019 Red Hat Inc. and others.
-*
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v. 2.0 which is available at
-* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
-* which is available at https://www.apache.org/licenses/LICENSE-2.0.
-*
-* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
-*
-* Contributors:
-* Red Hat Inc. - initial API and implementation
-*******************************************************************************/
-package org.eclipse.lsp4mp.model.values;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.google.gson.Gson;
-
-import org.eclipse.lsp4mp.commons.metadata.ItemHint.ValueHint;
-import org.eclipse.lsp4mp.commons.metadata.ItemMetadata;
-import org.eclipse.lsp4mp.model.PropertiesModel;
-
-/**
- * Values rules manager.
- *
- * @author Angelo ZERR
- *
- */
-public class ValuesRulesManager {
-
- private final Map> definitionsMap;
- private final List rules;
- private boolean withDefault;
-
- public ValuesRulesManager(boolean withDefault) {
- this.definitionsMap = new HashMap<>();
- this.rules = new ArrayList<>();
- this.withDefault = withDefault;
- }
-
- private void load(InputStream in) {
- ValuesRulesDescriptor descriptor = new Gson().fromJson(new InputStreamReader(in), ValuesRulesDescriptor.class);
- if (descriptor.getDefinitions() != null) {
- registerDefinitions(descriptor.getDefinitions());
- }
- if (descriptor.getRules() != null) {
- registerRules(descriptor.getRules());
- }
- }
-
- public void registerDefinitions(List definitions) {
- definitions.forEach(def -> definitionsMap.put(def.getId(), def.getValues()));
- }
-
- public void registerRules(List rules) {
- this.rules.addAll(rules);
- rules.stream() //
- .filter(rule -> rule.getValuesRef() != null) //
- .forEach(rule -> rule.getValuesRef() //
- .forEach(ref -> {
- List values = new ArrayList<>();
- List staticValues = rule.getValues();
- if (staticValues != null) {
- values.addAll(staticValues);
- }
- List refValues = definitionsMap.get(ref);
- if (refValues != null) {
- values.addAll(refValues);
- }
- rule.setValues(values); //
- }) //
- );
- }
-
- public void unregisterRules(List rules) {
- this.rules.removeAll(rules);
- }
-
- /**
- * Returns the values {@link ValueHint} from the given metadata property and
- * null otherwise.
- *
- * @param metadata the metadata property to match
- * @param model the properties model
- * @return the values {@link ValueHint} from the given metadata property and
- * null otherwise.
- */
- public List getValues(ItemMetadata metadata, PropertiesModel model) {
- for (ValuesRule rule : getRules()) {
- if (rule.match(metadata, model)) {
- return rule.getValues();
- }
- }
- return null;
- }
-
- /**
- * Returns true if the given value is valid for the given metadata property and
- * false otherwise.
- *
- * @param metadata the metadata property to match
- * @param model the properties model
- * @param propertyValue the property value to validate
- * @return true if the given value is valid for the given metadata property and
- * false otherwise.
- */
- public boolean isValidEnum(ItemMetadata metadata, PropertiesModel model, String propertyValue) {
- List enums = getValues(metadata, model);
- return enums == null || getValueHint(propertyValue, metadata, model) != null;
- }
-
- /**
- * Returns the {@link ValueHint} from the given property value for the given
- * metadata property and null otherwise.
- *
- * @param metadata the metadata property to match
- * @param model the properties model
- * @return the {@link ValueHint} from the given property value for the given
- * metadata property and null otherwise.
- */
- public ValueHint getValueHint(String propertyValue, ItemMetadata metadata, PropertiesModel model) {
- List enums = getValues(metadata, model);
- return getValue(propertyValue, enums);
- }
-
- private ValueHint getValue(String value, List values) {
- if (values == null || value == null) {
- return null;
- }
- for (ValueHint valueHint : values) {
- if (value.equals(valueHint.getValue())) {
- return valueHint;
- }
- }
- return null;
- }
-
- private List getRules() {
- if (isDefaultNotLoaded()) {
- synchronized (rules) {
- if (isDefaultNotLoaded()) {
- load(ValuesRulesManager.class.getResourceAsStream("quarkus-values-rules.json"));
- }
- }
- }
- return rules;
- }
-
- private boolean isDefaultNotLoaded() {
- return withDefault && rules.isEmpty();
- }
-}
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCodeActions.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCodeActions.java
index 5f8b97e82..bb509b394 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCodeActions.java
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCodeActions.java
@@ -43,7 +43,6 @@
import org.eclipse.lsp4mp.model.Property;
import org.eclipse.lsp4mp.model.PropertyKey;
import org.eclipse.lsp4mp.model.PropertyValue;
-import org.eclipse.lsp4mp.model.values.ValuesRulesManager;
import org.eclipse.lsp4mp.settings.MicroProfileCommandCapabilities;
import org.eclipse.lsp4mp.settings.MicroProfileFormattingSettings;
import org.eclipse.lsp4mp.utils.MicroProfilePropertiesUtils;
@@ -76,8 +75,8 @@ class MicroProfileCodeActions {
* @return the result of the code actions.
*/
public List doCodeActions(CodeActionContext context, Range range, PropertiesModel document,
- MicroProfileProjectInfo projectInfo, ValuesRulesManager valuesRulesManager,
- MicroProfileFormattingSettings formattingSettings, MicroProfileCommandCapabilities commandCapabilities) {
+ MicroProfileProjectInfo projectInfo, MicroProfileFormattingSettings formattingSettings,
+ MicroProfileCommandCapabilities commandCapabilities) {
List codeActions = new ArrayList<>();
if (context.getDiagnostics() != null) {
doCodeActionForAllRequired(context.getDiagnostics(), document, formattingSettings, codeActions);
@@ -87,8 +86,7 @@ public List doCodeActions(CodeActionContext context, Range range, Pr
// Manage code action for unknown
doCodeActionsForUnknown(diagnostic, document, projectInfo, commandCapabilities, codeActions);
} else if (ValidationType.value.isValidationType(diagnostic.getCode())) {
- doCodeActionsForUnknownEnumValue(diagnostic, document, projectInfo, valuesRulesManager,
- codeActions);
+ doCodeActionsForUnknownEnumValue(diagnostic, document, projectInfo, codeActions);
}
}
}
@@ -152,24 +150,23 @@ private void doCodeActionsForUnknown(Diagnostic diagnostic, PropertiesModel docu
* @param diagnostic the diagnostic
* @param document the properties model
* @param projectInfo the MicroProfile properties
- * @param valuesRulesManager the ValueRulesManager
* @param codeActions the code actions list to fill
*/
private void doCodeActionsForUnknownEnumValue(Diagnostic diagnostic, PropertiesModel document,
- MicroProfileProjectInfo projectInfo, ValuesRulesManager valuesRulesManager, List codeActions) {
+ MicroProfileProjectInfo projectInfo, List codeActions) {
try {
Node node = document.findNodeAt((diagnostic.getRange().getStart()));
PropertyValue propertyValue = null;
switch (node.getNodeType()) {
- case PROPERTY_VALUE:
- propertyValue = (PropertyValue) document.findNodeAt(diagnostic.getRange().getStart());
- break;
- case PROPERTY_VALUE_EXPRESSION:
- case PROPERTY_VALUE_LITERAL:
- propertyValue = (PropertyValue) document.findNodeAt(diagnostic.getRange().getStart()).getParent();
- break;
- default:
- assert false;
+ case PROPERTY_VALUE:
+ propertyValue = (PropertyValue) document.findNodeAt(diagnostic.getRange().getStart());
+ break;
+ case PROPERTY_VALUE_EXPRESSION:
+ case PROPERTY_VALUE_LITERAL:
+ propertyValue = (PropertyValue) document.findNodeAt(diagnostic.getRange().getStart()).getParent();
+ break;
+ default:
+ assert false;
}
PropertyKey propertyKey = ((Property) propertyValue.getParent()).getKey();
String value = propertyValue.getValue();
@@ -180,8 +177,7 @@ private void doCodeActionsForUnknownEnumValue(Diagnostic diagnostic, PropertiesM
return;
}
- Collection enums = MicroProfilePropertiesUtils.getEnums(metaProperty, projectInfo, document,
- valuesRulesManager);
+ Collection enums = MicroProfilePropertiesUtils.getEnums(metaProperty, projectInfo, document);
if (enums == null || enums.isEmpty()) {
return;
}
@@ -257,7 +253,8 @@ private void doCodeActionForIgnoreUnknownValidation(String propertyName, Diagnos
/**
* Returns a code action for diagnostic
that causes
* item
to be added to
- * microprofile.tools.validation.unknown.excluded
client configuration
+ * microprofile.tools.validation.unknown.excluded
client
+ * configuration
*
* @param item the item to add to the client configuration array
* @param diagnostic the diagnostic for the CodeAction
@@ -268,8 +265,8 @@ private void doCodeActionForIgnoreUnknownValidation(String propertyName, Diagnos
private CodeAction createAddToExcludedCodeAction(String item, Diagnostic diagnostic) {
CodeAction insertCodeAction = new CodeAction("Exclude '" + item + "' from unknown property validation?");
- ConfigurationItemEdit configItemEdit = new ConfigurationItemEdit("microprofile.tools.validation.unknown.excluded",
- ConfigurationItemEditType.add, item);
+ ConfigurationItemEdit configItemEdit = new ConfigurationItemEdit(
+ "microprofile.tools.validation.unknown.excluded", ConfigurationItemEditType.add, item);
Command command = new Command("Add " + item + " to unknown excluded array",
CommandKind.COMMAND_CONFIGURATION_UPDATE, Collections.singletonList(configItemEdit));
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCompletions.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCompletions.java
index cb9500878..a096d45b2 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCompletions.java
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileCompletions.java
@@ -47,7 +47,6 @@
import org.eclipse.lsp4mp.model.PropertyGraph;
import org.eclipse.lsp4mp.model.PropertyKey;
import org.eclipse.lsp4mp.model.PropertyValueExpression;
-import org.eclipse.lsp4mp.model.values.ValuesRulesManager;
import org.eclipse.lsp4mp.settings.MicroProfileCompletionSettings;
import org.eclipse.lsp4mp.settings.MicroProfileFormattingSettings;
import org.eclipse.lsp4mp.snippets.LanguageId;
@@ -73,14 +72,13 @@ class MicroProfileCompletions {
* @param document the properties model document
* @param position the position where completion was triggered
* @param projectInfo the MicroProfile project information
- * @param valuesRulesManager manager for values rules
* @param completionSettings the completion settings
* @param cancelChecker the cancel checker
* @return completion list for the given position
*/
public CompletionList doComplete(PropertiesModel document, Position position, MicroProfileProjectInfo projectInfo,
- ValuesRulesManager valuesRulesManager, MicroProfileCompletionSettings completionSettings,
- MicroProfileFormattingSettings formattingSettings, CancelChecker cancelChecker) {
+ MicroProfileCompletionSettings completionSettings, MicroProfileFormattingSettings formattingSettings,
+ CancelChecker cancelChecker) {
CompletionList list = new CompletionList();
int offset = -1;
Node node = null;
@@ -103,28 +101,28 @@ public CompletionList doComplete(PropertiesModel document, Position position, Mi
case PROPERTY_VALUE_EXPRESSION:
PropertyValueExpression propExpr = (PropertyValueExpression) node;
if (offset == propExpr.getStart() || (propExpr.isClosed() && propExpr.getEnd() == offset)) {
- collectPropertyValueSuggestions(node, document, projectInfo, valuesRulesManager, completionSettings, list);
+ collectPropertyValueSuggestions(node, document, projectInfo, completionSettings, list);
} else {
- collectPropertyValueExpressionSuggestions(node, document, projectInfo, valuesRulesManager, completionSettings, list);
+ collectPropertyValueExpressionSuggestions(node, document, projectInfo, completionSettings, list);
}
break;
case ASSIGN:
// Only collect if on right side of =
if (offset >= node.getEnd()) {
- collectPropertyValueSuggestions(node, document, projectInfo, valuesRulesManager, completionSettings, list);
+ collectPropertyValueSuggestions(node, document, projectInfo, completionSettings, list);
}
break;
case PROPERTY_VALUE:
case PROPERTY_VALUE_LITERAL:
// completion on property value
- collectPropertyValueSuggestions(node, document, projectInfo, valuesRulesManager, completionSettings, list);
+ collectPropertyValueSuggestions(node, document, projectInfo, completionSettings, list);
break;
default:
// completion on property key
- collectPropertyKeySuggestions(offset, node, document, projectInfo, valuesRulesManager, completionSettings,
- formattingSettings, list);
+ collectPropertyKeySuggestions(offset, node, document, projectInfo, completionSettings, formattingSettings,
+ list);
// Collect completion items with snippet
collectSnippetSuggestions(offset, node, document, projectInfo, completionSettings, getSnippetRegistry(),
list);
@@ -139,14 +137,12 @@ public CompletionList doComplete(PropertiesModel document, Position position, Mi
* @param offset the offset where completion was invoked
* @param node the property key node
* @param projectInfo the MicroProfile project information
- * @param valuesRulesManager the values rules manager
* @param completionSettings the completion settings
* @param list the completion list to fill
*/
private static void collectPropertyKeySuggestions(int offset, Node node, PropertiesModel model,
- MicroProfileProjectInfo projectInfo, ValuesRulesManager valuesRulesManager,
- MicroProfileCompletionSettings completionSettings, MicroProfileFormattingSettings formattingSettings,
- CompletionList list) {
+ MicroProfileProjectInfo projectInfo, MicroProfileCompletionSettings completionSettings,
+ MicroProfileFormattingSettings formattingSettings, CompletionList list) {
boolean snippetsSupported = completionSettings.isCompletionSnippetsSupported();
boolean markdownSupported = completionSettings.isDocumentationFormatSupported(MarkupKind.MARKDOWN);
@@ -192,8 +188,7 @@ private static void collectPropertyKeySuggestions(int offset, Node node, Propert
item.setKind(CompletionItemKind.Property);
String defaultValue = property.getDefaultValue();
- Collection enums = MicroProfilePropertiesUtils.getEnums(property, projectInfo, model,
- valuesRulesManager);
+ Collection enums = MicroProfilePropertiesUtils.getEnums(property, projectInfo, model);
StringBuilder insertText = new StringBuilder();
if (profile != null) {
@@ -367,30 +362,29 @@ private static FormattedPropertyResult getPropertyName(String propertyName, bool
* @param list the completion list to fill
*/
private static void collectPropertyValueSuggestions(Node node, PropertiesModel model,
- MicroProfileProjectInfo projectInfo, ValuesRulesManager valuesRulesManager,
- MicroProfileCompletionSettings completionSettings, CompletionList list) {
+ MicroProfileProjectInfo projectInfo, MicroProfileCompletionSettings completionSettings,
+ CompletionList list) {
Property property = null;
switch (node.getNodeType()) {
- case ASSIGN:
- case PROPERTY_VALUE:
- property = (Property) node.getParent();
- break;
- case PROPERTY_VALUE_LITERAL:
- case PROPERTY_VALUE_EXPRESSION:
- property = (Property) node.getParent().getParent();
- break;
- default:
- assert false;
+ case ASSIGN:
+ case PROPERTY_VALUE:
+ property = (Property) node.getParent();
+ break;
+ case PROPERTY_VALUE_LITERAL:
+ case PROPERTY_VALUE_EXPRESSION:
+ property = (Property) node.getParent().getParent();
+ break;
+ default:
+ assert false;
}
String propertyName = property.getPropertyName();
ItemMetadata item = MicroProfilePropertiesUtils.getProperty(propertyName, projectInfo);
if (item != null) {
- Collection enums = MicroProfilePropertiesUtils.getEnums(item, projectInfo, model,
- valuesRulesManager);
+ Collection enums = MicroProfilePropertiesUtils.getEnums(item, projectInfo, model);
if (enums != null && !enums.isEmpty()) {
boolean markdownSupported = completionSettings.isDocumentationFormatSupported(MarkupKind.MARKDOWN);
for (ValueHint e : enums) {
@@ -401,24 +395,27 @@ private static void collectPropertyValueSuggestions(Node node, PropertiesModel m
}
}
- private static void collectPropertyValueExpressionSuggestions(Node node,
- PropertiesModel model, MicroProfileProjectInfo projectInfo, ValuesRulesManager valuesRulesManager,
- MicroProfileCompletionSettings completionSettings, CompletionList list) {
+ private static void collectPropertyValueExpressionSuggestions(Node node, PropertiesModel model,
+ MicroProfileProjectInfo projectInfo, MicroProfileCompletionSettings completionSettings,
+ CompletionList list) {
PropertyGraph graph = new PropertyGraph(node.getOwnerModel());
- // Find properties that won't make a circular dependency and suggest them for completion
+ // Find properties that won't make a circular dependency and suggest them for
+ // completion
String completionPropertyName = ((Property) node.getParent().getParent()).getPropertyKey();
List independentProperties = graph.getIndependentProperties(completionPropertyName);
// Add all independent properties as completion items
for (String independentProperty : independentProperties) {
list.getItems().add(getPropertyCompletionItem(independentProperty, (PropertyValueExpression) node, model));
}
- // Add all properties not referenced in the properties file as completion options
+ // Add all properties not referenced in the properties file as completion
+ // options
for (ItemMetadata candidateCompletion : projectInfo.getProperties()) {
String candidateCompletionName = candidateCompletion.getName();
if (!graph.hasNode(candidateCompletionName)) {
- list.getItems().add(getPropertyCompletionItem(candidateCompletionName, (PropertyValueExpression) node, model));
+ list.getItems()
+ .add(getPropertyCompletionItem(candidateCompletionName, (PropertyValueExpression) node, model));
}
}
}
@@ -470,12 +467,14 @@ private static CompletionItem getValueCompletionItem(ValueHint item, List doDiagnostics(PropertiesModel document, MicroProfileProjectInfo projectInfo,
- ValuesRulesManager valuesRulesManager, MicroProfileValidationSettings validationSettings,
- CancelChecker cancelChecker) {
+ MicroProfileValidationSettings validationSettings, CancelChecker cancelChecker) {
if (validationSettings == null) {
validationSettings = MicroProfileValidationSettings.DEFAULT;
}
List diagnostics = new ArrayList();
if (validationSettings.isEnabled()) {
- MicroProfileValidator validator = new MicroProfileValidator(projectInfo, valuesRulesManager, diagnostics,
- validationSettings);
+ MicroProfileValidator validator = new MicroProfileValidator(projectInfo, diagnostics, validationSettings);
validator.validate(document, cancelChecker);
}
return diagnostics;
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileHover.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileHover.java
index 0fa053f64..7c8ed098e 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileHover.java
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileHover.java
@@ -35,7 +35,6 @@
import org.eclipse.lsp4mp.model.PropertyKey;
import org.eclipse.lsp4mp.model.PropertyValue;
import org.eclipse.lsp4mp.model.PropertyValueExpression;
-import org.eclipse.lsp4mp.model.values.ValuesRulesManager;
import org.eclipse.lsp4mp.settings.MicroProfileHoverSettings;
import org.eclipse.lsp4mp.utils.DocumentationUtils;
import org.eclipse.lsp4mp.utils.MicroProfilePropertiesUtils;
@@ -51,15 +50,14 @@ class MicroProfileHover {
/**
* Returns Hover object for the currently hovered token
*
- * @param document the properties model document
- * @param position the hover position
- * @param projectInfo the MicroProfile project information
- * @param valuesRulesManager manager for values rules
- * @param hoverSettings the hover settings
+ * @param document the properties model document
+ * @param position the hover position
+ * @param projectInfo the MicroProfile project information
+ * @param hoverSettings the hover settings
* @return Hover object for the currently hovered token
*/
public Hover doHover(PropertiesModel document, Position position, MicroProfileProjectInfo projectInfo,
- ValuesRulesManager valuesRulesManager, MicroProfileHoverSettings hoverSettings) {
+ MicroProfileHoverSettings hoverSettings) {
Node node = null;
int offset = -1;
@@ -75,29 +73,29 @@ public Hover doHover(PropertiesModel document, Position position, MicroProfilePr
}
switch (node.getNodeType()) {
- case COMMENTS:
- // no hover documentation
- return null;
- case PROPERTY_VALUE_EXPRESSION:
- return getPropertyValueExpressionHover(node, projectInfo, hoverSettings);
- case PROPERTY_VALUE_LITERAL:
- // no hover documentation
- return getPropertyValueHover(node.getParent(), projectInfo, valuesRulesManager, hoverSettings);
- case PROPERTY_VALUE:
- // no hover documentation
- return getPropertyValueHover(node, projectInfo, valuesRulesManager, hoverSettings);
- case PROPERTY_KEY:
- PropertyKey key = (PropertyKey) node;
- if (key.isBeforeProfile(offset)) {
- // hover documentation on profile
- return getProfileHover(key, hoverSettings);
- } else {
- // hover documentation on property key
- return getPropertyKeyHover(key, projectInfo, hoverSettings);
- }
+ case COMMENTS:
+ // no hover documentation
+ return null;
+ case PROPERTY_VALUE_EXPRESSION:
+ return getPropertyValueExpressionHover(node, projectInfo, hoverSettings);
+ case PROPERTY_VALUE_LITERAL:
+ // no hover documentation
+ return getPropertyValueHover(node.getParent(), projectInfo, hoverSettings);
+ case PROPERTY_VALUE:
+ // no hover documentation
+ return getPropertyValueHover(node, projectInfo, hoverSettings);
+ case PROPERTY_KEY:
+ PropertyKey key = (PropertyKey) node;
+ if (key.isBeforeProfile(offset)) {
+ // hover documentation on profile
+ return getProfileHover(key, hoverSettings);
+ } else {
+ // hover documentation on property key
+ return getPropertyKeyHover(key, projectInfo, hoverSettings);
+ }
- default:
- return null;
+ default:
+ return null;
}
}
@@ -182,7 +180,7 @@ private static Hover getPropertyKeyHover(PropertyKey key, MicroProfileProjectInf
* @return the documentation hover for property key represented by token
*/
private static Hover getPropertyValueHover(Node node, MicroProfileProjectInfo projectInfo,
- ValuesRulesManager valuesRulesManager, MicroProfileHoverSettings hoverSettings) {
+ MicroProfileHoverSettings hoverSettings) {
PropertyValue value = ((PropertyValue) node);
boolean markdownSupported = hoverSettings.isContentFormatSupported(MarkupKind.MARKDOWN);
// retrieve MicroProfile property from the project information
@@ -192,7 +190,7 @@ private static Hover getPropertyValueHover(Node node, MicroProfileProjectInfo pr
}
String propertyName = ((Property) (value.getParent())).getPropertyName();
ItemMetadata item = MicroProfilePropertiesUtils.getProperty(propertyName, projectInfo);
- ValueHint enumItem = getValueHint(propertyValue, item, projectInfo, valuesRulesManager, value.getOwnerModel());
+ ValueHint enumItem = getValueHint(propertyValue, item, projectInfo, value.getOwnerModel());
if (enumItem != null) {
// MicroProfile property enumeration item, found, display its documentation as
// hover
@@ -273,7 +271,7 @@ private static Range getProfileHoverRange(PropertyKey key) {
}
private static ValueHint getValueHint(String propertyValue, ItemMetadata metadata,
- ConfigurationMetadata configuration, ValuesRulesManager valuesRulesManager, PropertiesModel model) {
+ ConfigurationMetadata configuration, PropertiesModel model) {
if (metadata == null) {
return null;
}
@@ -284,6 +282,6 @@ private static ValueHint getValueHint(String propertyValue, ItemMetadata metadat
return valueHint;
}
}
- return valuesRulesManager.getValueHint(propertyValue, metadata, model);
+ return null;
}
}
\ No newline at end of file
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileLanguageService.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileLanguageService.java
index 0e2733c4d..30c500fad 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileLanguageService.java
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileLanguageService.java
@@ -36,7 +36,6 @@
import org.eclipse.lsp4mp.extensions.ExtendedMicroProfileProjectInfo;
import org.eclipse.lsp4mp.ls.api.MicroProfilePropertyDefinitionProvider;
import org.eclipse.lsp4mp.model.PropertiesModel;
-import org.eclipse.lsp4mp.model.values.ValuesRulesManager;
import org.eclipse.lsp4mp.settings.MicroProfileCommandCapabilities;
import org.eclipse.lsp4mp.settings.MicroProfileCompletionSettings;
import org.eclipse.lsp4mp.settings.MicroProfileFormattingSettings;
@@ -59,13 +58,8 @@ public class MicroProfileLanguageService {
private final MicroProfileFormatter formatter;
private final MicroProfileCodeActions codeActions;
private final MicroProfileDocumentHighlight documentHighlight;
- private final ValuesRulesManager valuesRulesManager;
public MicroProfileLanguageService() {
- this(new ValuesRulesManager(true));
- }
-
- public MicroProfileLanguageService(ValuesRulesManager valuesRulesManger) {
this.completions = new MicroProfileCompletions();
this.symbolsProvider = new MicroProfileSymbolsProvider();
this.hover = new MicroProfileHover();
@@ -74,7 +68,6 @@ public MicroProfileLanguageService(ValuesRulesManager valuesRulesManger) {
this.formatter = new MicroProfileFormatter();
this.codeActions = new MicroProfileCodeActions();
this.documentHighlight = new MicroProfileDocumentHighlight();
- this.valuesRulesManager = valuesRulesManger;
}
/**
@@ -91,8 +84,8 @@ public CompletionList doComplete(PropertiesModel document, Position position, Mi
MicroProfileCompletionSettings completionSettings, MicroProfileFormattingSettings formattingSettings,
CancelChecker cancelChecker) {
updateProperties(projectInfo, document);
- return completions.doComplete(document, position, projectInfo, getValuesRulesManager(), completionSettings,
- formattingSettings, cancelChecker);
+ return completions.doComplete(document, position, projectInfo, completionSettings, formattingSettings,
+ cancelChecker);
}
/**
@@ -107,7 +100,7 @@ public CompletionList doComplete(PropertiesModel document, Position position, Mi
public Hover doHover(PropertiesModel document, Position position, MicroProfileProjectInfo projectInfo,
MicroProfileHoverSettings hoverSettings) {
updateProperties(projectInfo, document);
- return hover.doHover(document, position, projectInfo, getValuesRulesManager(), hoverSettings);
+ return hover.doHover(document, position, projectInfo, hoverSettings);
}
/**
@@ -151,7 +144,8 @@ public CompletableFuture, List extends Locatio
PropertiesModel document, Position position, MicroProfileProjectInfo projectInfo,
MicroProfilePropertyDefinitionProvider provider, boolean definitionLinkSupport) {
updateProperties(projectInfo, document);
- CompletableFuture> definitionLocationLinks = definition.findDefinition(document, position, projectInfo, provider);
+ CompletableFuture> definitionLocationLinks = definition.findDefinition(document, position,
+ projectInfo, provider);
if (definitionLinkSupport) {
return definitionLocationLinks.thenApply((List resolvedLinks) -> {
return Either.forRight(resolvedLinks);
@@ -205,8 +199,7 @@ public List extends TextEdit> doRangeFormat(PropertiesModel document, Range ra
public List doDiagnostics(PropertiesModel document, MicroProfileProjectInfo projectInfo,
MicroProfileValidationSettings validationSettings, CancelChecker cancelChecker) {
updateProperties(projectInfo, document);
- return diagnostics.doDiagnostics(document, projectInfo, getValuesRulesManager(), validationSettings,
- cancelChecker);
+ return diagnostics.doDiagnostics(document, projectInfo, validationSettings, cancelChecker);
}
/**
@@ -226,23 +219,14 @@ public List doCodeActions(CodeActionContext context, Range range, Pr
MicroProfileProjectInfo projectInfo, MicroProfileFormattingSettings formattingSettings,
MicroProfileCommandCapabilities commandCapabilities) {
updateProperties(projectInfo, document);
- return codeActions.doCodeActions(context, range, document, projectInfo, getValuesRulesManager(),
- formattingSettings, commandCapabilities);
+ return codeActions.doCodeActions(context, range, document, projectInfo, formattingSettings,
+ commandCapabilities);
}
public List extends DocumentHighlight> findDocumentHighlight(PropertiesModel document, Position position) {
return documentHighlight.findDocumentHighlight(document, position);
}
- /**
- * Returns the manager for values rules.
- *
- * @return the manager for values rules.
- */
- private ValuesRulesManager getValuesRulesManager() {
- return valuesRulesManager;
- }
-
private void updateProperties(MicroProfileProjectInfo projectInfo, PropertiesModel document) {
if (projectInfo instanceof ExtendedMicroProfileProjectInfo) {
((ExtendedMicroProfileProjectInfo) projectInfo).updateCustomProperties(document);
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileValidator.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileValidator.java
index d38f354fe..dc71d4108 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileValidator.java
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/MicroProfileValidator.java
@@ -37,7 +37,6 @@
import org.eclipse.lsp4mp.model.PropertiesModel;
import org.eclipse.lsp4mp.model.Property;
import org.eclipse.lsp4mp.model.PropertyValueExpression;
-import org.eclipse.lsp4mp.model.values.ValuesRulesManager;
import org.eclipse.lsp4mp.settings.MicroProfileValidationSettings;
import org.eclipse.lsp4mp.utils.MicroProfilePropertiesUtils;
import org.eclipse.lsp4mp.utils.PositionUtils;
@@ -55,17 +54,16 @@ class MicroProfileValidator {
private static final String MICROPROFILE_DIAGNOSTIC_SOURCE = "microprofile";
private final MicroProfileProjectInfo projectInfo;
- private final ValuesRulesManager valuesRulesManager;
+
private final List diagnostics;
private final MicroProfileValidationSettings validationSettings;
private final Map> existingProperties;
private Set allProperties;
- public MicroProfileValidator(MicroProfileProjectInfo projectInfo, ValuesRulesManager valuesRulesManager,
- List diagnostics, MicroProfileValidationSettings validationSettings) {
+ public MicroProfileValidator(MicroProfileProjectInfo projectInfo, List diagnostics,
+ MicroProfileValidationSettings validationSettings) {
this.projectInfo = projectInfo;
- this.valuesRulesManager = valuesRulesManager;
this.diagnostics = diagnostics;
this.validationSettings = validationSettings;
this.existingProperties = new HashMap>();
@@ -215,7 +213,8 @@ private void validatePropertyValueExpressions(Property property) {
}
String refdProp = propValExpr.getReferencedPropertyName();
if (!allProperties.contains(refdProp)) {
- Range range = PositionUtils.createAdjustedRange(propValExpr, 2, propValExpr.isClosed()? -1 : 0);
+ Range range = PositionUtils.createAdjustedRange(propValExpr, 2,
+ propValExpr.isClosed() ? -1 : 0);
if (range != null) {
addDiagnostic("Unknown referenced property '" + refdProp + "'", range, expressionSeverity,
ValidationType.expression.name());
@@ -240,8 +239,7 @@ private void validatePropertyValueExpressions(Property property) {
*/
private String getErrorIfInvalidEnum(ItemMetadata metadata, ConfigurationMetadata configuration,
PropertiesModel model, String value) {
- if (!configuration.isValidEnum(metadata, value)
- || (valuesRulesManager != null && !valuesRulesManager.isValidEnum(metadata, model, value))) {
+ if (!configuration.isValidEnum(metadata, value)) {
return "Invalid enum value: '" + value + "' is invalid for type " + metadata.getType();
}
return null;
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/utils/MicroProfilePropertiesUtils.java b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/utils/MicroProfilePropertiesUtils.java
index 8ad5fc178..df55e5854 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/utils/MicroProfilePropertiesUtils.java
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/utils/MicroProfilePropertiesUtils.java
@@ -23,7 +23,6 @@
import org.eclipse.lsp4mp.commons.metadata.ItemMetadata;
import org.eclipse.lsp4mp.ls.commons.SnippetsBuilder;
import org.eclipse.lsp4mp.model.PropertiesModel;
-import org.eclipse.lsp4mp.model.values.ValuesRulesManager;
import org.eclipse.lsp4mp.services.QuarkusModel;
/**
@@ -87,14 +86,13 @@ public int getParameterCount() {
/**
* Returns the enums values according the property type.
*
- * @param property the property
- * @param projectInfo
- * @param valuesRulesManager
- * @param model
+ * @param property the property.
+ * @param configuration the configuration.
+ * @param model the properties model.
* @return the enums values according the property type
*/
public static Collection getEnums(ItemMetadata property, ConfigurationMetadata configuration,
- PropertiesModel model, ValuesRulesManager valuesRulesManager) {
+ PropertiesModel model) {
ItemHint hint = configuration.getHint(property);
if (hint != null) {
return hint.getValues();
@@ -102,9 +100,6 @@ public static Collection getEnums(ItemMetadata property, Configuratio
if (property.isBooleanType()) {
return QuarkusModel.BOOLEAN_ENUMS.getValues();
}
- if (valuesRulesManager != null) {
- return valuesRulesManager.getValues(property, model);
- }
return null;
}
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/resources/org/eclipse/lsp4mp/model/values/quarkus-values-rules.json b/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/resources/org/eclipse/lsp4mp/model/values/quarkus-values-rules.json
deleted file mode 100644
index 0ab338395..000000000
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/main/resources/org/eclipse/lsp4mp/model/values/quarkus-values-rules.json
+++ /dev/null
@@ -1,78 +0,0 @@
-
-{
- "definitions": [
- {
- "id": "#logginglevel",
- "values": [
- {
- "value": "OFF",
- "description": "OFF is a special level that can be used to turn off logging.\nThis level is initialized to `Integer.MAX_VALUE`."
- },
- {
- "value": "SEVERE",
- "description": "SEVERE is a message level indicating a serious failure.\n\nIn general SEVERE messages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators. This level is initialized to `1000`."
- },
- {
- "value": "WARNING",
- "description": "WARNING is a message level indicating a potential problem.\n\nIn general WARNING messages should describe events that will be of interest to end users or system managers, or which indicate potential problems. This level is initialized to `900`."
- },
- {
- "value": "INFO",
- "description": "INFO is a message level for informational messages.\n\nTypically INFO messages will be written to the console or its equivalent. So the INFO level should only be used for reasonably significant messages that will make sense to end users and system administrators. This level is initialized to `800`."
- },
- {
- "value": "CONFIG",
- "description": "CONFIG is a message level for static configuration messages.\n\nCONFIG messages are intended to provide a variety of static configuration information, to assist in debugging problems that may be associated with particular configurations. For example, CONFIG message might include the CPU type, the graphics depth, the GUI look-and-feel, etc. This level is initialized to `700`."
- },
- {
- "value": "FINE",
- "description": "FINE is a message level providing tracing information.\n\nAll of FINE, FINER, and FINEST are intended for relatively detailed tracing. The exact meaning of the three levels will vary between subsystems, but in general, FINEST should be used for the most voluminous detailed output, FINER for somewhat less detailed output, and FINE for the lowest volume (and most important) messages.\n\nIn general the FINE level should be used for information that will be broadly interesting to developers who do not have a specialized interest in the specific subsystem.\n\nFINE messages might include things like minor (recoverable) failures. Issues indicating potential performance problems are also worth logging as FINE. This level is initialized to `500`."
- },
- {
- "value": "FINER",
- "description": "FINER indicates a fairly detailed tracing message. By default logging calls for entering, returning, or throwing an exception are traced at this level. This level is initialized to `400`."
- },
- {
- "value": "FINEST",
- "description": "FINEST indicates a highly detailed tracing message. This level is initialized to `300`."
- },
- {
- "value": "ALL",
- "description": "ALL indicates that all messages should be logged. This level is initialized to `Integer.MIN_VALUE`."
- }
- ]
- }
- ],
- "rules": [
- {
- "matcher": {
- "types": [
- "java.util.logging.Level",
- "java.util.Optional"
- ]
- },
- "valuesRef": [
- "#logginglevel"
- ]
- },
- {
- "matcher": {
- "names": [
- "quarkus.log.category.{*}.level",
- "quarkus.log.category.{*}.min-level"
- ]
- },
- "valuesRef": [
- "#logginglevel"
- ],
- "values": [
- {
- "value": "DEBUG"
- },
- {
- "value": "ERROR"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/microprofile.ls/org.eclipse.lsp4mp.ls/src/test/resources/org/eclipse/lsp4mp/services/all-quarkus-properties.json b/microprofile.ls/org.eclipse.lsp4mp.ls/src/test/resources/org/eclipse/lsp4mp/services/all-quarkus-properties.json
index a74fbc0e6..af091bcbd 100644
--- a/microprofile.ls/org.eclipse.lsp4mp.ls/src/test/resources/org/eclipse/lsp4mp/services/all-quarkus-properties.json
+++ b/microprofile.ls/org.eclipse.lsp4mp.ls/src/test/resources/org/eclipse/lsp4mp/services/all-quarkus-properties.json
@@ -15907,6 +15907,48 @@
],
"name": "io.smallrye.jwt.KeyFormat",
"sourceType": "io.smallrye.jwt.KeyFormat"
- }
+ },
+ {
+ "name": "java.util.logging.Level",
+ "sourceType": "java.util.logging.Level",
+ "values": [
+ {
+ "value": "OFF",
+ "description": "`OFF` is a special level that can be used to turn off logging.\nThis level is initialized to `Integer.MAX_VALUE`."
+ },
+ {
+ "value": "SEVERE",
+ "description": "`SEVERE` is a message level indicating a serious failure.\n\nIn general SEVERE messages should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators. This level is initialized to `1000`."
+ },
+ {
+ "value": "WARNING",
+ "description": "`WARNING` is a message level indicating a potential problem.\n\nIn general WARNING messages should describe events that will be of interest to end users or system managers, or which indicate potential problems. This level is initialized to `900`."
+ },
+ {
+ "value": "INFO",
+ "description": "`INFO` is a message level for informational messages.\n\nTypically INFO messages will be written to the console or its equivalent. So the INFO level should only be used for reasonably significant messages that will make sense to end users and system administrators. This level is initialized to `800`."
+ },
+ {
+ "value": "CONFIG",
+ "description": "`CONFIG` is a message level for static configuration messages.\n\nCONFIG messages are intended to provide a variety of static configuration information, to assist in debugging problems that may be associated with particular configurations. For example, CONFIG message might include the CPU type, the graphics depth, the GUI look-and-feel, etc. This level is initialized to `700`."
+ },
+ {
+ "value": "FINE",
+ "description": "`FINE` is a message level providing tracing information.\n\nAll of FINE, FINER, and FINEST are intended for relatively detailed tracing. The exact meaning of the three levels will vary between subsystems, but in general, FINEST should be used for the most voluminous detailed output, FINER for somewhat less detailed output, and FINE for the lowest volume (and most important) messages.\n\nIn general the FINE level should be used for information that will be broadly interesting to developers who do not have a specialized interest in the specific subsystem.\n\nFINE messages might include things like minor (recoverable) failures. Issues indicating potential performance problems are also worth logging as FINE. This level is initialized to `500`."
+ },
+ {
+ "value": "FINER",
+ "description": "`FINER` indicates a fairly detailed tracing message. By default logging calls for entering, returning, or throwing an exception are traced at this level. This level is initialized to `400`."
+ },
+ {
+ "value": "FINEST",
+ "description": "`FINEST` indicates a highly detailed tracing message. This level is initialized to `300`."
+ },
+ {
+ "value": "ALL",
+ "description": "`ALL` indicates that all messages should be logged. This level is initialized to `Integer.MIN_VALUE`."
+ }
+ ]
+ }
]
}
\ No newline at end of file