Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Conditional Snippets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MikeGameDev
Junior Member

19 Posts

Posted - Aug 26 2016 :  4:37:32 PM  Show Profile  Reply with Quote
I want to change the comment block generated by my Document Method snippet depending on the number of parameters the method takes, for example:

This is the code for my Document Method snippet:

// $SymbolContext$ ( $SymbolVirtual$$SymbolPrivileges$$SymbolStatic$)
// Description: 
//	
// Parameters: 
//	$MethodArg$
// Returns:
//	$SymbolType$	



And it generates the following:

	// foo ( private static )
	// Description: 
	//	
	// Parameters: 
	//	int a 
	//	int b
	//	int c
	// Returns:
	//	void	
	static void foo(int a, int b, int c);


Which is great when the function has parameters, but when the function has no parameters it generates the following:

	// foo ( private static )
	// Description: 
	//	
	// Parameters: 
	// Returns:
	//	void	
	static void foo();


Notice that the "Parameters" line is being added. I'd like to have it so the snippet does not generate that line if the function takes no parameters.

How can I do this? Is it possible?

Thanks

Edited by - MikeGameDev on Aug 26 2016 4:38:23 PM

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Aug 28 2016 :  12:31:36 PM  Show Profile  Reply with Quote
I think to do this you would need a custom reserved string, and there is no way to add or modify the default ones at the moment.

I could put in a feature request for you if you like!

For what it's worth I don't find that ugly, I think it helps me see that there aren't any parameters there.
Go to Top of Page

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Aug 29 2016 :  09:38:02 AM  Show Profile  Reply with Quote
Another option could be, if we would insert "void" when there is no parameter. There are many possible preferences.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000