IssueRaiser

Add public/private access modifiers to GDScript and autocompletion improvements

<!-- Please fill in *all* the questions below and don't remove any of them. Proposals not following the template below will be closed immediately. --> **Describe the project you are working on:** 2.5d beat'em up **Describe the problem or limitation you are having in your project:** Inside a GDScript class i often use "private" variables and functions that shouldn't be visible ouside but that instead are "public", hence visible and usable by everyone. More or less related is the fact that autocompletion is cluttered, yes alphabetic order is good but the list always starts with lots of constants and the function or variable we want is usually buried in lots of other things that aren't useful in that moment. **Describe the feature / enhancement and how it helps to overcome the problem or limitation:** Let us specify if a variable or function is private or protected(or whatever keywords you want to use), a private variable can only be used by the functions of the same class, protected means that it's also accessible by the classes that inherit from the class the variable is in. About autocompletion in my opinion it would be even more useful if suggestions were grouped by class, ordered from the leaf of the class tree back to the root class, or maybe add to the editor's options the possibility to order and filter what is shown. **Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:** var v(no access modifier means public) protected var v(acce

Posted by 2plus2makes5 on Mar 27, 2020, 9:43 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (E-commerce)

Add public/private access modifiers to GDScript and autocompletion improvements

2plus2makes5Mar 27, 2020, 9:43 AM

<!-- Please fill in *all* the questions below and don't remove any of them. Proposals not following the template below will be closed immediately. --> **Describe the project you are working on:** 2.5d beat'em up **Describe the problem or limitation you are having in your project:** Inside a GDScript class i often use "private" variables and functions that shouldn't be visible ouside but that instead are "public", hence visible and usable by everyone. More or less related is the fact that autocompletion is cluttered, yes alphabetic order is good but the list always starts with lots of constants and the function or variable we want is usually buried in lots of other things that aren't useful in that moment. **Describe the feature / enhancement and how it helps to overcome the problem or limitation:** Let us specify if a variable or function is private or protected(or whatever keywords you want to use), a private variable can only be used by the functions of the same class, protected means that it's also accessible by the classes that inherit from the class the variable is in. About autocompletion in my opinion it would be even more useful if suggestions were grouped by class, ordered from the leaf of the class tree back to the root class, or maybe add to the editor's options the possibility to order and filter what is shown. **Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:** var v(no access modifier means public) protected var v(acce

Comments (0)

No comments yet. Start the discussion.

Comment on this issue