Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317781 - Syntax Coloring colors a method as if it is a parameter
Summary: Syntax Coloring colors a method as if it is a parameter
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 03:44 EDT by Sylvia Tancheva CLA
Modified: 2020-05-14 11:33 EDT (History)
1 user (show)

See Also:


Attachments
screen-shot (17.22 KB, image/png)
2010-06-24 03:44 EDT, Sylvia Tancheva CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvia Tancheva CLA 2010-06-24 03:44:23 EDT
Created attachment 172575 [details]
screen-shot

1. Use the code bellow
2. Go to Syntax Coloring preferences, enable and change colour of Parameter variables (for example red) - Apply - OK

Notice that the syntax Coloring shows red both the parameter $cmd and cmd which is a method from class Staf (see the screen-shot)

<?php
class Utils {
    static protected $snapshot_obj;
    
    /**
     * exec() - wrapper to php exec() function
     *
     * @param string $cmd - cmd to execute
     * @param boolean $return_output - whether to return the output of the command, or simply the boolean result (the default)
     * @param int $failure_severity - what is the failure severity - the higher the critical. (default=0) - if -1 passed, then will not throw exception
     * @param Staf $staf_handle - either null (default), or the staf handle to work with
     * @param array $ignore_rcs - erroneous return codes which should be ignored
     * @param boolean $fix_quotes - whether to quote fixing (default=true, relevant to staf only)
     * @return either cmd output or boolean result
     */
    static public function exec($cmd, $staf_handle=null, $return_output=false, $failure_severity=0, $ignore_rcs=array(), $fix_quotes=true) {
        if ($staf_handle instanceof Staf) {
            $res = $staf_handle->cmd($cmd, '', false, $return_output, $ignore_rcs, $fix_quotes);
            if ($return_output) {
                $res = $staf_handle->stafcmdout_to_array($res);
            }
            
            return $res;
        }

        // More code here ....
    }
}
Comment 1 Zhongwei Zhao CLA 2010-06-24 06:11:11 EDT
fixed in head
Comment 2 Gadi Goldbarg CLA 2010-08-19 11:15:43 EDT
Verified fixed.
Kalin Yanev
kalin.a@zend.com