Skip to content
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 support for Frosting #260

Merged
merged 5 commits into from
Aug 10, 2022
Merged

Add support for Frosting #260

merged 5 commits into from
Aug 10, 2022

Conversation

js6pak
Copy link
Contributor

@js6pak js6pak commented Aug 9, 2022

Closes #129, closes #255, closes #52

  • run configurations
    image

  • gutter icon
    image

  • tool window
    image
    (Special icons for cake script and cake frosting would be nice)

  • snippets

  • convert cake script configuration editor to ControlViewBuilder

I took a very "do it as rider would" approach in this PR and ended up using a lot of rider types which changed quite a bit in rider 2022 (I suppose because of the unreal engine support) upping the version requirement.

@nils-a
Copy link
Member

nils-a commented Aug 9, 2022

This looks brilliant, I need some time to process this. (Setting pluginSinceBuild = 222 feels a bit of a hard cut - I need to chew on this.)

@nils-a
Copy link
Member

nils-a commented Aug 9, 2022

Does this also fix the inconsistency I observed in #255 ?

@js6pak
Copy link
Contributor Author

js6pak commented Aug 9, 2022

This looks brilliant, I need some time to process this. (Setting pluginSinceBuild = 222 feels a bit of a hard cut - I need to chew on this.)

I have started working on this on 212, mostly namespaces changed so it would be trivial to port to another version, just not with the same .jar/.dll

Does this also fix the inconsistency I observed in #255 ?

I have not looked into it yet, will do later

@js6pak js6pak marked this pull request as ready for review August 9, 2022 21:01
@js6pak
Copy link
Contributor Author

js6pak commented Aug 9, 2022

Does this also fix the inconsistency I observed in #255 ?

I don't have a windows machine to test with atm but it should now be fixed with this

@nils-a What snippets would be needed? Just task/async task? Also is it possible to enable live templates only on a frosting project?

@nils-a
Copy link
Member

nils-a commented Aug 9, 2022

I tested your code before the last commit you made. Will test again tomorrow. Looks really cool so far.

One addition: If I open up a single frosting project (without a containing solution) the project picker in the run configuration does not list the project to be built.

What snippets would be needed? Just task/async task?

Since we have no snippets in the other IDEs to copy from, yes - let's go with that and see if more is needed.

Also is it possible to enable live templates only on a frosting project?

Not sure. I'd need to investigate.
I guess I would be possible to add another TemplateContext like

class CakeContext : TemplateContextType("Cake", "Cake") {
override fun isInContext(templateActionContext: TemplateActionContext): Boolean {
val lang = PsiUtilCore.getLanguageAtOffset(templateActionContext.file, templateActionContext.startOffset)
return CakeLanguage.`is`(lang)
}
}

and check for projects of type frosting and .cs..

Also, I'm not sure why the build currently fails - something with GitVersion being unable to calculate a nice version number for this PR. (Probably because I merged master into develop after screwing up the build 🙄)

@js6pak
Copy link
Contributor Author

js6pak commented Aug 9, 2022

One addition: If I open up a single frosting project (without a containing solution) the project picker in the run configuration does not list the project to be built.

Maybe it got fixed in the latest commit, but works fine for me?
image

Copy link
Member

@nils-a nils-a left a comment

Choose a reason for hiding this comment

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

LGTM!

@nils-a nils-a merged commit de89d4d into cake-build:develop Aug 10, 2022
@nils-a
Copy link
Member

nils-a commented Aug 10, 2022

@js6pak your changes have been merged, thanks for your contribution 👍

I took the liberty to fix the linting problems in kotlin and also changed some styling in c#. Hope you don't mind.
I also added an .editorconfig to the c# project - so future styling should be easier 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants