Class Browsing and Intellisensing

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
jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Class Browsing and Intellisensing

Post by jussij » Wed Oct 19, 2005 4:35 am

I just realised the Exuberant Ctags, used by Zeus for the class browsing and intellisensing features, uses regular expression to implement tagging for the following languages:
  • COBOL
  • JavaScript
  • REXX
  • S-Lang
  • YACC
But unfortunately the default Exuberant Ctags build comes with regular expressions disable, effectively meaning none of these languages are currently working :(

I am quite happy to create a new Exuberant Ctags build with regular expressions enable, if there is in fact a need for these languages to be supported :)

Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

COBOL Support

Post by pwdiener » Wed Jul 11, 2007 3:52 pm

Is this still this way? I don't seem to be able to get COBOL tags working. I'm using the internal tagger. I downloaded just today.

Also, a question about COBOL folding. What is the current state of folding support for COBOL? After reading the posts on this, I'm unclear. One folding capability that would be useful to me is the ability to fold paragraphs in the PROCEDURE division. This would simply hide/show the program code in a paragraph. Can the current folding support do that?

I haven't used Zeus much yet, but what I've seen looks like a good fit for me.

TIA

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Thu Jul 12, 2007 1:00 am

Is this still this way? I don't seem to be able to get COBOL tags working.
I will build the regexp dll version of ctags an set up a download like. Check back here is a day or two ;)
Also, a question about COBOL folding. What is the current state of folding support for COBOL?

As you may or may not be aware the Zeus folding is pretty much hard coded into the editor. For this reason, it does rely heavily on the feedback of users to add/fix any folding issues.

If you have found an error with the cobol code folding just post a snippet of code that highlights the error.
One folding capability that would be useful to me is the ability to fold paragraphs in the PROCEDURE division.
If you have an example of this PROCEDURE code post it to this code folding forum. But remember, because of the Zeus folding design not all fold points can be implemented :(

But when ever possible the folder will be change ;)

Cheers Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

cobol CTAGS

Post by pwdiener » Thu Jul 19, 2007 8:42 pm

Any progress on the COBOL supporting version of CTAGS?

What do I have to do to enable folding support, for COBOL specifically? From previous discussion of COBOL folding, it appears that what I'd like might work already and I'd like to try it out. I think the indentation level-based folding might accomplish what I want. If not, I'll post some code that will demonstrate what I'm requesting.

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Jul 23, 2007 12:02 am

Any progress on the COBOL supporting version of CTAGS?
Unfortunately I still have not been able to get the CTAGS build to work with regexp support :(

Some years back I did manage to get this build to work, but since then I have forgotten what I did and the CTAGS home page does not seem to have any instructions to guide me :(

But when I get a bit more time I will try again ;)
What do I have to do to enable folding support, for COBOL specifically? From previous discussion of COBOL folding, it appears that what I'd like might work already

If you open a COBOL file with .cob file extension Zeus will do COBOL code folding for that file.

If you have a COBOL file with some other file extension just let me know.
If not, I'll post some code that will demonstrate what I'm requesting.
In general if anyone should find an issue with any of the Zeus code folding modules, posting some code to the folding forum is a good start to getting the folding issue fixed:

http://www.zeusedit.com/forum/viewforum.php?f=8

Cheers Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

Code Folding

Post by pwdiener » Mon Jul 23, 2007 1:15 pm

Thanks. I was using CBL, but COB will work fine for me. I let you know if I have any problems with it.

I appreciate your efforts on CTAGS. I keep checking periodically.

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Jul 23, 2007 11:08 pm

If you open this file in Zeus:

Code: Select all

c:\Program Files\Zeus\xfolder.ini
and change this line:

Code: Select all

Cobol=cob
to read:

Code: Select all

Cobol=cob;cbl;
and restart Zeus then the folding will also work for .cbl files ;)

If you find any problems with the COBOL folding just post some sample code and a description to the Code Folding section of this forum.

Cheers Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

COBOL CTags

Post by pwdiener » Wed Jul 25, 2007 1:13 pm

Jussi,

I've downloaded the Exuberant CTags source and rebuilt ctags.exe with regex enabled. I copied that in to the Zeus directory as xtags.exe. Now, I can build a tag database for my COBOL program. However, something seems to be wrong.

When I edit the program, I can select a COBOL paragraph name and when I press F11 for Find Current Word, I usually get taken to that paragraph in the program - the key word is usually. This doesn't seem to work consistently. In some cursory testing, it appears that if the paragraph definition line has a sequence number (something in the first 6 columns of the line), then the paragraph won't be found.

Another issue is that no data element names are found with the tag search.

Any ideas?

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

Additional Info

Post by pwdiener » Wed Jul 25, 2007 1:48 pm

Some additional info:

I ran the version of Exuberant CTags I compiled at the command line against the same COBOL source file. Command line options were:
--verbose -f <tag file> <source file list>
as suggesting in the buildcmd.bat file.

When looking at the resultant tag file, all the paragraphs are present, including the ones Zeus said it couldn't find (with the sequence number present instead of blank). The tag type (extension field) seems to vary between p (paragraph) and g (group), however, with g on the paragraph-names with non-blank sequence numbers.

All the data element names seem to be present in the tag file, with tag type d or g as expected.

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

A bit more info

Post by pwdiener » Wed Jul 25, 2007 3:03 pm

I modified the cobol.c file for Exuberant CTags to eliminate the first 6 columns (sequence number) from consideration and eliminate comments (* in col 7). This seems to have corrected the problem with paragraphs being found.

Are data elements (type d) and group elements (type g) excluded by Zeus?

Is there a definition of the .ZBD file format available?

Sorry for all the add-ons to this topic, but I keep finding new data...

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Jul 25, 2007 11:56 pm

Command line options were:
--verbose -f <tag file> <source file list>

These are the command line arguments used by Zeus itself:

Code: Select all

--c-types=+fp --excmd=p --fields=+afmikKlnsSz --sort=no
Are data elements (type d) and group elements (type g) excluded by Zeus?

Most probably :(

In theory Zeus defines the following tag types and the xTags.dll maps the ctags information (ie the p'gs and g's) to one of these tag types:

Code: Select all

Tag_Class     
Tag_Enum      
Tag_Enumerator
Tag_Function  
Tag_Interface 
Tag_Macro     
Tag_Method    
Tag_Package   
Tag_Prototype 
Tag_Structure 
Tag_Typedef   
Tag_Variable
If you have a suggesting as to how the ctags information should be map to these tag types for the COBOL language I would be more than happy to implement a new xTags.dll for you to try ;)

If you like I can also incorporate your cobol.c changes as well to the xtags.exe.

Just send the details to: jussij@zeusedit.com
Is there a definition of the .ZBD file format available?

The .ZBD file is in fact a SQLite database. For example you could use a database browser to view the contents of the .ZBD file:

http://sqlitebrowser.sourceforge.net/

The actual .ZBD database design is definitely not the greatest, mainly because it was at one stage a binary file. The database structure is effectively nothing more than this original binary file format mapped to a database.

Cheers Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

CTags Mapping

Post by pwdiener » Thu Jul 26, 2007 8:45 pm

If you have a suggesting as to how the ctags information should be map to these tag types for the COBOL language I would be more than happy to implement a new xTags.dll for you to try


According to ctags, for COBOL it outputs the following tag kinds
d - data items - I would map to Tag_Variable
f - file descriptions - I would map to Tag_Interface
g - group items - I would map to Tag_Structure
p - paragraphs - I would map to Tag_Prototypes
P - program ids - I would map to Tag_Package
s - sections - I would map to Tag_Macro

I've seen where you can change the labels for these for a workspace - is there a set of labels by document type? I know I can save my labels as defaults, which will probably work for me as long as I stay with COBOL, but I do work with other languages too.

I also see there is References label - where does that come in to play? Is it a tag type?
If you like I can also incorporate your cobol.c changes as well to the xtags.exe.
I'll send them to you when I get them finalized - I'm still tinkering with getting them working just right.

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Fri Jul 27, 2007 12:04 am

According to ctags, for COBOL it outputs the following tag kinds
d - data items - I would map to Tag_Variable
f - file descriptions - I would map to Tag_Interface
g - group items - I would map to Tag_Structure
p - paragraphs - I would map to Tag_Prototypes
P - program ids - I would map to Tag_Package
s - sections - I would map to Tag_Macro
I will implement these tag types in the xTags.dll and send you a copy for testing.
I've seen where you can change the labels for these for a workspace - is there a set of labels by document type?
I don't think these labels would work if they where in the document type :?

As you would know these labels define the text used in the class browser panel. So if this information was in the document type the rule would have to be something like use the labels from the first document found in the workspace as it is loaded, or somehow use the information from the currently active document type.

Both of these approaches don't seem terribly intuitive to me :?

But I thing a better solution might be to define some sort of Label Language Group and add this to the workspace label panel.

Basically this would let you create different groups of labels (ie COBOL Lables, Java Labels, C/C++ Labels etc) and thus provide an easy way to quickly setup the labels for the workspace.
I also see there is References label - where does that come in to play? Is it a tag type?
It looks like it's not currently used for anything. It suspect it might have been there in the days of the .ZBD binary file format :?

Cheers Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

Labels

Post by pwdiener » Fri Jul 27, 2007 1:36 pm

What would happen if a workspace was for a mixed-language project? Which set of labels would be used in the class browser, and under what conditions?

Using your suggestion looks like it's more flexible. However, if the meaning of a tag kind is wildly different between language (e.g. in C a macro is a macro, in COBOL it's a section), the class browser display could be a little odd no matter which way it's done. It probably wouldn't be right to only show the tags that come from a specific language, and in any event the database doesn't look like it would accomodate that.

Oh, well. What's there now will work well for single-language (or "compatible" language) development.

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 15 guests