简体   繁体   中英

Open specific class rather than bean definition when clicked ref definition of spring-context.xml

My spring-context.xml

<bean id="aBean" class="com.example.A">
    <constructor-arg ref="bBean"/>
</bean>

<bean id="bBean" class="com.example.B">
    <!-- Properties -->
</bean>

Lets say I have two beans on spring-context.xml file. Here bBean is injected to aBean using constructor . I'm using well known ref attribute to inject the bBean .

When I Ctrl + Click on bBean my mouse mouse cursor moves to bean definition of of bBean on XML.

How can I open the class com.example.B when I click bBean of <constructor-arg ref="bBean"/>. Any shortcut key that I'm unaware of.

Using IntelliJ IDEA 2016.1.2 Ultimate

After searching for a while I found the answer

You can click Ctrl + Shift + B to directly to class when you click the bean defined by ref

Action name is Type Declaration

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM