Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317781

Summary: Syntax Coloring colors a method as if it is a parameter
Product: z_Archived Reporter: Sylvia Tancheva <silviya>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gadi
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
screen-shot none

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