Search in sources :

Example 1 with AnnotationHierarchyAwareLookup

use of org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup in project sts4 by spring-projects.

the class BootJavaLanguageServerComponents method createHoverHandler.

protected BootJavaHoverProvider createHoverHandler(JavaProjectFinder javaProjectFinder, RunningAppProvider runningAppProvider) {
    AnnotationHierarchyAwareLookup<HoverProvider> providers = new AnnotationHierarchyAwareLookup<>();
    providers.put(org.springframework.ide.vscode.boot.java.value.Constants.SPRING_VALUE, new ValueHoverProvider());
    providers.put(Annotations.SPRING_REQUEST_MAPPING, new RequestMappingHoverProvider());
    providers.put(Annotations.SPRING_GET_MAPPING, new RequestMappingHoverProvider());
    providers.put(Annotations.SPRING_POST_MAPPING, new RequestMappingHoverProvider());
    providers.put(Annotations.SPRING_PUT_MAPPING, new RequestMappingHoverProvider());
    providers.put(Annotations.SPRING_DELETE_MAPPING, new RequestMappingHoverProvider());
    providers.put(Annotations.SPRING_PATCH_MAPPING, new RequestMappingHoverProvider());
    providers.put(Annotations.PROFILE, new ActiveProfilesProvider());
    providers.put(Annotations.AUTOWIRED, new AutowiredHoverProvider(this));
    providers.put(Annotations.COMPONENT, new ComponentInjectionsHoverProvider(this));
    providers.put(Annotations.BEAN, new BeanInjectedIntoHoverProvider(this));
    providers.put(Annotations.CONDITIONAL, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_BEAN, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_MISSING_BEAN, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_PROPERTY, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_RESOURCE, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_CLASS, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_MISSING_CLASS, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_CLOUD_PLATFORM, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_WEB_APPLICATION, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_NOT_WEB_APPLICATION, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_ENABLED_INFO_CONTRIBUTOR, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_ENABLED_RESOURCE_CHAIN, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_ENABLED_ENDPOINT, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_ENABLED_HEALTH_INDICATOR, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_EXPRESSION, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_JAVA, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_JNDI, new ConditionalsLiveHoverProvider());
    providers.put(Annotations.CONDITIONAL_ON_SINGLE_CANDIDATE, new ConditionalsLiveHoverProvider());
    return new BootJavaHoverProvider(this, javaProjectFinder, providers, runningAppProvider);
}
Also used : ConditionalsLiveHoverProvider(org.springframework.ide.vscode.boot.java.conditionals.ConditionalsLiveHoverProvider) ConditionalsLiveHoverProvider(org.springframework.ide.vscode.boot.java.conditionals.ConditionalsLiveHoverProvider) BeanInjectedIntoHoverProvider(org.springframework.ide.vscode.boot.java.livehover.BeanInjectedIntoHoverProvider) BootJavaHoverProvider(org.springframework.ide.vscode.boot.java.handlers.BootJavaHoverProvider) AutowiredHoverProvider(org.springframework.ide.vscode.boot.java.autowired.AutowiredHoverProvider) HoverProvider(org.springframework.ide.vscode.boot.java.handlers.HoverProvider) ValueHoverProvider(org.springframework.ide.vscode.boot.java.value.ValueHoverProvider) ComponentInjectionsHoverProvider(org.springframework.ide.vscode.boot.java.livehover.ComponentInjectionsHoverProvider) RequestMappingHoverProvider(org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingHoverProvider) ValueHoverProvider(org.springframework.ide.vscode.boot.java.value.ValueHoverProvider) BeanInjectedIntoHoverProvider(org.springframework.ide.vscode.boot.java.livehover.BeanInjectedIntoHoverProvider) AnnotationHierarchyAwareLookup(org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup) BootJavaHoverProvider(org.springframework.ide.vscode.boot.java.handlers.BootJavaHoverProvider) ComponentInjectionsHoverProvider(org.springframework.ide.vscode.boot.java.livehover.ComponentInjectionsHoverProvider) RequestMappingHoverProvider(org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingHoverProvider) ActiveProfilesProvider(org.springframework.ide.vscode.boot.java.livehover.ActiveProfilesProvider) AutowiredHoverProvider(org.springframework.ide.vscode.boot.java.autowired.AutowiredHoverProvider)

Example 2 with AnnotationHierarchyAwareLookup

use of org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup in project sts4 by spring-projects.

the class BootJavaLanguageServerComponents method createAnnotationIndexer.

protected SpringIndexer createAnnotationIndexer(SimpleLanguageServer server, BootLanguageServerParams params) {
    AnnotationHierarchyAwareLookup<SymbolProvider> providers = new AnnotationHierarchyAwareLookup<>();
    providers.put(Annotations.SPRING_REQUEST_MAPPING, new RequestMappingSymbolProvider());
    providers.put(Annotations.SPRING_GET_MAPPING, new RequestMappingSymbolProvider());
    providers.put(Annotations.SPRING_POST_MAPPING, new RequestMappingSymbolProvider());
    providers.put(Annotations.SPRING_PUT_MAPPING, new RequestMappingSymbolProvider());
    providers.put(Annotations.SPRING_DELETE_MAPPING, new RequestMappingSymbolProvider());
    providers.put(Annotations.SPRING_PATCH_MAPPING, new RequestMappingSymbolProvider());
    providers.put(Annotations.BEAN, new BeansSymbolProvider());
    providers.put(Annotations.COMPONENT, new ComponentSymbolProvider());
    providers.put(Annotations.REPOSITORY, new DataRepositorySymbolProvider());
    providers.put("", new WebfluxRouterSymbolProvider());
    return new SpringIndexer(server, params, providers);
}
Also used : WebfluxRouterSymbolProvider(org.springframework.ide.vscode.boot.java.requestmapping.WebfluxRouterSymbolProvider) SymbolProvider(org.springframework.ide.vscode.boot.java.handlers.SymbolProvider) LiveAppURLSymbolProvider(org.springframework.ide.vscode.boot.java.requestmapping.LiveAppURLSymbolProvider) WebfluxRouterSymbolProvider(org.springframework.ide.vscode.boot.java.requestmapping.WebfluxRouterSymbolProvider) BeansSymbolProvider(org.springframework.ide.vscode.boot.java.beans.BeansSymbolProvider) RequestMappingSymbolProvider(org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingSymbolProvider) ComponentSymbolProvider(org.springframework.ide.vscode.boot.java.beans.ComponentSymbolProvider) DataRepositorySymbolProvider(org.springframework.ide.vscode.boot.java.data.DataRepositorySymbolProvider) RequestMappingSymbolProvider(org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingSymbolProvider) AnnotationHierarchyAwareLookup(org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup) ComponentSymbolProvider(org.springframework.ide.vscode.boot.java.beans.ComponentSymbolProvider) SpringIndexer(org.springframework.ide.vscode.boot.java.utils.SpringIndexer) DataRepositorySymbolProvider(org.springframework.ide.vscode.boot.java.data.DataRepositorySymbolProvider) BeansSymbolProvider(org.springframework.ide.vscode.boot.java.beans.BeansSymbolProvider)

Aggregations

AnnotationHierarchyAwareLookup (org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchyAwareLookup)2 AutowiredHoverProvider (org.springframework.ide.vscode.boot.java.autowired.AutowiredHoverProvider)1 BeansSymbolProvider (org.springframework.ide.vscode.boot.java.beans.BeansSymbolProvider)1 ComponentSymbolProvider (org.springframework.ide.vscode.boot.java.beans.ComponentSymbolProvider)1 ConditionalsLiveHoverProvider (org.springframework.ide.vscode.boot.java.conditionals.ConditionalsLiveHoverProvider)1 DataRepositorySymbolProvider (org.springframework.ide.vscode.boot.java.data.DataRepositorySymbolProvider)1 BootJavaHoverProvider (org.springframework.ide.vscode.boot.java.handlers.BootJavaHoverProvider)1 HoverProvider (org.springframework.ide.vscode.boot.java.handlers.HoverProvider)1 SymbolProvider (org.springframework.ide.vscode.boot.java.handlers.SymbolProvider)1 ActiveProfilesProvider (org.springframework.ide.vscode.boot.java.livehover.ActiveProfilesProvider)1 BeanInjectedIntoHoverProvider (org.springframework.ide.vscode.boot.java.livehover.BeanInjectedIntoHoverProvider)1 ComponentInjectionsHoverProvider (org.springframework.ide.vscode.boot.java.livehover.ComponentInjectionsHoverProvider)1 LiveAppURLSymbolProvider (org.springframework.ide.vscode.boot.java.requestmapping.LiveAppURLSymbolProvider)1 RequestMappingHoverProvider (org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingHoverProvider)1 RequestMappingSymbolProvider (org.springframework.ide.vscode.boot.java.requestmapping.RequestMappingSymbolProvider)1 WebfluxRouterSymbolProvider (org.springframework.ide.vscode.boot.java.requestmapping.WebfluxRouterSymbolProvider)1 SpringIndexer (org.springframework.ide.vscode.boot.java.utils.SpringIndexer)1 ValueHoverProvider (org.springframework.ide.vscode.boot.java.value.ValueHoverProvider)1