use of com.github.cameltooling.idea.util.CamelIdeaUtils in project camel-idea-plugin by camel-tooling.
the class CamelEndpointNameCompletionExtension method isValid.
@Override
public boolean isValid(@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull String query) {
if (query.contains("?")) {
// do not add completions when inside endpoint query params
return false;
}
PsiElement element = parameters.getPosition();
CamelIdeaUtils service = CamelIdeaUtils.getService();
return service.isPlaceForEndpointUri(element) && service.isProducerEndpoint(element);
}
Aggregations