Is it possible to sort a contents of project window manually? (non alphabetically)

I want to decide a order of window of project navigator's contents manually.

How to do this?

I attach a image file.  Please open it.



Attachment(s):
projectNavigator.png
3

+1 to this. At the very least I would love the option to display the files in their actual order in the project file (the order in which they are displayed in xcode).

2

Jon, Lim,

we have a request for sorting by type in the Project View, what is the sorting most users want:
http://youtrack.jetbrains.com/issue/OC-1666

We don't think that allowing manual sort is of any practical value, since there are various way you can use to open a file: using speed search in the project view (just start typing a files' name) or with Navigate->File action (Command+Shift+O).

We are open for discussion, though.

Regards,
Anton Makeev

-4

We don't think that allowing manual sort is of any practical value



A couple arguments in favor:

1) My team (and this is probably common) has a mix of people using xcode and appcode, despite my best efforts to convert everyone. Xcode uses manual sorting, which means in order to keep a big project sane you have to keep the underlying project file in order. Currently AppCode hides the order so I need to keep xcode open to clean up the project file.

2) A simple alpha sort doesn't always make sense. For example:

ObjcClassA.h
ObjcClassA.m
ObjcClassB.h
ObjcClassB.m


all good so far, but for c/c++ files in the project it sorts like:

CppClassA.cc
CppClassA.h
CppClassB.cc
CppClassB.h


Kind of nitty, but logically the header files should come first. Perhaps this will be fixed by the "sort by type" bug; it's not clear to me from the bug what that feature is intended to do.

1

Jon,
I understand the problem here and I think that 'sort by type' will solve it: all files will be sorted always the same way.
We strongly believe, that manual sorting is not that you want to put your efforts into, and we want to make AppCode do this for you.

Probably 'Sort By type' Will group implementation and headers files together.

-2

I'd think you could order the properties manually by just reordering them in the code... I notice (at least in PHPStorm) that for a PHP class, by default the Structure tab orders the properties (vars and methods) in the same order they're declared.

If I click the a/z button (Sort Alphabetically), it'll sort them that way per group (so vars are sorted alphabetically at the top then the methods are sorted the same way below that group).

If I uncheck the a/z button and click the Sort by Visibility button (to the left of it), it sorts slightly differently than the no-button default... which I don't understand, but it seems to do all the sorting I need. 

0

> We strongly believe, that manual sorting is not that you want to put your efforts into...

I for one would love for a way to sort my groups (directories) manually so they are in alphabetical order for my coworkers who use Xcode. Currently this involves having to open Xcode just to reorder the groups, which — to be frank — is quite silly.

0

The manual ordering of classes is important as when I have activities go from one to the next that have unsimilar names then I can easily see the path they take and their related grouping. Otherwise I would have to name the files with a number to give them this ordering which would be a hassle when adding or removing classes and make the file names longer than minimal (which get long enough as they are and cut off in the viewer requiring manual scrolling). Also sometimes I want to prioritise or depriortise a class I am working on or going to work on, by moving it to the top or bottom of the folder, respectively. These projects get to 30 activities quickly.

Imagine how frustrating it would be if function names were alphabetically sorted. Instead they are ordered by declaration.

Or it would be handy to have a tool that showed their class relationships as a diagram (function relationships would be great to).

I have done iOS and Android since 2010.

In Xcode in Settings folder:

SettingsMenu.swift

WiFi_Plan.swift

WiFi_Plan_ConfirmPaid.swift

WiFi_Plan_ProcessingPaid.swift

WiFI_Plan_SuccessfulPaid.swift

WiFI_Plan_FailPaid.swift

WiFI_Plan_ConfirmFree.swift

WiFI_Plan_ProcessingFree.swift

WiFI_Plan_SuccessfulFree.swift

WiFI_Plan_FailFree.swift

ManageDevices.swift

As you can see you start at SettingsMenu, then choose your WiFi Plan, then have 2 paths Paid or Free, which Paid or Free have similar paths, but can not be refactored as they look different to each other and having one class represent the Paid and Free would increase the code complexity. ManageDevices is another activity in the Settings group. In the future there will be many others in the Settings group.

1

We have a workflow implemented in Python, with different stages in different files. Details are irrelevant, but we would like the order of the files to represent the order of the workflow. This helps understanding the project. The view we have right now in PyCharm is that these stages are shown in "random" order (where "random" means sorted by name/type, which is out-of-order from process description point of view). 

I see the swift example above is the same.

The fundemental problem is that there is no way for the IDE to know the correct order by any information available to it. To most intuitive way to add the information is to manually sort. Also, I would love to "put effort in manual sorting" if it could be done.

I don't understand the logic behind a "you don't need it" reply. This is a clear limitation of the IDE relative to alternatives. JetBrains can strongly believe it is not necessary, but as a user this incorrect sorting irritates me daily. 

 

0

请先登录再写评论。