Community
Participate
Working Groups
Build Identifier: Build id: I20110613-1736 (Eclipse version 3.7.0) The PHP Explorer - in contrast to the Project Explorer - does not sort the content of projects or project subfolders alphabetically. This happens at least after working some time with the project contents and after including more and more folders - also linked folders. There is no obvious way to remedy the erratic sorting order by the eclipse user - the only way is to use other project views. Just in case that there might be problems with other eclipse add ons: In addition to PDT I use Mylyn, SVN, WDT, export utilities to publish files on remote servers and the remote system explorer utilities among other add ons. This bug is quite old - it appeared several in the community forum since 2008. Maybe it is a regression bug ? Reproducible: Always Steps to Reproduce: 1.Generate several PHP projects 2. Fill it with contents of different kinds - new folders, copy in folders, linked folders 3. Fill the folders with contents 4. Link to SVN and use checkins if you want 5. Check the order of the folders in the PHP explorer view - looks more or less erratic 6. Compare to "Project Explorer" view - there you get consistently alphabetical sorting on all levels of the folder and content hierarchy.
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!