| Summary: | PHP explorer does not sort folders or files alphabetically - sort order is erratic | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Ralph Moenchmeyer <rm> | ||||||||||||||||
| Component: | PDT | Assignee: | PHP UI <php.ui-inbox> | ||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||||||
| Severity: | enhancement | ||||||||||||||||||
| Priority: | P3 | CC: | aldrin.baroi, ganoro, glen.84, silviya, spam, zulus | ||||||||||||||||
| Version: | unspecified | ||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||
| OS: | Linux | ||||||||||||||||||
| See Also: |
https://git.eclipse.org/r/73849 https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=d4ecb775ac4890debfd70775da1badba362bdda6 |
||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Bug Depends on: | 179929 | ||||||||||||||||||
| Bug Blocks: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
Ralph Moenchmeyer
Created attachment 202688 [details]
Shows a folder in PHP Explorer with erratic sorting
Created attachment 202689 [details]
shows alphabetic sort order in project explorer
it's because some of the folders are excluded from the build path. we have decided to show first the buildpath directories and then list all others. This can be turned into a feature request to enable it. For my setup, sort order is erratic only for the top-level source folders. Folders under the top-level source folders and the files are sorted correctly alphabetically.
Tried creating the top level source folders in several different orders with no success.
Wanted the following folder structure:
src/main/php
src/main/resources
src/test/php
src/test/resources
With current Eclipse setup (Juno):
No matter what, getting the following folder structure:
src/main/resources <-- always before "src/main/php"
src/main/php
src/test/php
src/test/resources
In addition, in one or two tests got the following folder structure:
src/test/php <-- "test" folders are before "main"
src/test/resources
src/main/resources <-- always before "src/main/php"
src/main/php
In previous Eclipse setup (Indigo):
No matter what, was getting the following folder structure:
src/main/php
src/main/resources
src/test/resources <-- always before "src/test/php"
src/test/php
My current Eclipse setup:
Eclipse Java EE IDE for Web Developers.
Version : Juno Service Release 1
Build id: 20121004-1855
64-Bit
PHP Tool Integration Core 1.6.0.R20111119000000
PHP Development Tools (PDT) SDK Feature 3.1.1.201209101312
Mac OS X 10.7.5
Can you send me your project,I can not reproduce this bug,so I think it is cased by your specific settings. Created attachment 226291 [details]
screenshot
Hi Zhongwei: My project is hosted on Google Code. You can check out the source (Eclipse Project) from the following link: http://code.google.com/p/mediawiki-page-attachment/source/checkout Sincerely yours, Aldrin Hi Aldrin, Please the screenshot,I think it is right. Created attachment 226295 [details]
screenshot
btw,which pdt version do you use? Hi Zhongwei: PDT version is 3.1.1.201209101312 Attaching three (3) screen shots ( two for wrong sort order and one for all the installed components within Eclipse) Aldrin Created attachment 226366 [details]
Sort is wrong #1
Created attachment 226367 [details]
Sort is wrong #2
Created attachment 226368 [details]
All the installed components within Eclipse
i'm not sure if this is relevant: new files & folders are not added to the build path. after adding them manually to the build path the code will be indexed (now i can use autocomplete), the order changes but is more jumbled than before. Version: Kepler Release Build id: 20130614-0229 PHP Tool Integration Core 1.6.0.R20111119000000 (In reply to comment #3) > it's because some of the folders are excluded from the build path. > we have decided to show first the buildpath directories and then list all > others. > > This can be turned into a feature request to enable it. Not true. I changed an old project accordingly and included it in the buildpath - it never gets the right ordering. But: New projects established with Eclipse Indigo 3.7 or Juno 4.3 show an alphabetic ordering. In any case: The limitations of the PHP explorer are annoying sometimes - although I like Eclipse for PHP otherwise very, very much .... I would like to see a PHP explorer which shows some selectable information associated with the directories/files in columns and which would give the user the chance of ordering according to the columns shown. Just as in Dreamweaver (although I regard it almost embarrassing to refer to a software from a world I do not like ...) (In reply to comment #15) > i'm not sure if this is relevant: new files & folders are not added to the > build path. after adding them manually to the build path the code will be > indexed (now i can use autocomplete), the order changes but is more jumbled > than before. > > Version: Kepler Release > Build id: 20130614-0229 > > PHP Tool Integration Core 1.6.0.R20111119000000 In my experience the "jumbling" is only true for old projects - but not for new ones set up under Juno 4.3. When I add new dirs/files manually to the build path in such projects alphabetical ordering happens. However, not for old projects which stem from the Indigo times. I'm using Eclipse Mars.1 (4.5.1) with PDT 3.7.0.201510081354, and the folder ordering in two recently-created projects (as well as older projects) is not alphabetical. I've tried messing around with the build path settings, with no success. How do I fix this? I can fix the order of folders that are on the build path by editing the ".buildpath" file, but this should happen automatically, and there should also be an option not to show build path folders first. New Gerrit change created: https://git.eclipse.org/r/73849 Gerrit change https://git.eclipse.org/r/73849 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=d4ecb775ac4890debfd70775da1badba362bdda6 "Show build path folders first" option isn't part of this bug. Should be resolved via bug 179929 Hi Dawid I could not exactly understand (got a bit lost in this bug) - what is fixed, what is not, what is part of this bug and what should be part of another? :) Sure, before my patch php explorer had files / folders added in two logical section: 1. Dirs (and its content) that are buildpaths roots (src/, app/, vendor/ ...) 2. Dirs/files that are outside build paths. Dirs always first + alphabetical. This section are still actual but first section was sorted based on .buildpath order. This cause bug, when for example app/ was added after vendor/. As a result user had also vendor/ before app/ on list. This was fixed by me and sorting is alphabetical here. Separate bug (bug 179929), is to have first and second section mixed. Thanks a lot! :) Looks OK. Let's close it (In reply to Dawid Pakula from comment #24) Many thanks also from a grateful PDT user. Good job! |