feenkcom / gtoolkit

Glamorous Toolkit is the Moldable Development environment. It empowers you to make systems explainable through experiences tailored for each problem.
https://gtoolkit.com
MIT License
1.12k stars 49 forks source link

Creating a class in a package with no tags adds the package as the tag #2806

Closed chisandrei closed 2 years ago

chisandrei commented 2 years ago

When creating a class in a package with no tags, the name of the package is used for the tag. It should instead be empty.

Screenshot 2022-09-20 at 11 22 55
seandenigris commented 2 years ago

While you're playing in this area, the completion in the package editor includes entries which are not package names, but Package-Tag. While it is convenient to be able to set the package and the tag in one action, I recommend including only package names there. I was both 1) confused and 2) unclear whether choosing such an entry would create a new package with the same name as the existing package+tag, cause an error, etc.

hellerve commented 2 years ago

The issue is inside RPackage>>#classTagForClass: which is used to set a tag when we select a class in Coder. It looks as if in RPackages where we have Uncategorized classes, a class tag named the same as the package exists, which is returned by that method. I’m guessing that should be filtered out, but I’m not sure whether it should be done by the caller or in the method directly.

hellerve commented 2 years ago

I pushed a fix, but I’m not sure it’s the best way to solve the issue just yet

hellerve commented 2 years ago

@seandenigris I found the cause of the issue you are experiencing: RPackageOrganizer default packages returns both packages and hyphenated package+tag combinations. I don’t think there is much we can do about it in a simple way.

No, I was mistaken (I was led astray by the packages that look like tags of other packages, but are just packages that add another hyphenated clause, like AI-Algorithms-Graph-Components for AI-Algorithms-Graph). We can totally fix this. I will see whether it breaks anything.

hellerve commented 2 years ago

For now this all should work; I’m closing this for the moment.