functions and folding for a new document type

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
zura

functions and folding for a new document type

Post by zura »

Hi all,

I'm new to Zeus so apologies if my questions will sound ... silly;

I'm trying to define a new language (document type) support for Stata (statistical package with "C like" scripting language, which doesn't always follow all "real language" rules and have few questions:
can folding be customized somehow? like defining regex for fold start and end?

how to make function list to work? first it seems that it only works for the files in workplace, if I just open singla file and want to list functions in it then I get the message "file ... is not in a workplace'.

But even after creating a workplace and opening a file from workplace navigator, functions list still says "file ... is not in the current workplace'.

Can anyone advise me how to solve this?

Thanks in advance,
zura
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Zura,
can folding be customized somehow?
The code folding is done by the xFolder.dll and a such is not really configurable by the user ;(

But I have seen you request for a change to the xFolder.dll in the Code Folding section of the forum and these changes should be fairly easy to make.

So it should be fairly easy to have Zeus folding the Stata code ;)
how to make function list to work? first it seems that it only works for the files in workplace,
There are two function lists in Zeus. The first is the original and it is controlled by the function regexp found in the document type.

So for example in this case something like the following function regexp should work:

Code: Select all

^program
To view the list of functions you use the View, Function List menu item.

To navigate the functions use the View, Function Next and Previous menu items.
if I just open singla file and want to list functions in it then I get the message "file ... is not in a workplace'.
This is the second Zeus function list option. This function list is created by the ctags.exe program and for this to work a workspace will need to be open and the current file will need to be in the workspace.
But even after creating a workplace and opening a file from workplace navigator, functions list still says "file ... is not in the current workplace'.
This will be because ctags.exe does not support Stata and as such is not producing any function information for the file.
Can anyone advise me how to solve this?
To get this to work changes to the ctags.exe will need to be made.

I am quite happy to make these changes as I have done this for another Zeus user who needed changes for the COBOL language:

http://www.zeusedit.com/z300/ctags_src.zip

But for this to happen I will need you to define a few regular expressions for some or all of the following possible tag items:

Code: Select all

    Tag_Class
    Tag_Variable
    Tag_Prototype
    Tag_Typedef
    Tag_Import
    Tag_Macro
    Tag_Function
    Tag_Reference
Given a list of suitable regular expressions, I will be more than happy to add these these regular expressions to the ctags program ;)

Cheers Jussi
Post Reply