gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
303 stars 99 forks source link

[ENHANCEMENT] Add warning if a file is imported several times #3302

Closed RoiArthurB closed 2 years ago

RoiArthurB commented 2 years ago

Is your request related to a problem? Please describe.

In big project, it's easy to import several times a same file and make the whole project messy (cf. slide below where 129 imported files created 1088 import lines, but could be factorized in only 232 import lines).

image

Describe the improvement you'd like

It would be great if, like in Eclipse IDE below, GAMA warns if a file is already imported by another file in the project.

image

AlexisDrogoul commented 2 years ago

Sorry to report that I will not provide this enhancement. Or if I can do it, I will not do it as a warning, just an information. You are right in principle that it might be a good indication, but it can also be misleading. As a matter of fact, as reported by @ptaillandier in #3268, the order in which the files are imported might play an important role in projects which are not very well structured. I guess that a fix to this state of affairs is outside the scope of this issue...

RoiArthurB commented 2 years ago

I understand and, in the Eclipse implementation, it is also displayed as a hint and not as a warning :)

AlexisDrogoul commented 2 years ago

OK. Enhancement provided as far as I can test it (in Comokit, for instance).