Skip to content

Conversation

CodeDrivenMitch
Copy link
Member

Remove the link between creators and parent handlers since they were odd to some customers.
References now show the method signature (and sometimes line number).

…odd to some customers. References now show the method signature (and sometimes line number).
@CodeDrivenMitch CodeDrivenMitch added this to the 0.8.0 milestone Nov 29, 2022
@CodeDrivenMitch CodeDrivenMitch self-assigned this Nov 29, 2022
@CodeDrivenMitch CodeDrivenMitch requested review from a team, gklijs and smcvb and removed request for a team November 29, 2022 15:59
Copy link
Member

@smcvb smcvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bunch of questions to better understand what's happening here. Not blocking right now, as I am just not familiar enough with it at this stage.

ENTITY_ID("org.axonframework.modelling.command.EntityId"),
PROCESSING_GROUP("org.axonframework.config.ProcessingGroup")
PROCESSING_GROUP("org.axonframework.config.ProcessingGroup"),
SAGA("org.axonframework.config.ProcessingGroup")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this refer to the sage annotation instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Furthermore, what does this change have to do with the PR's intent of removing the link between creators and parent handlers?

override val element: PsiElement,
override val payload: String,
override val parentHandler: Handler?,
val isDeadline: Boolean = false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR now seems to implement more than just removal of linked parent handlers to creators. Was that intended?

override val element: PsiElement,
override val payload: String,
override val parentHandler: Handler?,
val isDeadline: Boolean = false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of the previous answer, having something called "default message creator" have a concept of whether it's a deadline makes it less default to me. I'd more so think you'd be dealing with a specific DeadlineMessageCreator in this case.

return AxonNavigationGutterIconRenderer(
icon = AxonIcons.Axon,
popupTitle = "Axon References To This Class",
popupTitle = "Axon References To $qualifiedName",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a bug fix you've sneaked into this PR.

* Searches for any event handlers that are not part of the aggregate model.
*
* @see org.axonframework.intellij.ide.plugin.handlers.types.EventHandler
* @see org.axonframework.intellij.ide.plugin.resolving.handlers.types.EventHandler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a documentation fix you've sneaked into this PR.


override fun renderText(): String {
return "${element.containingClassname()}.${element.name}"
return element.toViewText()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am certainly not deep enough into this stuff to understand how this solves the predicament of this PR. Would you care to explain this?

} else toPackageName()
}

fun PsiMethod.toViewText(): String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you've just 'generified' the entire naming scheme. This makes sense.

assertThat(hasLineMarker(DeadlineHandlerMethodLineMarkerProvider::class.java)).isTrue
assertThat(getLineMarkerOptions(DeadlineHandlerMethodLineMarkerProvider::class.java)).containsExactly(
OptionSummary("MyCommand", null, AxonIcons.Publisher)
OptionSummary("MyAggregate.handle(MyCommand, DeadlineManager):${actualLineNumber(9)}", "my_special_deadline", AxonIcons.Publisher)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's the toViewText method you've added, causing the line number to be added, but I don't clearly see how. Would you mind elaborating on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants