#201 sub new not displayed in outline

v0.3.11
closed-fixed
nobody
Outline (28)
5
2006-08-07
2005-09-19
Rémy Schumm
No

the Constructor of Perl-Classes which I normally name to "new" is
not displayed in the outline view.
Under certain circumstances it _is_ actually displayed even with a
special icon, but I cannot reproduce in _which_ circumstances.
All subs which are not named "new" are prperly displayed.
version: 0.3.12

Discussion

  • Jan Ploski
    Jan Ploski
    2005-09-24

    Logged In: YES
    user_id=86907

    The Outline view depends on correct syntax highlighting in the editor. Did
    you also notice broken syntax highlighting when "new" was not recognised?

     
  • Rémy Schumm
    Rémy Schumm
    2005-09-26

    Logged In: YES
    user_id=1347028

    no, the syntax highlight is correct. but - "new" is coloured like a keyword
    (like use, package etc.), as it _is_ actually a keyword in other
    contextes. maybe this is the problem?
    Same problem occurs with other functionnames that are named like a
    keyword. (maybe it's a bad idea to name a function like a keyword?)

    btw - thank you so much for the great work you're doing with e-p-i-c! as
    an old java programmer I feel more at home doing my work in eclipse :-)

     
  • Jan Ploski
    Jan Ploski
    2005-09-26

    Logged In: YES
    user_id=86907

    According to "man perlobj" 'new' is not a keyword in Perl, just a customary
    name for a constructor. EPIC should show it in the outline with a different
    icon, based on this naming convention.

    Can you upload a piece of code in which this subroutine is not displayed
    correctly in the Outline? Maybe you can create a nice test case by stripping
    away all code which does not affect the problem from your source file and
    then uploading it as attachment to this report.

     
  • Rémy Schumm
    Rémy Schumm
    2005-09-27

    Logged In: YES
    user_id=1347028

    attached a minimalstic class that does not display its constructor in the
    outline.
    while typing the comment on top of the class I realized "new" flashing up
    with its special icon very shortly, but not reproducably.

     
  • Rémy Schumm
    Rémy Schumm
    2005-09-27

    Logged In: YES
    user_id=1347028

    ps: I just realised that code folding for "new" does not work, either. "new"
    seems to be ignored as function.

     
  • Jan Ploski
    Jan Ploski
    2005-09-27

    Logged In: YES
    user_id=86907

    It seems that you forgot the attachment...

     
  • Rémy Schumm
    Rémy Schumm
    2005-09-28

    Logged In: YES
    user_id=1347028

    attachment did not find it's way to sourceforge... :-( so here it is:
    TestClass.pm

     
  • Rémy Schumm
    Rémy Schumm
    2005-09-28

     
    Attachments
  • Jan Ploski
    Jan Ploski
    2005-09-28

    Logged In: YES
    user_id=86907

    Fixed in CVS.

    The outline view depends on syntax highlighting to filter out "invalid"
    procedures matched by its "search-for-subs" regular expression and was
    rejecting "new" because of its keyword-like status.

     
  • Jan Ploski
    Jan Ploski
    2006-08-07

    Logged In: YES
    user_id=86907

    Fixed as of 0.4.0.

     
  • Jan Ploski
    Jan Ploski
    2006-08-07

    • status: open --> closed-fixed