Eclipse can't figure out which class file an object is coming from? [message #1566226] |
Thu, 15 January 2015 14:03  |
Eclipse User |
|
|
|
I'm looking at an object function, and when I hover and Ctrl+right-click on it, it doesn't underline and nothing happens. When I do that to its calling object, it underlines and takes me to the line where the object is instantiated. When I click the class it's instantiating from, it underlines and shows me a window of multiple files where the class exists, but Eclipse can't figure out which one it's using even though the file is included lines above in the same function...
If PHP can figure this out, I don't know why Eclipse can't. It means I have to selecting which class I think it is (even if I'm not sure) because it isn't checking the include/requires and their paths in every instance or just not relating them properly. I can deduce just by scrolling up the code and looking at which included class matches, which PHP can figure out on run and Eclipse should be able to too.
Is there some fix for this or is this a bug or is Eclipse really completely unable to figure this out? I thought it running the PHP validator to check errors could also put together the pieces on this.
|
|
|
|
|
|
|
|
|
Re: Eclipse can't figure out which class file an object is coming from? [message #1568418 is a reply to message #1567934] |
Fri, 16 January 2015 18:38  |
Eclipse User |
|
|
|
OK so here's a code example:
<?php
require_once(APPLICATION_PATH .'/models/ORMLocal.php');
public function sendConfirmationEmail( $to_email = null, $response = true ) {
require_once(APPLICATION_PATH . '/models/Service/ResponseService.php');
...
I think the issue is that Eclipse can't determine what APPLICATION_PATH is, which I think was the case with the other files I was looking at (which used that among other constants to build the include path).
Is it just not possible for Eclipse to determine constants, or is it not possible for it to determine any include path, or is it just not programmed to?
|
|
|
Powered by
FUDForum. Page generated in 0.08305 seconds