Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openrewrite.quarkus.search;
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.jspecify.annotations.Nullable;
import org.openrewrite.*;
import org.openrewrite.internal.StringUtils;
import org.openrewrite.marker.SearchResult;
import org.openrewrite.properties.PropertiesIsoVisitor;
import org.openrewrite.properties.PropertiesVisitor;
import org.openrewrite.properties.tree.Properties;
import org.openrewrite.quarkus.QuarkusExecutionContextView;
import org.openrewrite.yaml.YamlIsoVisitor;
import org.openrewrite.yaml.tree.Yaml;
import org.openrewrite.yaml.tree.YamlKey;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Pattern;
@Value
@EqualsAndHashCode(callSuper = false)
public class FindQuarkusProperties extends Recipe {
@Override
public String getDisplayName() {
return "Find Quarkus property";
}
@Override
public String getDescription() {
return "Finds occurrences of a Quarkus property key.";
}
@Option(displayName = "Property key",
description = "The property key to look for.",
example = "quarkus.http.port")
String propertyKey;
@Option(displayName = "Profile",
description = "The profile where the property is defined. If not specified, the property will be searched on all profiles.",
required = false,
example = "dev")
@Nullable
String profile;
@Option(displayName = "Search on all Profiles",
description = "If set, the property will be searched on all available profiles. Defaults to `true` if the profile is not defined.",
required = false,
example = "false")
@Nullable
Boolean searchAllProfiles;
@Override
public Validated