Giter VIP home page Giter VIP logo

Comments (9)

payliu avatar payliu commented on June 15, 2024

I finish to improve this request myself :)

now it can support selected group from project navigator.
Even for multiple selection or sub-group, still work well.

here is my code by compare, I can crate a new PR for you

thank you and thank for this great plugin.

uncrustify-plugin-1

from bbuncrustifyplugin-xcode.

benoitsan avatar benoitsan commented on June 15, 2024

That's great. It would be a nice addition.

I tried it but there is actually an issue: if the group has never been opened (triangle to the right), the plugin doesn't see any file inside the folder and the command "Uncrustify selected files" stay disabled. Once the folder has been opened (triangle to the bottom), it works (even if the folder is closed). I had this issue when I played with the navigator tree.

Can you reproduce this issue?

from bbuncrustifyplugin-xcode.

payliu avatar payliu commented on June 15, 2024

wow, it seem like a big problem for never un-opened group......how to get them?

uncrusitfy-bug1

from bbuncrustifyplugin-xcode.

payliu avatar payliu commented on June 15, 2024

The never unopened group cantain no child item.

So far, I did not find out a method to make this group to get its child.

But maybe could be trigger by keyboard input
, alt+ right arrow. I'm trying it.

from bbuncrustifyplugin-xcode.

payliu avatar payliu commented on June 15, 2024

hi @benoitsan

Good news, I found a method to expand those selected group, finally. and those never opened group will be loaded as well.

But here, must always return YES, "Uncrustify selected files" will always be 'enable'.
Because it is no good to expand any group when user open menu > edit.

check compare

thanks!

from bbuncrustifyplugin-xcode.

benoitsan avatar benoitsan commented on June 15, 2024

Forcing to expand a group to fix the issue is not a solution IMHO, it's more a workaround. The solution would be to find the API to get the contents of the group in any case. Right now, I'm pretty busy and don't have the time to work on this but as I said, I'm interested by this feature and will invest some time in it when I can.

from bbuncrustifyplugin-xcode.

payliu avatar payliu commented on June 15, 2024

Just take your time. thanks:)

For me, I prefer like the xcode show me what files be uncrustified, rather then hide in groups.
I'm looking forward to know your work. In the meantime, I'll try to find that API you said, Get the content from group without expanding.

from bbuncrustifyplugin-xcode.

benoitsan avatar benoitsan commented on June 15, 2024

For me, I prefer like the xcode show me what files be uncrustified, rather then hide in groups.

I was thinking about the feature and now I'm not sure if taking in account selected groups is a good idea. Like you say, uncrustifying files in hidden groups is perhaps not what the user wants.

Regarding Xcode default behavior when you drag files to the Finder, dragging multiple sources files works but dragging a group doesn't work.

There are also more complexed cases when a group + nested files are selected.
screen shot 2013-09-05 at 08 55 07
If you take this case, the Xcode behavior (just taking in account selected source files) allows you to never have ambiguous decisions to make.

from bbuncrustifyplugin-xcode.

benoitsan avatar benoitsan commented on June 15, 2024

Fixed. 624c196

from bbuncrustifyplugin-xcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.