GAMS-dev / studio

GAMS Studio
https://www.gams.com/latest/docs/T_STUDIO.html
GNU General Public License v3.0
36 stars 5 forks source link

Group by containing directory in Project Explorer #200

Closed acjbrouwer closed 2 years ago

acjbrouwer commented 3 years ago

When having source files with the same name but located in different directories open, their groups sort alphabetically in the Project Explorer. But such co-incident source files typically belong to different branches/repositories cloned/checked-out in different directories.

In the Project Explorer, it is possible to manually sort source files into groups, and rename groups to achieve the desired grouping on a per-branch/directory/repo-working-copy basis, but it would be helpful were the Project Explorer support a more automatic workflow to achieve the same.

For example, some heuristic that automatically groups the source files that can be reasonably assumed to belong together given the ((grand)parent)directory they are all contained in and whether that least-common-denominator directory has a .git or .svn subdirectory, then automatically renames the group according to that directory's name, and possibly adds a sub-hierarchy to the group that reflects subdirectories.

LutzWestermann commented 2 years ago

@acjbrouwer , with recent releases, we reworked the Project Explorer. One of the changes was to have folders below projects and to show the files in these folders. Does this help for your request? (It is not complete clear to me, what you mean by the heuristics to automatically group files).

acjbrouwer commented 2 years ago

Heuristics as in a set of algorithmic checks (e.g. does the a parent directory have a .git sub directory?) that, when satisfied, allow a likely-so guess as to how the user wants to name the project, set the base directory, and otherwise organize things in the Project Explorer, with that guess being automatically enacted.

The hierarchical structure of folders below the base directory is indeed a big step forward in automatically organizing things and captures the main issue that this ticket was opened for. But more automation via heuristics is conceivable.