Darkyenus / glsl4idea

A GLSL language plugin for IntelliJ IDEA
GNU Lesser General Public License v3.0
100 stars 30 forks source link

Clear function type cache on file modification #147

Closed Tasemo closed 5 years ago

Tasemo commented 5 years ago

Fixes #131 by recomputing the function type on file modifications. This is exactly how glslplugin.lang.elements.declarations.GLSLStructDefinition does it. It also seems odd, that the interface exposes methods to get parameters / return type / name non cached and some choose to use them instead of the cached value. Is the caching really necessary anyway?

Darkyenus commented 5 years ago

Thanks for the PR, it looks good.

It also seems odd, [...]. Is the caching really necessary anyway?

Honestly, I don't know. Most of this code is not mine but from the original creators, so I am not sure if the caching was solving some particular problem or if it was "just in case". I'm sure that there is a lot of places that could be rewritten or touched up. I don't have much time to devote to this project, but feel free to create more PRs, I'll review and merge them.