f



Notepad++ functions list

Hi,

From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :

After the association map :
--------------------------

<association langID = "29" id="tcl_procedure"/>

And then, in the parser section, the lines :
--------------------------------------------

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
 <function
   mainExpr="^[\t ]*((proc)[\s]+)"
   displayMode="$className->$functionName">
   <functionName>
     <nameExpr expr="([\w]|:)+"/>
   </functionName>
   <className>
     <nameExpr expr="[\w_]+"/>
   </className>
  </function>
</parser>

But the display only gives :
--------------------------------

 -- (Filename)
 -----"proc" as a class
 ------- proc
 ------- proc
 ------- .... (there is a proc foreach procedure that has been found )

I cannot catch the name of the procedure.

Has anyone tried to use this feature ( with success ;-) ) ?

Thanks,

Olivier.
0
9/3/2013 12:38:53 PM
comp.lang.tcl 23428 articles. 2 followers. Post Follow

7 Replies
4563 Views

Similar Articles

[PageSpeed] 20

Hi Olivier,

Indeed Npp looks promising with the function list.

You made the error of just grabbing only the (proc) part in the main expression.

This works for me:

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
	<function
	mainExpr="^[\t ]*((proc)[\s]+)[^\n]+\{"
	displayMode="$className->$functionName">
	<functionName>
	<nameExpr expr="[\w: ]+ \{.*\}"/>
	</functionName>
	<className>
	<nameExpr expr="[\w_]+"/>
	</className>
	</function>
</parser> 

It would be rather nice to extend this for Itcl and the Other OO-frameworks writing the mixed parser.

regards,
Detlef

Am Dienstag, 3. September 2013 14:38:53 UTC+2 schrieb oc_forums:
> Hi,
> 
> 
> 
> From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :
> 
> 
> 
> After the association map :
> 
> --------------------------
> 
> 
> 
> <association langID = "29" id="tcl_procedure"/>
> 
> 
> 
> And then, in the parser section, the lines :
> 
> --------------------------------------------
> 
> 
> 
> <parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
> 
>  <function
> 
>    mainExpr="^[\t ]*((proc)[\s]+)"
> 
>    displayMode="$className->$functionName">
> 
>    <functionName>
> 
>      <nameExpr expr="([\w]|:)+"/>
> 
>    </functionName>
> 
>    <className>
> 
>      <nameExpr expr="[\w_]+"/>
> 
>    </className>
> 
>   </function>
> 
> </parser>
> 
> 
> 
> But the display only gives :
> 
> --------------------------------
> 
> 
> 
>  -- (Filename)
> 
>  -----"proc" as a class
> 
>  ------- proc
> 
>  ------- proc
> 
>  ------- .... (there is a proc foreach procedure that has been found )
> 
> 
> 
> I cannot catch the name of the procedure.
> 
> 
> 
> Has anyone tried to use this feature ( with success ;-) ) ?
> 
> 
> 
> Thanks,
> 
> 
> 
> Olivier.

0
dgroth (33)
9/13/2013 8:35:27 AM
Op dinsdag 3 september 2013 14:38:53 UTC+2 schreef oc_forums:
> Hi,
> 
> 
> 
> From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :
> 
> 
> 
> After the association map :
> 
> --------------------------
> 
> 
> 
> <association langID = "29" id="tcl_procedure"/>
> 
> 
> 
> And then, in the parser section, the lines :
> 
> --------------------------------------------
> 
> 
> 
> <parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
> 
>  <function
> 
>    mainExpr="^[\t ]*((proc)[\s]+)"
> 
>    displayMode="$className->$functionName">
> 
>    <functionName>
> 
>      <nameExpr expr="([\w]|:)+"/>
> 
>    </functionName>
> 
>    <className>
> 
>      <nameExpr expr="[\w_]+"/>
> 
>    </className>
> 
>   </function>
> 
> </parser>
> 
> 
> 
> But the display only gives :
> 
> --------------------------------
> 
> 
> 
>  -- (Filename)
> 
>  -----"proc" as a class
> 
>  ------- proc
> 
>  ------- proc
> 
>  ------- .... (there is a proc foreach procedure that has been found )
> 
> 
> 
> I cannot catch the name of the procedure.
> 
> 
> 
> Has anyone tried to use this feature ( with success ;-) ) ?
> 
> 
> 
> Thanks,
> 
> 
> 
> Olivier.

0
emacs68 (1)
11/14/2013 4:46:07 PM
Hi Detlef ,

> 
> You made the error of just grabbing only the (proc) part in the main expression.
> 

Thank you for the hint and help, it works fine now ! Concerning object procedures, I am not used to it , and the number of writing possibilities would be puzzling to me.

Best regards,

Olivier
0
11/15/2013 9:46:09 AM
Hi Guys, 
I've created a functionList.xml which supports Tcl and Bash. You can download it from my site: http://99-developer-tools.com/notepad-function-list-tcl-bash/
Best Regards, Andreas
0
aw99 (3)
4/18/2014 11:28:03 AM
> 
> I've created a functionList.xml which supports Tcl and Bash. You can download it from my site: http://99-developer-tools.com/notepad-function-list-tcl-bash/
> 
> Best Regards, Andreas

Hi,

I've tried it : replacing only the Tcl part, or using your file available for download. It keeps crashing on 6.4.3 version of NotePad++ though it works well with Detlef version. What version of NotePad++ are you using ?

Olivier

0
oc_forums
4/18/2014 6:51:55 PM
Hi Olivier, 

Oh, shi**. I'm using 6.5.5. 
Andreas 
0
aw99 (3)
4/21/2014 11:41:42 PM
Hi Olivier, 
 I've rechecked this, you are right. My functionList.xml does not work with Npp 6.4.3. It does work at least with versions 6.4.5, 6.5 and 6.5.5, though.
Regards, Andreas
0
aw99 (3)
4/21/2014 11:43:20 PM
Reply: