NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

looking up declarations doesn't work

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
themarty



Joined: 30 Aug 2011
Posts: 5

PostPosted: Tue Aug 30, 2011 9:34 am    Post subject: looking up declarations doesn't work Reply with quote

I just installed netbeans (7.0.1) and i'm giving it a try to see if i like it.

There are some things that don't work for me though. I'll put them in different topics since most forums seem to prefer that. I hope that's also the rule here.

----------

When i keep CTRL pressed and click on a variable or function name, nothing happens and after like 10 seconds i get a popup saying it's looking up the declaration and that it's a lengthy process. Is this a bug, or should i change some settings for this to perform better? I've waited as long as 5 minutes, but it just doesn't find it; even though the declarations are in the same file

I've used the search but was unable to find the answer.
Back to top
George Pitcher
Posted via mailing list.





PostPosted: Tue Aug 30, 2011 10:05 am    Post subject: looking up declarations doesn't work Reply with quote

I'm also a relatively new NB user (most of my work has been done using Dreamweaver Cool.

Control-click works for me. I'm using NB 7.0.1 on Windows 7 32-bit.

George


-----Original Message-----
From: themarty [mailto:address-removed]
Sent: 30 August 2011 10:35
To: address-removed
Subject: looking up declarations doesn't work

I just installed netbeans (7.0.1) and i'm giving it a try to see if i like it.

There are some things that don't work for me though. I'll put them in different topics since most forums seem to prefer that. I hope that's also the rule here.

----------

When i keep CTRL pressed and click on a variable or function name, nothing happens and after like 10 seconds i get a popup saying it's looking up the declaration and that it's a lengthy process. Is this a bug, or should i change some settings for this to perform better? I've waited as long as 5 minutes, but it just doesn't find it; even though the declarations are in the same file

I've used the search but was unable to find the answer.





The information in this message is intended solely for the addressee and should be considered confidential. Publishing Technology does not accept legal responsibility for the contents of this message and any statements contained herein which do not relate to the official business of Publishing Technology are neither given nor endorsed by Publishing Technology and are those of the individual and not of Publishing Technology. This message has been scanned for viruses using the most current and reliable tools available and Publishing Technology excludes all liability related to any viruses that might exist in any attachment or which may have been acquired in transit.
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Tue Aug 30, 2011 10:22 am    Post subject: looking up declarations doesn't work Reply with quote

Hi,

Dne Tuesday 30 of August 2011 11:34:36 themarty napsal(a):
Quote:
When i keep CTRL pressed and click on a variable or function name, nothing
happens and after like 10 seconds i get a popup saying it's looking up the
declaration and that it's a lengthy process. Is this a bug, or should i
change some settings for this to perform better? I've waited as long as 5
minutes, but it just doesn't find it; even though the declarations are in
the same file

should be fast especially for declarations in the same file. Could you please
report an issue [1] against php/Navigation and attach your file? We need to
reproduce your issue to be able to fix it.

Thanks,
Tomas
[1] http://netbeans.org/community/issues.html
Back to top
paolosca



Joined: 09 Sep 2010
Posts: 384

PostPosted: Tue Aug 30, 2011 10:35 am    Post subject: looking up declarations doesn't work Reply with quote

On 08/30/2011 05:34 PM, themarty wrote:
Quote:
When i keep CTRL pressed and click on a variable or function name, nothing happens and after like 10 seconds i get a popup saying it's looking up the declaration and that it's a lengthy process. Is this a bug, or should i change some settings for this to perform better? I've waited as long as 5 minutes, but it just doesn't find it; even though the declarations are in the same file

If you just imported a large project it's possible that NetBeans is not
done indexing all the files yet. Normally you would see a progress bar
at the bottom of the editor window, if no progress bar is visible you
may try to restart NetBeans to see if it works faster.

In general it should be quite fast. In example, in the project I'm
working now (which has hundreds of PHP files) the "go to declaration"
happens immediately. It may become slow sometimes if I open lots of
files and I work on them for several hours. In this case restarting
NetBeans usually does the trick.

Also, if you have folders with backup files or other stuff that it's not
needed to run the project (i.e. a DB dumps, hires images, backups of
older versions of the project, etc) you may add them to the ignored
folders list (File->Project Properties->Ignored Folders). This will
prevent NetBeans from indexing files that are not strictly part of the
project. If you need you cay still access these files from the Files panel.

Regards,

Paolo.
Back to top
themarty



Joined: 30 Aug 2011
Posts: 5

PostPosted: Tue Aug 30, 2011 10:44 am    Post subject: Reply with quote

Thanks paolo.
I have disabled the check for external changes now and that seems to make a difference.

Clicking now immediately causes an action. The only problem is that it doesn't take me to the declaration

Code:
<?php
class Test
{
   private $_test;

   public function test()
   {
      $this->doTest();
   }

   public function doTest()
   {
      $this->_test = "test running";
   }
}

class AnotherTest extends Test
{
    private $_anotherTest;

   public function anotherTest()
   {
      $this->doTest();
   }
}
?>


If i click on doTest in the line $this->doTest(); it takes me to the class declaration: when i'm inside the Test class it jumps to the line where it says class Test and when i'm inside the class AnotherTest it takes me to the line where it says class AnotherText extends Text

Am i doing something wrong?
Back to top
jingram



Joined: 25 Oct 2009
Posts: 4

PostPosted: Tue Aug 30, 2011 12:37 pm    Post subject: Reply with quote

This is also not working for me on NB 7.0.1 on MAC OS X out of the box - should I file a bug report or is there meant to be some configuration to do? It worked on Windows and I moved to Mac two days ago and doesn't work.

It's not indexing or anything from what I can see, it's just that "Go To Declaration" does not work.
Back to top
paolosca



Joined: 09 Sep 2010
Posts: 384

PostPosted: Tue Aug 30, 2011 7:06 pm    Post subject: looking up declarations doesn't work Reply with quote

On 08/30/2011 06:44 PM, themarty wrote:
Quote:
Thanks paolo.
I have disabled the check for external changes now and that seems to make a difference.
Clicking now immediately causes an action. The only problem is that it doesn't take me to the declaration

I tested the code you posted, in my Netbeans version it behaves in a
different way:

Quote:
If i click on doTest in the line $this->doTest(); it takes me to the class declaration:
when i'm inside the Test class it jumps to the line where it says class Test

It takes me to line 11: public function doTest()


Quote:
and when i'm inside the class AnotherTest it takes me to the line where it says class AnotherText extends Text

It takes me to line 11: public function doTest()


Quote:
Am i doing something wrong?

I'm not sure what the problem may be, I tried with both NetBeans 7.0.1
and NetBeans 7.1 (dev) and the result is the same.

Which version are you using?


Regards,


Paolo.
Back to top
cybd



Joined: 12 Sep 2011
Posts: 1

PostPosted: Mon Sep 12, 2011 8:08 am    Post subject: go to declaration for static methods Reply with quote

Hi. I have the same problem -- cannot go to STATIC method declaration, but it is working for common methods. Here is an example:

Code:
class MyClass {
    public static function some_func() {
       print 'hello from some func';
    }
   
    public function another_func() {
       print 'hi hihi';
       self::some_func();
    }
}

$o = new MyClass();

$o->another_func();

MyClass::some_func();


I tried to reach declaration by ctrl+click, highlight method name and then pressed ctrl+b. Nothing works for some_func(). But for another_func() and MyClass() it works well. Also it works in Netbeans 6.9.1 PHP English version.

Windows 7 32bit, Netbeans 7.0.1 PHP Russian version (Release and Development versions)

UPD:

In english version of Netbeans 7.0.1 all works well.
Back to top
David Harkness
Posted via mailing list.





PostPosted: Mon Sep 12, 2011 5:38 pm    Post subject: looking up declarations doesn't work Reply with quote

On Mon, Sep 12, 2011 at 1:08 AM, cybd <address-removed ([email]address-removed[/email])> wrote:
Quote:
$o::some_func();


Try using the proper form for calling static methods by using the class name:


Back to top
vishnunn



Joined: 16 Sep 2011
Posts: 2

PostPosted: Fri Sep 16, 2011 2:13 am    Post subject: Same problem.... Reply with quote

themarty wrote:

If i click on doTest in the line $this->doTest(); it takes me to the class declaration: when i'm inside the Test class it jumps to the line where it says class Test and when i'm inside the class AnotherTest it takes me to the line where it says class AnotherText extends Text


I am facing this exact same problem. Earlier versions used to even open the file in which the function is declared in the current project with a simple click. But now it just jumps to the starting line of the class. I have also applied the latest updates but nothing changed. Anyone found any solution to this problem?
Back to top
vishnunn



Joined: 16 Sep 2011
Posts: 2

PostPosted: Wed Oct 12, 2011 12:19 pm    Post subject: Reply with quote

Hello All,
For all those who have got problem with jumping to declarations in another class/file please try clearing the cache folder at C:\Users\<windows-user>\.netbeans\7.0\var\cache.
I was facing this problem ever since I upgraded to netbeans 7. Hope this helps someone....

Vishnu
Back to top
Artur Muszyński
Posted via mailing list.





PostPosted: Fri Oct 14, 2011 7:24 pm    Post subject: looking up declarations doesn't work Reply with quote

W dniu 2011-10-12 14:19, vishnunn pisze:
Quote:
Hello All,
For all those who have got problem with jumping to declarations in another class/file please try clearing the cache folder at C:\Users\<windows-user>\.netbeans\7.0\var\cache.
I was facing this problem ever since I upgraded to netbeans 7. Hope this helps someone....

Vishnu

BTW Petr informed that issue #196988 was fixed. I'm going to test it.

Artur
Back to top
Artur Muszyński
Posted via mailing list.





PostPosted: Fri Oct 14, 2011 11:20 pm    Post subject: looking up declarations doesn't work Reply with quote

W dniu 2011-10-14 20:30, Artur Muszyński pisze:
Quote:
BTW Petr informed that issue #196988 was fixed. I'm going to test it.

Upgrading didn't helped, so I created test app and this worked fine (I
can could derived classes in PHP Hierarchy View etc).
Then I noticed that my include belongs to another NB project, so I
opened this project alone (by changing group) and it worked fine. Then I
opened my previous project again and it works fine now. Weird.

Best Regards,

Artur
Back to top
chilicheech



Joined: 24 Mar 2010
Posts: 3

PostPosted: Wed Feb 29, 2012 10:37 pm    Post subject: Re: go to declaration for static methods Reply with quote

cybd wrote:
Code:
class MyClass {
    public static function some_func() {
       print 'hello from some func';
    }
   
    public function another_func() {
       print 'hi hihi';
       self::some_func();
    }
}

$o = new MyClass();

$o->another_func();

MyClass::some_func();


Here's what's happening with me.

If I try to go to the MyClass declaration (last line) it goes to the class declaration.
If I try to go to the some_func() declaration (last line) it goes nowhere.

Why does it find the class but not the method? If it matters, I'm using namespaces and I haven't tried it without namespaces.

My System:
Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402
System: Mac OS X version 10.6.8 running on x86_64; MacRoman; en_US (nb)
Back to top
deragoku



Joined: 15 Apr 2012
Posts: 2
Location: USA

PostPosted: Mon Apr 16, 2012 12:58 am    Post subject: Reply with quote

I should submit a bug report, or the means to do some configuration? It works in Windows and I am two days before the transfer to a Mac and does not otterbox cases work.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo