-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add more services to statemachine
example
#1265
base: main
Are you sure you want to change the base?
Add more services to statemachine
example
#1265
Conversation
formatter.keyword('actions').append(Formatting.oneSpace()); | ||
const bracesOpen = formatter.keyword('{'); | ||
bracesOpen.prepend(Formatting.fit(Formatting.oneSpace(), Formatting.newLine())); | ||
const bracesClose = formatter.keyword('}'); | ||
bracesClose.prepend(Formatting.newLine()); | ||
formatter.interior(bracesOpen, bracesClose).prepend(Formatting.indent()); | ||
|
||
const stateName = formatter.property('name'); | ||
const stateEnd = formatter.keyword('end'); | ||
formatter.interior(stateName, stateEnd).prepend(Formatting.indent()); |
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.
One more thing, how to double indent? Currently, the following code:
state ExampleState
actions {
commandOne
}
end
Would be formatted to:
state ExampleState
actions {
commandOne
}
end
I tried to do the following:
formatter.interior(bracesOpen, bracesClose)
.prepend(Formatting.indent())
.prepend(Formatting.indent());
But it didn't work.
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 took a look at this, and this seems to be an issue in the formatter. This is probably something we want to fix in a separate PR.
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 see, I think the outer indent (the one for state
and end
) overrides this one.
Or maybe it doesn't take the double indent in consideration.
Sorry for the wait, but I have applied the comments in this PR. Although I don't know how to make the ECA test pass, I have created an account there, but previous commits are failing. |
c94d708
to
a990392
Compare
@Yokozuna59 Can you squash your commits? I believe the ECA tool has some weird issue with some of your commits. Maybe you might also need to remove the verification requirement on your commits? All of them (except for the merge commit) say that they are |
This comment was marked as resolved.
This comment was marked as resolved.
4940b78
to
b1a642d
Compare
- add `Formatting` service - add `CodeActionProvider` service - Remove an unreachable commands, events, and states - Rename all refereed state names that don't start with caps - validate unreached commands, events, and states
b1a642d
to
e3757c3
Compare
@msujew I squashed the commits and removed the commit verification, but the ECA is still failing. |
@Yokozuna59 have you used exactly the same email address in your Eclipse account as in the Git commit? |
@spoenemann Yes. Before rebasing and after creating the account, it showed that commits after that passed the test, but the original commits before creating the account still failed. |
Resolves #1257.
I also validated commands with events and states.
I haven't implemented the full version of
quick fix
to make state name starts with capital letter yet. The current Langium LSP didn't implement such feature yet, so I'm not sure how to do it in a clean approach.