Using the Code Explorer Panel

Ask how to do things or if a certain feature is available in the program.
Post Reply
serk237
Posts: 10
Joined: 21 Dec 2018 18:13

Using the Code Explorer Panel

Post by serk237 » 15 Jan 2019 22:15

Hello everyone. I use RJ Texted to edit an obscure language. I am trying to understand how to get custom items to appear in the Code area under Structures, Methods, etc.
I need to define custom items but cannot seem to get it done. If I use NOTE this appears in my TODO list perfectly, but I cannot use NOTE everywhere.

I am sure I am missing something simple any help or direction would be appreciated.

Thanks in advance!

serk237
Posts: 10
Joined: 21 Dec 2018 18:13

Re: Using the Code Explorer Panel

Post by serk237 » 15 Jan 2019 23:56

Maybe this is a better wording of question:

If I open an HTML file and I go to the code Explorer Panel. then look under the Tags tab. I will see <>script src="followed by what is on that line"

How can I get my own Tag to appear in that window like the script tag?

For example: I would like all lines that have :SECTION= to appear like script src=.

Sorry for any confusion.

User avatar
pjj
Posts: 1658
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Using the Code Explorer Panel

Post by pjj » 17 Jan 2019 11:38

Sadly, I have no idea how to do it; I suppose it is hardcoded and e.g. "Show Methods" simply scans the source looking for "function" keyword (but that's my guess). Btw. TODO and NOTE keywords are indeed hardcoded.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 5802
Joined: 19 Jul 2006 14:29

Re: Using the Code Explorer Panel

Post by Rickard Johansson » 20 Jan 2019 14:52

You could try to create your own HTML syntax file and add your own tag to the "Code folding/Explorer" section.

If you examine the HTML syntax file (HTML.syx) it contains the following lines in the fold section:

[Fold]
...
8_Id=<script
8_Begin=
8_End=</script
8_EndBefore=
8_Section=
8_NoParentOfId=0
8_NotAlwaysEnded=0
8_ListItem=ceTagScript
...

These lines will add the script tag to the explorer window.

If you find the syntax editor a bit to complicated to use, you can edit the syntax file manually. Just remember to copy all HTML syntax files to the "Syntax\User defined" folder first and edit them there.
The downside of maintaining your own version is that you may be missing out on new additions that I make to the HTML syntax files.

serk237
Posts: 10
Joined: 21 Dec 2018 18:13

Re: Using the Code Explorer Panel

Post by serk237 » 28 Jan 2019 18:52

Thanks pjj and Richard!

I will try your suggestions.

Post Reply