Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#191 Syntax Coloring and Outline Error w/ File Test

v0.3.11
closed-fixed
nobody
None
5
2006-08-07
2005-08-30
Jeff
No

Syntax coloring becomes messed up after use of a file
test (-s, -e, etc.). Additionally, as a result, some
subroutines following a file test may not show up in
the Outline list of subroutines. Pasting the following
code snippet into a Perl file will show you what's
going on. Notice how the subroutine "two" is not
colored correctly and does not appear in the Outline
view. I'm using Eclipse 3.1 in Windows XP Pro with EPIC
0.3.11.

----(also attached as Test.pl)----

$file = "test.txt";

sub one
{
if( -s $file == 0 )
{
print "Test is empty\n";
}
}

sub two
{
print "My subroutine doesn't show in outline";
}

Discussion

  • Jeff
    Jeff
    2005-08-30

    Test.pl

     
    Attachments
  • Jan Ploski
    Jan Ploski
    2005-09-09

    Logged In: YES
    user_id=86907

    The problem was that the filetest operators were not described as such in the
    syntax coloring specification (perl.xml) and would therefore be confused with
    regexp operators. Notice that -s was causing problems while some other
    filetest operators were not.

    I updated perl.xml to explicitly include all filetest operators. Now it works as
    expected... let's hope without side effects elsewhere.

    Fixed in CVS.

     
  • Jan Ploski
    Jan Ploski
    2006-08-07

    • status: open --> closed-fixed
     
  • Jan Ploski
    Jan Ploski
    2006-08-07

    Logged In: YES
    user_id=86907

    Fixed as of 0.4.0.