Link to XLnow Homepage
Home
Login Register Member List
XLnow OnScript Forums   » OnScript Editor   » Feature Requests   » Code Folding and Code Validati...  

Welcome Guest ( Login or Register )

Code Folding and Code Validation (vbScripts)
Author
Message
Posted 17.02.2005 15:16
Forum Newbie
Forum Newbie

Group: Forum Members
Active: 08.03.2005
Posts: 4

I have been looking for a tool to work with VBScripts that supports Code Folding and Validation. Basically meaning that it should be able to fold code around complete chunks such and all I have to do is click on the + sign to expand.
+Sub widget
End sub
Expands to
 
Sub Widget
+For I=1 to 10
+Do while xxx
End Sub
 
Etc
Also as a corollary to this it should be able to show For's without nexts, If's without End Ifs etc.. when a code validation is requested. Deeper code validation would be cool but a least checking for standard pairs like this and folding around them would be very useful.
 
The other great feature would be a code layout standardiser that indents code automatically based upon standard rule sets so that each section gets the correct indent like
dim a
dim b
For i=1 to 10
  b=b*i
  If b=10 then
     wscript.echo "This is a daft script!"
  ENd If
Next


Also it should capitalise words correctly so that
DIm is corrected to Dim
for goes to For
ENd if becomes End If
wscript.echo becomes WScript.Echo
etc
So that we get standard presentation.

 

IP Logged
This member is offline.
Posted 22.02.2005 19:11


Forum Administrator
Forum Administrator

Group: Forum Moderators
Active: 13.04.2009
Posts: 78

Simon, thank you for the excellent wish list! We have some ideas regarding the additions you mentioned and here is what I can tell you now:

Auto-Capitalization has been requested frequently and is on our TODO list. This feature should appear in one of the 1.x versions. Not in 1.1 (which we are testing now) but before 2.0.

Folding has been requested as well and we would very much like to add folds. However so far we thought of folds as something on a Sub/Function/Property level. Folding code around more granular blocks is certainly something we should think about. Would probably make sense to integrate with statement completion. Sorry, no plans yet.

I've personally been thinking to add some sort of source code beautifier (or code layout standardizer as you call it). At this point I'm not sure if it should work while typing or as a batch command, perhaps with preview. Open for suggestions...

Cyril Baratoff
XLnow - the makers of OnScript

IP Logged
This member is offline.
Posted 22.02.2005 20:27
Forum Member
Forum Member

Group: Forum Members
Active: 19.03.2005
Posts: 12
Being able to fold logic sub-blocks is a great idea.
Regarding routines, a collabsable object list in the filename window, clickable to jump to a routine, would be nice. Codewright has it; very handy.Joe Chasko
IP Logged
This member is offline.
Posted 22.02.2005 20:30


Forum Administrator
Forum Administrator

Group: Forum Moderators
Active: 13.04.2009
Posts: 78

Version 1.1 (which we are testing now) has what we call the Outline tab: a list of variables, subs, functions, classes etc. You can use it to navigate the code and to add new objects.

Cyril Baratoff
XLnow - the makers of OnScript

IP Logged
This member is offline.
Posted 23.02.2005 12:14
Forum Newbie
Forum Newbie

Group: Forum Members
Active: 08.03.2005
Posts: 4
Quote: Simon, thank you for the excellent wish list! We have some ideas regarding the additions you mentioned and here is what I can tell you now: Auto-Capitalization has been requested frequently and is on...

Thanks for your reply, in comment to it.


1. Auto-Capitalization is great, looking forward to it, however will it run on existing code. For example I don't just need a Word type autocorrect solution, but a menu option to fix bad Capitalization in existing code when I load it in.


2. Folding around Sub/Function/Properties is definitely welcome, but it does nothing to show If/Then/Else If/End If groups not For/Next groups. The number of these groups are fairly small in VBScript so it should not be too difficult to read down the code from the start of the block looking for the matching end of a block and if you hit an end of a function/sub/etc before the end of a IF block should highlight the starting IF section with a ! mark so can see unfinished/unclosed blocks. This is the number one feature I would love and if your product had it I would purchase immediately!!


3. Code completion/IntelliSense etc, this would be way cool for VBScript, but would it also cover objects created for their methods etc so say
Set IE = CreateObject("InternetExplorer.Application")
IE.xxxx would be available by auto-complete. That would be very Visual Studio cool!!


4. The source code beautifier would be perfect as a menu command. I am not too worried about the layout as I type (although if you can do that then it would be fantastic!!), but when I finish typing having a menu option to beautify it would be enough. If you can offer the menu version now and then add the in-line beautification then that would be great!!

 

IP Logged
This member is offline.
Posted 23.02.2005 13:04


Forum Administrator
Forum Administrator

Group: Forum Moderators
Active: 13.04.2009
Posts: 78

2. Folds:
Now that is a clear statement!

1. Capitalization and 4. Beautifying in general:
I think that it indeed might be helpful if we delivered a batch mode beautifier first. It could cover both and we would implement it faster.

3. Code completion:
We have this in 1.0. At times we find that OnScript does not recognize some type libraries correctly and the feature fails. Let us know if you find that this happens. But IE should be OK, I just checked.

Cyril Baratoff
XLnow - the makers of OnScript

IP Logged
This member is offline.
Showing page 1 of 1 - 6 messages found
« Next Oldest :: Next Newest »

Powered by InstantForum.NET v3.4
Copyright © 2002, 2004, InstantASP Ltd. All rights reserved.