Skip to main content



      Home
Home » Language IDEs » PHP Development Tools (PDT) » Eclipse can't figure out which class file an object is coming from?
Eclipse can't figure out which class file an object is coming from? [message #1566226] Thu, 15 January 2015 14:03 Go to next message
Eclipse UserFriend
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 #1566536 is a reply to message #1566226] Thu, 15 January 2015 18:06 Go to previous messageGo to next message
Eclipse UserFriend
What PDT version you have? We fixed couple "link related" issues in current nightly [1]. Will be released with Luna SR1

[1] - download.eclipse.org/tools/pdt/updates/nightly-latest
Re: Eclipse can't figure out which class file an object is coming from? [message #1566537 is a reply to message #1566536] Thu, 15 January 2015 18:06 Go to previous messageGo to next message
Eclipse UserFriend
Sorry, wrong url: http://download.eclipse.org/tools/pdt/updates/latest-nightly/
Re: Eclipse can't figure out which class file an object is coming from? [message #1567894 is a reply to message #1566536] Fri, 16 January 2015 11:44 Go to previous messageGo to next message
Eclipse UserFriend
Dawid Pakula wrote on Thu, 15 January 2015 23:06
What PDT version you have? We fixed couple "link related" issues in current nightly [1]. Will be released with Luna SR1

[1] - download.eclipse.org/tools/pdt/updates/nightly-latest


Eclipse for PHP Developers

Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
Re: Eclipse can't figure out which class file an object is coming from? [message #1567917 is a reply to message #1567894] Fri, 16 January 2015 11:55 Go to previous messageGo to next message
Eclipse UserFriend
Sorry for misleading. We'll release 3.4 with Luna SR2 (Service Release 2) - February 27, 2015 [1]

Could you try latest nightly?

[1] - https://projects.eclipse.org/projects/tools.pdt/releases/3.4
Re: Eclipse can't figure out which class file an object is coming from? [message #1567927 is a reply to message #1567917] Fri, 16 January 2015 12:03 Go to previous messageGo to next message
Eclipse UserFriend
What does 3.4 refer to? I'm on 4.4.1 with SR1. I'm confused.
Re: Eclipse can't figure out which class file an object is coming from? [message #1567934 is a reply to message #1567927] Fri, 16 January 2015 12:05 Go to previous messageGo to next message
Eclipse UserFriend
Eclipse platform number is 4.4.1. But PDT (PHP Development Tools) plugin is in 3.3.1.
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 Go to previous message
Eclipse UserFriend
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?
Previous Topic:LUNA - PHP + Javascript editing problems: OSX
Next Topic:Importing files from other directories
Goto Forum:
  


Current Time: Mon Jul 14 01:31:46 EDT 2025

Powered by FUDForum. Page generated in 0.08305 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top