Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to remove empty variable declaration blocks #88

Open
JoA-RHU opened this issue Apr 15, 2024 · 2 comments
Open

Add an option to remove empty variable declaration blocks #88

JoA-RHU opened this issue Apr 15, 2024 · 2 comments
Assignees

Comments

@JoA-RHU
Copy link

JoA-RHU commented Apr 15, 2024

Is your feature request related to a problem? Please describe.
When creating a new POU, a method or a property, new variable declaration blocks are automatically created (at least in TwinCAT).
If you don't use them, they will stay there forever. This is something annoying, especially in properties where you generally don't need local variables at all.

Describe the solution you'd like
An option to delete these empty blocks would be nice. Maybe in a new settings section as it doesn't fit in any of the existing ones.

Before

FUNCTION_BLOCK MyNewFB
VAR_INPUT
END_VAR
VAR_OUTPUT
   Busy : BOOL;
   Done : BOOL;
END_VAR
VAR
END_VAR
PROPERTY Name : T_MaxString
VAR
END_VAR

After

FUNCTION_BLOCK MyNewFB
VAR_OUTPUT
   Busy : BOOL;
   Done : BOOL;
END_VAR
PROPERTY Name : T_MaxString
@Barteling
Copy link
Collaborator

Hmm, this has been requested before, so far i have not been touching any source code but only white spaces... i'll take it in consideration

@Roald87
Copy link

Roald87 commented Apr 21, 2024

Would be nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants