Page 1 of 1

Code explorer methods shown as "Other"

Posted: 26 Apr 2009 18:42
by Ger Teunis
Because I work a lot with bash scripts which have lots of methods I wanted to add the ability to view methods in "Code explorer"

Syntax of functions are
functioname()
{
//some methods here
}

What I did:
Opened "Syntax editor", opened bash syntax.
Went to code folder/explorer

and made sure the following items where added
Fold_begin {
Fold_end }
Fold_List_item = ceMethod.

But for some reason with the above configurtion all methods are visable, but only in "Unknown objects".

Second item:
Tracking doesn't work for unknown in 5.10.

Third:
Is it possible to select the first item in "general" when only one item (like Module) is available?

Posted: 26 Apr 2009 20:52
by Rickard Johansson
Enter

Fold_begin {
Fold_end }
Fold_List_item <empty>

and enter something in List_Exclude=<string>|<string>...

For some reason List_Exclude need at least 1 string for it to work :D

Posted: 26 Apr 2009 21:08
by Ger Teunis
Thanks, that worked!
It seems that active method tracking doesn't work at the moment.

Also, could you give me suggestion about:

But in bash I also can have constructs like

Code: Select all

TEMP="`cat "$path/appinfo.json" | grep -v "enabled" | sed "s/{/{\\n    enabled=\\"1\\",/g"`"
The s/{/{\\n part of this line breaks the method detector, all subsequent methods are not found anymore.

Can I configure the syntax that subsequent items are detected?
I.e. using the ` and start and end for a block or so?
(` cause the text in between to be executed, no need to detect methods there)

Posted: 27 Apr 2009 08:31
by Rickard Johansson
You could try this:

Code: Select all

BlockName = Modifiers ?
BlockOnLine = Yes
BlockAsString = Yes
BlockStart = /
BlockEnd = <empty>

and

EndOpenBlockAt = 0123456789+-*/\=[]();:.,'"
It may give some strange highlighting at times, e.g. appinfo will be highlighted in $path/appinfo.json

Posted: 27 Apr 2009 18:03
by Ger Teunis
Nice hack around :)
Thanks, it did work!