Skip to content

Conversation

@stephan-gh
Copy link
Contributor

Adds some code folding for Mixin classes. Right now there is an option to fold target descriptors and the (in my opinion) annoying (Object) casts that are necessary sometimes.

Both options can be toggled in the Code folding options. As we discussed a while ago, I've made the folding of target descriptors enabled by default and disabled the folding of object casts.

Screenshot of target descriptor folding

screenshot_20170614_170201

Screenshot of Object cast folding

screenshot_20170614_170341


The original code will appear when clicking on the folded code, just like when IntelliJ IDEA collapses method bodies etc.

@gabizou
Copy link
Contributor

gabizou commented Jun 14, 2017

Would you be able to fold the double casts? Or maybe even include some smart double cast options when typing this in a mixin? Might need another pr or feature set addition for the second part.

@stephan-gh
Copy link
Contributor Author

@gabizou Are you referring to casts like (EntityLivingBase) (Object) this? Folding casts entirely would only make sense in that case IMO (and only if it actually matches the target class)

@kashike
Copy link
Contributor

kashike commented Jun 14, 2017

@gabizou
Copy link
Contributor

gabizou commented Jun 14, 2017

@kashike It still is mildly annoying where it does show it as highlighted as though it is unnecessary, but it would still be worthwhile to have some sort of folding to increase legibility in the target code.

@DenWav
Copy link
Member

DenWav commented Jul 16, 2017

Looks good, thanks as always. Sorry for the long wait. ❤️

@DenWav DenWav merged commit 39512c8 into dev Jul 16, 2017
@stephan-gh stephan-gh deleted the mixin-folding branch July 16, 2017 14:01
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.

5 participants