Can VBScript support document-outline

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Wang Guan
Avatar
Dear:
I downloaded a trial version, and run the demo application.
It is powerful to edit VB.net/C# code, but not powerful enough to edit VBScript code.
Is it difficult to add VBScript support, same as VB.net?
for example, the following features seem not to be supported:
Document outline;
code completion;
QuickInfo tips;
Parameters tips;

Is it possible to support it in VBScript? How can I implement it? Is it difficult?

Thank you.

Comments (7)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We haven't converted the VB.NET code to work for VBScript. It's something we might do in the future. If you wanted to tackle it yourself you could purchase the .NET Languages Add-on source code and modify the VB.NET code.

For VBScript, could you go into more detail about what would be reflected for IntelliPrompt? For instance do you reference assemblies with that or are you talking about COM objects instead? We could use as much detail as possible. Thanks!


Actipro Software Support

Posted 12 years ago by Wang Guan
Avatar
Thank you for your reply.
I'd like to tell you about our situation. We needs an editor for VBScript, including the following features:
1. syntax high-light;
2. Document out-line, then user can navigate the whole document easily.
3. IntelliPrompt, then user can edit VBScript easily and efficiently.
For example, when user input "Textbox1", and then "." is pressed, our application gets the information "Textbox1" from the Editor (e.g. SyntaxEditor), and finds which functions are available, then set the information to the Editor, we hope the editor can show them as list, and tooltip.
4. We are also concern about the performance, because there may be more than 5000 lines in one document.

Certainly, other features are also needed as an editor, and we find they are almost available in your SyntaxEditor. We just want to know whether how much we have to cost (money and human resource)in implementing Document outline and IntelliPrompt features, like those in .NET languages Add-on.

Thank you.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Can you paste in a VBScript code sample so that we can see more about how your IntelliPrompt ideas would work? Just want to ensure we're on the same page. If you could paste in code that actually shows the Textbox1 declaration, and how it is used, etc. that would be best.

The .NET Languages Add-on took us months of work to develop, but then again, we were also building v4.0 features along with it. However it's never a fast thing to develop an advanced language, especially for a huge language like C# or VB.NET. Now VBScript is somewhat of a slimmed down version of VB.NET so the recommended way of doing it would be to get the source for the VB.NET language we have, and modify it so that it works for VBScript.

Also, there is a page in the .NET Languages Add-on section of our site that gives a good overview of the steps we followed to build the add-on.


Actipro Software Support

Posted 12 years ago by Wang Guan
Avatar
Our script code is as following:
---------------------------------------------------
function Button_Click1()
Textbox1.UpdateContent("hello,world")
end function
---------------------------------------------------
In the VBscript editor, we hope it can do as following:
when user inputs "Textbox1", and then press ".", it can show
a list of available methods for the "Textbox1" objects. for example,
a list like following:
BackColor
Visible
Text
UpdateContent

Our application is known about the available functions according to the object name "Textbox1", so it can set the information to the Editor.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry I'm still a little confused. So you guys know externally what information to populate the member list with for things like a TextBox1? If so then you could even do this now (other than the AST document outline tree) by using the free VBScript dynamic language and handling various SyntaxEditor events. For instance if the KeyTyped event indicates a "." was typed, look at the token behind, build a member list, and display it. If you have a code-behind class, you can write all the sort of code in the language class itself so it is encapsulated well.


Actipro Software Support

Posted 12 years ago by Wang Guan
Avatar
YES, we can do it by handling SyntaxEditor "keypress" event.
Thank you.

Then my question it, is it possible to implement Document tree for VBscript? or is it difficult?

For example, there are the following VBscript code in the editor
------------------------
Function Func1()
End function

Function Func2()
End function
------------------------

We hope we can establish a document tree(or list), including a list:
Func1
Func2,

Then user can view the document easily.

And We hope code outline is also available for VBScript.

Do we have to buy the sourcecode of The .NET Languages Add-on, and revise it?

Thank you.

[Modified at 05/14/2007 03:46 AM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes you can create a document tree for any language however that requires some form of semantic parsing to determine what tokens mean what. Our parser generator is designed for just that. It helps you build a semantic parser that constructs an abstract syntax tree (AST) of your code document. Then you can use that info to build a document TreeView like we do in our sample for C#, VB, etc.

You could probably write your own parser (with or without the help of our semantic parser) relatively fast that would parse out the function names and where they are. You can even kick this off in a separate thread using our semantic parser service. If you want to get really advanced and parse down to expressions, etc. then purchasing the .NET Languages Add-on source is an option and would give you a base platform that you could trim down for your VBScript needs.

For simple code outlining (code expansion/collapsing), our dynamic VB.NET sample shows how to do it for a VB syntax. You should be able to easily take that code and modify it for VBScript.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 5 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.