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

New sort algo #302

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

New sort algo #302

wants to merge 2 commits into from

Conversation

Sildra
Copy link

@Sildra Sildra commented Mar 19, 2013

New sort algo "type":

  • elements will be sorted by 'type index' then by name
  • 'type index' is currently defined by the textual representation of the kind
    • dependent of the values associated in the kinds dictionary

@xavierd
Copy link
Owner

xavierd commented Mar 19, 2013

The code looks correct, but why would you like to do that?

@Sildra
Copy link
Author

Sildra commented Mar 19, 2013

If you means why I would do kinds[x.kind.value] instead of x.kind.value, it's because for my case, I've renamed some of the associated values in the kinds dictionary so that the tree show types in this order when completing a class:

  • class (previously 4: 't')
  • ctor (24: '+')
  • dtor (25: '~')
  • func (8: 'f')
  • mmbr (6: 'm')
  • var (9: 'v')

I haven't added my changes to kinds because instead of using 1 char for displaying the type, it uses up to 6 chars (more understandable).
Example:
clang_type_sort

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.

2 participants