You are here: PSPad forum > English discussion forum > Code Explorer Additions

Code Explorer Additions

#1 Code Explorer Additions

Posted by: JB | Date: 2015-04-17 14:47 | IP: IP Logged

I understand there are no user defined capabilities to the Code Explorer.

I program in the Fivewin language similar to other dBase derivative languages like FoxPro and Harbour. Fivewin uses the same PRG extension.

Code Explorer supports Functions fine. But I program mostly in OOP so I really need support for CLASS and METHOD syntax.

Sample:


Class TCustomer from TDatabase
---Method New()
Endclass

Method New() Class TCustomer
---...
Return self

[It seems that the forum's code format does not support indentations, so I have used dashes in place of what should be spaces.]

If support for that syntax could be added it would be extremely appreciated.

Thanks,
James

Options: Reply | Quote | Up ^


#2 Re: Code Explorer Additions

Posted by: pspad | Date: 2015-04-17 14:56 | IP: IP Logged

There is no problem to improve Code explorer.
Can you send me some real code sample with Classes?
Did I understand well, that you use FoxPro highlighter for your language?

There is no problem to easily create user code explorer for your language, if you miss some keywords e.t.c.

Options: Reply | Quote | Up ^


#3 Re: Code Explorer Additions

Posted by: JB | Date: 2015-04-19 05:07 | IP: IP Logged

Thanks for the reply. I'm not sure what you mean by "real code." What I provided in my previous message was pretty close. Here is a real working example.

#include "fivewin.ch"

Function Main()
TTest():new()
Return nil

Class TTest
METHOD New()
Endclass

Method New()
msgInfo("Test class")
Return self

If you need something else, please explain.

If this can be user defined for Code Explorer, where might I find an explanation of how to do it?

JB

Options: Reply | Quote | Up ^


#4 Re: Code Explorer Additions

Posted by: JB | Date: 2015-04-19 05:22 | IP: IP Logged

I forgot to answer your question about which highlighter I am using. I couldn't find a FOXPRO.INI file in the syntax directory so I am pretty sure I copied the CLIPPER.INI file and named it FIVEWIN.INI. However I did this a long time ago so I don't remember for sure.

My FIVEWIN.INI does contain the keywords CLASS and METHOD. But I could not figure out how to set it so Code Explorer recognized them.

JB

Options: Reply | Quote | Up ^


#5 Re: Code Explorer Additions

Posted by: pspad | Date: 2015-04-19 09:16 | IP: IP Logged

OK. There are 2 possibilities:

1. I will extend FoxPro code explorer
2. I can create code parser suited for your language.

In case 2 I need to know what should be as content of code explorer and some real code source samples to set up code parser.

Options: Reply | Quote | Up ^


#6 Re: Code Explorer Additions

Posted by: JB | Date: 2015-04-20 15:19 | IP: IP Logged

Sorry, I don't think I have enough knowledge to make a judgment about this. Can you tell me the pros and cons of each method?

Options: Reply | Quote | Up ^


#7 Re: Code Explorer Additions

Posted by: pspad | Date: 2015-04-20 15:46 | IP: IP Logged

I am afraid when I will modify code parser for FoxPro, It can cause false positive in FoxPro language.
If I will make special code parser for your language, it will fit to this language only and you can say what do you want to see in the Code explorer.

Options: Reply | Quote | Up ^


#8 Re: Code Explorer Additions

Posted by: JB | Date: 2015-04-20 18:47 | IP: IP Logged

Are you are talking about the INI file? Or, is there something else involved?

The only addition I need is to have the Code Explorer tree recognize Classes and Methods, similar to how does Functions. So it would show:

Functions
...Main()
...DoThis()

Class TCustomer
...New()
...Balance()

Class TInvoice
...New()
...Print()

[I am merely using the ... to show indents since the forum can't.]

It would show multiple classes only when they are in the same file.

This would really makes things faster for me. Much faster. Right now I am working on a simple prototype that has about 8 classes in the same file. It is very tedious trying to find the right method especially when there are multiple methods with the same name in the same file.

Most of the real code I am working on now is proprietary, so I will have to look for some older code I can provide.

Thanks for your consideration to add this feature.

Options: Reply | Quote | Up ^


#9 Re: Code Explorer Additions

Posted by: pspad | Date: 2015-04-20 19:07 | IP: IP Logged

Are you able to send me to support mail your language file FIVEWIN.INI and your source code file?
I will create new code parser or update existing one.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR