spring-projects / spring-projects/spring-tools

Enable do ctrl click at an advice's pointcut method to open a Poincut class in the respective @Pointcut method

Open
#1,328 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

for: eclipse for: vscode type: enhancement
Dominant language
Java
Stars
983
Forks
240
Avg merge
7d 1h
Merged PRs (30d)
7

Description

Hello

For STS 4.23.1

Having a pointcut class as follows:

package com.manuel.jordan.aop.pointcut;

...

public class CienciaPointcut {

	@Pointcut("execution(* com.manuel.jordan.service.CienciaService.count(..))")
	public void cienciaServiceCount() {

	}

	@Pointcut("execution(* com.manuel.jordan.service.CienciaService.find*(..))")
	public void cienciaServiceFinds() {

	}

}

Observe the class and methods are public

If in an Aspect class exists in other package as follows:

package com.manuel.jordan.aop.aspect;

...

@Aspect
@Component
@Profile("aop-before")
class LoggingCienciaAspectBefore {

       @Before("com.manuel.jordan.aop.pointcut.CienciaPointcut.cienciaServiceFinds()")
	void beforeAdviceForFinds(JoinPoint jp) {
           ...
	}

}

Through the IDE I am able to do ctrl + click in the class name at:

  • Before("com.manuel.jordan.aop.pointcut.CienciaPointcut.cienciaServiceFinds()")

It with the purpose to open the CienciaPointcut class.
Until here It works fine.

But is not possible do ctrl + click in the method name at:

  • Before("com.manuel.jordan.aop.pointcut.CienciaPointcut.cienciaServiceFinds()")

It with the purpose to open the CienciaPointcut class but in the cienciaServiceFinds() method

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in STS 4.23.1 using the provided public pointcut class and @Before advice example. No repository files or tests are identified in the issue, so locate the existing navigation handling for pointcut class names first; done means Ctrl-clicking the referenced method opens the corresponding @Pointcut method.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.