forked from eclipse-lsp4mp/lsp4mp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Wrong/Missing Log Levels in application.properties
See redhat-developer/vscode-quarkus#315 Signed-off-by: azerr <[email protected]>
- Loading branch information
1 parent
ec0bea2
commit d9813bb
Showing
71 changed files
with
1,252 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
....eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/commons/metadata/ValueHint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 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.commons.metadata; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* A hint for a value. | ||
* | ||
* @see https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#value-hint | ||
*/ | ||
public class ValueHint { | ||
|
||
private String value; | ||
|
||
private String description; | ||
|
||
private String sourceType; | ||
|
||
/** | ||
* Returns the value. | ||
* | ||
* @return the value. | ||
*/ | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
/** | ||
* Returns the converted value by using the given converter. | ||
* | ||
* @param converterKind the converter | ||
* @return the converted value by using the given converter. | ||
*/ | ||
public String getValue(ConverterKind converterKind) { | ||
return ConverterKind.convert(getValue(), converterKind); | ||
} | ||
|
||
/** | ||
* Returns the preferred value according the given converters. | ||
* | ||
* @param converterKinds supported converters and null otherwise. | ||
* | ||
* @return the preferred value according the given converters. | ||
*/ | ||
public String getPreferredValue(List<ConverterKind> converterKinds) { | ||
ConverterKind preferredConverter = converterKinds != null && !converterKinds.isEmpty() ? converterKinds.get(0) | ||
: null; | ||
return getValue(preferredConverter); | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public String getSourceType() { | ||
return sourceType; | ||
} | ||
|
||
public void setSourceType(String sourceType) { | ||
this.sourceType = sourceType; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((description == null) ? 0 : description.hashCode()); | ||
result = prime * result + ((sourceType == null) ? 0 : sourceType.hashCode()); | ||
result = prime * result + ((value == null) ? 0 : value.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
ValueHint other = (ValueHint) obj; | ||
if (description == null) { | ||
if (other.description != null) | ||
return false; | ||
} else if (!description.equals(other.description)) | ||
return false; | ||
if (sourceType == null) { | ||
if (other.sourceType != null) | ||
return false; | ||
} else if (!sourceType.equals(other.sourceType)) | ||
return false; | ||
if (value == null) { | ||
if (other.value != null) | ||
return false; | ||
} else if (!value.equals(other.value)) | ||
return false; | ||
return true; | ||
} | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
...ipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/commons/metadata/ValueProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 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.commons.metadata; | ||
|
||
/** | ||
* A provider for a value. | ||
* | ||
* @see https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#value-providers | ||
* | ||
*/ | ||
public class ValueProvider { | ||
|
||
public static enum ValueProviderDefaultName { | ||
|
||
HANDLE_AS("handle-as"); | ||
|
||
private final String name; | ||
|
||
private ValueProviderDefaultName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
} | ||
|
||
private String name; | ||
|
||
private ValueProviderParameter parameters; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public ValueProviderParameter getParameters() { | ||
return parameters; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public void setParameters(ValueProviderParameter parameters) { | ||
this.parameters = parameters; | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...mp.jdt.core/src/main/java/org/eclipse/lsp4mp/commons/metadata/ValueProviderParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 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.commons.metadata; | ||
|
||
/** | ||
* A parameter value provider. | ||
* | ||
* @see https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#value-providers | ||
* | ||
*/ | ||
public class ValueProviderParameter { | ||
|
||
private String target; | ||
|
||
public String getTarget() { | ||
return target; | ||
} | ||
|
||
public void setTarget(String target) { | ||
this.target = target; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.