-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the link between creators and parent handlers #158
base: master
Are you sure you want to change the base?
Conversation
…odd to some customers. References now show the method signature (and sometimes line number).
There was a problem hiding this 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.
@@ -33,6 +33,7 @@ enum class AxonAnnotation(val annotationName: String) { | |||
AGGREGATE_MEMBER("org.axonframework.modelling.command.AggregateMember"), | |||
ROUTING_KEY("org.axonframework.commandhandling.RoutingKey"), | |||
ENTITY_ID("org.axonframework.modelling.command.EntityId"), | |||
PROCESSING_GROUP("org.axonframework.config.ProcessingGroup") | |||
PROCESSING_GROUP("org.axonframework.config.ProcessingGroup"), | |||
SAGA("org.axonframework.config.ProcessingGroup") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
@@ -34,7 +34,7 @@ import javax.swing.Icon | |||
data class DefaultMessageCreator( | |||
override val element: PsiElement, | |||
override val payload: String, | |||
override val parentHandler: Handler?, | |||
val isDeadline: Boolean = false, |
There was a problem hiding this comment.
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?
@@ -34,7 +34,7 @@ import javax.swing.Icon | |||
data class DefaultMessageCreator( | |||
override val element: PsiElement, | |||
override val payload: String, | |||
override val parentHandler: Handler?, | |||
val isDeadline: Boolean = false, |
There was a problem hiding this comment.
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.
@@ -49,7 +49,7 @@ class ClassLineMarkerProvider : LineMarkerProvider { | |||
if (handlers.isNotEmpty()) { | |||
return AxonNavigationGutterIconRenderer( | |||
icon = AxonIcons.Axon, | |||
popupTitle = "Axon References To This Class", | |||
popupTitle = "Axon References To $qualifiedName", |
There was a problem hiding this comment.
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.
@@ -28,7 +28,7 @@ import org.axonframework.intellij.ide.plugin.util.toQualifiedName | |||
/** | |||
* 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 |
There was a problem hiding this comment.
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.
@@ -35,7 +35,7 @@ data class QueryHandler( | |||
override val handlerType: MessageHandlerType = MessageHandlerType.QUERY | |||
|
|||
override fun renderText(): String { | |||
return "${element.containingClassname()}.${element.name}" | |||
return element.toViewText() |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
@@ -43,7 +43,7 @@ class DeadlineHandlerMethodLineMarkerProviderTest : AbstractAxonFixtureTestCase( | |||
) | |||
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) |
There was a problem hiding this comment.
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?
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).