Function List plugin is available

Don HO
2005-08-10
2013-08-12
<< < 1 2 3 4 > >> (Page 3 of 4)
  • One more (Delphi) *.pas bug:
    [code]
    unit Strings;

    interface
    uses SysUtils;

    resourcestring

      SScenarioFileSelectFilter='Scenario files (*.sce)|*.sce';

    function IDtoVER(FileVerID:TGUID):Cardinal;

    implementation

    function IDtoVER(FileVerID:TGUID):Cardinal ;
      var
        i:integer;
    begin
        Result:=0;
    end;

    initialization
        AppPath:=ExtractFilePath(paramstr(0));

    end.
    [/code]
    in original version there are more "resourcestring" lines. after deleting   SScenarioFileSelectFilter plugin finds IDtoVER function. but after "cleaning" of other lines and language char's plugin didnt find function at all.
    :(

     
    • I didn't understand you! At first, I support only pascal at the moment. For Delphi I have no sources. If you have some troubles or wishes, please send me a Mail with the source code and comment the problems in the code. I have no Pascal or Delphi expirience and so you have to help me to implement it correctly, if it is possible.

      Regards
      Jens

       
      • Now, I know what you mean. You would like to see functions that are typed with a dot (bla.bla).

        The second problem depends on my comment recognition. So the (* in the line is a starting comment. That is the problem!

        I will solve this
        Regards
        Jens

         
  • more on Delphi bugs (part 1).
    Standart TForm unit (*.pas file):

    [code]
    unit FFormMain;
    interface
    uses
      Windows, Messages, ...;
    type
      TFormMain = class(TForm)
        OpenDialog1: TOpenDialog;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
        procedure FormDestroy(Sender: TObject);
        procedure FileReset(ReloadFile,ReloadParams,Scenario:Boolean);   
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    var
      FormMain: TFormMain;

    implementation
    {$R *.dfm}
    procedure TFormMain.Button1Click(Sender: TObject);
    begin
        ...
    end;

    procedure TFormMain.FormDestroy(Sender: TObject);
    begin
        ...
    end;

    procedure TFormMain.FileReset(ReloadFile,ReloadParams,Scenario:Boolean);
    var
        str:string;
    begin
        if ReloadFile then begin
            ...
        end else begin
            ...
        end;
    end;
    [/code]
    FunctionList resolves only first function/procedure name, but uncorrectly understands its place.
    for all other functions/procedures it shows "TFormMain" and correctly understands theirs place.

     
  • more on Delphi bugs (part 2).
    code unit ( *.pas file):
    [code]
    unit STRUC;
    interface
    uses
      SysUtils,Math,Classes,Zlib, ...;
    type
      TIntArray = array of Integer;
      TTwoDimFloat = array of array of Float;

      TQStructure = class
      private
        Fz: array of Float; //Шаг в глубину, для прогрева, чисто рассчетная величина
        FVetv: TQVetv; //для ветвей
        FVetvStep: TIntArray;//массив шагов по длине выработок
        FVetvCount:Cardinal;
        FUzel: TQUzel;  //для узлов
        FUzelCount:Cardinal;

        function GetQUzel(index, depth: Cardinal): TQstruc;
        function GetQVetv(index, step, depth: Cardinal): TQstruc;
        function GetZ(index:Cardinal): Float;

        procedure SetZ(index: Cardinal; const Value: Float);
           procedure SetUzelDim(Value: Cardinal);
           procedure SetVetvDim(Value: Cardinal);

        function GetVetvStep(VetvNum: Cardinal): Cardinal;
           procedure SetVetvLength(VetvNum,StepCount: Cardinal);
      public
        destructor Destroy; override;

      end;
    implementation

    destructor TStatic.Destroy;
    begin
        ...
      inherited;
    end;

    procedure TStatic.Read(S: TStream);
    begin
        ...
    end;

    constructor TUzel.Create;
    begin
    ...
    end;

    destructor TUzel.Destroy;
    begin
        ...
      inherited;
    end;
    [/code]
    on this sample functionlist didnot understand Delphi constructors/destructors

     
  • How about making it possible to use user rules on internal syntax defenitions?

    feks i use a lot of LISP, but it wont allow me to use a user rule AND the syntax at the same time :(

    heres the regexp i used:
    Function Begin => [ \t]*\([ \t]*defun[ \t]+
    Function List Name => [a-zA-Z0-9_+\-*/<>=:.!?@%&|]+
    Function End =>[ \t]+\([a-zA-Z0-9_+\-*/<>=:.!?@%&| \t]*\)

    heres an example:
    (defun add (a b)
      (+ a b)
    )

     
    • Please instruct me. Is this function in LISP a normal function declaration or is it your own creation? If it is not and it is missed in my parsing rules, I will add it.

      This feature is not so complicated to implement, but I think it is not necessary. If you don't think so, please let me know.

      Regards
      Jens

       
  • Thanks a lot for correct Delphi Function names support!!!
    only one small bug found:
    [code]
    procedure TData.WriteAll(S: TStream);

      procedure WriteGran(something);
      begin
            ...;
      end;

    begin

      for i:=1 to 6 do
        WriteOne(something[i]);
      ...
    end;
    [/code]
    only embedded procedure "WriteGran(something)" is found, "mother" procedure "TData.WriteAll(S: TStream)" - not found ):

     
  • hi,
    really nice plugin, but I'm missing one thing that would make it perfect.

    listing all variables aswell

    that would make the displaying a bit more complex, because then i'd say a tree view would be the best choice

    so that every function in the list has a little plus that when you click on it, you get a list with the variable names which have a plus besides them and when you expand this one, you'll see all occurrences of that variable in the script listed.

    I hope you get the point, this would be a very nice addition, please comment if you would consider adding it or not..

    Rregards, anonymous

     
    • Implementation of this feature for every language is big problem and the parsing time increses again. Currently there exsit a big problem with the parsing time on big files. If you have an idea to decreses the time, let me know. Then it will be possible to add variable names and maybe also other stuff.

      Regards
      Jens

       
  • Jens,

    Great plugin - I've been hooked on CodeWright for a long time because it had this functionality.

    One "feature" I've uncovered in the Function List plugin is that it doesn't handle parentheses within comments. Example:

    // Return (DWORD):
    //              Zero = Command completed successfully
    //          Non-Zero = WWWXXYYZZ where:
    //                In the event of a drive reported error (Check Condition):
    //                  WW = SCSI Sense Key
    //                  XX = SCSI Sense Code
    //                  YY = Additional Sense Code Qualifier
    //                  ZZ = FRU code
    //                In the event of an ASPI reported error:
    //                  WW, XX & YY = 0
    //                  ZZ = The ASPI error code (refer to WnASPI32.h for error
    //                       code definitions)

    When I had the above in comments preceding the actual function, my function list showed "error" as the function name and double clicking "error" would take me to the first line in the comment box with the parentheses. I'm sure it's the parentheses causing problems because I replaced them with brackets ('[' & ']')and the function name suddenly appeared & everything worked correctly.

    Keep up the good work!!!!!!!

    Steve

     
    • Yesterday, after my post I found a solution and I fixed the bug. It was easier as I expected. Now the new version of Function List Plugin is available in the download section. Please download the version 0.13.

      Have Fun
      Jens

       
    • This problem is known and listed in the bugtacking list. I have currently no solution.

      Regards
      Jens

       
      • f0dder
        f0dder
        2006-07-26

        I suppose you're doing RegEx scans to build the function list? I can see two solutions... #1 would be writing a "real" scanner - lots of work. #2 would be doing a little pre-processing (ie, comment handling) before you do the RegEx'ing...

         
  • It's cool~~~!  I am looking for it.

     
  • I would love to see a feature where i can define which api to use for certain extensions. E.g. for .php files i would to see on the php.api functions. Can i do that and if not, can you please add that to the dev list.

     
  • Yes, in a later version I change this behaviour.

    Best Regards
    Jens

     
    • Hi !
      I use fortran 77 and I want to ask how can I do to write a comment (with notepad++) with the symbol "'" which is recognised by fortran 77. "!" is unknown by fortran77 

       
  • Hello,
    Great work.  I have a small request for JavaScript function parsing.

    The plugin works great for functions like this:
    function test()
    {
        alert("test");
    }

    However, for functions defined like:
    var myclass = Class.create();
    myclass.prototype = {
       someProperty: null,
       someFunction:  function(){
         //function body
       } 
    }
    The function is not found.  This style is popular in the AJAX code like prototype (http://prototype.conio.net/)

    Thanks
    Chris W.

     
  • Function List plugin listed funtion of C++ code isn't full.
    Example:

    #include "stdio.h"

    void A1()
    {

        return status;
    }

    void A2()
    {
        return;

    }

    void A3()
    {
        //***
        return status;
    }

    void B1()
    {
        return;
      
    }

    void B2()
    {
         return;
      
    }

    void B3()
    {
        return;
    }

    void B4()
    {
        return;
    }

    void B5()
    {
        return;
    }

    void B6()
    {
        return TRUE;
    }

    All funtion B don't display in Function List.
    If delete comment in function A3 then Function list display OK.

     
    • I am sorry, but for me it works perfectly. Maybe it depends on the used version. Please have a look on download section at n++ homepage.
      If you are useing the latest version, contact me via mail.

      Regards
      Jens

       
  • Thanks for your reply.
    My Function List plugin is old.
    In v0.14, It displays OK.
    Regards.
    HK

     
  • Hello,
    I write code in vbs/hta and the functionList is a great tool, but the List for VB/VBS is not correct:

    example:
    sub testA()
    ...
    end sub

    sub testB
    ...
    end sub

    The sub testB is missing in the List - the plugin needs the () to parse testB...
    The same by function xxx()

    Another thing:
    where can I configure "buildIn" languages like vbs?

    I use v0.14

    Thanks
    AA

     
    • I change it asap!

      > Another thing:
      > where can I configure "buildIn" languages like vbs? 

      Not possible at the moment. Commes up with later version.

      Best Regards
      Jens

       
      • Hello Jens,

        super! I have still two ideas :

        1. can you create a tooltip for each item in the functionlist with the definition of the function ('function begin', 'function list name' and 'function end'). It's for a quick view for parameters...

        2. can you create/define a 'commentTag' like javadoc /** or so in the languageComment (vbs: '-- blubblub --- or so). If I edit large files with many function's, the functionlist is very large and unclearly. And such a 'highlighted'  comment bring a structure in the list (bold or so)

        A question: can you implement the class-methodes in vbs like php:

        class Test
          function func1()
          ...
          end function

          sub sub1
          ...
          end sub
        end class

        in the functionList then
        class1.func1
        class1.sub1

        thank you
        greetings
        AA

         
<< < 1 2 3 4 > >> (Page 3 of 4)