[ phpeclipse-Bugs-1477978 ] DEFINE is not parset correctly
"SourceForge.net" <[email protected]> Fri, 23 Mar 2007 10:05:00 -0700
| Newsgroups | gmane.comp.ide.eclipse.phpeclipse.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1477978, was opened at 2006-04-27 17:53
Message generated for change (Comment added) made by scorphus
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1477978&group_id=57621
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PHP Parser
Group: None
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Hertzel (emudojo)
Assigned to: Nobody/Anonymous (nobody)
Summary: DEFINE is not parset correctly
Initial Comment:
When you have some code like this
define('MAX_CONNECTION_STATUS_IGNORE', 1);
define('MAX_CONNECTION_STATUS_PENDING', 2);
define('MAX_CONNECTION_STATUS_ONHOLD', 3);
define('MAX_CONNECTION_STATUS_APPROVED', 4);
define('MAX_CONNECTION_STATUS_DISAPPROVED', 5);
define('MAX_CONNECTION_STATUS_DUPLICATE', 6);
$GLOBALS['_MAX']['STATUSES'] = array(
MAX_CONNECTION_STATUS_IGNORE =>
'strStatusIgnore', // start value
MAX_CONNECTION_STATUS_PENDING =>
'strStatusPending', // start value
MAX_CONNECTION_STATUS_ONHOLD =>
'strStatusOnHold',
MAX_CONNECTION_STATUS_APPROVED =>
'strStatusApproved', // start value
MAX_CONNECTION_STATUS_DISAPPROVED =>
'strStatusDisapproved',
MAX_CONNECTION_STATUS_DUPLICATE =>
'strStatusDuplicate',
);
PHPeclipse underline the keys of the
$GLOBALS['_MAX']['STATUSES'] array, because for
Phpeclipse those GLOBAL variables haven't been
initialized. I have in my include path the folder
containing this file.
----------------------------------------------------------------------
Comment By: Pablo Aguiar (scorphus)
Date: 2007-03-23 14:05
Message:
Logged In: YES
user_id=987242
Originator: NO
I don't confirm this bug. I unsuccessfully tried to reproduce it with this
three different approaches:
Approach one:
[file="1477978_test_01.php"]
<?php
define('MAX_CONNECTION_STATUS_IGNORE', 1);
define('MAX_CONNECTION_STATUS_PENDING', 2);
define('MAX_CONNECTION_STATUS_ONHOLD', 3);
define('MAX_CONNECTION_STATUS_APPROVED', 4);
define('MAX_CONNECTION_STATUS_DISAPPROVED', 5);
define('MAX_CONNECTION_STATUS_DUPLICATE', 6);
$GLOBALS['_MAX']['STATUSES'] = array(
MAX_CONNECTION_STATUS_IGNORE => 'strStatusIgnore', // start value
MAX_CONNECTION_STATUS_PENDING => 'strStatusPending', // start value
MAX_CONNECTION_STATUS_ONHOLD => 'strStatusOnHold',
MAX_CONNECTION_STATUS_APPROVED => 'strStatusApproved', // start value
MAX_CONNECTION_STATUS_DISAPPROVED => 'strStatusDisapproved',
MAX_CONNECTION_STATUS_DUPLICATE => 'strStatusDuplicate',
);
?>
[/file]
Approach two:
[file="1477978_test_02-a.php"]
<?php
define('MAX_CONNECTION_STATUS_IGNORE', 1);
define('MAX_CONNECTION_STATUS_PENDING', 2);
define('MAX_CONNECTION_STATUS_ONHOLD', 3);
define('MAX_CONNECTION_STATUS_APPROVED', 4);
define('MAX_CONNECTION_STATUS_DISAPPROVED', 5);
define('MAX_CONNECTION_STATUS_DUPLICATE', 6);
?>
[/file]
[file="1477978_test_02-b.php"]
<?php
require_once '1477978_test_02-a.php';
$GLOBALS['_MAX']['STATUSES'] = array(
MAX_CONNECTION_STATUS_IGNORE => 'strStatusIgnore', // start value
MAX_CONNECTION_STATUS_PENDING => 'strStatusPending', // start value
MAX_CONNECTION_STATUS_ONHOLD => 'strStatusOnHold',
MAX_CONNECTION_STATUS_APPROVED => 'strStatusApproved', // start value
MAX_CONNECTION_STATUS_DISAPPROVED => 'strStatusDisapproved',
MAX_CONNECTION_STATUS_DUPLICATE => 'strStatusDuplicate',
);
?>
[/file]
Approach three:
[file="1477978_test_03.php"]
<?php
define(MAX_CONNECTION_STATUS_IGNORE, 1);
define(MAX_CONNECTION_STATUS_PENDING, 2);
define(MAX_CONNECTION_STATUS_ONHOLD, 3);
define(MAX_CONNECTION_STATUS_APPROVED, 4);
define(MAX_CONNECTION_STATUS_DISAPPROVED, 5);
define(MAX_CONNECTION_STATUS_DUPLICATE, 6);
$GLOBALS['_MAX']['STATUSES'] = array(
MAX_CONNECTION_STATUS_IGNORE => 'strStatusIgnore', // start value
MAX_CONNECTION_STATUS_PENDING => 'strStatusPending', // start value
MAX_CONNECTION_STATUS_ONHOLD => 'strStatusOnHold',
MAX_CONNECTION_STATUS_APPROVED => 'strStatusApproved', // start value
MAX_CONNECTION_STATUS_DISAPPROVED => 'strStatusDisapproved',
MAX_CONNECTION_STATUS_DUPLICATE => 'strStatusDuplicate',
);
?>
[/file]
For all these tests, all files were parsed correctly and no error nor
warning arose.
I'm using Eclipse 3.2.1 and phpeclipse-1.1.9-cvs-20060920
Regards,
Pablo Aguiar.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1477978&group_id=57621
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV