Skip to content

chore: move unmanagedComment between imports and class#570

Merged
octonato merged 1 commit intomainfrom
rgc/move-unmanagedComment
Oct 6, 2021
Merged

chore: move unmanagedComment between imports and class#570
octonato merged 1 commit intomainfrom
rgc/move-unmanagedComment

Conversation

@octonato
Copy link
Copy Markdown
Member

@octonato octonato commented Oct 6, 2021

I was reviewing #503 and spotted this, but PR got merged in the meantime.

Also contains some minor formatting.

Comment on lines 76 to +77
s"""package ${service.fqn.parent.javaPackage};
|
|$imports
|
|$managedComment
|
|public final class $testKitClassName {
|
| private Function<ActionCreationContext, $className> actionFactory;
|
| private $className createAction() {
| $className action = actionFactory.apply(new StubActionCreationContext());
| action._internalSetActionContext(Optional.of(new StubActionContext()));
| return action;
| };
|
| public static $testKitClassName of(Function<ActionCreationContext, $className> actionFactory) {
| return new $testKitClassName(actionFactory);
| }
|
| private $testKitClassName(Function<ActionCreationContext, $className> actionFactory) {
| this.actionFactory = actionFactory;
| }
|
| private <E> ActionResult<E> interpretEffects(Action.Effect<E> effect) {
| return new ActionResultImpl(effect);
| }
|
| ${Format.indent(generateServices(service), 2)}
|
|}
|""".stripMargin
|
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

just because I want to see the | aligned with the p. :-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't it align just before the p? 😆

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not add the | at the first line then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will do it. I'm trying to hold a balance here and not look like a total formatting freak. :-)

|
|$imports
|
|$unmanagedComment
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is the real motivation for this PR. A leftover from #503

Comment on lines 76 to +77
s"""package ${service.fqn.parent.javaPackage};
|
|$imports
|
|$managedComment
|
|public final class $testKitClassName {
|
| private Function<ActionCreationContext, $className> actionFactory;
|
| private $className createAction() {
| $className action = actionFactory.apply(new StubActionCreationContext());
| action._internalSetActionContext(Optional.of(new StubActionContext()));
| return action;
| };
|
| public static $testKitClassName of(Function<ActionCreationContext, $className> actionFactory) {
| return new $testKitClassName(actionFactory);
| }
|
| private $testKitClassName(Function<ActionCreationContext, $className> actionFactory) {
| this.actionFactory = actionFactory;
| }
|
| private <E> ActionResult<E> interpretEffects(Action.Effect<E> effect) {
| return new ActionResultImpl(effect);
| }
|
| ${Format.indent(generateServices(service), 2)}
|
|}
|""".stripMargin
|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't it align just before the p? 😆

@octonato
Copy link
Copy Markdown
Member Author

octonato commented Oct 6, 2021

shouldn't it align just before the p?

Don't tease me or I will format all the things!
Actually, it depends with we use interpolation or not.

@octonato octonato merged commit a7f8bc2 into main Oct 6, 2021
@octonato octonato deleted the rgc/move-unmanagedComment branch October 6, 2021 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants